Jump to content
WAPT Forum
Sign in to follow this  
Guest krisg

Variable URL's without querystring parameters

Recommended Posts

Guest krisg

Is it possible to create scenarios where the URLs visited are randomly selected from a file.

I know it's possible to do this for URL's that have the form:

 

http://www.domain.com/products/view?id=123456

 

Where the id in the URL is retrieved from a file.

 

But is is possible, and if so how, to generate random URLs from a file that have the form:

 

http://www.domain.com/products/view/123456

Share this post


Link to post
Share on other sites

Yes, it's possible. You can use $Var function in URI path. For example, you can use following URI path:

 

/products/view/$Var(SomeVariable)

Share this post


Link to post
Share on other sites
Guest krisg

Hi Sergei,

 

I actually figured it out just after i posted the question, but thank you anyway for your assistance.

Share this post


Link to post
Share on other sites
Guest rene

Yes, it's possible. You can use $Var function in URI path. For example, you can use following URI path:

 

/products/view/$Var(SomeVariable)

 

Hi Sergei,

 

Where would it get the value from?

Would it be possible to retrieve the value from a file?

If so how would I do that?

Share this post


Link to post
Share on other sites

It will get value from the variable with name "SomeVariable".

Yes, you can use $LOrder and $LRand functions or JavaScript operator to initialize the variable by a value from file.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×