Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [riena-dev] TestCollector - How does it work?

Rougly spoken (and Stefan Liebig can explain that a lot better) we wanted to make sure that no testcase is overseen. So Testcases are now annotated with an Annotation on the class level and then we have Testcases like AllTests on certain package levels that pick up all class (in the same bundle) and are derived from TestCase and have a refering TestCase.

So a class with the annotation
@UITestCase

is picked up by the collector below. The collector can also be told to only collect testcase from a certain package or a package and all packages below that..

Finally there is a testcase that no testcase has no annotation and therefore this "CheckForOverseenTestCase" would fail.

We have TestCollectors for UITestCases, NonUITestCases and other categories......

@Stefan: anything I missed ?

christian
Am 10.03.2009 um 20:24 schrieb Elias Volanakis:

Noticed this (see below) in org.eclipse.riena.internal.ui.ridgets.swt today and I'm just curious:

How does it work? Is there some convention I must use (naming, annotation) when writing new tests, so they get automagically added to the suite?

:-)

public class AllTests extends TestCase {

	@SuppressWarnings("unchecked")
	public static Test suite() {
return TestCollector .createTestSuiteWith(Activator.getDefault().getBundle(), AllTests.class.getPackage(),
				UITestCase.class);
	}
}


Thanks for the info,
Elias.
<ATT00001.c>



Back to the top