Child pages
  • Testing-JUnit and TestNG
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Testing with JUnit and the similar TestNG

Minor configuration in eclipse

To be able to test your business objects layer in JUnit test cases, you should set the following parameters in your test case/test suite launch configuration :
First in the "Arguments" tab, set your working directory to the build product of your project. For example, for a framework project the working directory should be :

${workspace_loc:MyEclipseProject/build/MyEclipseProject.framework} 

For an application it should be (using the handy wolips_dir_loc variable)

${working_dir_loc_WOLips:MyEcliseProject}

Then, in the classpath tab, select the "User Entries" entry and use the "Advanced..." button and select the "Add Folders" button.

Select the "Java" folder of your build product.
Use the "Up/Down" buttons to move this folder at the first position of your classpath.

Be Careful

If during your tests execution you see error messages such as cannot cast EOGenericRecord to <your object> please check that the "Java" folder is at first position in your classpath entries.

  • No labels