Eclipse Junit testing

Ask a question+
3

Hello everyone! I should test my application, which I have build in Eclipse. How can I do that?
1.create the JUnit code within the same project? or
create a separate project ?
Changeby is the name of my project - should I create a project called ChangebyTest?

Sara 290
add comment

1 Answer

1

You should keep unit tests in the same project.
Create a second source folder and put your test classes into the same packages as the classes under test.
the structure will be the following;

       -main
           -my.package
            -MyClass.java
       -test
          -my.package
            -MyClassTest.java
Sargsyan 580
add comment

Your Answer