Saikumar Kodanda
Saikumar Kodanda

Reputation: 31

How to use project property value for Dump File property in SoapUI Pro 5.0.0

I have 20 test cases under a test suite, each test case when run provide me a response which needs to be saved to pdf. I have used "Dump File" property in SoapUI pro to save the response to a file. Now everytime the folder location is changed, I will have to change the path in all 20 testcase steps. So I looking for help, is it possible to use value of a custom property defined at project level as value Dump File property.

Project Property --> OutputPath (Property Name) | C:/test/output (Value)

HTTP TestRequest Properties --> Dump File (Property Name) | (${outputPath})+filename.pdf (Value)

Thanks Sai

Upvotes: 3

Views: 8392

Answers (3)

davidfrancis
davidfrancis

Reputation: 3849

One gotcha to watch out for:

If you're just using a Request/Response rather than a TestCase, the "Dump File" request property will still be available but you cannot enter anything into it

To resolve, right click on your Request and do Add to TestCase
You can then follow the defaults if you have no TestSuite or TestCase already
Now you can find Dump File and enter it against the copy of the Request inside the TestCase

Note: Remember to run the Request from your TestCase rather than from the upper portion of the soapUI project tree.

Upvotes: 6

Rao
Rao

Reputation: 21379

It can be defined Dump File value as below:

${#Project#OutputPath}/filename.pdf

Upvotes: 1

albciff
albciff

Reputation: 18517

You have to add a project property in the project custom properties tab as you do, however you are missing the last / character:

enter image description here

The second problem is to expand a project property you need to use #Project# so in your case for dump file intestRequest use ${#Project#outputPath} filename.pdf insted of (${outputPath})+filename.pdf as:

enter image description here

This should do the trick.

Hope this helps,

Upvotes: 3

Related Questions