Priority And Dependency

hlo frnds,Totally i have two doubts
1 → How to use priority among test cases(Not Test Suites)
2 → How to use Dependency among Test cases(example: TC1 depends on TC2.if TC2 failed means TC1 should be skipped)

I do not see what you mean.

In a Test Suites, the contained Test Cases will be invoked sequentially as they are defined. Katalon implements no concept of “priority of test cases”.

Katalon implements no concept of “dependency” between Test Cases.

Katalon Studio provides no such control out of box. A Test Suite is just a dumb bunch of Test Cases. It provides no feature of “skip this when that failed”.

If a Test Case contains TestCase1 and TestCase2 in this sequence, the TestCase2 will be always invoked after the TestCase1 regardless the result of TestCase1.

When the TestCase1 passed, the TestCase2 will be invoked of course.

When the TestCase1 failed, the TestCase2 will be still invoked.

My custom Groovy class com.kazurayam.ks.TestCaseResults enables conditional execution of Test Case in Test Suite. It enables you to quit a Test Case quickly when a preceding Test Case in a Test Suite failed.

See the following documentation.

The built-in callTestCase keyword could be a basis of alternative approach.

You write a Test Case as “Controller” that calls other scripts under the “Test Cases” folder. The “Controller” can implement any if … then … else control based the the result of called scripts.

1 Like