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.

Create one HTML report with mochawesome and run multiple

See original GitHub issue

What are you trying to achieve?

Create one HTML report for every test.js file

What do you get instead?

https://ibb.co/eyE63x

codeceptjs run-multiple --all --reporter mocha-multi

Feature('test1')
BeforeSuite(I => {
	console.log('Start testing bla bla bla 1')
})
AfterSuite(I => {
	console.log('Finished testing bla bla bla 1')
})
const scenario1 =
	'@test1|' +
	'bla bla bla 1'
Scenario(scenario1, function*(I) {
I.login('id')...
})

// ================

Feature('test2')
BeforeSuite(I => {
	console.log('Start testing bla bla bla 2')
})
AfterSuite(I => {
	console.log('Finished testing bla bla bla 2')
})
const scenario1 =
	'@test2|' +
	'bla bla bla 2'
Scenario(scenario1, function*(I) {
I.login('id')...
})

// =============

Feature('test3')
BeforeSuite(I => {
	console.log('Start testing bla bla bla 3')
})
AfterSuite(I => {
	console.log('Finished testing bla bla bla 3')
})
const scenario1 =
	'@test3|' +
	'bla bla bla 3'
Scenario(scenario1, function*(I) {
I.login('id')...
})

Details

  • CodeceptJS version:
  • NodeJS Version:
  • Operating System:
  • Protractor || WebDriverIO || Nightmare version (if related)
  • Configuration file: “dependencies”: { “codeceptjs”: “^1.1.3”, “concurrently”: “^3.5.1”, “puppeteer”: “^1.0.0” }, “devDependencies”: { “mocha”: “^4.1.0”, “mocha-multi”: “^0.11.1”, “mocha-junit-reporter”: “^1.15.0”, “mochawesome”: “^3.0.1”, “mochawesome-report-generator”: “^3.1.0” }
const multipleConfig= {
	test1: {
		grep: '@test1',
		browsers: ['chrome'],
	},
	test2: {
		grep: '@test2',
		browsers: ['chrome'],
	},
	test3: {
		grep: '@test3',
		browsers: ['chrome'],
	},
}
const defaultConfig = {
	tests: './src/tests/**/*.js',
	timeout: 900,
	output: './output',
	helpers: {
		Puppeteer: {
			windowSize: '1280x800',
			browser: 'chrome',
			chrome: {args: ['--no-sandbox', '--disable-setuid-sandbox']},
			url: 'http://localhost',
			uniqueScreenshotNames: false,
			show: false,
			waitForAction: 1000,
			restart: true,
		},
		MyHelpers: {
			require: './helpers/helpers.js',
		},
	},
	mocha: {
		reporterOptions: {
			'mocha-junit-reporter': {
				stdout: '-',
				options: {
					mochaFile: './output/result.xml',
				},
			},
			mochawesome: {
				stdout: './output/console.log',
				options: {
					reportDir: './output',
					reportPageTitle: 'Report page',
					reportFilename: 'report',
					quiet: true,
					json: false,
					html: true,
					overwrite: true,
					inline: true,
				},
			},
		},
	},
	multiple: multipleConfig,
	bootstrap: false,
	include: {},
	name: 'codecept',
}

Issue Analytics

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

github_iconTop GitHub Comments

17reactions
Rob-Dohertycommented, Jun 1, 2018

It would be really useful to have a single report for a parallel test run.

0reactions
gabrielbergmanncommented, Nov 4, 2019

Would be a great feature, I’m facing the same problema in my project. @DavertMik

Read more comments on GitHub >

github_iconTop Results From Across the Web

Create one HTML report with mochawesome and run multiple
Create one HTML report for every test.js file What do you get instead? https://ibb.co/eyE63x codeceptjs run-multiple --all --reporter ...
Read more >
How To Generate Mocha Reports With Mochawesome?
Learn how to generate Mocha reports and use Mocha report generator Mochawesome, a popular and easy-to-use Mocha reporter for Selenium test ...
Read more >
Cypress — merging multiple mochawesome reports | by Kristijan
This command will take multiple JSON outputs and create one containing all. I know you might want HTML report, but first we need...
Read more >
10 Generate HTML Report In Cypress | MochAwesome Reporter
In this video, I will show you how to generate HTML report in cypress.Cypress Pluginhttps://github.com/LironEr/cypress- mochawesome - ...
Read more >
Using Mochawesome Reporter with Cypress
Generate multiple mocha reports in a single mocha execution. ... to generate a standalone HTML/CSS report to help visualize your test runs.
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