header
header
Main Menu
Home
Eviware Store
Downloads
Products
News
Forum
Eviware Blog
Search
FAQs
Customer Area
Support
Documentation
Tutorials
CookBook
Downloads
Forum
Login Form
Welcome, Guest. Please login or register.
October 14, 2008, 02:51:55 pm
Username: Password:
Login with username, password and session length

Forgot your password?
 
Latest posts of: Shashi
Welcome, Guest. Please login or register.
October 14, 2008, 02:51:55 pm
Home Help Search Login Register
News: The Forums are up! Welcome to eviware.

  Show Posts
Pages: [1]
1  soapUI / soapUI / Unable to read the response in groovy script test step on: June 02, 2008, 09:53:53 pm
hello,

I have a datasource step followed by a request followed by a script step.

I want to run the script against the response to read some node values

def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
def holder = groovyUtils.getXmlHolder( "stageMove_RountingPair_Request.requestContent" )


def mesLotName = holder.getNodeValue("//ax21:mesLotName")

But I get NullPointerexception

It is not saying which object is null.

could someone please tell me what am I doing wrong?

Thanks
- Shashi
2  soapUI / soapUI / Re: How to read parent and child nodes in groovy? on: May 06, 2008, 11:16:10 pm
Thanks for the reply. It is working perfectly as expected.
- Shashi
3  soapUI / soapUI / How to read parent and child nodes in groovy? on: May 06, 2008, 12:13:31 am
Hello,

I have a response like this

<ax21:stageset>
   <ax21:name>
   <ax21:type>
</ax21:stageset>
<ax21:fabstageset>
   <ax21:name>
   <ax21:type>
</ax21:fabstageset>

Can some one please help me giving me leads to code the groovy assertion to get the child elements based on its parent?

Example, I need value of name under the first parent node that is ax21:stageset.

In my current script i am doing

def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )

def name = holder.getNodeValue("//ax21:name")

this gets me the last one it reads. Is there a way to specify the parent.name like stageset.name or fabstageset.name?

Thanks in advance!
- Shashi

4  soapUI / soapUI / Difference in running testrunner standalone or from within the tool on: May 02, 2008, 12:33:02 am
I want to understand the difference in running the soap ui test runner.bat from command line or from Test Maker versus running it from within the Soap UI tool.

The reason is, I have script assertions which writes the results to a log file. It creates the log file which I run the test case from within the tool. but when I invoke it from command line or from test maker tool, it does not execute the script assertion and does not produce the file.
5  soapUI / soapUI / Re: Will Soap UI no pro version and pro verison work together on a single box wh on: April 14, 2008, 09:51:54 pm
java.lang.NoClassDefFoundError: com/eviware/soapui/tools/SoapUITestCaseRunner

It is not able to load the SoapUITestCaseRunner class
6  soapUI / soapUI / Will Soap UI no pro version and pro verison work together on a single box when ? on: April 14, 2008, 06:46:42 pm
I have both SOAP ui non pro version and the pro version with trail license.

I get NoClassDefFoundError while invoking testrunner.bat from cmd line while using no pro version and I get System could not find the path specified while using pro version.

Could this be caused by both existing together?

my invoking statement from ant script is

${SOAPUI_PATH}\testrunner.bat -e ${WS_URL}/LotDTOService -r -f D:\INCA_AUTO -c &quot;MES_Lot_TestCase&quot; D:\INCA_AUTO\INCA_SVR8_Proj-soapui-project#trial.xml

SOAPUI_PATH is set to the bin directory of soap ui
WS_URL is the WSDL URL

7  soapUI / soapUI / Re: Reading test data from into datasource and to feed that to the test case on: April 01, 2008, 07:31:47 pm
I was reading a tutorial on Soap ui pro where we could create properties on response and create a transfer to transfer the value of the properties from the response to the property. that link also had a data source loop to be created to get the properties for all the requests posted to the service.

I am trying to parse out the response to get some specific values from the response. Initial thought was to save the response a files and to write a java program to parse the response. But for testing maintainability is a bug thing with this approach.

Is this configurable in soap ui pro by using properties and transfers? Is yes, can someone tell me how?
8  soapUI / soapUI / Re: Reading test data from into datasource and to feed that to the test case on: March 31, 2008, 07:16:10 pm
I have this resolved now. I had to change the order if the test steps (I was not aware the order matters)

Now I have the responses saved for all the requests. The idea is to write programs to extract information to have test results compared with expected results.

Thanks for all the information Ole and I will use the groovy site as I will be writing more and more of that.

9  soapUI / soapUI / Re: Reading test data from into datasource and to feed that to the test case on: March 31, 2008, 06:16:53 pm
I have outFile.close() right after I write the response to the file. It is not able to capture the responses.

Instead if I out the same script as a script assertion, it is able to write the response to the file. But the draw back is I get only one file with the last request and response. I need to save all the responses.

I want to try some try catch and finally block to handle to this situation where I can force things a bit. for that, I need some help with Groovy scripting. Can anyone point me to a good source on Groovy where I can see the usage of the scripting language and also some examples?

Thanks
- Shashi
10  soapUI / soapUI / Re: Reading test data from into datasource and to feed that to the test case on: March 28, 2008, 11:57:03 pm
Hello,

I am able to save the response into the file. I was able to do this with the assertions as well. I have moved the assertion to a test step now.

But the file comes out empty. Could it be the problem where the file object is still not closed completely and the next request is trying to access the same object?

Thanks
- Shashi
11  soapUI / soapUI / Re: Reading test data from into datasource and to feed that to the test case on: March 28, 2008, 12:09:47 am
Thanks for the reply with detail instructions.

It was a perfect solution. thanks again.

I do have an extended question as I am new to Soap ui pro.

I have a groovy assertion to save the response file onto my system so I can parse and analyze the result later.

Is there a simple way to say all the three responses into different files so I can parse them and get the test results?

I am doing this save and parse method because I want to be able to validate the data in some particular tags in the Soap response.

Regards
- Shashi
12  soapUI / soapUI / Reading test data from into datasource and to feed that to the test case on: March 27, 2008, 09:58:32 pm
Hello,

I have testdata.properties in the format for example
name1=data1,data2,data3

I have a properties test step defined reading the data from this properties file for the property name = name1

I also have a data source and data source loop test step to read the data from this properties file and to loop through the data with comma separation between data.

The idea here is to have the datasource read the file and loop through the data from 1 through 3 and feed each one at a time to the properties step.

The request is built to take the data from properties like ${Properties#mesLotName}

I am not sure if this is the right way to set up the steps in this order to achieve data driven testing looping through a set of test data.

But it is not working the way I expect it to. It is reading the datasource but putting the entire line with comma as the property value so the response is NullPointerException where it cannot qualify the data input.

Could someone please let me know what is the best way to fix this scenario or if there an alternative to this?

Any help is much appreciated.

Thanks
- Shashi
Pages: [1]


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
header header
header
header