Closed pratiksyngenta closed 6 months ago
I am able to run the slack web api to run onEnd after e2e test execution is done.
But I have jest unit test cases and playwright e2e tests.
I am able to merge it using
const EC = require('eight-colors'); const MCR = require('monocart-coverage-reports'); const slackWebApi = require('./playwright-slack-notify'); const coverageOptions = { name: 'My Merged Coverage Report', inputDir: ['./jest-tests-results/raw', './e2e-tests-result/ct/raw'], outputDir: './tests-coverage-combined', reports: [['lcov'], ['console-summary']], onEnd: async (reportData, helper) => { // slack integration with web api // await slackWebApi(reportData, helper); } }; const generate = async () => { // clean cache first await MCR(coverageOptions).cleanCache(); console.log('generate merge coverage reports ...'); const coverageResults = await MCR(coverageOptions).generate(); console.log('merge coverage reportPath', EC.magenta(coverageResults.reportPath)); }; generate();
Trying to use https://github.com/cenfun/monocart-reporter-examples/tree/main/integrations/slack-web-api I guess onEnd I dont get reportData, helper here in this case.. can you please suggest
the coverage reporter onEnd hook is different with monocart-reporter, see example here https://github.com/cenfun/monocart-coverage-reports/tree/main?tab=readme-ov-file#onend-hook
I am able to run the slack web api to run onEnd after e2e test execution is done.
But I have jest unit test cases and playwright e2e tests.
I am able to merge it using
Trying to use https://github.com/cenfun/monocart-reporter-examples/tree/main/integrations/slack-web-api I guess onEnd I dont get reportData, helper here in this case.. can you please suggest