cancel
Showing results for 
Search instead for 
Did you mean: 

Property Transfer from response to Global is failing in Linux-Need help

Apoorva6
Frequent Contributor

Property Transfer from response to Global is failing in Linux-Need help

Hi Everyone,

 

I am able to trnasfer property from Response to Global property on Windows, however when I am exporting same project in Linux machine and running via testRunner.sh, the property transfer is failing with missing target. Attached doc has screen shot of windows and Linux error. Please help.

5 REPLIES 5
nmrao
Community Hero

Re: Property Transfer from response to Global is failing in Linux-Need help

Would be better if a sample project can be provided with reproducible behavior


Regards,
Rao.
Apoorva6
Frequent Contributor

Re: Property Transfer from response to Global is failing in Linux-Need help

Hi Rao,

 

Thanks for Reply,

 

Attached is the Project.xml

Apoorva6
Frequent Contributor

Re: Property Transfer from response to Global is failing in Linux-Need help

Hi Rao,
Did you get time to check on the issue plz?
nmrao
Community Hero

Re: Property Transfer from response to Global is failing in Linux-Need help

No. Not sure why the property of a project being transferred to global property and exporting it? If you can provide the problem, then that might help.


Regards,
Rao.
Apoorva6
Frequent Contributor

Re: Property Transfer from response to Global is failing in Linux-Need help

Hi Rao,

 

This problem is similar to one you have already provided solution. In earlier solution we wanted to fetch account details from DB and then load it to response from external path. That solution is working fine. In this case we need account number from response and not from earlier DB.

 

I will set projectlevel property Order1

1) I have request1 and  corresponding response1. The response1 have account number

I need this account number to be loaded into an external file saved as Order1.xml with Order1 as input (You have provided an earlier solution to this and we dont want to alter the mock Response level script here, as this we need to act as an independent entity.)

2)Next is request2 will hit to server and code will invoke request3 with mock URL with input Order1 to get external Response3 and we need to load account number here.

 

I tried Account number to set to global property and then in external file giving account number value as #Global#Acct_nb . On Windows I am able to see Global property is getting transferred and I am able to load external file with account number generated. However when I am loading the project on Linux server and ran testrunner.sh, property transfer is getting failed.

 

Please let me know if there is a way to do this. All we need is not to alter your earlier solution of mock Response script (below is same for reference)

 

def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
def holder = groovyUtils.getXmlHolder(mockRequest.requestContent)
def OrdNum1 = holder.getNodeValue("//*:GetOrderDataInput/*:orderNumber")
def file = new File (groovyUtils.projectPath+"/MOCK/GCP/GammaGetOrder/${OrdNum1}.xml")
def fileToLoad = 'soapFault'
if (file.exists()) {
fileToLoad = OrdNum1
}
context.content = groovy.xml.XmlUtil.serialize(new XmlParser().parse(groovyUtils.projectPath+"/MOCK/GCP/GammaGetOrder/${fileToLoad}.xml"))

New Here?
Join us and watch the welcome video:
Top Kudoed Authors