emile
9 years agoOccasional Contributor
set header in teststep by loop
Hi, I'd like to set all my teststep Hedears by looping, something like that : def testSteps = context.testCase.getTestStepList() testSteps.each{ // This block will loop through the test steps ...
- 9 years ago
Hello Emile,
I would simplify your code by using the "it" keyword withing the loop for referring to the current TestStep:
def testSteps = context.testCase.getTestStepList() testSteps.each{ try{ it.testRequest.setRequestHeaders(headers); } catch (e){} }