katalon series of seven: Use Case & variables between patients with call

First, use cases variable
write use cases, we can use the code definition of variables, such as:
String name = 'news'
println (name)

The above are hard-coded, we can also define variables in use cases where, oh take effect only in this use case, the cross want to use case with global variables.

For example in code execution as in Example 1,

 

Example variables provided in Example 1 with

 

Results of the:


Second, use cases call
written when used embodiment, also be called in Example 1 with Example 2, such as use in Example 2 is a single use case 1 is landed, may be called first landing use cases before the cases under 2 alone.
Here we use above in Example 1, for example, to call in with Example 2.
Use case with Example 2, top left, click Add-Call Test Case, select 1

 

We can see that use the variables defined in Example 1 is also brought over, can modify the value of a variable in the interface mode / code pattern.
We use the value in Example 2 to modify variables, you can see with the run in Example 2 with 1 calls, variable values used in Example 2 before the value of the example set in use.

Guess you like

Origin www.cnblogs.com/songzhenhua/p/11744440.html