Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

213
Views
Cypress: sending report stats to discord/slack

I have a framework ready in cypress, now I want my execution stats to be posted to discord or slack. Now to do that I have written a after:run method in plugin/index.js and I am getting the stats. I am getting stuck not when I am trying to send the stats to slack.

/// <reference types="cypress" />

module.exports = (on, config) => {
on('after:run', (results) => {if (results) {

    abc = results.totalPassed, 'out of all tests', results.totalTests, 'passed'
    //console.log(results.totalPassed, 'out of all tests', results.totalTests, 'passed')
     got.post(
      'SLACK WEBHOOK IRL',
      { body: {content: abc}, json: true }
     );
  }})
}

I tried axios as well but I am constantly getting axios/got not defined. and if I add an Import statement then I am getting an error message saying Import cannot be outside of module.

Not sure what is the currect path here to get this activity done.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!