Coder Social home page Coder Social logo

wdio-cucumber-json-reporter's People

Contributors

alextiley avatar sanijalal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

iflix jdrew1303

wdio-cucumber-json-reporter's Issues

TypeError: Cannot read property 'line' of undefined at ' line: scenario.location.line,'

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",

Bug: JavaScript script tags are not sanitized

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": []
},
...

Breaks in WDIO 6: Cannot read property 'cjson:metadata' of undefined

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
image

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",```

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.