In integrated testing (Maintain test case context), the input values for static local variables are not applied
Static local variables are declared inside a function but retain their value throughout the lifetime of the program and are initialized only once. Due to this characteristic, in integration tests (Maintain test case context), only the test case that first initializes the static local variable initializes its value.
When Maintain test case context is checked, additional configuration is required to input values into static local variables for each test case.
- Method for inputting values into static local variables for each test case
- From [Test View], double-click the test or test case that attempts to assign an input value to a static local variable.
- Check the name of the static local variable in [Test Editor] > [Test Case]
- In [Test Editor] > [Test Info] > [Test Structure], enter
static local variable name_initialized = 0;
into the Before-call code and save - RUN Test
Need more help with this?
Don’t hesitate to contact us here.