alextiley / wdio-cucumber-json-reporter Goto Github PK
View Code? Open in Web Editor NEWGenerates a JSON report for cucumber via webdriver.io
Generates a JSON report for cucumber via webdriver.io
Apparently our antivirus finds trojan in dependency of v1.1.2
- [email protected]
:
I have also posted related issue in Cucumber repo cucumber/common#812
Getting the following error trying to run tests using with the reporter; how/where is 'scenario.location' supposed to be defined? The tests run fine with default reporters.
C:\Users\osmolyar\AppData\Roaming\npm\node_modules\webdriverio\build\lib\utils\BaseReporter.js:336
throw _iteratorError;
^
TypeError: Cannot read property 'line' of undefined
at CucumberJSONReporter. (C:\Users\osmolyar\AppData\Roaming\npm\node_modules\wdio-json-cucumber-reporter\lib\reporter.js:104:35)
at emitOne (events.js:116:13)
at CucumberJSONReporter.emit (events.js:211:7)
at BaseReporter.handleEvent (C:\Users\osmolyar\AppData\Roaming\npm\node_modules\webdriverio\build\lib\utils\BaseReporter.js:324:35)
at Launcher.messageHandler (C:\Users\osmolyar\AppData\Roaming\npm\node_modules\webdriverio\build\lib\launcher.js:623:28)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at emit (internal/child_process.js:772:12)
at _combinedTickCallback (internal/process/next_tick.js:141:11)
at process._tickDomainCallback (internal/process/next_tick.js:218:9)
Submitting [object Object]
in LoginPage.open(): testConfig.config.baseUrl ishttp://redhatlinux1.iscinternal.com:52773
Package versions:
"wdio-cucumber-framework": "^1.1.0",
"wdio-cucumber-reporter": "^1.2.2",
"wdio-junit-reporter": "^0.3.1",
"wdio-json-reporter": "~0.3.1",
"wdio-spec-reporter": "0.0.5",
"webdriverio": "^4.6.2",
Example feature:
Scenario Outline: I enter a script tag into a text input
When I type "<phrase>" into the text field
Examples:
| phrase |
| <script>alert('fail');</script> |
Expected outcome: JSON output should not contain raw JavaScript
Actual outcome: See JSON snippet below
...
{
"keyword": "When ",
"line": 183,
"name": "I type \"<script>alert('fail');</script>\" into the destination search field",
"id": "I type \"<script>alert('fail');</script>\" into the text field183",
"tags": [],
"uri": "/spec/functional/features/MyFeature.feature",
"result": {
"status": "passed",
"duration": 185000000
},
"embeddings": []
},
...
Our Project can't run after upgrading to WDIO 6.
It looks like the API has changed a bit.
Error
[0-0] 2020-03-31T11:35:52.667Z ERROR @wdio/local-runner: Failed launching test session: TypeError: Cannot read property 'cjson:metadata' of undefined
Fast investigation with console.log
Package.json
"@babel/preset-env": "^7.9.0",
"@babel/register": "^7.9.0",
"@ui5/cli": "^1.14.0",
"@wdio/cli": "^6.0.8",
"@wdio/cucumber-framework": "^6.0.8",
"@wdio/junit-reporter": "^6.0.8",
"@wdio/local-runner": "^6.0.8",
"@wdio/selenium-standalone-service": "^6.0.8",
"@wdio/spec-reporter": "^6.0.8",
"@wdio/sync": "^6.0.8",
"chai": "^4.2.0",
"deepmerge": "^4.2.2",
"eslint": "^6.8.0",
"eslint-plugin-jsdoc": "^22.1.0",
"npm-run-all": "^4.1.5",
"nyc": "^15.0.0",
"rimraf": "^3.0.2",```
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.