alibaba82
17 years agoSuper 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
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