Test Case failure in test suite causing subsequent tests to error

Hi, am using a test suite to run 5 web tests in chrome browser, but if one of them fails it will cause all subsequent tests to give an error.
Have gone to ‘Project Settings > Execution’ and enabled ‘Terminate drivers after each test case’, and have implemented the following test case tear down in the test suite:

@TearDownTestCase(skipped = false) // Please change skipped to be false to activate this method.
def tearDownTestCase() {
String cmd = “taskkill /F chromedriver.exe”
Runtime.getRuntime().exec(cmd)
}

This doesn’t seem to be killing the instance of chromedriver.exe though, is there any way to ensure this is always killed even if the test case fails?

So I have resolved this by adding the following tear downs to the test cases:

@com.kms.katalon.core.annotation.TearDownIfFailed
def tearDownIfFailed() {
WebUI.closeBrowser()
String cmd = “taskkill /F /IM chromedriver.exe”
Runtime.getRuntime().exec(cmd)
}

@com.kms.katalon.core.annotation.TearDownIfError
def tearDownIfError() {
WebUI.closeBrowser()
String cmd = “taskkill /F /IM chromedriver.exe”
Runtime.getRuntime().exec(cmd)
}

However having to add these to every test case doesn’t seem like that elegant a solution. Have tried these in the test suite SetUp/TearDown and as Test Listeners, but don’t seem to be triggered when needed. Do these have to be applied at test case level or is there another way?