Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

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
nameYes
  • A string
  • Provide an easy-to-remember test suite name.

Location in the test class file

Before the class declaration.

Examples

Test class #1 has some @JoinSuite annotations.

 

@JoinSuite Example 1

@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 Example 2

@JoinSuite(name:'bucket_v2')

@JoinSuite(name:'stg')

@Database(id: 'qpt_pet', modes: ['tgt', 'src'])

class stg_post_process

{

@Test

bkt_subheader_stg_bucket_valid()

{

...

 

 

Run test suite 'aud'
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.

 

Run test suite 'bucket_v2'
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

 

  • No labels

0 Comments

You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.