One method of the interface Test is getTestObjectClass(). It determines the class of the test object which the test is supposed to be executed on.
Class<T> getTestObjectClass();
For example, if a test should run on wiki articles, the method should be implemented like this:
public Class<Article> getTestObjectClass()
Please implement the method getDescription() in a meaningful way, return a concise description about what this test is about. It will be used to generated the documentation table of all available tests of the system, c.f. Doc CIDashboard.
String getDescription();
this.addParameter("SearchString", TestParameter.Type.Regex, TestParameter.Mode.Mandatory, SEARCH_STRING_DESCRIPTION);details about parameter definition can be looked up in the class TestParameter. The testing framework then will assert that the parameter values are specified in a consistent way and otherwise inform the user accordingly. Hence, the implementation of the test does not need to deal with error handling about the parameters.
Message execute(T testObject, String[] args, String[]... ignores) throws InterruptedException;
The message returns an object of the class Message where a verbose feedback, especially in case of failure of the test, should be provided. Make sure that the returned Message is of the correct Type which is either SUCCESS, FAILURE, or ERROR. FAILURE should be returned if the test has been executed on the test object, but did not meat the requirements checked by the test. If any kind of problems (e.g., IOExceptions, invalid parameter settings) occur that prevent an orderly execution of the test on the test object, then a message of type ERROR should be returned, including a meaningful description of the problem if possible.
For tests of computational complexity, please make sure that the following method is called within the progress of the execute-method at least any second:
{{{ Utils.checkInterrupt();}}}
That will help to do a process shutdown in an ordered manner, if a termination of the overall test run is triggered (e.g., by a user).
<extension plugin-id="d3web-Plugin-TestingFramework" point-id="Test" id="UnusedFlowTest"> <parameter id="class" value="de.d3web.tests.diaflux.UnusedFlowTest" /> <parameter id="name" value="UnusedFlow" /> <parameter id="description" value="CITest UnusedFlow" /> <parameter id="version" value="1.0" /> <parameter id="priority" value="5" /> </extension>