Contributions
Re: tc.run() does not function in load tests
Hey, I know I'm 3 years late here, but I retested this on 5.2.1, still getting the error. Here's the solution: I managed to avoid the issue with synchonized(): def tc = testRunner.testCase.testSuite.testCases["callee"] synchronized(tc){ def runner = tc.run(null, false ) } Run a couple of times for a minute with Load Test set to Simple Strategy, 0 Test Delay and 0 Random. I got around 5mil executions per minute, zero errors. Same setup, but not synchronized, rolled off 10k rows error log in 3 seconds, getting spammed with the one you got: ERROR:groovy.lang.MissingPropertyException: No such property: context for class: Script1 Hope this helps :) Jakub9 years agoPlace ReadyAPI QuestionsReadyAPI Questions2.1KViews0likes0CommentsRe: Programmatically retrieveing SOAP request from a MockService (not from OnRequest script)
Actually, it seems I'm trying to to somthing very similar to larsn here (link doesn't seem to be working, see the post in the old forums), but the link provided there doesnt help, as it deals with the MessageExchage object in context of an assertion script. //edit with a link to old forums10 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.4KViews0likes1CommentRe: Programmatically retrieveing SOAP request from a MockService (not from OnRequest script)
Hi Rao, Unfortunately, these are not the droids we are looking for :( The link you posted describes handling the request from the MockService side. If this was possible in our environment, it would be quite easy, as the MockService provides the 'mockRequest' object directly available in the OnRequest. There are several reasons why we cannot handle requests from the mockservice: - the mockservice is not being triggered as a part of the TestCase, it's running independently - we don't know which test step will require to access the request's content, so we cannot inject it into a TestCase context from within the OnRequest Script of the MockService - we cannot create a DB which would hold the requests and responses, as it's deployed on the customer's system I've managed to access the context object of the MockService from within a TestStep script and while this wouls allow me to save each request into the context, it's not a good solution, as the context would grow really big with a large amount of requests. In short, I need to access the Request content on a MockService from within a TestStep Script, not from the OnRequest Script of the MockService. Jakub10 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.4KViews0likes2CommentsProgrammatically retrieveing SOAP request from a MockService (not from OnRequest script)
Hi guys, I'm trying to get a Request object (see the image1.png below) from a MockService. This woudln't be a problem to do if I was in the context of the running MockService, where it's easily available in the OnRequest script. However, due to the structure of our tests, I needs to access the Request object from a Script TestStep. Since it's available in the UI and I'm working directly with the object model, I believe it must be possible to do this, but even after quite thorough research of the API docs, I was unable to to achieve what I need :( I think it should be available either from the WsdlMockService or the WsdlMockRunner object (although the request list persists atfer the mock service is stopped, so MockRunner is probably a wrong direction...). Here is a code snippet which I started with: import com.eviware.soapui.impl.wsdl.WsdlTestSuite; import com.eviware.soapui.impl.wsdl.WsdlProject; import com.eviware.soapui.impl.wsdl.mock.WsdlMockService; import com.eviware.soapui.impl.wsdl.mock.WsdlMockRunner WsdlTestSuite testSuite = testRunner.runContext.testCase.testSuite; WsdlProject project = testSuite.project; WsdlMockService mockService = project.getMockServiceByName("mockServiceName"); WsdlMockRunner mockRunner = mockService.getMockRunner(); Now, I guess I should go somewhere from the "mockService" object. Do you have any idea where? Thanks :) Jakub //Edit: obviously, I need to get hold of the MessageExchange object. I'll try to go there and update if I succeed :)10 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.5KViews0likes4Comments[Res] test is run from the commandline with groovy
Hi guys, I'm writing a Setup Script for a Test Case that needs to execute different logic based on whether it's run from commandline or triggered in the UI. (UI interaction vs. dynamic ID generation, detail on this are not important ) Question is: Is there some context property (or other functionality), on which I can base the decision whether the test was triggered from the Command Line or the UI? For example, to decide if the Test Case was run as a Load Test or separately, I can use: context.getProperty("LoadTestRunner") == null I was unable to find this kind of functionality for commandline trigger Thanks, Jakub10 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.6KViews0likes3CommentsSoapUI 5.0.0-Mock Response Test Step - NoSuchMethodException
Hi Smartbears I'm creating a duplicate bug from non-pro bug forum, as I finally installed the Pro 5.0.0 version and was able to confirm, that it is also affected. (original thread: viewtopic.php?t=24311). We can keep the discussion in the original thread, I just wanted to point out, that the bug is also present in the pro version Original post: When selecting a SOAP Mock Response test step in UI, error log fills up with exceptions. Also when running a test case containing this test step, the step is not able to receive any incoming requests and whole test case hangs. The same mockservice works without a problem as a standalone mockservice in the project. I started with creating a fresh project, adding a wsdl (tested and working for all other purposes). Then I created a usual structure of a Test Suite and a Test Case. After adding a SOAP Mock Response Test Step, the error log fills with several exceptions. Stack trace: Thu May 15 10:27:36 CEST 2014:ERROR:java.lang.NoSuchMethodException: Unknown property 'handleFault' java.lang.NoSuchMethodException: Unknown property 'handleFault' at org.apache.commons.beanutils.PropertyUtilsBean.getSimpleProperty(PropertyUtilsBean.java:1122) at org.apache.commons.beanutils.PropertyUtils.getSimpleProperty(PropertyUtils.java:408) at com.eviware.soapui.support.components.JPropertiesTable$PropertiesTableModel.getValueAt(JPropertiesTable.java:277) at javax.swing.JTable.getValueAt(Unknown Source) at javax.swing.JTable.prepareRenderer(Unknown Source) at com.eviware.soapui.support.components.JPropertiesTable$PTable.prepareRenderer(JPropertiesTable.java:549) at javax.swing.plaf.basic.BasicTableUI.paintCell(Unknown Source) at javax.swing.plaf.basic.BasicTableUI.paintCells(Unknown Source) at javax.swing.plaf.basic.BasicTableUI.paint(Unknown Source) at javax.swing.plaf.ComponentUI.update(Unknown Source) at javax.swing.JComponent.paintComponent(Unknown Source) at javax.swing.JComponent.paint(Unknown Source) at javax.swing.JComponent.paintChildren(Unknown Source) at javax.swing.JComponent.paint(Unknown Source) at javax.swing.JViewport.paint(Unknown Source) at javax.swing.JComponent.paintChildren(Unknown Source) at javax.swing.JComponent.paint(Unknown Source) at javax.swing.JComponent.paintChildren(Unknown Source) at javax.swing.JComponent.paint(Unknown Source) at javax.swing.JComponent.paintChildren(Unknown Source) at javax.swing.JComponent.paint(Unknown Source) at javax.swing.JComponent.paintChildren(Unknown Source) at javax.swing.JComponent.paint(Unknown Source) at javax.swing.JComponent.paintChildren(Unknown Source) at javax.swing.JComponent.paint(Unknown Source) at javax.swing.JComponent.paintToOffscreen(Unknown Source) at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(Unknown Source) at javax.swing.RepaintManager$PaintManager.paint(Unknown Source) at javax.swing.RepaintManager.paint(Unknown Source) at javax.swing.JComponent._paintImmediately(Unknown Source) at javax.swing.JComponent.paintImmediately(Unknown Source) at javax.swing.RepaintManager$3.run(Unknown Source) at javax.swing.RepaintManager$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source) at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source) at javax.swing.RepaintManager.prePaintDirtyRegions(Unknown Source) at javax.swing.RepaintManager.access$1100(Unknown Source) at javax.swing.RepaintManager$ProcessingRunnable.run(Unknown Source) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$200(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) I get the same exception and stack trace also for these properties: Unknown property 'handleFault' Unknown property 'handleResponse' Unknown property 'forceMtom' Unknown property 'multipartEnabled' Unknown property 'encodeAttachments' Unknown property 'inlineFilesEnabled' Unknown property 'responseHttpStatus' Unknown property 'responseDelay' These properties seem to be directly related to the properties panel on the bottom left. Also when the panel is smaller and scrollable, exceptions pop up as they are being rendered when scrolling. This behavior was only observed on the 5.0.0 free (I don't know about betas and paid versions), previous versions are not affected, we successfully rolled back to 4.6.3. - paid version tested now, bug present Let me know if you need any more information Regards, Jakub10 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.4KViews0likes1Comment[R]SoapUI 5.0.0-Mock Response Test Step-NoSuchMethodExceptio
Hi guys, When selecting a SOAP Mock Response test step in UI, error log fills up with exceptions. Also when running a test case containing this test step, the step is not able to receive any incoming requests and whole test case hangs. The same mockservice works without a problem as a standalone mockservice in the project. I started with creating a fresh project, adding a wsdl (tested and working for all other purposes). Then I created a usual structure of a Test Suite and a Test Case. After adding a SOAP Mock Response Test Step, the error log fills with several exceptions. Stack trace: Thu May 15 10:27:36 CEST 2014:ERROR:java.lang.NoSuchMethodException: Unknown property 'handleFault' java.lang.NoSuchMethodException: Unknown property 'handleFault' at org.apache.commons.beanutils.PropertyUtilsBean.getSimpleProperty(PropertyUtilsBean.java:1122) at org.apache.commons.beanutils.PropertyUtils.getSimpleProperty(PropertyUtils.java:408) at com.eviware.soapui.support.components.JPropertiesTable$PropertiesTableModel.getValueAt(JPropertiesTable.java:277) at javax.swing.JTable.getValueAt(Unknown Source) at javax.swing.JTable.prepareRenderer(Unknown Source) at com.eviware.soapui.support.components.JPropertiesTable$PTable.prepareRenderer(JPropertiesTable.java:549) at javax.swing.plaf.basic.BasicTableUI.paintCell(Unknown Source) at javax.swing.plaf.basic.BasicTableUI.paintCells(Unknown Source) at javax.swing.plaf.basic.BasicTableUI.paint(Unknown Source) at javax.swing.plaf.ComponentUI.update(Unknown Source) at javax.swing.JComponent.paintComponent(Unknown Source) at javax.swing.JComponent.paint(Unknown Source) at javax.swing.JComponent.paintChildren(Unknown Source) at javax.swing.JComponent.paint(Unknown Source) at javax.swing.JViewport.paint(Unknown Source) at javax.swing.JComponent.paintChildren(Unknown Source) at javax.swing.JComponent.paint(Unknown Source) at javax.swing.JComponent.paintChildren(Unknown Source) at javax.swing.JComponent.paint(Unknown Source) at javax.swing.JComponent.paintChildren(Unknown Source) at javax.swing.JComponent.paint(Unknown Source) at javax.swing.JComponent.paintChildren(Unknown Source) at javax.swing.JComponent.paint(Unknown Source) at javax.swing.JComponent.paintChildren(Unknown Source) at javax.swing.JComponent.paint(Unknown Source) at javax.swing.JComponent.paintToOffscreen(Unknown Source) at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(Unknown Source) at javax.swing.RepaintManager$PaintManager.paint(Unknown Source) at javax.swing.RepaintManager.paint(Unknown Source) at javax.swing.JComponent._paintImmediately(Unknown Source) at javax.swing.JComponent.paintImmediately(Unknown Source) at javax.swing.RepaintManager$3.run(Unknown Source) at javax.swing.RepaintManager$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source) at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source) at javax.swing.RepaintManager.prePaintDirtyRegions(Unknown Source) at javax.swing.RepaintManager.access$1100(Unknown Source) at javax.swing.RepaintManager$ProcessingRunnable.run(Unknown Source) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$200(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) I get the same exception and stack trace also for these properties: Unknown property 'handleFault' Unknown property 'handleResponse' Unknown property 'forceMtom' Unknown property 'multipartEnabled' Unknown property 'encodeAttachments' Unknown property 'inlineFilesEnabled' Unknown property 'responseHttpStatus' Unknown property 'responseDelay' These properties seem to be directly related to the properties panel on the bottom left. Also when the panel is smaller and scrollable, exceptions pop up as they are being rendered when scrolling. This behavior was only observed on the 5.0.0 free (I don't know about betas and paid versions), previous versions are not affected, we successfully rolled back to 4.6.3. Let me know if you need any more information Regards, Jakub10 years agoPlace ReadyAPI QuestionsReadyAPI Questions2.6KViews0likes2CommentsRe: [Resolved] Retrieveing request content from MockService
Hi Marcus, After some experimenting, blood and tears, I figured out that this was indeed a namespace issue in xpath. "requestContent.getNodeValue("//EndDeviceAssets:arg")" did the trick Both import com.eviware.soapui.support.XmlHolder; XmlHolder requestContent = new XmlHolder(mockRequest.requestContent); log.info(requestContent.getNodeValue("//EndDeviceAssets:arg")); and def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context ) def requestContent = groovyUtils.getXmlHolder( mockRequest.requestContent ) log.info requestContent.getNodeValue("//EndDeviceAssets:arg") work as expected ans return "somestring" from my request. Thanks for help, we can resolve the thread Jakub11 years agoPlace ReadyAPI QuestionsReadyAPI Questions4.1KViews1like0Comments