Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added slack notification #759

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Conversation

FahadDarw
Copy link
Contributor

@FahadDarw FahadDarw commented Dec 12, 2024

Description:

This PR introduces improvements to the Cypress test setup and workflow, focusing on report generation and Slack integration for test notifications. The following changes have been implemented:


Key Changes:

1. Workflow File (.github/workflows/cypress-tests.yml):

  • Removed redundant step: mkdir mochareports is no longer necessary since the directory will be created dynamically by the report generator.
  • Improved Slack notifications: Updated the cy:notify script to use a Node.js-based notification mechanism for more flexibility.

2. Cypress Configuration (Dfe.Academies.External.Web/CypressTests/cypress.config.ts):

  • Improved reporter setup:
    • Added mochawesomeReporterOptions to define custom report directory paths and enable integration with Slack messaging.
    • Removed "Fixed a typo (quiet parameter added explicitly)."

3. Package File (Dfe.Academies.External.Web/CypressTests/package.json):

  • Scripts:
    • Added a new script, generate:html:report, to merge JSON test results and generate an HTML report using mochawesome-merge and mochawesome-report-generator.
    • Updated cy:notify to utilise a Node.js-based Slack notification script (sendSlackNotification.js).
  • Dependencies:
    • Added cypress-multi-reporters for improved reporting and integration with multiple tools.

Impact:

  • Simplifies report management by dynamically creating necessary directories.
  • Improves Slack integration for test notifications with a customisable Node.js script.
  • Aligns Cypress reporting with multi-reporter support for better integration with external tools.
  • Adds recognition for new contributors to the project metadata.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants