Project
IntelliJ IDEA
Priority
Normal
Type
Bug
Fix versions
No Fix versions
State
Fixed
Assignee
Anna Kozlova
Subsystem
Project Configuration
Affected versions
No Affected versions
Fixed in build
108.65  
  • Created by   Kevin Lawrence
    6 years ago (02 Nov 2005 22:24)
  • Updated by   root
    2 years ago (17 Jan 2010 20:24)
  • Jira: IDEADEV-11206
    (history, comments)
 
IDEA-30494 Default for Current directory should be module root NOT project root
0
Issue is visible to: All Users
  The issue is visible to the selected user group only
When you run a JUnit test (for example bu right clicking a test method and choosing RUN TEST), IDEA uses the root directory of the Project as the CWD. This is almost always wrong. It should use the root of the module which contains the test.

This is much more annoying than it sounds because it means you have to create a custom configuration every time you run a test. If you forget, the test fails for mysterious reasons because it looks for files in the wrong place.

You can change the default CWD setting for the project but this does not help if you have multiple modules in a project that interact with the file system.

Environment: Windows XP

Issue was resolved
Comments (1)
 
History
 
Linked Issues (?)
 
Anna Kozlova
  Anna Kozlova
23 Oct 2007 19:36
4 years ago
Use $MODULE_DIR$ macros in default configuration settings. It would expand into module root directory.