cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamically create query parameters to get request in ReadyAP

SOLVED
Member

Dynamically create query parameters to get request in ReadyAP

As per my requirement need to create single test case for multiple endpoints and pass different query parameters for each endpoint in the iteration. I followed Data driver framework to achieve it but, here I am facing issue while setting dynamic parametres to different end points in each iterations. 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Hero

Re: Dynamically create query parameters to get request in ReadyAP

Hi @mani03 

 

dynamically generating REST query parms seems to have popped up several times on the board in the last 6 months or so.

 

Please see this link   - in the link someone else was asking about this a while back and @nmrao put a groovy script to do this.  There is also a feature request asking for the ability to dynamically populate the query parms - the link to this feature request is also included via the link - suggest you add an upvote - the more votes it gets, the more likely SmartBear will consider adding it into the OTB functionality.

 

I also had the same issue a couple of months before the previous link was raised on the forum - I raised a service request and eventually SmartBear provided me the following:

 

1. Modify the request as shown in the screenshot: https://1drv.ms/u/s!AtuBNgWQsBvDgYo3igoN8Xngs-wUhQ [https://1drv.ms/u/s!AtuBNgWQsBvDgYo3igoN8Xngs-wUhQ] 
All the query parameters are passed as a value of a single dummy template parameter that seems to give the correct request in the result: https://1drv.ms/u/s!AtuBNgWQsBvDgYo4SC0gbfYYNrQj_w [https://1drv.ms/u/s!AtuBNgWQsBvDgYo4SC0gbfYYNrQj_w] 
2. User a groovy script that produces a string of query params and their values and returns it: https://1drv.ms/u/s!AtuBNgWQsBvDgYo5ZKnigE64mSf2wg [https://1drv.ms/u/s!AtuBNgWQsBvDgYo5ZKnigE64mSf2wg] Then, refer to the script result from the parameter's value: https://1drv.ms/u/s!AtuBNgWQsBvDgYo63NVVLRPgkufTzg [https://1drv.ms/u/s!AtuBNgWQsBvDgYo63NVVLRPgkufTzg]

 

Cheers,

 

rich

if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta

View solution in original post

4 REPLIES 4
Community Hero

Re: Dynamically create query parameters to get request in ReadyAP

Hi @mani03 

 

dynamically generating REST query parms seems to have popped up several times on the board in the last 6 months or so.

 

Please see this link   - in the link someone else was asking about this a while back and @nmrao put a groovy script to do this.  There is also a feature request asking for the ability to dynamically populate the query parms - the link to this feature request is also included via the link - suggest you add an upvote - the more votes it gets, the more likely SmartBear will consider adding it into the OTB functionality.

 

I also had the same issue a couple of months before the previous link was raised on the forum - I raised a service request and eventually SmartBear provided me the following:

 

1. Modify the request as shown in the screenshot: https://1drv.ms/u/s!AtuBNgWQsBvDgYo3igoN8Xngs-wUhQ [https://1drv.ms/u/s!AtuBNgWQsBvDgYo3igoN8Xngs-wUhQ] 
All the query parameters are passed as a value of a single dummy template parameter that seems to give the correct request in the result: https://1drv.ms/u/s!AtuBNgWQsBvDgYo4SC0gbfYYNrQj_w [https://1drv.ms/u/s!AtuBNgWQsBvDgYo4SC0gbfYYNrQj_w] 
2. User a groovy script that produces a string of query params and their values and returns it: https://1drv.ms/u/s!AtuBNgWQsBvDgYo5ZKnigE64mSf2wg [https://1drv.ms/u/s!AtuBNgWQsBvDgYo5ZKnigE64mSf2wg] Then, refer to the script result from the parameter's value: https://1drv.ms/u/s!AtuBNgWQsBvDgYo63NVVLRPgkufTzg [https://1drv.ms/u/s!AtuBNgWQsBvDgYo63NVVLRPgkufTzg]

 

Cheers,

 

rich

if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta

View solution in original post

Moderator

Re: Dynamically create query parameters to get request in ReadyAP

Hi all,

 

@richie thanks for gathering all the information and for sharing the reply from the Customer Care team!

@mani03, did Richie's reply help?

 


Olga Terentieva
SmartBear Assistant Community Manager

Highlighted
Community Hero

Re: Dynamically create query parameters to get request in ReadyAP

@Olga_T,

It appears that this is a common problem for the engineers who test / automate the REST Services as it is repeatedly seen in the forum. Is it possible to push for feature enhancement ? Also possible for Knowledge Base article with the original answer for quick access?



Regards,
Rao.
Community Manager

Re: Dynamically create query parameters to get request in ReadyAP

I've sent a request to our team to consider creating a KB article. Thanks for drawing our attention to this topic, @nmrao.

---------
Tanya Gorbunova
SmartBear Community Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.↓↓↓↓↓