WHAT:
After upgrading to 9.0 none of my Cucumber features are running. Everything was working before the upgrade.
ERROR LOG:
(Root cause: java.lang.SecurityException: class “module-info”'s signer information does not match signer information of other classes in the same package
you can add New Listener → Cucumber → (replace with this code)
import com.kms.katalon.core.annotation.AfterTestCase
import com.kms.katalon.core.annotation.BeforeTestCase
import com.kms.katalon.core.context.TestCaseContext
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
import com.kms.katalon.core.cucumber.keyword.internal.CucumberGlueGenerator as CucumberGlueGen
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI
import static com.kms.katalon.core.checkpoint.CheckpointFactory.findCheckpoint
import static com.kms.katalon.core.checkpoint.CheckpointFactory.findCheckpoint
class NewTestListener {
/**
* Executes before every test case starts.
* @param testCaseContext related information of the executed test case.
*/
@BeforeTestCase
def beforeTestCase(TestCaseContext testCaseContext) {
CucumberKW.GLUE = ['stepDefinition']
CucumberGlueGen.addDefaultPackages();
}
}
@Coty : I am getting this exception from couple of days.Please advice
2024-04-01 16:15:19.787 INFO c.k.k.core.main.WSVerificationExecutor - START Verification
2024-04-01 16:15:20.542 INFO c.k.k.c.c.k.CucumberBuiltinKeywords - Starting run keyword runFeatureFile: ‘Include\features\Admin Control\Board\Board Definition\BD_CRUDOperations.feature’ and extract report to folder: ‘C:\Users\SKARAM~1\AppData\Local\Temp\Katalon\Include\features\Admin Control\Board\Board Definition\BD_CRUDOperations.feature\20240401_161505/cucumber_report/1711968320509’…
2024-04-01 16:15:22.344 ERROR c.k.k.core.keyword.internal.KeywordMain - Keyword runFeatureFile was failed (Root cause: java.lang.SecurityException: class “module-info”'s signer information does not match signer information of other classes in the same package
at cucumber.runtime.io.ResourceLoaderClassFinder.loadClass(ResourceLoaderClassFinder.java:42)
at cucumber.runtime.io.ResourceLoaderClassFinder.getDescendants(ResourceLoaderClassFinder.java:32)
at cucumber.runtime.Reflections.instantiateSubclasses(Reflections.java:33)
in your test explorer -->Test Listeners → right click and then click on new → New Test Listener (given any name ) and then inside that file you have to just import below package
and then inside the class you have to just paste below lines of code @BeforeTestCase
def beforeTestCase(TestCaseContext testCaseContext) {
CucumberGlueGenerator.addDefaultPackages();
}
and save it then after that you can run your feature file it will work.