Caused by: groovy.lang.MissingPropertyException: No such property: testCase for class: Script2
I'm using below script to get the error message from test-step in listener level. I place this script under TestRunListener.afterRun def logPrefix = testCase.getName() + ': ' log.info (logPrefix + 'Number of results = ' + testRunner.getResults().size().toString()) for(result in testRunner.getResults()){ if(result.getStatus().toString() != 'PASS' ){ def failedTestStepName = result.getTestStep().getName() def logPrefixStep = logPrefix.trim() + failedTestStepName + ': ' log.error(logPrefixStep + 'TestStep "' + failedTestStepName + '" finished with the status ' + result.getStatus().toString()) for(testProperty in testCase.getTestStepByName(failedTestStepName).getPropertyList()){ if(testProperty.isReadOnly()){ log.info(logPrefixStep + 'Output property: ' + testProperty.getName() + ' = ' + testProperty.getValue()) }else{ log.info(logPrefixStep + 'Input property: ' + testProperty.getName() + ' = ' + testProperty.getValue()) } } for(message in result.getMessages()){ log.error(logPrefixStep + 'Error message: ' + message) } } } whenever running my test cases. I'm getting below error Thu Nov 21 15:32:05 UTC 2019: ERROR: com.eviware.soapui.support.scripting.ScriptException: Error in TestRunListener.afterRun com.eviware.soapui.support.scripting.ScriptException: Error in TestRunListener.afterRun at com.eviware.soapui.eventhandlers.support.DefaultSoapUIEventHandler.invoke(DefaultSoapUIEventHandler.java:31) at com.eviware.soapui.eventhandlers.support.AbstractEventHandlerMetaData.invokeHandlers(AbstractEventHandlerMetaData.java:80) at com.eviware.soapui.eventhandlers.support.AbstractEventHandlerMetaData.invokeHandlers(AbstractEventHandlerMetaData.java:61) at com.eviware.soapui.eventhandlers.impl.EventHandlersTestRunListener.afterRun(EventHandlersTestRunListener.java:36) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.notifyAfterRun(AbstractTestCaseRunner.java:360) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalFinally(AbstractTestCaseRunner.java:212) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalFinally(AbstractTestCaseRunner.java:1) at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:154) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) 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: groovy.lang.MissingPropertyException: No such property: testCase for class: Script2 at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:66) at org.codehaus.groovy.runtime.callsite.PogoGetPropertySite.getProperty(PogoGetPropertySite.java:51) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty(AbstractCallSite.java:310) at Script2.run(Script2.groovy:4) at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.run(SoapUIGroovyScriptEngine.java:94) at com.eviware.soapui.support.scripting.groovy.SoapUIProGroovyScriptEngineFactory$SoapUIProGroovyScriptEngine.run(SoapUIProGroovyScriptEngineFactory.java:83) at com.eviware.soapui.eventhandlers.support.DefaultSoapUIScript.invoke(DefaultSoapUIScript.java:42) at com.eviware.soapui.eventhandlers.support.DefaultSoapUIEventHandler.invoke(DefaultSoapUIEventHandler.java:29) ... 12 more I'm using readyAPI 3.0.Solved26KViews0likes2CommentsGetting : ERROR: Exception in request: java.net.SocketException: Connect
Hi All, Recent times I'm facingERROR: Exception in request: java.net.SocketException: Connection reset a lot. Everytime has to run 3 to 4 times to execute the API. I don't know what is the issue here? I tried couple of solution from internet but I couldn't fixed it. Any inputs to resolve this would be appreciated. Because it really kills the automation and has to run every API 3 to 4 times to get success. Tue May 05 16:51:23 UTC 2020: ERROR: Exception in request: java.net.SocketException: Connection reset Tue May 05 16:51:23 UTC 2020: ERROR: An error occurred [Connection reset], see error log for details HTTP-LOG ========= [write] I/O error: Connection has been shutdown: javax.net.ssl.SSLException: java.net.SocketException: Connection reset ERROR-LOG ========= Tue May 05 16:51:23 UTC 2020: ERROR: java.net.SocketException: Connection reset java.net.SocketException: Connection reset at java.net.SocketInputStream.read(Unknown Source) at java.net.SocketInputStream.read(Unknown Source) at sun.security.ssl.InputRecord.readFully(Unknown Source) at sun.security.ssl.InputRecord.read(Unknown Source) at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source) at sun.security.ssl.SSLSocketImpl.waitForClose(Unknown Source) at sun.security.ssl.HandshakeOutStream.flush(Unknown Source) at sun.security.ssl.Handshaker.kickstart(Unknown Source) at sun.security.ssl.SSLSocketImpl.kickstartHandshake(Unknown Source) at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source) at sun.security.ssl.SSLSocketImpl.writeRecord(Unknown Source) at sun.security.ssl.AppOutputStream.write(Unknown Source) at com.eviware.soapui.impl.wsdl.support.http.SoapUILoggingOutputStream.write(SoapUILoggingOutputStream.java:41) at org.apache.http.impl.io.SessionOutputBufferImpl.streamWrite(SessionOutputBufferImpl.java:126) at org.apache.http.impl.io.SessionOutputBufferImpl.flushBuffer(SessionOutputBufferImpl.java:138) at org.apache.http.impl.io.SessionOutputBufferImpl.flush(SessionOutputBufferImpl.java:146) at org.apache.http.impl.BHttpConnectionBase.doFlush(BHttpConnectionBase.java:177) at org.apache.http.impl.DefaultBHttpClientConnection.flush(DefaultBHttpClientConnection.java:185) at org.apache.http.impl.conn.CPoolProxy.flush(CPoolProxy.java:177) at org.apache.http.protocol.HttpRequestExecutor.doSendRequest(HttpRequestExecutor.java:240) at com.eviware.soapui.impl.wsdl.support.http.HttpClientSupport$SoapUIHttpRequestExecutor.doSendRequest(HttpClientSupport.java:498) at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:122) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:271) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:71) at com.eviware.soapui.impl.wsdl.support.http.HttpClientSupport$SoapUIHttpClient.doExecute(HttpClientSupport.java:248) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) at com.eviware.soapui.impl.wsdl.support.http.HttpClientSupport$Helper.execute(HttpClientSupport.java:593) at com.eviware.soapui.impl.wsdl.support.http.HttpClientSupport.execute(HttpClientSupport.java:661) at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.submitRequest(HttpClientRequestTransport.java:332) at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.sendRequest(HttpClientRequestTransport.java:249) at com.eviware.soapui.impl.wsdl.WsdlSubmit.run(WsdlSubmit.java:130) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Above are the errors, I'm receiving every-time.Solved17KViews0likes6CommentsError groovy.lang.MissingMethodException: No signature of method: java.lang.String.getService()
Below is my piece of automation code def getEnv = project.getEnvironmentByName(env); def wsdlInterface = project.getInterfaceAt( 0 ).getName(); def wsdlService = getEnv.getService(wsdlInterface, com.eviware.soapui.config.ServiceConfig.Type.Enum.forString("SOAP")); Getting below error when trying to get service details for my automation. . groovy.lang.MissingMethodException: No signature of method: java.lang.String.getService() is applicable for argument types: (String, com.eviware.soapui.config.ServiceConfig$Type$Enum) values: [rentalDetails_V1_1PortTypeSoap11, SOAP] at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:70) at org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaClassSite.java:46) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:148)15KViews1like1Commentgetting BUG! exception in phase 'semantic analysis' in source unit 'Script1.groovy'
Hi All. I'm working on the script library in readyAPI 2.8.0 I have a readyAPI project saved in C/soapui and I've created a folder calledGroovyLibrary inside the project folder (C/soapui/GroovyLibrary). I place my below script inside the groovyLibrary folder. package soapui .GroovyLibrary class Callee { String hello() { return "Hello world!" } def static salute( who, log ) { log.info "Hello again $who!" }} I followed the exact the way it mentioned in the below documentation https://support.smartbear.com/readyapi/docs/testing/scripts/library.html#_ga=2.210636115.718279044.1573586134-774997694.1532459669 but while executing the groovy from readyAPI; I'm getting below execption BUG! exception in phase 'semantic analysis' in source unit 'Script2.groovy' The lookup for Callee caused a failed compilaton. There should not have been any compilation from this call. How can I rectify this? anyhelp would be appreciated. Thanks.Solved15KViews0likes9CommentsTransfer step gets hanged while executing the whole test case
I'm trying to execute the whole test case. ReadyAPI gets hanged at the Transfer property step though it gets executed when it is run individually. I also tried executing the whole test case for multiple iterations, but it got hanged at the second iteration. And when I restarted the ReadyAPI and tried again, it is getting hanged at the first iteration itself. Please find the attached screenshot for reference.Solved9.2KViews0likes10Commentsorg.openqa.selenium.WebDriverException: java.net.ConnectException: Failed to connect to localhost/0:
Hi All, I'm trying to connect selenium from readyapi, I followed the same steps given in the selenium integration documentation, but I'm getting below error org.openqa.selenium.WebDriverException: java.net.ConnectException: Failed to connect to localhost/0:0:0:0:0:0:0:1:38669 Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:48' System info: host: 'ITORL464', ip: '192.168.102.6', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_181' Driver info: driver.version: FirefoxDriver error at line: 7 I'm new to this, anyhelp is appreticated. I'm using geckodriver-v0.9.0 selenium-java-3.14.Solved8.8KViews0likes1CommentError getting response;java.net.Unknown HostException
I am not getting any response for a particular api from last week . earlier It was working properly. I didn't change anything in the api. But now iam not getting any response. Getting error message like "Error Getting Respponse; Un"Unknown HostException : 11200-server-xo8.2KViews0likes4CommentsReadyAPI - Dynamic POST using .xml files or using .csv file that are saved in the directory
I am using ReadyAPI (SOAPUI) POST method. I would like to POST content from an external file. 1) In the media type drop down I select application/xml ORapplication/json 2) And in the area where we put the actual payload, I would like to use the external file path so that content of that extenral file can be read and gets Send via POST method. Is above achievable? I can see it can be done for SOAP requests as per -https://www.soapui.org/docs/data-driven-tests/using-files.html BUT i am not sure if its possible to it for REST Request for POST method. I have been googling for days but can't find a solution so any help would be much appreciated. Basically my need is that i will have a bunch of XML payloads created at the given directory which i will need to send via POST method. I know how to make it data driven using DataSource/Loop but not sure if i can send POST request that exists as an external file. I hope i have explained the question correctly. Any further questions please let me know. Thanks for your help in advance.Solved8KViews0likes9CommentsGroovy get node value
Hi, I'm writing a groovy script to read a JDBC request. I'm having a little trouble in getting the node values. <Row rowNumber="1"> <JOB_ID>1</JOB_ID> <JOB_TITLE>Public Accountant</JOB_TITLE> <MIN_SALARY>4200.00</MIN_SALARY> <MAX_SALARY>9000.00</MAX_SALARY> </Row> I want to read the elements inside the Row. getNodeValue() returns null. def groovyutils = new com.eviware.soapui.support.GroovyUtils(context) def testCase = testRunner.testCase def testStep = testCase.getTestStepByName("JDBC Request") def runner = testStep.run(testRunner, context) def response = runner.getResponseContentAsXml(); def xml = groovyutils.getXmlHolder(response); for( node in xml.getDomNodes("/Results/ResultSet/Row")) { def nodeList = node.getChildNodes() def jobid = node.getChildNodes().item(1).getNodeValue() log.info(jobid) def jobtitle = node.getChildNodes().item(2).getNodeValue() log.info(jobtitle) } Log: Wed Aug 01 00:09:36 IST 2018: INFO: null Wed Aug 01 00:09:36 IST 2018: INFO: Wed Aug 01 00:09:36 IST 2018: INFO: null Wed Aug 01 00:09:36 IST 2018: INFO: Wed Aug 01 00:09:36 IST 2018: INFO: null Wed Aug 01 00:09:36 IST 2018: INFO: I want to read each element in the Row. Help will be appreciated!!7.9KViews0likes3Comments