cancel
Showing results for 
Search instead for 
Did you mean: 

Really puzzling issue when using soapUI with Microsoft Team Foundation Server

Highlighted
Super Contributor

Really puzzling issue when using soapUI with Microsoft Team Foundation Server

Hello,
We are using TFS for version control and check in our soapUI projects and groovy files into this system. I have one of my GlobalGroovy files checked in TFS. This file has a function which update the XML of some request.

The function is

void CreateRandomUser(context, String CreateUserRequestName)
{

Calendar c = Calendar.getInstance();
String timeStamp = c.get(Calendar.MONTH).toString() + c.get(Calendar.DAY_OF_MONTH ).toString() + c.get(Calendar.HOUR_OF_DAY).toString() + c.get(Calendar.MINUTE).toString() + c.get(Calendar.SECOND).    toString() + c.get(              Calendar.MILLISECOND).toString() ;
String UserName = "aaaaa" + timeStamp;
String Email = UserName + "@" + UserName + ".com";
String DisplayName = UserName;

def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
def holder = groovyUtils.getXmlHolder( CreateUserRequestName + "#Request" )
//UpdateEmail
holder.setNodeValue( "//user:CreateUser/user:request/user:UserProfile/user:EmailAddress", Email )
//UpdateUserName
holder.setNodeValue( "//user:CreateUser/user:request/user:UserProfile/user:Username", UserName )
//Update DisplayName
holder.setNodeValue( "//user:CreateUser/user:request/user:UserProfile/user:DisplayName", DisplayName )

// update request with updated xml
holder.updateProperty()

}

The problem is that when I call this function, the value soapUI writes is not the one that is inside this function. soapUI seems to referencing some older file.

If I save the same function in another file, it works fine.

I am not sure if my explanation is clear. I think if I can show you over Webex that would be much easier. Not sure if the issue is with TFS or with soapUI

Thanks

Ali
2 REPLIES 2
Highlighted
Super Contributor

Please Ignore. I had two files in the scripts folder whose name was different but the class name was the same. soapUI was fetching the method from one of the files which I did not anticipate. I made the class names unique and it works now.

Ali
Highlighted
Super Contributor

Hi Ali,

thanks for following up on this, I'll see if we can somehow detect this situation and show a warning..

regards!

/Ole
eviware.com
New Here?
Join us and watch the welcome video:
Announcements
TechCorner Leaderboard
Want a fun and easy way to learn ReadyAPI and show off your skills? Try solving weekly TechCorner challenges and get into the Leaderboard!


Challenge Status

Get a full Raw JMS request

Participate!

Compare an expected JSON value and actual response in Events

Participate!

Fetch value/data from JSON response using Groovy Script

See replies!

Get data from Petstore and add it to Excel sheets

Participate!
Top Kudoed Authors