Introduction
Hello, Readers!!
As we have already covered a long way with Katalon, let's move ahead and explore yet another feature of Katalon studio. Today, we will see the steps to Skip test cases in a test suite. Along with that, we will also learn to Execute Tests on Multiple devices in parallel in Katalon.

So, let’s get started!!
Skip Test Cases
To skip test cases in a test suite, we will need to preconfigure a Test Listener with the TestCaseContext.skipThisTestCase() method.
Follow the steps below to create Test Listeners and skip test cases:
-
Open the Katalon studio, go to the Test Explorer panel, and then right-click on Test Listeners.
Select New > New Test Listener

2. A New Test Listener dialog box will appear.
Give it a name, like SkipTest, in this case. Select Generate sample Before Test Case method and then click Ok. You can also select other methods if you want the samples to be generated.

3. Katalon Studio will generate a sample template having the necessary annotations, libraries, and the supported functions as given below:
import static com.kms.katalon.core.checkpoint.CheckpointFactory.findCheckpoint
import static com.kms.katalon.core.testcase.TestCaseFactory.findTestCase
import static com.kms.katalon.core.testdata.TestDataFactory.findTestData
import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject
import com.kms.katalon.core.checkpoint.Checkpoint as Checkpoint
import com.kms.katalon.core.model.FailureHandling as FailureHandling
import com.kms.katalon.core.testcase.TestCase as TestCase
import com.kms.katalon.core.testdata.TestData as TestData
import com.kms.katalon.core.testobject.TestObject as TestObject
import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI
import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as Mobile
import internal.GlobalVariable as GlobalVariable
import com.kms.katalon.core.annotation.BeforeTestCase
import com.kms.katalon.core.annotation.BeforeTestSuite
import com.kms.katalon.core.annotation.AfterTestCase
import com.kms.katalon.core.annotation.AfterTestSuite
import com.kms.katalon.core.context.TestCaseContext
import com.kms.katalon.core.context.TestSuiteContext
class SkipTest {
/**
* Executes before every test case starts.
* @param testCaseContext related information of the executed test case.
*/
@BeforeTestCase
def sampleBeforeTestCase(TestCaseContext testCaseContext) {
println testCaseContext.getTestCaseId()
println testCaseContext.getTestCaseVariables()
}
}
4. To skip test cases, use the TestCaseContext.skipThisTestCase() method.
Inside the Skiptest listener, copy and paste the below code under the generated sample template.
//Checks for the required condition and skips the test case if true.
if(inputyourconditionhere)
{ testCaseContext.skipThisTestCase()
}