webdriverio-boneyard / wdio-cucumber-framework

A WebdriverIO v4 plugin. Adapter for Cucumber testing framework.
MIT License
77 stars 61 forks source link

Cucumber tests failing due to intermittently 'undefined' steps #32

Closed christian-bromann closed 7 years ago

christian-bromann commented 8 years ago

From @dimirey on August 1, 2016 22:42

The problem

My cucumber tests often fail due to an issue where defined steps are mistakenly considered undefined. When run again, the failed 'undefined' steps occasionally pass correctly as defined. This happens when running ~16 tests in parallel. The failures started after updating webdriverio and the cucumber framework to the latest versions.

Environment

This doesn't seem to happen when running tests individually, only when tests (which share step definitions) are run in parallel.

Link to Selenium/WebdriverIO logs

unable to find any logs which have significance to this

Code To Reproduce Issue [ Good To Have ]

Create a user and assert that the settings conform with the Org settings I enter in the user details "A" "B" "C" "D":

module.exports = function(){

var add_user = require("../support/pages/page_admin_users_adduser.js");

this.When(/^I Enter in the user details "([^"]*)" "([^"]*)" "([^"]*)" "([^"]*)"$/, function (arg1, arg2, arg3, arg4) {

            add_user.first_name_textfield.waitForVisible()
            add_user.first_name_textfield.setValue(arg1)

            add_user.last_name_textfield.waitForVisible()
            add_user.last_name_textfield.setValue(arg2)

            add_user.display_name_textfield.waitForVisible()
            add_user.display_name_textfield.setValue(arg1 + " " + arg2)

            add_user.email_textfield.waitForVisible()
            add_user.email_textfield.setValue(arg3)

            add_user.password_textfield.waitForVisible()
            add_user.password_textfield.setValue(arg4);

      });
}

Copied from original issue: webdriverio/webdriverio#1507

christian-bromann commented 7 years ago

@dimirey can you share a reproducible example?

christian-bromann commented 7 years ago

Closing due to inactivity.