vijayk1Occasional ContributorJoined 7 years ago11 Posts3 LikesLikes received2 SolutionsView All Badges
ContributionsMost RecentMost LikesSolutionsRe: how to send request response to readyapi report using groovy response= testRunner.testCase.getTestStepByName("TestStep name").getPropertyValue("Response") parsedResponse = new JsonSlurper().parseText(response) def X=parsedResponse.TESTValue // value you need to assert or check assert (X == '1234' ) : response // this will post complete response in report prajakta Hope this help. Re: how to disable caching at readyAPI end? We are under discussion with dev team regarding server side/proxy caching. But as of now after more debugging, we found that postman is adding temporary header ("Cache-Control":"no-cache"). After adding "Cache-Control":"no-cache" for GET in readyAPI its working fine. We'll update once we get final confirmation from Dev. Thanks, vijayk1 how to disable caching at readyAPI end? Hi All, I'm getting error while running test via ReadyAPI, it seems readyAPI is checking its local cache and not hitting server. In response header I'm getting different value for Age Header (which means response is old one) Here is My test: 1) create some item 2) get item 3) delete item 4) delay of 8 sec 5) get item (this is getting positive response) please find response header for my GET request below: ( response header for step no 2) HTTP/1.1 200 Date: Wed, 15 May 2019 10:53:47 GMT Content-Type: application/json;charset=UTF-8 Transfer-Encoding: chunked Connection: Keep-Alive Age: 0 (Response header for step no 5) HTTP/1.1 200 Date: Wed, 15 May 2019 10:53:47 GMT Content-Type: application/json;charset=UTF-8 Transfer-Encoding: chunked Connection: Keep-Alive Age: 8 When checking via POSTMAN its working fine. Response from POSTMAN: Date →Wed, 15 May 2019 10:53:56 GMT Content-Length →0 Connection →Keep-Alive Age →0 Please let me know how to disable local cache in ReadyAPI. ( Checked with readyAPI version 2.5, 2.6 and 2.7) Thanks, VijayK1 SolvedRe: Tags not working via cmd line after updating to readyAPI 2.6.0 Hello, Yes you have two option. 1) Go back to previous readyAPI which you were using (which we did to avoid any new issue). 2) Download maintenance build of ReadyAPI 2.6.0 ( https://support.smartbear.com/downloads/readyapi/maintenance) Hope that help. Thanks, Vijayk1 Re: how to send request response to readyapi report using groovy nmrao Thanks. assert (X == 'X' ) : response This did the job. Thanks for help Regards, Vijay how to send request response to readyapi report using groovy Hi Team, I have a project which can be run on two endpoints and few request have different response. Currently I'm executing Request and based on endpoint I've put assertion using groovy. I've put log.info to print failure cause but I'm unable to write log.info into final junit type report, i'm only getting like below: ----------------- Messages ------------------------------ Assertion failed: assert false error at line: 46 how can I write requets and response in report or log.info in final report? SolvedRe: How to Execute Test Cases parallel Correct if I'm wrong. You want LibTestsuite to execute 1st sequentially then Testcasessuite as parallel. If this is case then you can do: Set Project RunType as Sequential (LibTestsuite should be present above Testcasessuite) --------Project set as sequential in Setup Script of project level---- import com.eviware.soapui.model.testsuite.TestSuite.TestSuiteRunType project.setRunType(TestSuite.TestSuiteRunType.SEQUENTIAL) --------LibTestsuite set as sequential in Setup Script of LibTestsuite level---- import com.eviware.soapui.model.testsuite.TestSuite.TestSuiteRunType testSuite.setRunType(TestSuite.TestSuiteRunType.SEQUENTIAL) --------Testcasessuite set as sequential in Setup Script of Testcasessuite level---- import com.eviware.soapui.model.testsuite.TestSuite.TestSuiteRunType testSuite.setRunType(TestSuite.TestSuiteRunType.PARALLEL) Hope thats what you are looking for. Regards, Vijay Re: Property transfer from response of one request to another request Sorry I dont know how to parse Soap Envelope. But below code can work (i checked based on your soap response) import groovy.util.XmlSlurper response= testRunner.testCase.getTestStepByName("Source Request Name").getPropertyValue("Response") String parsedResponse = new XmlSlurper().parseText(response) String IdValue = parsedResponse.toString().substring(349,355) You can try changing substring range or work for better Soap XML parser Regards, Vijay Re: How to Execute Test Cases parallel use below groovy in Setup Script for your testsuite (use SEQUENTIAL for sequential) import com.eviware.soapui.model.testsuite.TestSuite.TestSuiteRunType testSuite.setRunType(TestSuiteRunType.PARALLEL ) log.info testSuite.getRunType() If you want your testsuites to be executed parallel use below groovy in Project->Setup Script project.setRunType(TestSuite.TestSuiteRunType.PARALLEL ) log.info project.getRunType() Re: Property transfer from response of one request to another request use groovy to parse request and save IdValue. then use ${#TestSuite#IdValue} in request xml. Hope below groovy code can work for you. import groovy.util.XmlSlurper response= testRunner.testCase.getTestStepByName("Source Request Name").getPropertyValue("Response") parsedResponse = new XmlSlurper().parseText(response) String IdValue=parsedResponse.ReceiptId.IdValue testRunner.testCase.testSuite.setPropertyValue("IdValue",IdValue) <ReceiptId idOwner="ABC"> <IdValue name="ReceiptID">${#TestSuite#IdValue}</IdValue> </ReceiptId> Regards, Vijay