I have a Struts 2 project with JUnit4 in eclipse Juno.
I want to run a test in one of my action classes. I use the @Test annotation for the method I want to test. So far so good.
To run the test, I right click on the action class, select Run as -> JUnit Test.
Now it appears that the build.xml, which compliles all classes, is used but once build finishes, some classes are not in the build folder so I get the ClassNotFoundException. (the console is cleared before the exception is displayed so difficult to capture see what happened).
I have 3 action classes but only 1 has .class file in the build folder. (obviously this is not the one that I want to JUnit test)
Using Project -> Clean will result in all .class files being in the build folder.
Why is Run Junit test using build.xml and why are some classes getting cleared?