Invalid value undefined supplied to /suites/suites/0/tests/0/timedOut: Boolean
See original GitHub issueI am getting the above error with the following json
{
"stats": {
"suites": 1,
"tests": 1,
"passes": 0,
"pending": 0,
"failures": 1,
"start": "2018-01-22T15:06:36.116Z",
"end": "2018-01-22T15:06:36.602Z",
"duration": 486,
"testsRegistered": 1,
"passPercent": 0,
"pendingPercent": 0,
"other": 0,
"hasOther": false,
"skipped": 0,
"hasSkipped": false,
"passPercentClass": "danger",
"pendingPercentClass": "danger"
},
"suites": {
"uuid": "49ace02e-54fe-4939-b896-ca93300bc4f5",
"title": "",
"fullFile": "",
"file": "",
"beforeHooks": [],
"afterHooks": [],
"tests": [],
"suites": [
{
"uuid": "cea92469-5c61-4fdb-8b02-64b2aa4c9657",
"title": "Add Bank MOP",
"fullFile": "",
"file": "",
"beforeHooks": [],
"afterHooks": [],
"tests": [
{
"title": "should fail",
"fullTitle": "Add Bank MOP should fail",
"duration": 64,
"state": "failed",
"pass": false,
"fail": true,
"pending": false,
"code": "cy.visit('localhost:8080');",
"err": {
"message": "CypressError: cy.visit() failed trying to load:\n\nhttp://localhost:8080/\n\nWe attempted to make an http request to this URL but the request failed without a response.\n\nWe received this error at the network level:\n\n > Error: connect ECONNREFUSED 127.0.0.1:8080\n\nCommon situations why this would fail:\n - you don't have internet access\n - you forgot to run / boot your web server\n - your web server isn't accessible\n - you have weird network configuration settings on your computer\n\nThe stack trace for this error is:\n\nError: connect ECONNREFUSED 127.0.0.1:8080\n at Object.exports._errnoException (util.js:1026:11)\n at exports._exceptionWithHostPort (util.js:1049:20)\n at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1081:14)\nFrom previous event:\n at Server._onResolveUrl (/Users/john.hamlett/Documents/Work/cypress/packages/server/lib/server.coffee:321:11)\n at backendRequest (/Users/john.hamlett/Documents/Work/cypress/packages/server/lib/socket.coffee:296:23)\nFrom previous event:\n at Socket.<anonymous> (/Users/john.hamlett/Documents/Work/cypress/packages/server/lib/socket.coffee:312:9)\n at emitMany (events.js:127:13)\n at Socket.emit (events.js:201:7)\n at /Users/john.hamlett/Documents/Work/cypress/packages/socket/node_modules/socket.io/lib/socket.js:503:12\n at _combinedTickCallback (internal/process/next_tick.js:67:7)\n at process._tickCallback (internal/process/next_tick.js:98:9)",
"estack": "CypressError: cy.visit() failed trying to load:\n\nhttp://localhost:8080/\n\nWe attempted to make an http request to this URL but the request failed without a response.\n\nWe received this error at the network level:\n\n > Error: connect ECONNREFUSED 127.0.0.1:8080\n\nCommon situations why this would fail:\n - you don't have internet access\n - you forgot to run / boot your web server\n - your web server isn't accessible\n - you have weird network configuration settings on your computer\n\nThe stack trace for this error is:\n\nError: connect ECONNREFUSED 127.0.0.1:8080\n at Object.exports._errnoException (util.js:1026:11)\n at exports._exceptionWithHostPort (util.js:1049:20)\n at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1081:14)\nFrom previous event:\n at Server._onResolveUrl (/Users/john.hamlett/Documents/Work/cypress/packages/server/lib/server.coffee:321:11)\n at backendRequest (/Users/john.hamlett/Documents/Work/cypress/packages/server/lib/socket.coffee:296:23)\nFrom previous event:\n at Socket.<anonymous> (/Users/john.hamlett/Documents/Work/cypress/packages/server/lib/socket.coffee:312:9)\n at emitMany (events.js:127:13)\n at Socket.emit (events.js:201:7)\n at /Users/john.hamlett/Documents/Work/cypress/packages/socket/node_modules/socket.io/lib/socket.js:503:12\n at _combinedTickCallback (internal/process/next_tick.js:67:7)\n at process._tickCallback (internal/process/next_tick.js:98:9)\n at Object.cypressErr (http://localhost:51874/__cypress/runner/cypress_runner.js:65969:11)\n at Object.throwErr (http://localhost:51874/__cypress/runner/cypress_runner.js:65934:18)\n at Object.throwErrByPath (http://localhost:51874/__cypress/runner/cypress_runner.js:65961:17)\n at http://localhost:51874/__cypress/runner/cypress_runner.js:57623:31\n at visitFailedByErr (http://localhost:51874/__cypress/runner/cypress_runner.js:57242:12)\n at http://localhost:51874/__cypress/runner/cypress_runner.js:57622:22\n at tryCatcher (http://localhost:51874/__cypress/runner/cypress_runner.js:6268:23)\n at Promise._settlePromiseFromHandler (http://localhost:51874/__cypress/runner/cypress_runner.js:4290:31)\n at Promise._settlePromise (http://localhost:51874/__cypress/runner/cypress_runner.js:4347:18)\n at Promise._settlePromise0 (http://localhost:51874/__cypress/runner/cypress_runner.js:4392:10)\n at Promise._settlePromises (http://localhost:51874/__cypress/runner/cypress_runner.js:4467:18)\n at Async._drainQueue (http://localhost:51874/__cypress/runner/cypress_runner.js:1200:16)\n at Async._drainQueues (http://localhost:51874/__cypress/runner/cypress_runner.js:1210:10)\n at Async.drainQueues (http://localhost:51874/__cypress/runner/cypress_runner.js:1084:14)"
},
"isRoot": false,
"uuid": "0dcc7c19-1b95-4eca-bbb1-67bf7a6f597f",
"isHook": false,
"skipped": false
}
],
"suites": [],
"passes": [],
"failures": [
"0dcc7c19-1b95-4eca-bbb1-67bf7a6f597f"
],
"pending": [],
"skipped": [],
"duration": 64,
"root": false,
"rootEmpty": false,
"_timeout": 2000
}
],
"passes": [],
"failures": [],
"pending": [],
"skipped": [],
"duration": 0,
"root": true,
"rootEmpty": true,
"_timeout": 2000
},
"copyrightYear": 2018
}
This was generated using Cypress.io, and was unmodified. The HTML is generated just fine if I allow mochawesome to generate the html, however I don’t wanna do that I have to do some modifications to the JSON before making the HTML
I am only sending the minimum flags
marge ./json/mochawesome.json -f test --assetsDir=./test/assets
How do I have marge generate the html report?
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
Invalid Boolean value | Apple Developer Documentation
Detects when a program accesses a Boolean variable and its value isn't true or false.
Read more >GraphQL Apollo: Variable $bool got invalid value "false ...
$body: String $bool: Boolean! Yet I cannot get it to pass the boolean value in the mutation. I've ensured the variables are correct...
Read more >Boolean - JavaScript - MDN Web Docs
The Boolean object represents a truth value: true or false.
Read more >4.2 Booleans - Racket Documentation
True and false booleans are represented by the values #t and #f, respectively, though operations that depend on a boolean value typically treat...
Read more >PHP type comparison tables - Manual
HTML Forms do not pass integers, floats, or booleans; they pass strings. ... Simply doing if ($x) while $x is undefined will generate...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Fixed with mochawesome-report-generator 3.1.5
The
timedOut
property doesn’t come frommochawesome
, it comes frommocha
. See here. The problem is that the test object generated by Cypress does not have atimedOut
property.Unfortunately I keep running into scenarios like this. The reporter was initially designed to work only with mocha and is based off of the test object that mocha generates. However there are other libraries that use mocha under the hood so the reporter is compatible but can exhibit unexpected behavior like this.
The JSON validation was put in place to ensure that
marge
can successfully generate an HTML report without errors or unexpected rendering since you can pass whatever JSON you want to the cli.Looking closer, the generated HTML report currently doesn’t use the
timedOut
property so I may just relax the validation for this property.