MOCHAWESOME HTML Report in CYPRESS (EASY INTEGRATION)

Поделиться
HTML-код
  • Опубликовано: 14 дек 2024

Комментарии • 37

  • @joanmedia
    @joanmedia  3 года назад

    🤖DISCORD: discord.gg/2F9E2fRGaU
    ⭐PREMIUM Cypress + Typescript course: shorturl.at/dcnPn
    📣FREE Cypress videos: shorturl.at/h6iEX

  • @AndrewMatasov
    @AndrewMatasov 2 года назад +1

    Amazing! You won't believe it, but everything still works.

    • @joanmedia
      @joanmedia  2 года назад

      haha really happy it worked!

  • @Concerned_Indianz
    @Concerned_Indianz 3 года назад +1

    One more Wonderful video,,Thanks a lot.

    • @joanmedia
      @joanmedia  3 года назад

      Thanks to you for the comment :)

  • @Abhishek-l2v
    @Abhishek-l2v 2 месяца назад +1

    Hi, with the latest versions of Cypress I'm not able to get the screenshots attached with the HTML report. Can you help with the latest configurations for this?
    Thanks in advance !!

    • @joanmedia
      @joanmedia  2 месяца назад +1

      There is an updated video: ruclips.net/video/wx2juhSt1Ls/видео.htmlsi=t1inmMqQQfGNiXZZ
      Hope it helps :)

  • @rajasekharcmr
    @rajasekharcmr 3 года назад +1

    I am not able to run scripts using npm run cypress:runChrome command. Is there any specific setup we have to run in this way? when i am running from command prompt, browser is not opening but scripts are running. I am using this command "npx cypress run --spec cypress\integration\bussr-operator-cases\* --browser chrome" any suggestions would be great helpful

    • @joanmedia
      @joanmedia  3 года назад

      Hi, what's the error message you are getting?

  • @lindajuliethmontoyasanchez9259
    @lindajuliethmontoyasanchez9259 2 года назад +1

    Excellent videos, thank you very much for sharing the knowledge, Joan, please do you have a video in which I implement cypress-mochawesome-reporter in cypress 10, I am trying to configure it following the video but it does not load the index.html

    • @joanmedia
      @joanmedia  2 года назад

      Hello Linda. Yes, the index has changed, now it should be configured in another file.
      In the meantime, what you can do is create the plugins folder, and the index file and link it in the cypress.config.js(github.com/JoanEsquivel/cypress-demo-framework/blob/main/cypress.config.ts) line 26.
      I'll try to create an updated video soon.

    • @jorgelopez4619
      @jorgelopez4619 2 года назад

      @@joanmedia Hola Joan, tengo el mismo problema que Linda, tengo un proyecto que hice de Cypres 10 + Cucumber guiado con sus videos pero cuando intento implementar MOCHAWESOME me genera el json pero no el index.html con el cual ver el reporte, adjunto la configuración del archivo cypress.config.js
      const { defineConfig } = require("cypress");
      const createBundler =
      require("@bahmutov/cypress-esbuild-preprocessor");
      const addCucumberPreprocessorPlugin =
      require("@badeball/cypress-cucumber-preprocessor").addCucumberPreprocessorPlugin;
      const createEsbuildPlugin =
      require("@badeball/cypress-cucumber-preprocessor/esbuild").createEsbuildPlugin;
      module.exports = defineConfig({
      reporter: 'cypress-mochawesome-reporter',
      reporterOptions: {
      charts: true,
      reportPageTitle: 'Google Demo Reports',
      embeddedScreenshots: true,
      inlineAssets: true,
      saveAllAttempts: false,
      reportDir: 'cypress/reports',
      overwrite: true
      },
      e2e: {
      async setupNodeEvents(on, config) {
      require('./cypress/plugins/index.js')(on, config)
      const bundler = createBundler({
      plugins: [createEsbuildPlugin(config)]
      });
      on("file:preprocessor", bundler);
      await addCucumberPreprocessorPlugin(on, config);
      return config;
      },
      specPattern: "cypress/e2e/feature/*.feature",
      baseUrl: "www.google,
      defaultCommandTimeout: 10000,
      pageLoadTimeout: 10000,
      chromeWebSecurity: false
      },
      });
      dentro de cypress/plugins/index.js tengo la siguiente configuracion:
      module.exports = (on, config) => {
      // optional: register cypress-grep plugin code
      // github.com/bahmutov/cypress-grep
      require("cypress-mochawesome-reporter/plugin")(on);
      };

  • @ptvsportslive8188
    @ptvsportslive8188 2 года назад +1

    Legende

  • @premsudheer2092
    @premsudheer2092 3 года назад +1

    Damn.. you covered a lot dude.. .thanks a lot man..

  •  3 года назад +1

    Freaking legend, my cypress master. Ty! 1

    • @joanmedia
      @joanmedia  3 года назад

      Did You like it? Thanks for your comment OSIFOY 😎

  • @ЕвгенийБелецкий-к5в
    @ЕвгенийБелецкий-к5в 2 года назад +1

    hi! thanks for video. I have a question: why tests starts running in headless mode? how i can to change it?

    • @joanmedia
      @joanmedia  2 года назад

      Thanks for your comment. You need to use the --headed tag. For example: cypress run --headed

  • @christinak6357
    @christinak6357 2 года назад +1

    Great! Very useful content Thanks!

  • @umeshmodi7219
    @umeshmodi7219 2 года назад +1

    Thank you . I have successfully integrated mochaawsome report to test. I have a question how to get second last run html. It's overriding previous report

    • @joanmedia
      @joanmedia  2 года назад

      Hi! Umesh, I would recommend to run it in Jenkins saving the report in each job execution, and if you are using local executions, create a bash/bat script to save the report after each one.

  • @danielkovacs3664
    @danielkovacs3664 2 года назад +2

    hi
    good video series
    I have a bit question, what i do wrong, on the folder I only see a json file
    "screenshotOnRunFailure": true,
    "video": false,
    "reporter": "cypress-mochawesome-reporter",
    "reporterOptions": {
    "reportDir": "cypress/report",
    "charts": true,
    "reportPageTitle": "mocha"
    }
    }

    • @joanmedia
      @joanmedia  2 года назад +1

      Hi, thank you very much!
      Check your JSON file with mine: github.com/JoanEsquivel/cypress-demo-framework/blob/main/cypress.json
      Maybe there is something missing?

    • @danielkovacs3664
      @danielkovacs3664 2 года назад

      @@joanmedia it is the same, but just json file are generated into the report folder
      "reporter": "cypress-mochawesome-reporter",
      "reporterOptions": {
      "reportDir": "cypress/reports/mocha",
      "charts": true,
      "reportPageTitle": "demo",
      "timeStamp": "mmddyyyy_HHMMss",
      "embeddedScreenshoots": true
      },

    • @lovely-do8ns
      @lovely-do8ns 2 года назад

      @@danielkovacs3664 hi bro did you found the solution facing the same issue only json file showing

  • @svetlanakudrua4555
    @svetlanakudrua4555 3 года назад +1

    Hi! You do great job! I like your tutorials very much!!! Could you please make a video about the integration of cypress +axe plugin to perform accessibility testing with using of some reporters (saving report to files not to console only)?

    • @joanmedia
      @joanmedia  3 года назад +1

      Hi Svetlana! It is added to my list. Will try to research about it

    • @svetakudrya3461
      @svetakudrya3461 3 года назад +1

      @@joanmedia Thank you! looking forward!

  • @andyTarcz
    @andyTarcz 2 года назад +1

    How can i share the report with someone? it is a local file so im wondering how i can do that

    • @joanmedia
      @joanmedia  2 года назад

      When you are working with a CI tool like Jenkins you can save it per job and share the link: ruclips.net/video/Gf0gxV1bYbc/видео.html and why not send that by email. There are more ways to do it, but I think that’s the most basic way to do it

  • @mtanaro
    @mtanaro 3 года назад +1

    Good morning Joan, I followed all the steps but the report was not created. Do you have a clue what could happened?

    • @joanmedia
      @joanmedia  3 года назад

      Hi Maria, good afternoon, sorry for the delay. It should work following the steps. I would suggest some debug" steps:
      1- www.npmjs.com/package/cypress-mochawesome-reporter Here are some steps depending on the versions, maybe there are some differences? so you can apply a change depending on your framework.
      2- You can access my repo, and take a look of what I did, and maybe a typo can be found: github.com/JoanEsquivel/cypress-demo-framework
      3- We can pray, maybe god can help us hahaha

  • @lovely-do8ns
    @lovely-do8ns 2 года назад

    I can see only json file not the HtMl file what should I do ?

  • @shadowkun-
    @shadowkun- Год назад

    Can you make tutorial about this but make it that it emails the report everytime a test run is finished? is that possible?