Connection timeout when connecting to mongo db through groovy script through open source soap ui
I have been trying to connect to mongodb using the following groovy script through open source soap UI. I have already plaved gmongo 1.5 jar and mongo java driver jar 3.10.1 in soap ui lib folder. I use soap ui 5.3.0 version. Mongo db version is 3.6 I have added SSL settings in preferences, included truststore file. ------------------------------------------------------------------------------------- import com.gmongo.GMongo import com.mongodb.BasicDBObject import com.mongodb.DB import com.mongodb.DBCollection import com.mongodb.DBCursor import com.mongodb.* import com.mongodb.MongoException def javaMongo = new MongoClient(new MongoClientURI("mongodb://<username>:<password>@server:port/env?ssl=true&replicaSet=XXX")) def db = javaMongo.getDB('XXX') def table = db.getCollection("XXX"); def query = new BasicDBObject("XXX", "XX") def cursor = table.find(query) try { while(cursor.hasNext()) { log.info cursor.next() } } finally { cursor.close() } -------------------------------------------------------------------------------- But I get the following error : com.mongodb.MongoTimeoutException: Timed out after 30000 ms while waiting for a server that matches com.mongodb.client.internal.MongoClientDelegate$1@7ff24094. Client view of cluster state is {type=REPLICA_SET, servers=[{address=XXX:XXX, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketWriteException: Exception sending message}, caused by {javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No subject alternative names matching IP address XXXXX found}, caused by {java.security.cert.CertificateException: No subject alternative names matching IP address XXXXXX found}}] error at line: 25 I have tried using this script as well: ------------------------------------------------------------------ @Grab('com.gmongo:gmongo:1.5') import com.gmongo.GMongoClient import com.mongodb.MongoCredential import com.mongodb.ServerAddress import com.mongodb.BasicDBObject import com.mongodb.* ENV = 'XXX' def global_config = [ stage: [ database: 'XXX', username: 'XXXX', password: 'XXXX', server: 'XXXX', port: XXX ] ] def config = global_config[ENV]; def credential = MongoCredential.createMongoCRCredential(config.username, config.database, config.password as char[]) def mongo = new GMongoClient(new ServerAddress(config.server, config.port), [ credential ]) def db = mongo.getDB(config.database) log.info db def collection1 = db.getCollection("XXXXX") log.info collection1.find().first() -------------------------------------------------------------------- This gives me the following exception: com.mongodb.MongoTimeoutException: Timed out after 30000 ms while waiting to connect. Client view of cluster state is {type=UNKNOWN, servers=[{address=XXXX:XX, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketReadException: Exception receiving message}, caused by {java.net.SocketException: Connection reset}}] error at line: 31 Have also included changes in testrunner.bat file: set java_opts=%java_opts% -dsoapui.https.protocols=TLSv1,TLSv1.2,SSLv3 set JAVA_OPTS=%JAVA_OPTS% -Dsoapui.browser.disabled="true" Added this in vmoptions file: -Dsoapui.https.protocols=SSLv3,TLSv1.2 -Dsun.security.ssl.allowUnsafeRenegotiation=true Also imported truststore file in the project level, WS-Security Configurations tab. Inspite of all these changes, I see the connection issue. Please help me in resolving the errors and help in connecting to the db.Solved16KViews0likes1CommentUnexpected token in Groovy Scripting.
My agenda is to create a greeting() method inside the HelloWorld class using Eclipse and want to use the same method in Soap UI open source by importing that jar file. Steps I've followed: 1. Created simple program in Java (This is the only class present in the Java Project) 2. Exported the complete Java Project as runnable jar and placed */bin/ext folder and restarted Soap UI 3. Below is the code from Soap UI Groovy editor. 4. When I try to the program from Soap UI, getting the following error. Is there any step that I missed? Would be grateful if anyone could help :)12KViews0likes5Commentsparsing json via Groovy in soapui
The JSON Data is a response of a rest service(list_files) {"Files": [ {"filepath": "input/file_29112017d.csv"}, {"filepath": "input/file_29112017d.log"}, {"filepath": "input/file_29112017d.ini"}, {"filepath": "output/file_29112017d.xml"}, {"filepath": "output/file_29112017d.csv.trc"} ]} The goal is to get the path of csv file and not *csv.trc. Also the order of response varies with each test runs i.e $.Files[*].filepath[0] does not yield always input/file_29112017d.csv This doesn't work either import static com.jayway.jsonpath.JsonPath.parse def response = context.expand( '${list_files#Response}' ) //log.info response gives correctly def csvpath= parse(response).read('$.Files[?(@.filepath =~ /.*csv/i)]') log.info csvpath the error is Wed Nov 29 17:06:54 CET 2017:ERROR:java.lang.IllegalArgumentException: Unsupported operator = java.lang.IllegalArgumentException: Unsupported operator = at com.jayway.jsonpath.internal.filter.eval.ExpressionEvaluator.eval(ExpressionEvaluator.java:65) at com.jayway.jsonpath.internal.filter.ArrayEvalFilter.isMatch(ArrayEvalFilter.java:90) at com.jayway.jsonpath.internal.filter.ArrayEvalFilter.filter(ArrayEvalFilter.java:69) at com.jayway.jsonpath.internal.filter.PathTokenFilter.filter(PathTokenFilter.java:50) at com.jayway.jsonpath.JsonPath.read(JsonPath.java:255) at com.jayway.jsonpath.internal.JsonReader.read(JsonReader.java:103) at com.jayway.jsonpath.internal.JsonReader.read(JsonReader.java:97) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoCachedMethodSite.invoke(PojoMetaMethodSite.java:189) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116) at Script12.run(Script12.groovy:5) at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.run(SoapUIGroovyScriptEngine.java:90) at com.eviware.soapui.impl.wsdl.teststeps.WsdlGroovyScriptTestStep.run(WsdlGroovyScriptTestStep.java:141) at com.eviware.soapui.impl.wsdl.panels.teststeps.GroovyScriptStepDesktopPanel$RunAction$1.run(GroovyScriptStepDesktopPanel.java:250) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)Solved11KViews0likes3CommentsPOIXMLTypeLoader Error when trying to write to XLSX file
I have been trying to develop a groovy script to write to an xlsx fiel and I am trying to use APache POI to do that. I have attached my script (I have played around with every variation of this that I can think of, so it not very pretty right now). I have also included all Apache POI files in the lib folder for ReadyAPI and I have checked my buildpath and deleted any old references and any old version of the POI jars. I still keep getting the following error after everything I have tried. Error: Tue Apr 09 15:32:51 MST 2019: ERROR: org.apache.poi.ooxml.POIXMLException: Could not initialize class org.apache.poi.ooxml.POIXMLTypeLoader org.apache.poi.ooxml.POIXMLException: Could not initialize class org.apache.poi.ooxml.POIXMLTypeLoader at org.apache.poi.ooxml.POIXMLFactory.createDocumentPart(POIXMLFactory.java:66) at org.apache.poi.ooxml.POIXMLDocumentPart.read(POIXMLDocumentPart.java:657) at org.apache.poi.ooxml.POIXMLDocument.load(POIXMLDocument.java:180) at org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:282) at org.apache.poi.xssf.usermodel.XSSFWorkbookFactory.createWorkbook(XSSFWorkbookFactory.java:88) at org.apache.poi.xssf.usermodel.XSSFWorkbookFactory.createWorkbook(XSSFWorkbookFactory.java:116) at org.apache.poi.xssf.usermodel.XSSFWorkbookFactory$createWorkbook.call(Unknown Source) at Script1.run(Script1.groovy:19) at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.run(SoapUIGroovyScriptEngine.java:98) at com.eviware.soapui.support.scripting.groovy.SoapUIProGroovyScriptEngineFactory$SoapUIProGroovyScriptEngine.run(SoapUIProGroovyScriptEngineFactory.java:83) at com.eviware.soapui.impl.wsdl.teststeps.WsdlGroovyScriptTestStep.run(WsdlGroovyScriptTestStep.java:158) at com.eviware.soapui.impl.wsdl.panels.teststeps.GroovyScriptStepDesktopPanel$RunAction$1.run(GroovyScriptStepDesktopPanel.java:331) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at org.apache.poi.xssf.usermodel.XSSFFactory.createDocumentPart(XSSFFactory.java:56) at org.apache.poi.ooxml.POIXMLFactory.createDocumentPart(POIXMLFactory.java:63) ... 14 more Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.apache.poi.ooxml.POIXMLTypeLoader at org.apache.poi.xssf.model.ThemesTable.<init>(ThemesTable.java:86) ... 20 more10KViews0likes1CommentHow to resolve the error “java.lang.Exception: TestCase [TestCase] failed without assertions"
Hi, Thanks in advance I am running soap ui testsuite it is working fine, I have created groovy and java in soapui assertion if timeout or service gives any error it will send email alert, while running the testsuite it is sending mail if the service is giving any error or read timeout. But I am trying same thing through “Launch TestRunner” it is not working and giving below mentioned errors. Please help to resolve this issue soapui project has been attached. Error: Running SoapUI TestRunner for [CustomerService-Testing] directory: C:\Program Files\SmartBear\SoapUI-5.0.0\bin\. command: cmd.exe /C testrunner.bat -sCustomerServiceTestSuite -cCustomerServiceTestCase C:\Users\sairam\Desktop\Testingjobs\CustomerService-Testing-soapui-project.xml SoapUI 5.0.0 TestCase Runner Configuring log4j from [C:\Program Files\SmartBear\SoapUI-5.0.0\bin\soapui-log4j.xml] 21:55:19,709 INFO [DefaultSoapUICore] initialized soapui-settings from [C:\Users\sairam\soapui-settings.xml] 21:55:22,805 INFO [WsdlProject] Loaded project from [file:/C:/Users/sairam/Desktop/Testingjobs/CustomerService-Testing-soapui-project.xml] 21:55:24,552 INFO [SoapUITestCaseRunner] Running SoapUI tests in project [CustomerService-Testing] 21:55:24,553 INFO [SoapUITestCaseRunner] Running TestCase [CustomerServiceTestCase] 21:55:24,581 INFO [SoapUITestCaseRunner] Running SoapUI testcase [CustomerServiceTestCase] 21:55:24,605 INFO [SoapUITestCaseRunner] running step [Test Request] 21:55:25,117 ERROR [WsdlSubmit] Exception in request: java.net.SocketTimeoutException: Read timed out 21:55:25,118 ERROR [SoapUI] An error occurred [Read timed out], see error log for details 21:55:25,146 INFO [SoapUITestCaseRunner] Assertion [SOAP Response] has status UNKNOWN 21:55:25,147 INFO [SoapUITestCaseRunner] Assertion [Schema Compliance] has status UNKNOWN 21:55:25,147 INFO [SoapUITestCaseRunner] Assertion [Not SOAP Fault] has status UNKNOWN 21:55:25,147 INFO [SoapUITestCaseRunner] Assertion [Script Assertion] has status UNKNOWN 21:55:25,148 ERROR [SoapUITestCaseRunner] Test Request failed, exporting to [C:\Program Files\SmartBear\SoapUI-5.0.0\bin\CustomerServiceTestSuite-CustomerServiceTestCase-Test_Request-0-FAILED.txt] 21:55:25,150 ERROR [SoapUITestCaseRunner] Error saving failed result: java.io.FileNotFoundException: C:\Program Files\SmartBear\SoapUI-5.0.0\bin\CustomerServiceTestSuite-CustomerServiceTestCase-Test_Request-0-FAILED.txt (Access is denied) java.io.FileNotFoundException: C:\Program Files\SmartBear\SoapUI-5.0.0\bin\CustomerServiceTestSuite-CustomerServiceTestCase-Test_Request-0-FAILED.txt (Access is denied) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.<init>(Unknown Source) at java.io.FileOutputStream.<init>(Unknown Source) at java.io.PrintWriter.<init>(Unknown Source) at com.eviware.soapui.tools.SoapUITestCaseRunner.afterStep(SoapUITestCaseRunner.java:725) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.runTestStep(AbstractTestCaseRunner.java:251) at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.runCurrentTestStep(WsdlTestCaseRunner.java:52) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:152) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:47) at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:139) at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.start(AbstractTestRunner.java:81) at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase.run(WsdlTestCase.java:645) at com.eviware.soapui.tools.SoapUITestCaseRunner.runTestCase(SoapUITestCaseRunner.java:602) at com.eviware.soapui.tools.SoapUITestCaseRunner.runRunner(SoapUITestCaseRunner.java:399) at com.eviware.soapui.tools.AbstractSoapUIRunner.run(AbstractSoapUIRunner.java:162) at com.eviware.soapui.tools.AbstractSoapUIRunner.runFromCommandLine(AbstractSoapUIRunner.java:93) at com.eviware.soapui.tools.SoapUITestCaseRunner.main(SoapUITestCaseRunner.java:119) 21:55:25,154 INFO [SoapUITestCaseRunner] Finished running SoapUI testcase [CustomerServiceTestCase], time taken: 517ms, status: FAILED 21:55:25,155 INFO [SoapUITestCaseRunner] TestCase [CustomerServiceTestCase] finished with status [FAILED] in 517ms 21:55:25,155 ERROR [SoapUITestCaseRunner] java.lang.Exception: TestCase [CustomerServiceTestCase] failed without assertions 21:55:25,156 ERROR [SoapUI] An error occurred [TestCase [CustomerServiceTestCase] failed without assertions ], see error log for details java.net.SocketTimeoutException: Read timed out at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(Unknown Source) at java.net.SocketInputStream.read(Unknown Source) at org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:149) at org.apache.http.impl.io.SocketInputBuffer.fillBuffer(SocketInputBuffer.java:110) at org.apache.http.impl.io.AbstractSessionInputBuffer.readLine(AbstractSessionInputBuffer.java:264) at org.apache.http.impl.conn.DefaultResponseParser.parseHead(DefaultResponseParser.java:98) at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:252) at org.apache.http.impl.AbstractHttpClientConnection.receiveResponseHeader(AbstractHttpClientConnection.java:281) at org.apache.http.impl.conn.DefaultClientConnection.receiveResponseHeader(DefaultClientConnection.java:247) at org.apache.http.impl.conn.AbstractClientConnAdapter.receiveResponseHeader(AbstractClientConnAdapter.java:219) at com.eviware.soapui.impl.wsdl.support.http.HttpClientSupport$SoapUIHttpRequestExecutor.doReceiveResponse(HttpClientSupport.java:147) at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:125) at org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:633) at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:454) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754) at com.eviware.soapui.impl.wsdl.support.http.HttpClientSupport$Helper.execute(HttpClientSupport.java:247) at com.eviware.soapui.impl.wsdl.support.http.HttpClientSupport.execute(HttpClientSupport.java:362) at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.submitRequest(HttpClientRequestTransport.java:324) at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.sendRequest(HttpClientRequestTransport.java:237) at com.eviware.soapui.impl.wsdl.WsdlSubmit.run(WsdlSubmit.java:127) at com.eviware.soapui.impl.wsdl.WsdlSubmit.submitRequest(WsdlSubmit.java:80) at com.eviware.soapui.impl.wsdl.WsdlRequest.submit(WsdlRequest.java:242) at com.eviware.soapui.impl.wsdl.teststeps.WsdlTestRequestStep.run(WsdlTestRequestStep.java:419) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.runTestStep(AbstractTestCaseRunner.java:239) at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.runCurrentTestStep(WsdlTestCaseRunner.java:52) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:152) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:47) at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:139) at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.start(AbstractTestRunner.java:81) at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase.run(WsdlTestCase.java:645) at com.eviware.soapui.tools.SoapUITestCaseRunner.runTestCase(SoapUITestCaseRunner.java:602) at com.eviware.soapui.tools.SoapUITestCaseRunner.runRunner(SoapUITestCaseRunner.java:399) at com.eviware.soapui.tools.AbstractSoapUIRunner.run(AbstractSoapUIRunner.java:162) at com.eviware.soapui.tools.AbstractSoapUIRunner.runFromCommandLine(AbstractSoapUIRunner.java:93) at com.eviware.soapui.tools.SoapUITestCaseRunner.main(SoapUITestCaseRunner.java:119) java.lang.Exception: TestCase [CustomerServiceTestCase] failed without assertions at com.eviware.soapui.tools.SoapUITestCaseRunner.throwFailureException(SoapUITestCaseRunner.java:535) at com.eviware.soapui.tools.SoapUITestCaseRunner.runRunner(SoapUITestCaseRunner.java:437) at com.eviware.soapui.tools.AbstractSoapUIRunner.run(AbstractSoapUIRunner.java:162) at com.eviware.soapui.tools.AbstractSoapUIRunner.runFromCommandLine(AbstractSoapUIRunner.java:93) at com.eviware.soapui.tools.SoapUITestCaseRunner.main(SoapUITestCaseRunner.java:119)6.3KViews0likes1CommentHow to retrieve response of Test Step from one TestCase to another TestCase with groovy script ?
Here I want to retrieve "mul" Teststep response from "MulipleTestCase" and want to use this response in" Divide TestCase". def groovyUtils= new com.eviware.soapui.support.GroovyUtils(context) def teststep=context.testCase.testSuite.getTestCaseAt(1).getTestStepByName("mul") def response=groovyUtils.getXmlHolder("mul#Response") But I got an exception error "Unexpected Element:CDATA.."Solved5.8KViews0likes1CommenttestRunner.testCase.getTestStepByName("my").setPropertyValue("id","42") not working in script ...
Hello, I tried to write a groovy script an to set values of a testrequest, and to excecute that afterwards. It looks like this: testRunner.testCase.getTestStepByName("my").setPropertyValue("id", "42") def whatis = testRunner.testCase.getTestStepByName("my").getPropertyValue( "id" ) log.info "Value of id by testRunner.testCase.getPropertyValue: "+whatis testRunner.runTestStepByName("my") The result in the log gives Value of id by testRunner.testCase.getPropertyValue: null where I expected it to be 42, so also running "my" is not possible since it has no property values Where is the problem? I don`t see where and what is going wrong? Thanks, P.S. "my" looks like this: <soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:ilUserAdministration"> <soapenv:Header/> <soapenv:Body> <urn:addGroup soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <id xsi:type="xsd:string">?</id> </urn:addGroup> </soapenv:Body> </soapenv:Envelope>Solved5.6KViews0likes3CommentsJsonSlurplerGetting Error while Parsing the Json Response
I tried tocreate a groovy script to parse the JSON response to a variable using JsonSlurper. Though the response Json is in valid format, i am getting an error def responseContent = testRunner.testCase.testSteps["Neme fof the test step"].testRequest.response.contentAsString def Response = new JsonSlurper().parseText(responseContent) log.info Code Could some one please look into this issue provide me a workaround for this. Thanks in advance5KViews0likes20CommentsGroovy script for database manipulation using project property
I want to execute simple delete query with the schema nametaken from project properties, but I am not sure how to pass the value to it, current way doesn't work for me. import groovy.sql.Sql import com.eviware.soapui.support.GroovyUtils.* def dbURL = context.expand('${#Project#MSSQLUrl}') def dbUser = context.expand('${#Project#MSSQLUser}') def dbPass = context.expand('${#Project#MSSQLPassword}') def dbDriver = context.expand('${#Project#MSSQLDriver}') def dbschema1 = context.expand('${#Project#Schema1}') def dbschema2 = context.expand('${#Project#Schema2}') com.eviware.soapui.support.GroovyUtils.registerJdbcDriver(dbDriver) log.info (dbschema1) //logsEMP_SCHEMA def sql = Sql.newInstance(dbURL, dbUser, dbPass, dbDriver) sql.execute("DELETE FROM ['$dbschema1'].[dbo].[JOB] WHERE EMPNAME = 'NAME1'"); //doesnt work,com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object name ''EMP_SCHEMA'.dbo.JOB'. error at line: 14 sql.execute("DELETE FROM [EMP_SCHEMA].[dbo].[JOB] WHERE EMPNAME = 'NAME1'"); //works Dont know how to pass the schema value to SQL querySolved3.8KViews0likes9CommentsUsing context parameter in Request Authorization
Hi, I am currently building a Test Case in which I use scripts to parse the response body of a few REST API Call Test Steps. 1. I create a user: POST /user/signup. 2. I log in with the created user: POST /user/login ( response body contains a JWT token that I want to use as Authorization in the following API Calls ) 3. I parse the token with the following script: import groovy.json.JsonSlurper responseContent = testRunner.testCase.getTestStepByName("POST User Login").getPropertyValue("response") jsonParser = new JsonSlurper().parseText(responseContent) context.JWTToken = jsonParser.token log.info ("Token in context: " + context.JWTToken) The token correctly logs in the log.info (line 5 of the script), so it is valid and stocked as a context variable. 4. I want to create a product: POST /products . This API Call needs a valid JWT to suceed, so I want to pass my stocked context.JWTToken as the value of the the Access Token. It doesn't work and I would gladly like to get some help on how to make it work. I also tried: ${context.JWTToken} ; context.JWTToken ; JWTToken ; ${=JWTToken} ; ${JWTToken} Thank youSolved3.7KViews1like2Comments