Forum Discussion
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.
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.
- SagarShroff9 years agoOccasional Contributor
Hi @RyanHeidorn
Thanks for your quick reply and for your efforts for approaching to my problem.
Actually i had already done one time investment of development where i had replaced all my request path value with variable.
In next release a fix was implemented and http request were updated, due to which i had to re-record my requests in order to incorporate the changes.
As you mentioned a search-replace fits a perfect solution to my problem, i have already raised a requirement in the support group.
- RyanHeidorn9 years agoStaff
Thanks Sagar.
I notified our product group about your feature request and recommended that it be added to our product roadmap for inclusion in a future release.
Related Content
- 8 years ago
- 10 years ago
Recent Discussions
- 3 years ago
- 3 years ago
- 4 years ago