Search This Blog

Wednesday, October 7, 2009

XStudio 1.0: Automatically create the default testcase

In some specific cases, the notion of testcase is useless. For instance a JUnit test will match one test class. This test class can run several methods which could be identified to testcases. The problem is that it is impossible to run only one single method within a JUnit class (using the console runner JUnitCore).

However, without testcase, XStudio will not execute anything. So, the user would need to create one fake testcase for each test. Hence, the launcher would ignore the testcase index, would execute the test including all its methods, retrieve the results, traces etc. and store all this in the fake testcase. But creating a default testcase manually for each test is a bit painful and unnecessary from a user point of view.

In these cases, the launcher can now call (i.e. in the initialize() method) the method setDefaultTestcaseMustBeCreated(true). This will automatically create a default testcase at runtime if no testcase exist.

No comments:

Post a Comment