Part 22 - Mochawesome HTML Report in Cypress | Attach Screenshot into Mochawesome HTML Report

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

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

  • @06account
    @06account 3 года назад +3

    Excellent work I can see you have put in lot of effort to gather all required things to generate report with screenshot..

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

    Thanks for sharing this video.. this is very much useful .. both positive and negative flows worked for me. Thanks again.. keep posting such amazing things..

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

    just a question: how did you configure cypress to run the "posttest" script automatically after all the specs have run? I have been searching for this on the web but could not find a good answer. thank you

  • @tejkumarkempaiah4906
    @tejkumarkempaiah4906 3 года назад +2

    Thank you :) Can you please share a video or blog which clearly explains the differences between mochawesome and allure reports from cypress front.

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

    I am currently having an issue where if I email the entire reports folder to someone , they are able to view the reports but not the failed screenshots. I tried base64 encoding with readFileSync() to embed the screenshot into the report but for some reason its not working inside index.js file . Any idea ?

  • @burgasHoH
    @burgasHoH 3 года назад +2

    Incredible video and work !!

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

    Thanks a lot for this video. Really helpful. However, I am facing an issue that the image attached in HTML is shown broken even though it is proper in the screenshots folder. I've verified that the path provided for the screenshot to be attached in the index.js is correct. Can you please tell the resolution for this?

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

    Hi,
    In My project I have configured a Cucumber HTML Report but am facing on challenges, Unable to attach the passed screenshot in the report. Could u please help us please?

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

    Thanks for your lesion, but I can't attach picture when I use the normal path :( when I using the absolute path as string like `D:/../..' it's ok and and can attach the picture. How can I use the normal path to attach a picture? Thank you

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

      Ultimately the attachment is used by html page. So relative path should be mentioned from html file location to make it work.

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

      @@QABoxLetsTest Thank you so much, I'm so appreciate that

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

    Hello,
    I tried running this and I encounter an issue wherein the script for combine and generate reports is not running after the cli test, there is no error being display before, during and after test

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

      I have created videos for reports on Jenkins and Azure DevOps. Please check those once.

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

    Hi Vinod,
    Thanks for the video. I was able to setup mochawesome reporter.
    I had an observation of the weird behaviour of the reporter tool.
    If all test cases passed then the report is not generated. You have to intentionally fail 1 test script for the report to be generated. After that you fix the fail test case and re-run, you will see the report generated for both the runs.
    Can you please re-create the above-mentioned scenario and confirm if something is to be fixed.
    Regards,
    Anand

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

      Weird, you might have setup the scripts wrongly. I tried it successfully with both cases, all passing and some failing.

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

      @@QABoxLetsTest Use typescript and check. May be I missed in my earlier question. But I am 100% sure.
      It's not working when all test cases pass.

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

      Show me your scripts once and I would also double check it.

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

      @@mailanandteerth I am also facing the same issue. Single (i.e., merged) html report doesn't generate when all the test cases pass. (Only the respective mochawesome.json gets generated inside mocha folder.)
      But if I intentionally fail a test case, only then the Single (merged) html report gets generated inside mochareports folder.
      Were you guys able to find any fix for this problem? Please let me know

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

    Thanks

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

    Can u please add complete report code. I am not able see command at 8.19..scrips are not scrolled to right so what is parameter for combine report

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

      Please check the description of this video. In there you would find the GitHub link. From there you can get code for everything I'm doing in this playlist

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

    Is there way to get multiple-cucumber-html-reporter in Cypress

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

      I never did it myself but I find this link
      github.com/TheBrainFamily/cypress-cucumber-preprocessor/issues/280

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

      @@QABoxLetsTest thank you :)

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

    ERROR: Failed to merge reports giving error while merging files

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

      Please refer to the GitHub repo for this tutorial in the description of the video.

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

    Please give me ur complete code, it is not visible properly

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

      Please check the description of this video. In there you would find the GitHub link. From there you can get code for everything I'm doing in this playlist

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

    when I run run test it returns "Error: no test specified"

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

      Sure, this happens when integration folder is empty. Check your cypress.json or the config file for the same.

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

      @@QABoxLetsTest yes, I created the CommandLineSuite folder and put some tests

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

      Please check your config because this is standard cypress error which pops up when Cypress fails to find test files.

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

      @@QABoxLetsTest Now this.
      > mochawesome-merge cypress/reports/mocha/*.json > cypress/reports/mochareports/report.json
      ERROR: Failed to merge reports
      Error: Pattern cypress/reports/mocha/*.json matched no report files

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

      I've posted my code in the GitHub itself.you can refer to the same. All your errors are related with how you have setup your project.