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.
November 22, 2008, 09:06:53 am
Username: Password:
Login with username, password and session length

Forgot your password?
 
Adding Property names on Property Transfer by groovy
Welcome, Guest. Please login or register.
November 22, 2008, 09:06:53 am
Home Help Search Login Register
News: The Forums are up! Welcome to eviware.

+  Eviware Forum
|-+  soapUI
| |-+  soapUI
| | |-+  Adding Property names on Property Transfer by groovy
« previous next »
Pages: [1] Print
Author Topic: Adding Property names on Property Transfer by groovy  (Read 672 times)
Manoj
Newbie
*
Posts: 24


« on: January 18, 2008, 05:44:36 pm »

Hi,

I am trying to add propety names to the property transfer step through groovy taking property names from a file . But failed. Huh

Please help me on this. Below is the code...

// read the file
def properties = new java.util.Properties();
properties.load( new java.io.FileInputStream( "C:\\def.txt" ));
System.out.println("File was found........");
def targetStep = testRunner.testCase.getTestStepByName( "Property Transfer" );

//def names = properties.propertyNames();
def names = [];
names =  properties.propertyNames();

while( names.hasMoreElements() )
{
 def name = names.nextElement();
 
targetStep.addProperty( name ) ;

}

Logged
omatzura
Administrator
Hero Member
*****
Posts: 1,425


« Reply #1 on: January 19, 2008, 09:21:40 am »

Hi!

shouldn't you be adding these to a "Properties" step? Property-Transfer steps don't support custom properties.. Or am I misunderstanding you?

regards!

/Ole
eviware.com
Logged
Manoj
Newbie
*
Posts: 24


« Reply #2 on: January 21, 2008, 06:34:35 am »

Hi,

I am able to add to the properties step. But could not able to add to Property transfer step.
Logged
omatzura
Administrator
Hero Member
*****
Posts: 1,425


« Reply #3 on: January 21, 2008, 10:10:37 am »

Hi,

ok.. thats "ok".. you can't add properties to a property-transfer step. Maybe you want to add property-transfers dynamically?

regards,

/Ole
eviware.com
Logged
Manoj
Newbie
*
Posts: 24


« Reply #4 on: January 21, 2008, 06:23:43 pm »


Yes how can we add Property transefer dynamically?
Logged
omatzura
Administrator
Hero Member
*****
Posts: 1,425


« Reply #5 on: January 21, 2008, 11:19:29 pm »

Hi!

you should call addTransfer ( name ) on the property-transfer step, this will create and return a new PropertyTransfer. The returned transfer then has properties for setting source/target/options, etc.. Have a look at the javadocs at http://www.soapui.org/apidocs/com/eviware/soapui/impl/wsdl/teststeps/PropertyTransfer.html

Hope this helps!

regards,

/Ole
eviware.com
Logged
Manoj
Newbie
*
Posts: 24


« Reply #6 on: January 22, 2008, 06:58:13 am »

Thank you.
Logged
Pages: [1] Print 
« previous next »
Jump to:  


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