Call Test Case and Skip a Test Step?

Hi everyone, as per title of this topic, i’m looking for ways to call for a test case and skip a test step in it. aka, i have a tear down in a test case that’m looking to avoid in order to run a new test case in conjunction.

Could this be avoided and how?

WebUI.callTestCase(findTestCase(‘Test Cases/Test Case A’)).skipTestStep?

hello,
in TC_A set variable - execute with default value true
in TC_A step you dont want to run put in if(execute){} statement
when you call TC_A just set parameter to false

Hi @Andrej Podhajský

Thanks for your response.
Apologies in advance, but would you be able to elaborate more on the 2nd part?

in TC_A step you dont want to run put in if(execute){} statement
when you call TC_A just set parameter to false

as you said, you have some step/steps you don’t want to run.
put them in if(){} condition when condition is parameter you set… so when you execute TC as separate, default value of parameter will be true, and steps will be executed.
when you will call this TC with steps that needs to be under condition, just call it with parameter with value false, and steps will not be executed.
is this more understandable?

1 Like

better understanding yes @Andrej Podhajský

The set variable has to be a ‘global variable’ ? Or the local variable is paramitirzed when the calling from Test Case B occurs?

Also how does that look like for the statement in Test Case B?

WebUI.callTestCase(findTestCase('Test Cases/Test Case A'), variable == false)

Thank you,

local variable
call should look like
WebUI.callTestCase(findTestCase(‘Test Cases/Test Case A’), [(‘executeSteps’) : true])

and definition of variable:

image.png

1 Like

yes i had initially set it to local variable just wanted to confirm.
problem is these steps are part of the TearDown in TC_A. I can’t seem to add the if statement there?