Forum Discussion
Hey matheusgeovanni
If I understand your request correctly - you're saying that you need each request to include an updated value, then yes that's entirely possible and you don't have to use groovy script either.
I didn't really understand the following:
1 - Delete the Header
2 - Right-click on the soap UI project
3 - Click on 'Add Username Token'
4 - Password digest
Could you add some screenshots that match the steps above - just so I can visualise what you mean please?
I'm guessing what you need to do here - but if you just need an updated header value each time you run the next test - I'd create a 'setup testsuite' containing a testcase with your REST step that generates these token values for you. Immediately after the test step that generates the token value, I'd add in a property transfer step to save the newly generated token value to a custom project level property (entitled 'tokenHeader').
Assuming each test case has a request that needs a new token value, I'd include as the first test step in my test (BEFORE the REST request that needs the new token value), a 'Run TestCase' step, which points back to the 'setup testsuite's testcase.
The next test step in my test would be the relevant REST request that is being tested (which needs the new token value) and the token Header's value would be set as '${#Project#tokenHeader}.
That's about the most straightforward way I can think of to do this.
ta
rich
Related Content
- 8 months ago
- 4 years ago
- 3 years ago
Recent Discussions
- 15 years ago