_@JoinSuite
Description
- Group test classes with this annotation so that you can run a group of test classes as a 'suite' from the command line.
Attributes
Attribute Name | Required? | Possible Values | Info |
---|---|---|---|
name | Yes |
|
|
Location in the test class file
Before the class declaration.
CLI Command Syntax
- Enclose the name of the test suite you are running with square brackets.
- e.g.,
test [myTestSuite]
Examples
Test class #1 has some @JoinSuite
annotations.
Â
@JoinSuite(name:'bucket_v2')
@JoinSuite(name:'aud')
@JoinSuite(name:'pnd')
@Database(id: 'qpt_pet', modes: ['tgt'])
class bucket_subheader_aud
{
@BeforeTest
setVariables()
{
...
Â
And so does test class #2. But only 'bucket_v2
' matches a suite in test class #1.
Â
@JoinSuite(name:'bucket_v2')
@JoinSuite(name:'stg')
@Database(id: 'qpt_pet', modes: ['tgt', 'src'])
class stg_post_process
{
@Test
bkt_subheader_stg_bucket_valid()
{
...
Â
When test suite 'aud
' is run from the command line, only one test class is run, because only one test class is annotated for the 'aud
' suite.
Â
userme > te [aud] Processing [3] tests class [default].bucket_subheader_aud ------------------------------------------- 1/3 .run_test Passed P[1] 2/3 .columnsLoadInOrder Passed P[2] 3/3 .DeleteSQLTest Passed P[3] Tests run: 3, Successes: 3, Time elapsed: 42.289 sec
Â
When test suite 'bucket_v2
' is run from the command line, two test classes are run, because each is annotated for the 'bucket_v2
' suite.
Â
userme > te [bucket_v2] Processing [6] tests class [default].stg_post_process ----------------------------------------------- 1/6 .bkt_subheader_stg_bucket_valid Passed P[1] 2/6 .bkt_detail_stg_bucket_valid Passed P[2] 3/6 .bkt_payment_stg_bucket_valid Passed P[3] class [default].bucket_subheader_aud ------------------------------------------- 4/6 .run_test Passed P[4] 5/6 .columnsLoadInOrder Passed P[5] 6/6 .DeleteSQLTest Passed P[6] Tests run: 6, Successes: 6, Time elapsed: 65.45 sec
Â