How do you execute JUnit tests from SCTM?

0 Likes

Problem:

How do you execute JUnit tests from SCTM?

Resolution:

QUESTION
----------------------------------
How do you execute JUnit tests from SCTM?

ANSWER
----------------------------------
SilkCentral Test Manager allows the user to run JUnit tests on any properly configured machine with an Execution Server. It is important to note that SilkCentral currently only supports JUnit 3.8.1, a change in the way JUnit tests were written was introduce in JUnit 4.0 and is not supported.

To run a JUnit test from SilkCentral Test Manager create a new test definition selecting "JUnit" from the drop down. Fill in the rest of the details as you see fit.


Press "Next" which will load the JUnit Test Properties dialog. From here we define the following properties:

Test Class: The Java class which implements the JUnit functionality and contains JUnit tests to be executed.

Test Method: Enter the name of a single JUnit method to be executed.

Java home directory: Enter the directory of your JRE, do not append "\bin" as SCTM will do this for you.

Classpath: Enter the classpath required to successfully execute the JUnit tests.


Click "Finish" to save your JUnit Test Definition.

You should now be able to right click your newly created Test Defintion and perform a "Try Run Test Definition" to execute your JUnit tests.

Old KB# 24508
Comment List
Anonymous
Related Discussions
Recommended