Whether you are doing interface testing or automated testing, parameterization is definitely an unavoidable hurdle.
Because we have to consider the problem of multiple interfaces using the same parameters. Therefore, this article will describe how katalon is parameterized.
global variables
Open profile in the menu bar on the right and click default. After opening, click add on the default page to add global variables.
Profiles: default is the default file, you can also choose to add a file yourself, right-click Profiles, new->execution profile
Name: Custom variable name
Value: Custom parameter value
ps: Remember to save after setting up! !
How to use global variables
After setting the global variable, you need to call the global variable in the interface before you can use it.
1. Call global variables
a. Add the request information of the interface in the object repository first.
b. In the variables menu on the request information page, call global variables
Name: Custom variable name
Type: The type of the calling parameter. Global variable is the global variable of the table name
Default Value: The default value of global variables. Just select the global variables set in Profiles.
2. Use global variables
In step 1, global variables have been passed into the interface. Use the format ${variable name} to call the corresponding variable.
ps: The post request uses the same method to pass parameters in the body. The global variables are first passed into the interface through variables. Then use the ${variable name} format to call it.
The above is how katalon uses global variables for parameterization. We will continue to update Katalon’s other parameterized methods in the future.
Finally, I would like to thank everyone who reads my article carefully. Reciprocity is always necessary. Although it is not a very valuable thing, if you can use it, you can take it directly:
This information should be the most comprehensive and complete preparation warehouse for [software testing] friends. This warehouse has also accompanied tens of thousands of test engineers through the most difficult journey. I hope it can also help you!