Forum Discussion
If someone from smartbear community give a quick solution it will be really appreciated.
SagarShroff wrote:Hi,
In my case the /Request/Path/0 value changes in every release. I need help in seting up a user defined rule that will help me setting a constant value in Headers--> Request/Path/0
- RyanHeidorn9 years agoStaff
Hi SagarShroff,
Is the URL string for your requests a dynamic value that changes from run to run, or is it a constant value that changes with each software release? Is it every request in your scenario, or only a few?
Variables that you create in LoadComplete can be easily inserted in the /Request/Path/ field. The process is the same as with any parameterized value, so you can use the Parameterization Wizard or you can manually create and use the variable where appropriate.
If the value is a constant and does not contain any special characters, my suggestion is to create a constant variable and manually insert the variable directly into the request header, as seen below:
Please let me know if this helps.
- SagarShroff9 years agoOccasional Contributor
The value changes from release to release and there are many requests so its not feasible to use variables. The faster way would be to re-record which i want to ignore if Smartbear provides some rules to automatically update the value.
So as per your above example the value 'LoadComplete' needs to be set via some rule if possible ?
- RyanHeidorn9 years agoStaff
Hi SagarShroff
I have been thinking about how to accomplish this. There is not currently a quick way to do it, but I believe if you spend some time on the script, it will be very easy to change in the future. This is how I would approach it:
- Create a constant variable that contains the value you want in the request path.
- For each request in your scenario that will have a changing URL, create a Data Replacer for the request path. I attached an screenshot you can use as an example.
- When the request path value changes in a future release, simply edit the constant variable you created and all the requests using the data replacer will be updated automatically.
I also suggest going to our feature request forum and requesting some "find / replace all" functionality that could simplify this process going forward.
Hope this helps.
Related Content
- 8 years ago
- 10 years ago
Recent Discussions
- 3 years ago
- 3 years ago
- 4 years ago