0
votes

I am using protractor-cucumber framework, When going to execute more than file with similar any single step in file both are going to skip and getting error ambiguous step definition.

feature 1
Given goto google world
When Send "Mike" to text box
Then verify result should be appear
feature 2
Given goto google world
When Send "Samp" to text box
Then verify result should be appear
 config file

     cucumberOpts = {
        require: ['./Test_Scripts/*.js',
            './Support/hooks.js'],
        format: 'json:Reports/results.json',
        strict: true

    }
    suites = [
        '/feature/*.feature'
    ]

How to execute both file without ambiguity?

2
please show your config - Kacper
cucumberOpts = { require: ['./Test_Scripts/*.js', './Support/hooks.js'], format: 'json:Reports/results.json', strict: true } suites = [ '/feature/*.feature' ] - Make
Don't you have same steps defined twice somewhere in ./Test_Scripts/ directory? - Kacper
yes both file exist in this folder - Make
I don't mean *.feature files. I mean files where you have defined your steps. The error says that your steps in *.feature match to more than one regexps in step definition files. - Kacper

2 Answers

0
votes

Similar problem with ambiguous step definition was already elaborated here: Multiple Step Definitions match error in Cucumber

0
votes

Try using below code line in configurations.

specs:['./feature/*.feature'],