Forum Discussion

francisbrochu's avatar
francisbrochu
Occasional Contributor
8 years ago

Is there a way to add a line in Transaction Log tab when using run() ?

Hi, 

 

In my Groovy scripts, I like to rename my Test Step so I can verify quickly what have failed directly by looking the Test Step name in the Transaction Log tab when I execute my Test Case.

 

However, when I call other test steps via my Groovy script and use the run() command instead of gotoStep() I don't have a line in my Transaction Log tab. Is there a way to add a line in Transaction Log tab when using run() ?

 

Currently with run() I do :

 

testStep = testRunner.testCase.getTestStepAt(2)
testStep.setName("Script validation for ID :" + context.ID_FORM)
testStep.run(testRunner,context)

5 Replies

  • nmrao's avatar
    nmrao
    Champion Level 3
    You want to log?

    did you try:
    log.info "log statement goes here with variable value is ${variable}"
    • francisbrochu's avatar
      francisbrochu
      Occasional Contributor

      Yes, but I want a trace in the Transaction log tab, not in the Script log.

       

      When I generate a report, I see the transaction logs, not the script logs in the report.