Parameterization of URL


Have you ever wondered how to run the same test in same environment with different URLs?

Here is the appraoch to paramteremize URL The URL also can tested with different data sets using Data-Driven varaibale approach/Application variables/Random application variables

If the URL format is basepath.com/{extension}, the base path remains constant and the extension changes frequently/has to be tested with different data sets this approach works

1. Variable Declaration

2. Use the declared variables in a test case URL

1. Declaring the variables
  • If varaible(s) is used as application variable(s), then Application variable(s) has to be declared in variables tab in the Settings
  • If it is used as Random application variables, then Random application variable(s) has to be declared in variables tab in the Settings
  • If it is used in Data Driven file, follow the steps here
2. Use the declared variables in a test case URL
  • Navigate to edit steps of any test case(s)
  • Click on override URL option by clicking on the checkbox.(this will allow URL editing)
  • Type double underscore variable name double underscore(__variablename__) in the extension of URL Local Image

NOTE:

  • The test case will run with different URL's, if used in Data Driven testing - Variable approach
  • The test case will run with different random URL's, if used in Random application variables
  • The test case will run with single URL, if declared in Application variables

results matching ""

    No results matching ""