No need to split URL Values and Query String for CloudTest

Document created by Dave Murphy Employee on Jul 19, 2017
Version 1Show Document
  • View in full screen mode

This is usually when extracting part of the url randomly, e.g. category, sub-category, product in an e-commerce website. Then that needs to be used in the next request(s), example of a product page below:
 

/product/Aromatique-Cinnamon-Cider-Candle-in-Glass_301_-1_301_504047876?savedSearchLoginURL=&LandingPage=Landing+Page&commandNameURL=&ddkey=http:ProductResultList

 

When opening a message in CloudTest and looking at the Inputs part, there is a part for the URL Values and Query String (Figure 1). Figure 1 also shows the substitution of the above product link part in two properties for the requests that needed the extracted value. But that is NOT needed and it involves extra work.

 

Figure 1. Inputs when opening a message in CloudTest.

 

Where:
randomProduct_URL = /product/Aromatique-Cinnamon-Cider-Candle-in-Glass_301_-1_301_504047876
randomProduct_Query  = savedSearchLoginURL=&LandingPage=Landing+Page&commandNameURL=&ddkey=http:ProductResultList

 

So the above is NOT a best practice. The below is a best practice:

 

Figure 2. Inputs with only one parameter substituted.

 

Where:
randomProduct = /product/Aromatique-Cinnamon-Cider-Candle-in-Glass_301_-1_301_504047876?savedSearchLoginURL=&LandingPage=Landing+Page&commandNameURL=&ddkey=http:ProductResultList

 

CloudTest will compute it as is, it will take as query string from the question mark (?) on.
 
It doesn’t matter how big the value is, just put a single parameter in the URL Values field and it will work.

Attachments

    Outcomes