Context not appearing in reports
See original GitHub issueI’m attempting to use addContext
with tests running in Cypress 2.10 (Windows 10) and the latest version of mochawesome (3.0.2 with reporter at 3.1.2), but the added context isn’t appearing in the report. I’ve added the following test as an example:
const addContext = require('mochawesome/addContext');
describe('example context missing', () => {
it('should have context', function () {
expect(1+1).to.eq(2);
addContext(this, 'context');
});
});
Here’s the expanded report section for that test:
And here’s the JSON generated:
{
"uuid": "16c93dda-0555-41aa-9d6f-2742af6d8e57",
"title": "example context missing",
"fullFile": "",
"file": "",
"beforeHooks": [],
"afterHooks": [],
"tests": [
{
"title": "should have context",
"fullTitle": "example context missing should have context",
"duration": 4,
"state": "passed",
"speed": "fast",
"pass": true,
"fail": false,
"pending": false,
"code": "expect(1 + 1).to.eq(2);\naddContext(this, 'context');",
"err": {},
"isRoot": false,
"uuid": "e2403d20-86f4-4730-a017-d20b4c68154b",
"isHook": false,
"skipped": false
}
],
"suites": [],
"passes": [
"e2403d20-86f4-4730-a017-d20b4c68154b"
],
"failures": [],
"pending": [],
"skipped": [],
"duration": 4,
"root": false,
"rootEmpty": false,
"_timeout": 2000
}
I’ve debugged addContext
whilst the tests have been running and test.context
is set to the string passed in, so the helper appears to be doing it’s work, it just isn’t showing up in the report.
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (2 by maintainers)
Top Results From Across the Web
SSRS 2008 Report Context Menu not visible in Report Manager
In you scenario, the drop-down menu of the report is now visible, this is really strange, it's hard to say the root reason...
Read more >2488825 - Access Context of Report Not Working
Go to the work center Business Analytics, view Design Reports. · Search for the report and click on Assign. · From the Show...
Read more >Right click context menu not showing for table visual in report.
Right-clicking on a table visual in a report does not show the context menu when we first come to the report. If we...
Read more >Solved: When I click on Flow Context in RITM it does not s...
Solved: I have set the property to TRACE still it doesn't load the flow and keeps showing the message - Flow reports not...
Read more >Crystal Reports - Some fields not showing in Data Context
I use dataclasses to create my reports. When fields do not show in field explorer go to your dataclasses and change ...
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
I have mochawesome working here -> https://github.com/testdrivenio/cypress-mochawesome-s3
Essentially-
Ah, no, we aren’t currently paying for the dashboard service, the mochawesome report is so we have a nice viewable report within TeamCity, directly with the build in question.