Validate in test hooks which test case folder is running


I just wanted to ask if it is possible to verify if the test case folder is running/active in test listener?


Is this what you’re asking for?

def beforeTestCase(TestCaseContext testCaseContext) {
  println testCaseContext.testCaseId

Hi @aldrine.reynon

What do you mean by active ? Are you looking for a sign that something happened in a test case (URL navigated, an object clicked ?)

In which case you can do something like this in the test case:

// Something happens
GlobalVariable.somethingHappened = true 

Can I get the test case folder name and store it in GlobalVariable?

GlobalVariable.testCaseFolderName = true
GlobalVariable.testCaseFolderName = 'staging'

Something like this