Contributions
- 1.3KViews0likes0Comments
Re: How to know which teststep is running?
Basically, i want to identify and get the XML test request step name from the series of steps in that test cases. I can store the step as you said, but still i have to store more than 5 step names for a single run (as this is my configuration, based on my requirement) and this will again confuse me to get the name of XML request name (as if we hard coded). So i am looking for, is there any way that i can get the previously executed XML test request name using Groovy? (there could be lots of request executed for single run, but have to identify the XML test request step name). Please help me.1.3KViews0likes0CommentsRe: How to know which teststep is running?
I got you. but in some cases, i will have series of steps to be executed and series of steps to be disabled. please find below example. i have a test case like below. TestCase1 ---1-Groovy Script ---1-TestRequest ---1-ConditionalGoTo ---1-PropertyTransfer ---2-Groovy Script ---2-TestRequest ---2-ConditionalGoTo ---2-PropertyTransfer ---Groovy Validation Step here, as i said before, for some test case, i will be disabling the series of steps i.e; from above, steps starts with '1- ...' and will run the steps starts with '2- ...'. so at this point of time, i have to know which TestRequest is run at this time, so that i can do validation based on that in the Groovy Validation Step. For this, from this case, more test steps are run ( '1- ...'), but i need to specifically get the name of the XML request step (here '1-TestRequest'). The reason behind is, i have lots of test steps inside my test case (based on my requirement). so i have to do in the above manner and i am looking this solution to get the executed test request name. Could you please help me, is there any ways that i can get from Groovy code?1.3KViews0likes0CommentsRe: How to know which teststep is running?
It just gives the step name as 'Groovy Step'. But what i need is, for one of my test case, i will be running 'Test Request 2' and at the same time my other two test requests will be disabled. So at this point of time, Test Request 1 and 3 will be in disabled mode, Test Request 2 will be in enabled mode and it was the one executed. Now once after executing the request, it comes to groovy step and here i need to get the name of the executed test request (i.e; immediate previous executed test step name. for eg, I should get the name as 'Test Request 2'). how should i get that? Please help me.1.3KViews0likes0CommentsHow to know which teststep is running?
Hi, I have set of test steps(Test Request Steps) inside a test case as below and one groovy step. Based on my input from excel, i run a particular request step and at the same time, i will disable all other request steps on the same run. In groovy step, i do some validation based on the executed test step (request step). How can i get the test step name of the executed test step on each time or for each run from the Groovy step? Can anyone help me. Test Case1 Test Request 1 Test Request 2 Test Request 3 Groovy Step1.7KViews0likes7CommentsHow to get the total characters available in XML response
Hi, Is there anyway that i can get the total size and total string length (total no of characters in the XML response) of the response through Groovy? I have a test which displays response xml which has more than 33,000 characters. When i try to write my result in the excel file, it throws error. So i want to do a validation before writing in excel, such that if my response xml has more than 25,000 characters, i need to skip my writing. Please help me on this.1.6KViews0likes3CommentsTest Suite pass, but getting error
Hi, I have setup test suite with groovy. My suite will run by taking data from excel and execute and write the results in the same excel. After execution i see my test suite is Passed with green color in all test steps. Transaction is properly done in backend too. But at last in the 'soapui log' and in 'error log' i see the below message. CAn anyone help me what could be the problem. Thu Aug 22 12:59:40 EDT 2013:ERROR:groovy.lang.MissingMethodException: No signature of method: java.io.File.close() is applicable for argument types: () values: [] Possible solutions: list(), list(java.io.FilenameFilter), use([Ljava.lang.Object;), use(java.lang.Class, groovy.lang.Closure), use(java.util.List, groovy.lang.Closure), collect(groovy.lang.Closure) groovy.lang.MissingMethodException: No signature of method: java.io.File.close() is applicable for argument types: () values: [] Possible solutions: list(), list(java.io.FilenameFilter), use([Ljava.lang.Object;), use(java.lang.Class, groovy.lang.Closure), use(java.util.List, groovy.lang.Closure), collect(groovy.lang.Closure) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:54) at org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaClassSite.java:46) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120) at Script1.run(Script1.groovy:23) at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.run(SoapUIGroovyScriptEngine.java:96) at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase.runTearDownScript(WsdlTestCase.java:882) at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.internalFinally(WsdlTestCaseRunner.java:175) at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.internalFinally(WsdlTestCaseRunner.java:39) at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:163) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)1.2KViews0likes1Comment