Can i use test listener only at specific test suite?

currently i am using this keyword before test suite run in generally.

how can i point this test listener to specific test suite only?

Hi @Gan_Jyi_Yng

In TestSuiteContext of a Test Suite Listener you can retrieve the name of the test suite, then you can check if this is the test suite you want to perform extra logic before the execution or not.

what is ’ TestSuiteContext? where can i locate it?

Please refer to the @BeforeTestSuite section, there’s a code example:

i already have the codes. the example you posted isn’t helpful, as i already completed test listener codes, but it is for all test suite in generally as i mentioned at main post.
i just wanted to know how to call different test suite.
do you understand my questions?
i have Test Suite A, B, C
i have one test listerner, but i want it run only for Test Suite A
in test listener i have “@BeforeTestSuite
my question is, can i make use of this like change it to @BeforeTestSuiteA ? so it run for test suite A only not for all test suite.


Within the Test Suite UI, you have a Script tab. You can put your logic there in the setUp() function and change the annotation @SetUp(skipped=true) to @SetUp(skipped=false).