Difference between revisions of "Species Discovery Plugin Test Suite"

From Gcube Wiki
Jump to: navigation, search
(Created page with 'The Species Discovery Plugin Testsuite is a java library for the testing and the checking of the functionality offered by a Species Discovery plugin. The test suite offers diffe…')
 
(No difference)

Revision as of 14:14, 22 November 2012

The Species Discovery Plugin Testsuite is a java library for the testing and the checking of the functionality offered by a Species Discovery plugin.

The test suite offers different sets of test to run over a plugin.

Here some examples of testsuite use:

	//instantiate the plugin to test
	ObisPlugin obisPlugin = new ObisPlugin();
 
	//start the TestSuite creation for the specified plugin
	TestSuiteBuilder builder = TestSuiteBuilder.create(obisPlugin);
 
	//we want to load the plugin configuration from the IS in the /gcube/devsec scope
	builder.runtimeResourceFromIS(GCUBEScope.getScope("/gcube/devsec"));
 
	//the suite will use the specified scientific name and common name sets
	builder.withScientificNameSet(ScientificNameSet.SHORT).withCommonNameSet(CommonNameSet.SHORT);
 
	//we require to run the ScanTest group
	builder.addScanTest();
 
	//the test suite should save the test report into a file
	builder.reportToFile();
 
	//finally we build the test suite...
	TestSuite testSuite = builder.build();
 
	//...and run it
	testSuite.run();