I have a JSR-223 script in my VSM running this line of code:
return testExec.getStateValue("lisa.vse.http.current.transaction").uri;
Works as designed in ITR mode, but when deployed on a VSE, fails with:
Script throw an exception: bsh.EvalError: Sourced file: inline evaluation of:
``return testExec.getStateValue("lisa.vse.http.current.transaction").uri;
: reflection error: bsh.ReflectError: No such field: uri :
It may have to do with different Java security settings on Devtest workstation vs the VSE environment.
You could try using testExec.getStateValue("lisa.vse.http.current.transaction").getRequestedURI() with appropriate null checks instead of .uri (in case you are on DevTest 9.5.1)
Please remember the underlying APIs can change & both .uri & testExec.getStateValue("lisa.vse.http.current.transaction").getRequestedURI() may not work in future versions.