In the test case, go to General tab -> Execution Behavior -> Enable the option “Force all variables to be global”.