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?

Hi Elias, Hi Christian,

Am 10.03.2009 um 22:28 schrieb Christian Campo:

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..

and it can be told to collect test cases which are UITestCases and NonUITestCases. Some of those annotations are inheritable, i.e. if they are annoted with an
abstract test case all sub classes inherit the annotation.


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......
ManualTestCase, NonGatherableTestCase (marks the "all test cases" so that
it does not collect itself)

@Stefan: anything I missed ?

Almost nothing.

Tschüß,
Stefan


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>

_______________________________________________
riena-dev mailing list
riena-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/riena-dev



Back to the top