Service Virtualization

  • 1.  not seeing a variable set with setStateValue

    Posted Jan 13, 2017 04:13 PM

    Hello,

     

    I'm looking to set a value in the Virtual HTTPS Responder. I've added a Data Protocol Filter (Scriptable Data Protocol).  I've put the code under the Process Responses tab.  After running by ITR I'm not seeing the variable value come back in the Properties section under the Responder.  Any ideas what I might be doing wrong?

     

    %beanshell%

    testExec.setStateValue("xxxGary","TEST");

     

    DevTest 8.5

     

    Thanks,

     

    Gary



  • 2.  Re: not seeing a variable set with setStateValue

    Broadcom Employee
    Posted Jan 13, 2017 08:02 PM

    The response data protocol filters are loaded in the VS Image Selection step, not the Respond step. If you add it to that step, is the property assigned?

     

    When I need to set any properties later in the process, I either add a scriptable step or I add a scriptable dataset / assertion to the step where I need the property assigned.



  • 3.  Re: not seeing a variable set with setStateValue

    Posted Jan 17, 2017 12:55 PM

    HI Rick,

     

    Thanks for replying.  It didn't work initially but I'm still playing around with that as well as setting the filter in property to  lisa.vse.respose.

     

    Gary



  • 4.  Re: not seeing a variable set with setStateValue
    Best Answer

    Posted Jan 17, 2017 01:00 AM

    change the filter in property in your scriptable data protocol to lisa.vse.response from lisa.HTTP/S Respond.rsp.