Skip to content
This repository has been archived by the owner on Dec 18, 2019. It is now read-only.

Reporting issues after 2.2.1 version #138

Closed
petrosbountis opened this issue Jul 26, 2018 · 5 comments
Closed

Reporting issues after 2.2.1 version #138

petrosbountis opened this issue Jul 26, 2018 · 5 comments

Comments

@petrosbountis
Copy link

// Description
While executing a feature file (or a set of feature files) steps appear to be missing in some scenarios and also steps from other scenarios are been displayed to the terminal via spec reporter

// Project
cucumber-boilerplate

// Environment
MacOS 10.13.6

// Affects Version
wdio-cucumber-framework@2.2.1

// Actual Behaviour

  • Missing scenario steps from the report
  • Steps from other scenarios are displayed instead in some cases

// Troubleshooting
Executed same feature(s) with 2.2.0 & 2.2.1 respectively, automation actions in both cases seem to get actually executed, though reporting appears to be the main issue that's also failing the command execution itself

// Error Log

ERROR: Cannot read property 'type' of undefined
chrome
Type    at CucumberReporter.getUniqueIdentifier (/Users/username/IdeaProjects/cucumber-boilerplate/node_modules/wdio-cucumber-framework/build/reporter.js:324:24)
    at CucumberReporter.handleBeforeStep (/Users/username/IdeaProjects/cucumber-boilerplate/node_modules/wdio-cucumber-framework/build/reporter.js:104:27)
    at emitMany (events.js:147:13)
    at CucumberEventListener.emit (events.js:224:7)
    at CucumberEventListener.onTestStepStarted (/Users/username/IdeaProjects/cucumber-boilerplate/node_modules/wdio-cucumber-framework/build/cucumberEventListener.js:160:18)
    at emitOne (events.js:121:20)
    at EventEmitter.emit (events.js:211:7)
    at TestCaseRunner.emit (/Users/username/IdeaProjects/cucumber-boilerplate/node_modules/cucumber/src/runtime/test_case_runner.js:51:27)
    at TestCaseRunner.<anonymous> (/Users/username/IdeaProjects/cucumber-boilerplate/node_modules/cucumber/src/runtime/test_case_runner.js:135:10)
    at Generator.next (<anonymous>)
    at Generator.tryCatcher (/Users/username/IdeaProjects/cucumber-boilerplate/node_modules/bluebird/js/release/util.js:16:23)
    at PromiseSpawn._promiseFulfilled (/Users/username/IdeaProjects/cucumber-boilerplate/node_modules/bluebird/js/release/generators.js:97:49)
    at TestCaseRunner.<anonymous> (/Users/username/IdeaProjects/cucumber-boilerplate/node_modules/bluebird/js/release/generators.js:201:15)
    at TestCaseRunner.aroundTestStep (/Users/username/IdeaProjects/cucumber-boilerplate/node_modules/cucumber/lib/runtime/test_case_runner.js:210:22)
    at /Users/username/IdeaProjects/cucumber-boilerplate/node_modules/cucumber/src/runtime/test_case_runner.js:202:18
    at Generator.next (<anonymous>)
------------------------------------------------------------------
@christian-bromann
Copy link
Contributor

@Rob-Meijeren can you take a look?

@wswebcreation
Copy link
Contributor

🤔, strange. Will also take a look tomorrow morning.

@Rob-Meijeren
Copy link
Contributor

I just checked and indeed it happens with the 2.2.1. This is probably due to the change I made in how the steps are passed to the reporter.

just for the record a good example is elementVisibility.feature in the boilerplate.

I will take a closer look tomorrow to see how we can fix this but I already have some idea for it. Namely adding a check in getStepFromFeature to check if we are processing a scenario if so to check the line to make sure we have the right scenario. I thought there would only be 1 scenario at that time but appreantly there are cases when there is more than one.

@Rob-Meijeren
Copy link
Contributor

I just made a pull request to fix this. I checked with the cucumber-boilerplate project and with my personal project

@christian-bromann
Copy link
Contributor

Let's continue convo in #139

christian-bromann pushed a commit that referenced this issue Jul 30, 2018
 Author:    Meijeren <meijeren@hotmail.nl>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants