https://issues.apache.org/bugzilla/show_bug.cgi?id=54109

          Priority: P2
            Bug ID: 54109
          Assignee: [email protected]
           Summary: JSR223TestElement : SampleResult properties should be
                    set before entering script to allow user setting
                    different code
          Severity: enhancement
    Classification: Unclassified
                OS: All
          Reporter: [email protected]
          Hardware: All
            Status: NEW
           Version: 2.8
         Component: Main
           Product: JMeter

Currently JSR223Sampler calls these methods after script has been executed:
result.setSuccessful(true);
            result.setResponseCodeOK();
            result.setResponseMessageOK();
            if (ret != null){
                result.setResponseData(ret.toString(), null);
            }


This does not allow script to set:
- Different response code than 200
- Different message
- And response data is overriden by ret.toString()

I think this should be changed, JSR223Sampler should call these before calling
script and script would be able to change that.

It could break existing script that set these values to non successful ones and
make assertions fails so a jmeter property could be introduced although I am
not in favor of this as I think in fact scripts that do that are wrong and it
is hidden currently.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to