Operating System Windows 10
Katalon Studio Version 6.3.3
Katalon Studio logs
-
Nothing new is logged when executing the test that reproduces the bug
Environment (for Web testing)
- Chrome Version 77.0.3865.75 (Official Build) (64-bit)
Steps to reproduce
- Create the step definition with provided source (call the Step Definition class whatever you want)
- Create the feature file with provided source
- Create the test case with provided source. Modify the path to the feature file to match your own
- Run the test case directly with any browser or with Web Service (does not need a browser)
- See the execution log in Log Viewer tab with Tree View
Expected Behavior
Because the Test Case has executed two calls to CucumberKW.runFeatureFile, I expect to see something like:1 - runFeatureFile("Include/features/RMP Samples/00 - RMP Step Definitions tests/com.runmyprocess.cucumber.CucumberSamplesStepsDefinitions/DummySteps.feature")
SCENARIO dummy test with argument
SCENARIO dummy test without argument
2 - runFeatureFile("Include/features/RMP Samples/00 - RMP Step Definitions tests/com.runmyprocess.cucumber.CucumberSamplesStepsDefinitions/DummySteps.feature")
SCENARIO dummy test with argument
SCENARIO dummy test without argument
Actual Behavior
1. runFeatureFile("Include/features/RMP Samples/00 - RMP Step Definitions tests/com.runmyprocess.cucumber.CucumberSamplesStepsDefinitions/DummySteps.feature")
SCENARIO dummy test with argument
SCENARIO dummy test without argument
1.2 - runFeatureFile("Include/features/RMP Samples/00 - RMP Step Definitions tests/com.runmyprocess.cucumber.CucumberSamplesStepsDefinitions/DummySteps.feature")
SCENARIO dummy test with argument
SCENARIO dummy test without argument
Screenshots / Videos (please attach screenshots or videos if necessary to reproduce the issue)
Step definition:
/** * Dummy step: use it when you don't want to specify a real step. It only prints a message in log.
* Formats:* Dummy step * dummy step * Dummy step '<text>' * dummy step '<text>' ** @param text Any text */ @Given("[dD]ummy step( '(.+)')?") void dummy_step(String text) { // Trace println "Step definition method: CucumberSamplesStepsDefinitions.dummy_step text=${text}" }
Feature file to test with:
Feature: Test that Katalon Studio cannot find the step definition if the annotation uses a regular expression
Scenario: Dummy step with argument
Given dummy step 'this is a Given step'
When dummy step 'this is a When step'
Then dummy step 'this is a Then step'
Scenario: Dummy step without argument
Given dummy step
When dummy step
Then dummy step
Test Case source:
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.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as Mobile
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 internal.GlobalVariable as GlobalVariable
CucumberKW.runFeatureFile("Include/features/RMP Samples/00 - RMP Step Definitions tests/com.runmyprocess.cucumber.CucumberSamplesStepsDefinitions/DummySteps.feature")
CucumberKW.runFeatureFile("Include/features/RMP Samples/00 - RMP Step Definitions tests/com.runmyprocess.cucumber.CucumberSamplesStepsDefinitions/DummySteps.feature")
