Running problem
Well, I have this Java project structure:
src
|-- some.packages/java files
|
src-test
|--some.packages
|--config/xml & properties files
When I build the project, every file is copied into out directory:
out/production/some.packages
out/test/some.packages
out/test/config.
When I want to run a test, it first Make the project, but when it do that, the config directory is not copied into out/test, so the test don't run fine.
To get the test running fine, I have to 'Rebuild project' and uncheck the Make (before launch) option within Run dialog box.
Any idea?
请先登录再写评论。
Hi.
I tried to reproduce this bug, but failed. More notes about my test case:
1. I have created a project with the structure you have described.
2. Put JavaFileTest.java into scr-test/some.packages. This class contained the single empty method, annotated with @Test from JUnit 4 lib.
3. Inside this method done Ctrl+Shift+F10. A test configuration for the method was made, with Make = On by default.
Properties and config files were successfully copied to output.
BTW, my build is 9853. What is yours? Any more differences (maybe TestNG, a way to create run configuration)?
Alexander.
There is a bug with which the describe behavior is possible: http://www.jetbrains.net/jira/browse/IDEADEV-36915
Try to rebuild to "cure" the project.
Alexander.
Thank you very much, Alex, I didn't know there was a bug. But rebuild doesn't work, because that is what I do
to run my tests. First rebuild, then run the test without Make checkbox checked.
Also I use to compile only the modified file then run the test.
Thanks, again for your answer.