question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is there any way to generate one report per `test_settings`?

See original GitHub issue

Given the following configuration…

require('nightwatch-cucumber')({
	cucumberArgs: [
		'--format', 'pretty',
		'--format', 'json:reports/cucumber.json',
		'features'
	]
});
module.exports = {
	...
	test_workers: true,//Tests running in parallel
	...
	test_settings: {
		default: {
			launch_url: 'http://ondemand.saucelabs.com:80',
			...
		},
		chrome: {
			...
		},
		firefox: {
			...
		},
		ie11: {
			...
		}
    }
};

And given the following command…

nightwatch --env chrome,firefox,ie11

All my tests are executed in parallel and the reports for all these tests are merged into one file cucumber.json.

The problem is that I cannot distinguish in the report what test was executed for firefox or chrome or IE.

Is there any way to generate one report per platform?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
ncochardcommented, Aug 9, 2017

Hello

Thank you @danielgecko for looking into this.

Yes, you are correct. #237 will solve my issue. Feel free to close my issue (#256) and I’ll follow the discussion on #237.

I was actually considering a solution similar to what was explained in that thread. (See below.)

const argv = require('yargs-parser')(process.argv.slice(2));
const { env } = argv;
require('nightwatch-cucumber')({
	cucumberArgs: [
		...
		'--format', `json:reports/cucumber-${env}.json`,
		...
	]
});

I’m considering writing a wrapper for nightwatch that will spawn the following commands (in parallel) nightwatch --env ie11, nightwatch --env firefox, nightwatch --env chrome. This would generate the following reports: cucumber-ie11.json, cucumber-firefox.json and cucumber-chrome.json. And my wrapper will gather all these reports into one folder for easy browsing. I’ll share my code when it’s complete!

Best regards

0reactions
danielgeckocommented, Aug 9, 2017

I also found a related issue:

https://github.com/mucsi96/nightwatch-cucumber/issues/237

which has a solution that could be changed slightly to work for you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configure unit tests by using a .runsettings file - Microsoft Learn
You can create more than one .runsettings file in your solution and select one as the active test settings file as needed. Specify...
Read more >
Is it possible to get a report of unit tests run in TFS builds ...
TFS build test results don't seem to store any information about the test categories, so I can't use those to group by solution...
Read more >
Generate Test Specification Reports - MATLAB & Simulink
Create a report of test settings and parameter information. ... This example uses an existing test file ( AutopilotTestFile.mldatx ), which was created...
Read more >
How i will create test for report class for this....
1. Test class must start with @isTest annotation if class class version is more than 25 · 2. Test environment support @testVisible ,...
Read more >
Analyze run results - ADM Help Centers
Note: By default, the report is generated to a folder called ... but you can modify the test settings to instruct UFT Developer...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found