ContributionsMost RecentMost LikesSolutionsHow to get cookies in Groovy scripts? Question How to get cookies in Groovy scripts? Answer If theSession optionis enabled, ReadyAPI maintains the HTTP session on the TestCase level automatically, which means that it storescookiesreceived from the server and sends them back in the subsequent requests to the same endpoint. If you need to get programmatic access to the stored cookies, you can use this Groovy script (it's applicable to ReadyAPI v.1.7.0 and later): import org.apache.http.protocol.HttpContext import com.eviware.soapui.model.iface.SubmitContext import org.apache.http.impl.client.BasicCookieStore import org.apache.http.client.protocol.HttpClientContext HttpContext httpContext = context.getProperty(SubmitContext.HTTP_STATE_PROPERTY) BasicCookieStore cookieStore = httpContext.getAttribute(HttpClientContext.COOKIE_STORE) //iterate through the cookies store and output the name-value pairs to the log cookieStore.getCookies().each{ log.info(it.name + "=" + it.value) } Example: How to get cookies in Groovy scripts? Hi Community, Let meshare an answer to the above question with you 🙂 If theSession optionis enabled, ReadyAPI maintains the HTTP session on the TestCase level automatically, which means that it storescookiesreceived from the server and sends them back in the subsequent requests to the same endpoint. If you need to get programmatic access to the stored cookies, you can use this Groovy script (it's applicable to ReadyAPI v.1.7.0 and later): import org.apache.http.protocol.HttpContext import com.eviware.soapui.model.iface.SubmitContext import org.apache.http.impl.client.BasicCookieStore import org.apache.http.client.protocol.HttpClientContext HttpContext httpContext = context.getProperty(SubmitContext.HTTP_STATE_PROPERTY) BasicCookieStore cookieStore = httpContext.getAttribute(HttpClientContext.COOKIE_STORE) //iterate through the cookies store and output the name-value pairs to the log cookieStore.getCookies().each{ log.info(it.name + "=" + it.value) } Example: Re: Using GraphQL without ability to point to a schema file HiMikhail, Thank you for the clarifications. I'm afraid there is no much I can suggest for testing your scenario in ReadyAPI before GraphQL introspection (and auto-updating the cached schema) is supported. I've already relayed this to the Product Team so that they could consider these GraphQL support improvements for future versions. Re: Using GraphQL without ability to point to a schema file Himogranovitch, Thank you for your interest in GraphQL support in ReadyAPI. Here are answers to your questions: 1. What you're looking for is the possibility to performintrospectionagainst the GraphQL endpoint.Currently, this is not supported by ReadyAPI and the only way to provide your GraphQL API schema to ReadyAPI is to import a GraphQL SDL file either from the local drive or from the URL (ifno authentication is required to access this file). I'll bring your interest in the introspection support to our Product Team's attention. 2. In ReadyAPI for each environment you can specify a new endpoint for your GraphQL interface as it's shown in the image below. If this is not what you're looking for, please clarify your question. Re: [SoapUIMultiThreadedHttpConnectionManager$SoapUIDefaultClientConnection] Connection closed HiRajs, SoapUI Pro 4.6.4 was released in 2014, and now it's out of support. With your current license, you can use the latest version of ReadyAPI, where I'm sure you won't be observing that issue: 1. Create backup copies of all your projects. While normally the projects should open fine in the latest version we cannot fully guarantee this when one jumps over too many versions of SoapUI Pro and ReadyAPI. 2. Download and install ReadyAPI - it should pick up your license and your current workspace automatically. If you still have any connection issues when running your tests, or any issues with your projects or license, please open a support case - our Customer Care team will be happy to help:https://support.smartbear.com/message/?prod=ReadyAPI Re: Set SSL Keystore using Groovy on Test Step level Hiashutosh, Looks like the below code line works for unsetting the keystore. You can give it a try. testRunner.testCase.testSteps['Step Name'].testRequest.setSslKeystore(new EmptyWssCrypto()) Re: soap groovy copt file - inChannel.transferTo & Files.copy( Hi JesperJ, The below code works for me. Please copy the full snippet to your Groovy Script test step, correct the file paths and try it out. import java.nio.file.Path; import java.nio.file.Paths; import java.nio.file.Files; Path source = Paths.get("C:\\Temp\\source.xlsx") Path destination = Paths.get("C:\\Temp\\destination.xlsx") Files.copy(source, destination); You can enhance it as it's described here to handle the situation when the destination file already exists in the location. Re: JDBC SQL Server Connection drops out HiPMarriott, Your question looks specific to the MS SQL driver functioning, please consider posting your question to the Microsoft forum. From what I found, this thread may be of some help:https://stackoverflow.com/questions/41021303/sql-server-jdbc-driver-cant-detect-lost-connection-quickly/43241284 Re: getting the tfs BuildNumber when running the ReadyAPI command line on Octopus Hitsmith0422, If your build agent sets environment variables in the system as Jenkins does, you should be able to access those variables from a Groovy script within ReadyAPI the same way as it's described here:https://smartbear-cc.force.com/portal/KbArticleViewer?name=How-to-get-Jenkins-environment-variables-in-ReadyAPI-when-ReadyAPI-test-is-being-ran-with-Jenkins&sp=readyapi Re: Automating Oauth2 token retrieval- 'Implicit Grant' method . Java script in auth manager failing Hi ManRam2020, The document object does not have theFindChildByXpath() method, and it cannot be added to it anyhow. Please try using the evaluate() method instead:https://developer.mozilla.org/en-US/docs/Web/API/Document/evaluate