Skip to content

Commit

Permalink
Merge pull request katalon-studio-samples#1 from katalon-studio-sampl…
Browse files Browse the repository at this point in the history
…es/fix-connection-refused

Fix connection refused occasionally
  • Loading branch information
huynguyen2908 authored Oct 28, 2021
2 parents f6c4868 + fa4234b commit 06d3e8c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Test Listeners/TestListener.groovy
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import com.katalon.KatalonHelper
import com.kms.katalon.core.annotation.AfterTestCase
import com.kms.katalon.core.annotation.BeforeTestSuite
import com.kms.katalon.core.context.TestCaseContext
import com.kms.katalon.core.context.TestSuiteContext
import com.kms.katalon.core.webui.util.WebDriverCleanerUtil

class TestListener {
/**
Expand All @@ -11,4 +14,9 @@ class TestListener {
def sampleBeforeTestSuite(TestSuiteContext testSuiteContext) {
KatalonHelper.updateInfo()
}

@AfterTestCase
def terminateRunningWebDrivers(TestCaseContext testCaseContext) {
WebDriverCleanerUtil.cleanup()
}
}

0 comments on commit 06d3e8c

Please sign in to comment.