Solved
Forum Discussion
MisterB
Champion Level 3
3 years agoDoes the content of this post help?
Solved: Zephyr Scale server testResult POST publishes only... - SmartBear Community
- Apoorva610 years agoFrequent ContributorHi Rupert, thnx for reply. I already have script which can load from file. I need the script which can compare the ordernumber value, compare with file names and load the one which has ordernumber.txt file. Thnx in advance
- rupert_anderson10 years agoValued Contributor
Hi,
Ok, sorry, in that case I'm not totally sure what you need..
Where you say compare order number, compare file names, load the matching file - I take that to mean something like:
1. Request is made to your mock
2. You extract the ordernumber from the request
3. Build a file path to load the ordernumber.txt file (shown in the sample I provided)
Is this what you mean? Then what do you want to do? Since the title of the post says 'get soap mock response from external file' - I was thinking you would then want to despatch the loaded file contents as the mock's response?
- Apoorva610 years agoFrequent ContributorHi, let me put this way. There can be unlimited files in the path containing mock response. If the order number is xyz then we need to load from xyz.txt else we error. So we need to compare ordernumber value with value.txt in path and if not found, we error