How to use context.report in output custom tool

kram_soatestkram_soatest Posts: 14

Hi,

I am doing some custom validations. I added extenstion tool as an output to response. How can I make the custom tool failure with a error message which I can see in the report while running using cli
For eg in extension tool I have a condition
If a==1
Result pass
Else
Result fail with message “a is not 1”
I tried adding context.report(“a is not 1) in the else part but no luck

Best Answer

Answers

  • benken_parasoftbenken_parasoft Posts: 488 ✭✭✭

    I tried adding context.report(“a is not 1) in the else part but no luck

    The "report" method from com.parasoft.api.ScriptingContext sounds like what you want and it does work. See what I recently posted here:
    Print Message in Quality Task

    Providing an example might make it easier for someone to help you identify what you might be missing. You might have some other error or problem in your script, for example. You might also consider asking Parasoft Support if you need a timely resolution.

Sign In or Register to comment.