SOAPUI TestRunner test case count and runner (teardown) test case count mismatch
Hi, Structure and flow of Project TestSuite Test Case 1 Test Step (REST request) Test Case 2 Test Step (REST Request) Test Step (Groovy script) (this script will call and execute Test Case 3 based on condition, test case 3 will be disabled state, if condition pass it will enable test case and execute and again it will be disabled Test Case 3 Test Step (REST Request) Problem Statement : If we execute above TestSuite via 'SOAPUI-TestRunner', number of test case executed count is correct, in our sample case : Total Test case count : 4 (which is correct, since test case 3 got executed twice via groovy script (Test Case 1 + Test case 2 + Test case 3 + Test Case 3), but if we try to get total Test case executed count from teardown its showing as 'Test case count : 2 Teardown script not considering test cases which got executed via groovy script Attached snapshots for reference Any help or support would be great, thanks3.4KViews0likes7CommentsIs there a way I can input a specific value what will only run tests with that value
Hey Folks, I'm wanting to input a specific value before running my tests that will allow me to only run tests that have that specific value in the Datasource. Would I be able to do this in TestRunner under Global/System/Project Properties? Each test has multiple iterations I would want to skip the iterations that don't contain the variable that has been inputed. I imagine that this could be done with a Groovy script inserted into each step but I need to know what to specify the value to be ran. Many thanks!Solved2.1KViews0likes5CommentsSecurity Tests within Docker
Hello, Is there a way to run Security Tests in a Docker container? We are currently running our SoapUI tests (ReadyAPI 2.7) in a Docker container as a part of our CI/CD pipeline, but cannot find an option to run the Security TestRunner within the container, since it appears to default to tesrunner.sh. Given the Security Tests are within a suite within the SoapUI Pro project, how might we include running these tests within the container? Thanks, GregSolved1.1KViews0likes1Commentjava.lang.RuntimeException: Unable to refresh expired access token.
Hi all. I am trying to Automate the REST APIs (Services) that uses User Level Token Authentication using using Groovy Script and TestRunner.bat file in SoapUI. Groovy Script: where I am generating and hitting the request. NOTE: The below are passed as parameters to this method. strTestStepName, strPathforResp, profilename, respTimepath try { def authContainer = testRunner.testCase.testSuite.project.OAuth2ProfileContainer def profileName = context.expand( '${#Project#profileName}' ) def authProfile = authContainer.getProfileByName(profilename) def oAuthClientFacade = new OltuOAuth2ClientFacade() oAuthClientFacade.requestAccessToken(authProfile) Thread.sleep(1000) def accessToken = authProfile.getAccessToken() log.info accessToken def validate = testRunner.runTestStepByName(strTestStepName); resptime(validate,respTimepath); def httpResponseHeaders = context.testCase.testSteps[strTestStepName].testRequest.response.responseHeaders def strhttpStatus = httpResponseHeaders["#status#"].toString() strResponseXML = testRunner.testCase.testSteps[strTestStepName].testRequest.response.getContentAsString(); strResponseXML = strResponseXML.trim(); log.info strResponseXML fWriteToFile(strPathforResp+".txt",strResponseXML) //--> Writing Response to Local for Further validations } catch(Exception e) { log.info e.message; } The User Token is generated without any issues when I try it manually. But, when I try to run/generate the User Level Token via Groovy Script with TestRunner.bat, I am getting inconsistent Errors - Please see below. Instance#1: Error 2017-08-17 20:45:21,909 INFO [OAuth2RequestFilter] The access token has expired, trying to refresh it. 2017-08-17 20:45:22,586 ERROR [WsdlSubmit] Exception in request: java.lang.RuntimeException: Unable to refresh expired access token. 2017-08-17 20:45:22,587 ERROR [SoapUI] An error occurred [Unable to refresh expired access token.], see error log for details 2017-08-17 20:45:22,589 ERROR [errorlog] java.lang.RuntimeException: Unable to refresh expired access token. java.lang.RuntimeException: Unable to refresh expired access token. at com.eviware.soapui.impl.wsdl.submit.filters.OAuth2RequestFilter.reloadAccessToken(OAuth2RequestFilter.java:140) at com.eviware.soapui.impl.wsdl.submit.filters.OAuth2RequestFilter.filterRestRequest(OAuth2RequestFilter.java:68) at com.eviware.soapui.impl.wsdl.submit.filters.AbstractRequestFilter.filterAbstractHttpRequest(AbstractRequestFilter.java:41) at com.eviware.soapui.impl.wsdl.submit.filters.AbstractRequestFilter.filterRequest(AbstractRequestFilter.java:33) at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.sendRequest(HttpClientRequestTransport.java:172) at com.eviware.soapui.impl.wsdl.WsdlSubmit.run(WsdlSubmit.java:119) at com.eviware.soapui.impl.wsdl.WsdlSubmit.submitRequest(WsdlSubmit.java:79) at com.eviware.soapui.impl.rest.RestRequest.submit(RestRequest.java:192) at com.eviware.soapui.impl.wsdl.teststeps.RestTestRequestStep.run(RestTestRequestStep.java:794) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.runTestStep(AbstractTestCaseRunner.java:211) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.runTestStepByName(AbstractTestCaseRunner.java:200) at com.eviware.soapui.model.testsuite.TestCaseRunner$runTestStepByName.call(Unknown Source) 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 Script1.fRunandAPICResponse(Script1.groovy:113) at Script1$fRunandAPICResponse.callCurrent(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:49) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:153) at Script1.run(Script1.groovy:58) at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.run(SoapUIGroovyScriptEngine.java:92) at com.eviware.soapui.impl.wsdl.teststeps.WsdlGroovyScriptTestStep.run(WsdlGroovyScriptTestStep.java:141) at com.eviware.soapui.model.testsuite.TestStep$run.call(Unknown Source) 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:120) at Script1.run(Script1.groovy:7) at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.run(SoapUIGroovyScriptEngine.java:92) at com.eviware.soapui.impl.wsdl.teststeps.WsdlGroovyScriptTestStep.run(WsdlGroovyScriptTestStep.java:141) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.runTestStep(AbstractTestCaseRunner.java:211) at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.runCurrentTestStep(WsdlTestCaseRunner.java:47) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:138) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:46) at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:129) at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.start(AbstractTestRunner.java:77) at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase.run(WsdlTestCase.java:595) at com.eviware.soapui.tools.SoapUITestCaseRunner.runTestCase(SoapUITestCaseRunner.java:565) at com.eviware.soapui.tools.SoapUITestCaseRunner.runRunner(SoapUITestCaseRunner.java:397) at com.eviware.soapui.tools.AbstractSoapUIRunner.run(AbstractSoapUIRunner.java:204) at com.eviware.soapui.tools.AbstractSoapUIRunner.run(AbstractSoapUIRunner.java:139) at com.eviware.soapui.tools.AbstractSoapUIRunner.runFromCommandLine(AbstractSoapUIRunner.java:114) at com.eviware.soapui.tools.SoapUITestCaseRunner.main(SoapUITestCaseRunner.java:120) Caused by: org.apache.oltu.oauth2.common.exception.OAuthSystemException: org.apache.http.client.ClientProtocolException at org.apache.oltu.oauth2.httpclient4.HttpClient4.execute(HttpClient4.java:119) at org.apache.oltu.oauth2.client.OAuthClient.accessToken(OAuthClient.java:65) at org.apache.oltu.oauth2.client.OAuthClient.accessToken(OAuthClient.java:55) at com.eviware.soapui.impl.rest.actions.oauth.OAuth2TokenExtractor.refreshAccessToken(OAuth2TokenExtractor.java:192) at com.eviware.soapui.impl.rest.actions.oauth.OltuOAuth2ClientFacade.refreshAccessToken(OltuOAuth2ClientFacade.java:72) at com.eviware.soapui.impl.wsdl.submit.filters.OAuth2RequestFilter.reloadAccessToken(OAuth2RequestFilter.java:119) ... 42 more Caused by: org.apache.http.client.ClientProtocolException at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:822) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:732) at org.apache.oltu.oauth2.httpclient4.HttpClient4.execute(HttpClient4.java:103) ... 47 more Caused by: org.apache.http.auth.MalformedChallengeException: Authentication challenge is empty at org.apache.http.impl.auth.RFC2617Scheme.parseChallenge(RFC2617Scheme.java:71) at org.apache.http.impl.auth.AuthSchemeBase.processChallenge(AuthSchemeBase.java:115) at org.apache.http.impl.auth.BasicScheme.processChallenge(BasicScheme.java:89) at org.apache.http.impl.client.DefaultRequestDirector.processChallenges(DefaultRequestDirector.java:1183) at org.apache.http.impl.client.DefaultRequestDirector.handleResponse(DefaultRequestDirector.java:1078) at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:482) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820) ... 50 more Instance#2: Error 2017-08-17 17:37:26,559 INFO [log] 2017-08-17 17:37:27,229 WARN [HttpClientSupport$SoapUIHttpClient] Authentication error: Unable to respond to any of these challenges: {bearer=WWW-Authenticate: Bearer} It would help if anyone could assist me in resolving this (or) let me know if there are any workarounds for this issue Note: Due to Security Reasons I cannot share the API details/project files here.1.7KViews0likes0CommentsReceiving JVM error in jenkins when using testrunner.bat
Team, We are doing Continuous Integration with Jenkins by using SoapUI NG TestRunner. Daily 50 plus jobs are running in it. At times, we could see the below error in the job log, ------------------------------------------------------------------------------- The process cannot access the file because it is being used by another process. C:\Users\...\AppData\Local\Temp\jfxrtpath The process cannot access the file because it is being used by another process. The process cannot access the file because it is being used by another process. C:\Users\...\AppData\Local\Temp\readyxmx The process cannot access the file because it is being used by another process. Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit. Invalid maximum heap size: -Xmx Build step 'Execute Windows batch command' marked build as failure Recording test results readyapi.bat had -Xmx2048m. Not sure what caused this issue. We believe, it is not following any patterns , it occurs randomly for some jobs. Please suggest solution for this issue and let us know, if you need any further details.Solved4.8KViews0likes7CommentsIO Error: Unknown host specified in TestRunner Execution
Hello, We have some Test Steps that make use of JDBC connections in SoapUI. For our Oracle database we use a tnsnames.ora file to manage the hosts and connections. I did have some initial problems getting that to work with SoapUI. But finally got it after updating some things in the vmoptions fileand moving the odbc driver into<Install Directory>\SmartBear\ReadyAPI-1.6.0\bin\ext. It works fine now. However, I noticed when we try to run the tests from the cmd line or Test Runner they fail. How can I configure SoapUI to know that the hosts are there? Just making a simple connection step and running a query here. Sample from the error log: 09:35:58,004 ERROR [SoapUI] An error occurred [IO Error: Unknown host specified ], see error log for details 09:35:58,005 ERROR [errorlog] java.sql.SQLRecoverableException: IO Error: Unknown host specified java.sql.SQLRecoverableException: IO Error: Unknown host specified at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:517) at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:557) at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:233) at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:29) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:556) at com.eviware.soapui.support.GroovyUtils$DriverProxy.connect(GroovyUtils.java:150) at java.sql.DriverManager.getConnection(Unknown Source) at java.sql.DriverManager.getConnection(Unknown Source) at com.eviware.soapui.support.jdbc.JdbcUtils.initConnection(JdbcUtils.java:67) at com.eviware.soapui.impl.wsdl.panels.teststeps.JdbcSubmit.getDatabaseConnection(JdbcSubmit.java:188) at com.eviware.soapui.impl.wsdl.panels.teststeps.JdbcSubmit.prepare(JdbcSubmit.java:214) at com.eviware.soapui.impl.wsdl.panels.teststeps.JdbcSubmit.runQuery(JdbcSubmit.java:171) at com.eviware.soapui.impl.wsdl.panels.teststeps.JdbcSubmit.run(JdbcSubmit.java:145) at com.eviware.soapui.impl.wsdl.panels.teststeps.JdbcSubmit.<init>(JdbcSubmit.java:77) at com.eviware.soapui.impl.wsdl.panels.teststeps.JdbcRequest.submit(JdbcRequest.java:133) at com.eviware.soapui.impl.wsdl.teststeps.JdbcRequestTestStep.run(JdbcRequestTestStep.java:203) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.runTestStep(AbstractTestCaseRunner.java:251) at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.runCurrentTestStep(WsdlTestCaseRunner.java:50) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:161) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:1) at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:127) at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.start(AbstractTestRunner.java:73) at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase.run(WsdlTestCase.java:673) at com.eviware.soapui.impl.wsdl.WsdlTestCasePro.run(WsdlTestCasePro.java:96) at com.eviware.soapui.impl.wsdl.WsdlTestCasePro.run(WsdlTestCasePro.java:85) at com.smartbear.ready.cmd.runner.SoapUITestCaseRunner.runTestCase(SoapUITestCaseRunner.java:633) at com.smartbear.ready.cmd.runner.pro.SoapUIProTestCaseRunner.runTestCase(SoapUIProTestCaseRunner.java:237) at com.smartbear.ready.cmd.runner.SoapUITestCaseRunner.runRunner(SoapUITestCaseRunner.java:430) at com.smartbear.ready.cmd.runner.pro.SoapUIProTestCaseRunner.runRunner(SoapUIProTestCaseRunner.java:98) at com.smartbear.ready.cmd.runner.AbstractSoapUIRunner.run(AbstractSoapUIRunner.java:257) at com.smartbear.ready.cmd.runner.AbstractSoapUIRunner.runFromCommandLine(AbstractSoapUIRunner.java:160) at com.smartbear.ready.cmd.runner.pro.SoapUIProTestCaseRunner.init(SoapUIProTestCaseRunner.java:82) at com.smartbear.ready.cmd.runner.pro.SoapUIProTestCaseRunner.main(SoapUIProTestCaseRunner.java:78) Caused by: oracle.net.ns.NetException: Unknown host specified at oracle.net.resolver.HostnameNamingAdapter.resolve(HostnameNamingAdapter.java:188) at oracle.net.resolver.NameResolver.resolveName(NameResolver.java:130) at oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java:413) at oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:882) at oracle.net.ns.NSProtocol.connect(NSProtocol.java:267) at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1625) at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:365)Solved18KViews0likes10CommentstestRunner.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.6KViews0likes3CommentsGetting Http 400 Bad Request response while running TestRunner
I am getting this error while running a testsuite using the Launch TestRunner option. SoapUIMultiThreadedHttpConnectionManager$SoapUIDefaultClientConnection] Receiving response: HTTP/1.1 400 Bad Request. There are 5 test steps. Out of 5 test steps, the 1st step runs fine and then I get this message for the rest of the steps.1.5KViews0likes3CommentsHow to enable TLSv1.2 for Testrunner
I have configured the vmoption file. Its working fine when i trigger request directly using play button. But while same testcase fails when I ran through Testrunner with SSLhandshake error. Please let me know if there is any configuration to be done Testrunner to support tlsv1.2Solved5.6KViews0likes2Comments