Contributions
Re: JMS Mock - Extract Header Value from Incoming request and set in the JMS dispatch response property.
Thank you Rao. Correct, I realized it later. Have requested Smart Bear support and they got back saying they will find out what methods are needed to add the headers. will keep you posted.7 years agoPlace ReadyAPI QuestionsReadyAPI Questions4KViews0likes3CommentsRe: JMS Mock - Extract Header Value from Incoming request and set in the JMS dispatch response property.
Hi Rao, Thanks you for the response. I am using Ready API 1.9.0-m-snapshot. I tried the line of code you specified, but get the below error. Sat Jun 24 22:21:46 AEST 2017:ERROR:groovy.lang.MissingPropertyException: No such property: requestHeaders for class: com.smartbear.servicev.core.model.impl.jms.JmsMockRequest groovy.lang.MissingPropertyException: No such property: requestHeaders for class: com.smartbear.servicev.core.model.impl.jms.JmsMockRequest at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:53) at org.codehaus.groovy.runtime.callsite.GetEffectivePojoPropertySite.getProperty(GetEffectivePojoPropertySite.java:66) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:296) at Script9.run(Script9.groovy:6) at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.run(SoapUIGroovyScriptEngine.java:98) at com.eviware.soapui.support.scripting.groovy.SoapUIProGroovyScriptEngineFactory$SoapUIProGroovyScriptEngine.run(SoapUIProGroovyScriptEngineFactory.java:79) at com.eviware.soapui.impl.wsdl.mock.dispatch.ScriptMockOperationDispatcher.selectMockResponse(ScriptMockOperationDispatcher.java:97) at com.smartbear.servicev.core.model.impl.jms.JmsMockDispatcher.dispatchRequest(JmsMockDispatcher.java:90) at com.smartbear.servicev.core.engine.impl.jms.JmsVirt.regularDispatch(JmsVirt.java:68) at com.smartbear.servicev.core.engine.impl.jms.JmsVirt.regularDispatch(JmsVirt.java:1) at com.smartbear.servicev.core.engine.impl.AbstractVirt.dispatch(AbstractVirt.java:140) at com.smartbear.servicev.core.engine.impl.jms.JmsVirt.dispatch(JmsVirt.java:93) at com.smartbear.servicev.core.model.impl.jms.JmsMockDispatcher$ProducerConsumerConnectionData.onMessage(JmsMockDispatcher.java:51) at org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer.java:1404) at org.apache.activemq.ActiveMQSessionExecutor.dispatch(ActiveMQSessionExecutor.java:131) at org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor.java:202) at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:133) at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:48) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)7 years agoPlace ReadyAPI QuestionsReadyAPI Questions4KViews0likes5CommentsRe: JMS Mock - Extract Header Value from Incoming request and set in the JMS dispatch response property.
the below is a snapshot of the transaction log, with incoming messages. I have highlighted the JMS property values which I would like to capture in the incoming request and set in the response message.7 years agoPlace ReadyAPI QuestionsReadyAPI Questions4KViews0likes8CommentsRe: JMS Mock - Extract Header Value from Incoming request and set in the JMS dispatch response property.
hi Rao, the queues are configured in hermesJMS. In service V,a JMS virt was created and the JMS route, specifying hermes config, session and target was added. please find below screenshot of the this implementation in servive V.7 years agoPlace ReadyAPI QuestionsReadyAPI Questions4KViews0likes9CommentsJMS Mock - Extract Header Value from Incoming request and set in the JMS dispatch response property.
Hi, I have a mock implementation of JMS message. I am trying to capture custom header value from the incoming request into the mock and set that value in the response header of the mock response before dispatching it. Tried the below line of code. Works well for HTTP mock requests but not for JMS messages coming into the mock. def Host= mockRequest.getRequest().getHeader("Host").toString() log.info(Host) Would really appreciate if you someone could shed some light on it. ThanksSolved7 years agoPlace ReadyAPI QuestionsReadyAPI Questions4.2KViews0likes11CommentsSimulating Fixed Rate Strategy in LoadUI NG
Hi, We in the organization are new to Load UI NG and are currently trailing it out before we raise a purchase order. In Load UI NG, we are trying to simulate a fixed-rate strategy similar to the one provided in Load Test component in SoapUI PRO. Our applications are transnational based thanuser loadbased. We are used to specifying the TPS rate we want to achieve with x number of users in soapUI PRO (the tool throttles the requests per second accordingly) While I am using the fixed rate load test type inLoad UI NG, I am unable to achieve the required fixed transactional rate. The configuration for this load type is more on users and I fail to understand the necessary configuration to achieve a fixed transaction rate (I also tried with throttling the transactions using thinktime/pacing but doesn’t work) Would really be glad if someone could educate me on this. Thanks.8 years agoPlace ReadyAPI QuestionsReadyAPI Questions2.1KViews0likes1CommentRe: removeDomNodes with for Loop
Thank you for you response nmrao. soapUI structure: Datasource Original GroovyScript Modified Original Request attached is the original request.xml Groovy Script: def grUtils = new com.eviware.soapui.support.GroovyUtils(context) noAccounts = Integer.parseInt (context.expand( '${DataSource#noAccounts}' )) def fileNo = context.expand( '${DataSource#FileNumber}' ) //Copy XML content form one request to another (IDM_Original to IDM_Modified) def ts = testRunner.testCase.getTestStepByName("Original") def ts2 = testRunner.testCase.getTestStepByName("Modified") String content = ts.getHttpRequest().getRequestContent() ts2.getHttpRequest().setRequestContent(content) //Removing Account Nodes def ReqHolder2 = grUtils.getXmlHolder("Modified#Request") def count = ReqHolder2.getDomNodes('//ARCAAccountReportBatch[1]/Accounts[1]/Account').size() log.info(count) if (noAccounts <= 4) { log.info("intheloop") for (i in noAccounts+1..5) { log.info("//ARCAAccountReportBatch[1]/Accounts[1]/Account[$i]") log.info("inloop"+i) ReqHolder2.removeDomNodes("//ARCAAccountReportBatch[1]/Accounts[1]/Account[$i]") } } else { log.info("is-11") } ReqHolder2.updateProperty() //write the request and response to a file def inputFileRequest = new File("V:\\AccountCreation_XMLs\\"+ "Account_" + fileNo+".xml") def request = grUtils.getXmlHolder(context.expand( '${Modified#Request}')).getPrettyXml() inputFileRequest.write(request) //log.info(grUtils.getXmlHolder(context.expand( '${Modified#Request}')).getPrettyXml()) Modified Request: See attached modified request.xml No, the values changes everytime. The objective is to create 100+ xml request with different account size. eg..some having only 2, some having 3 etc.. Thank you.1KViews0likes0CommentsremoveDomNodes with for Loop
Hi, Below is the portion of the XML request that I am manuplating using groovy script. <Accounts> <account recordId="1"> <account recordId="2"> <account recordId="3"> <account recordId="4"> <account recordId="5"> <Accounts> Based on a value ranging from 1-5 (which I read from a file), I will have to remove the Domnodes. For eg. If the value is 3, then I will have to remove nodes 4 and 5. I have the below groovy script but what I observe is that it does not remove all the nodes as the position of the nodes change when the loop is exeuted for the first loop value. def ReqHolder2 = grUtils.getXmlHolder("Modified#Request") def count = ReqHolder2.getDomNodes('//ARCAAccountReportBatch[1]/Accounts[1]/Account').size() log.info(count) noAccounts = Integer.parseInt (context.expand( '${DataSource#noAccounts}' )) ///numeric value I read from the file for (i in noAccounts+1..count) { ReqHolder2.removeDomNodes("//ARCAAccountReportBatch[1]/Accounts[1]/Account[$i]") } ReqHolder2.updateProperty() On exeuting this (with the noAccounts = 2), I get the below updated XML request <Accounts> <account recordId="1"> <account recordId="2"> <account recordId="3"> <account recordId="5"> <Accounts> I would apprecite if anyone could help me with the solution. Thank you.1.3KViews0likes2Comments