Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jan 08 2018 21:14
    adamgruber closed #21
  • Jan 08 2018 21:14
    adamgruber commented #21
  • Jan 08 2018 21:13
    adamgruber closed #50
  • Jan 08 2018 21:13
    adamgruber commented #50
  • Jan 08 2018 21:12
    adamgruber closed #78
  • Jan 08 2018 21:12
    adamgruber commented #78
  • Jan 08 2018 21:12
    adamgruber closed #79
  • Jan 08 2018 21:12
    adamgruber commented #79
  • Jan 07 2018 18:58
  • Jan 04 2018 13:56
    rsaccoll starred adamgruber/mochawesome
  • Jan 04 2018 10:38
  • Jan 04 2018 06:31
    CrossJae starred adamgruber/mochawesome
  • Jan 03 2018 11:38
    vijaybernad opened #222
  • Dec 29 2017 21:42
    juansb827 starred adamgruber/mochawesome
  • Dec 27 2017 23:11
    Koslun starred adamgruber/mochawesome
  • Dec 27 2017 10:21
    MiYogurt starred adamgruber/mochawesome
  • Dec 26 2017 17:45

    adamgruber on 3.0.1

    (compare)

  • Dec 26 2017 17:45

    adamgruber on 3.0.0

    (compare)

  • Dec 26 2017 17:43

    adamgruber on master

    Update CHANGELOG.md (compare)

  • Dec 26 2017 17:42

    adamgruber on master

    Release 3.0.1 [ci skip] (compare)

Anesh Parvatha
@0xc0d3r
Hey, can someone guide me how to use parallel mode programatically to generate mochawesome report?
Dev
@Charan83
Hi all,
Does anybody know, the location of zip file for the mochawesome report
Dev
@Charan83
Is there a way to change the context name that we are adding, currently it says 'Additional Test Context'
Adam Gruber
@adamgruber
There is currently no option to change that text
Bernabé Puente Moure
@robopilingui_twitter
Hello everyone. I am having a problem with the urls generated for failed tests. It is generating the decoded url and exception of the character '#'.
It is generating this for me: (example% 20 # 1)
when it should be generating this:% 28example% 20% 231% 29
In other words, it is generating the character '#' instead of '% 23'.
How can I solve that. Thanks a lot!!!
AkramPasha
@AkramPasha

Hello, im using below config in cypress.json but in docker container when suite is executed under mocha folder *json file are not generated , Could someone help me in this.

"reporter": "cypress-multi-reporters",
"reporterOptions": {
"reporterEnabled": "mochawesome",
"mochawesomeReporterOptions": {
"reportDir": "cypress/reports/mocha",
"quite": true,
"overwrite": false,
"html": false,
"json": true
}
},

Abhinaba Ghosh
@abhinaba-ghosh

Hi peeps, it seems mochawesome is not able to understand the reporterOptions

my .mocharc contains below configuration -

 parallel: true,
  jobs: 2,
  reporter: 'mochawesome',
  reporterOptions: {
    reportDir: './test-reports/',
    reportFilename:'master-report',
    saveHtml: true,
    saveJson: true,
    charts: true,
    showSkipped: true,
    overwrite: true
  },

It seems the report options are ignored always

the dep versions:

    "mocha": "^8.2.1",
    "mochawesome": "^6.2.2",
    "mochawesome-report-generator": "^5.2.0",

any guidance would help.

Dev
@Charan83
how can I customize to add custom header, currently we have passed tests (with green tick) and failure tests(x- red) at the top of the report. Clicking on x(red) we can filter only the failed tests.
I would like to add another filter here. How can we do it?
Adam Gruber
@adamgruber
The report header is not customizable. What filter do you need?
Dev
@Charan83
Would like to have a filter for flaky tests(tests that were passing on retry)
Slavik
@slavikshen
Does addContext works under the after? I have an after outside of any describe.
Adam Gruber
@adamgruber
It should
Dev
@Charan83
@adamgruber can flaky test filter be added to the report, think it will be very helpfull for all
Adam Gruber
@adamgruber
The reporter doesn’t currently work well with retried tests. The info needed for that kind of filter isn’t there
LorenzoLK
@LorenzoLK
I'm having an issue where I npm install all of the libraries for mochawesome and its affiliates and it says that it could not load the reporter.
Prasanna Dangalla
@prasa7
Hi Nice to join this group
I have a problem when using "inlineAssets": true
I need this because I'm trying to embed the generated report to a mail
so all the css and javascript should be in one HTML page
@adamgruber can you kindly help me ?
My cypress.json looks as below
"reporter": "cypress-multi-reporters",
"reporterOptions": {
  "inlineAssets": true,
  "reporterEnabled": "cypress-mochawesome-reporter, mocha-junit-reporter",
  "mochaJunitReporterReporterOptions": {
  "mochaFile": "cypress/reports/junit/results-[hash].xml"
  },
  "cypressMochawesomeReporterReporterOptions": {
    "charts": true,
    "reportPageTitle": "custom-title"
  }
},
"video": false
I have this script in package.json
"scripts": {
"test1": "cypress run",
"report:merge": "mochawesome-merge --reportDir cypress/reports/html/.jsons/ > cypress/reports/mochawesome-bundle.json",
"report:generate": "marge cypress/reports/mochawesome-bundle.json -o cypress/reports/html"
}
I execute
npm run test1
npm run report:generate
npm run report:merge
Yosuva
@ayosuva
Hello Team
async.series ([ function(cb) { addContext(this, 'some context'); ], done)
addContext not working if i use it inside async.series([])
can someone please help me?
I am new to JS and mochaswsome
Adam Gruber
@adamgruber
The function inside the array is creating a closure so this no longer refers to the test object. Use an arrow function inside the array instead.
Yosuva
@ayosuva
Can you please give me a sample code for 'arrow function inside the array'
Adam Gruber
@adamgruber
async.series([ cb => { addContext(this, 'something'); } ], done)
Yosuva
@ayosuva
thanks Adam. It helps
Yosuva
@ayosuva
@adamgruber - is there a way i can wrap the text in mochawesome report?
Adam Gruber
@adamgruber
Not sure what you are trying to do but generally the report does not support customizations.
Yosuva
@ayosuva
Is there a way i can get all the added context details in afterEach fuctions ?
Yosuva
@ayosuva
@adamgruber Is there a way i can get all the added context details in afterEach functions ? so that i can update the results into Xray using API call
Yosuva
@ayosuva
Got it. Ignore .. I was able to get all the added context details using this .currentTest.context
dfawole
@dfawole
Hello all, am using mochawesome reporter to generate test reports for my tests with the custom outputFileFormat option to generate .json result files but when I tried to merge all the generated test results using mergeResults utilities function I kept getting this error below, and one more thing, if you'll indulge me, am using the wdio-mochawesome-reporter v3.2.0, and instead of it generating .log file results instead of .json file results, do you think this might be a bug as well? Any help will be greatly appreciated
ERROR @wdio/cli:utils: Error in onCompleteHook: SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
1 reply
Helene Lejeune
@helenou
Hi @adamgruber can you tell if my request is existing functionality adamgruber/mochawesome#358, I believe it's not
jasp402
@jasp402
hi everyone. I'm working with Cypress and mochawesome report. I have a question. How to disabled video generator?
faheemsiddiq
@faheemsiddiq
Hello, I am using mochawesome report with Cypress. I have a build pipeline running on bamboo and that pushes the full_report.html to artifactory. I then open that report from artifactory. I am getting this error "Blocked script execution because the document's frame is sandboxed and the 'allow-scripts' permission is not set.", running:
Cypress version 7.4.0,
mocha version 8.1.3,
mochawesome version 6.2.2,
mochawesome-merge version 4.2.0,
mochawesome-report-generator version 5.2.0,
PawelEpicode
@PawelEpicode

hello Guys,
can you please help with mocha reporting,
cypresstest@1.0.0 cypress:generatereport

npx mochawesome-merge cypress/results/*.json>mochawesome.json && npx mochawesome-report-generator mochawesome.json -o
cypress/results --charts true -f index.html -t 'HDP Regression Run' -p 'HDP Regression Run'

ERROR: Failed to merge reports

Error: Pattern cypress/results/*.json matched no report files

thisis how my package json looks,
"cypress:generatereport": "npx mochawesome-merge cypress/results/*.json>mochawesome.json && npx mochawesome-report-generator mochawesome.json -o cypress/results --charts true -f index.html -t 'HDP Regression Run' -p 'HDP Regression Run'"
},
"author": "",
"license": "ISC",
"devDependencies": {
"cypress": "^9.0.0",
"cypress-file-upload": "3.5.0",
"cypress-mailosaur": "^2.0.1",
"mocha": "^9.1.3",
"mochawesome": "^7.0.1",
"mochawesome-merge": "^4.2.0",
"mochawesome-report-generator": "^6.0.1",
"semistandard": "^16.0.1"
},

and cypress.json
"reporter": "mochawesome",
"reporterOptions": {
"files": [
"cypress/results/*.json"
],
"overwrite": false,
"html": false,
"json": true
}

Juan Pablo
@jprealini
Hello everyone! Quick question... For a given reason, I need to have a simple json file created by a reporter (I am using mochawesome with Cypress). The merged mochawesome reporter is too complex, so I wonder if there is a way to manipulate, customize, post-process the merged json file to create something more like a basic array of json objects that just contain test title, status and duration. Similar to this:
[
  {
    "description": "Key Navigation Tabs tests PRIMARY-ACCOUNT-CENTRIC Main tabs load correctly",
    "assertions": [
      {
        "passed": true
      }
    ],
    "duration": 20560
  },
  {
    "description": "Key Navigation Tabs tests VIRTUAL-ACCOUNT-CENTRIC Main tabs load correctly",
    "assertions": [
      {
        "passed": true
      }
    ],
    "duration": 13862
  },
  {
    "description": "Key Navigation Tabs tests PRIMARY-USER-CENTRIC Main tabs load correctly",
    "assertions": [
      {
        "passed": true
      }
    ],
    "duration": 18957
  }
]
Mudit Maheshwari
@mudit94
I am getting refused to load image error when i am trying to view the report in jenkins
for cypress-mochawesome-reporter
HybridEyeGrillage
@HybridEyeGrillage

Hello!
I just got started with mochawesome a couple days ago- everything so far is configured well and I can merge/generator a nice report. The odd thing that I notice is that every step's code output, whether passing or failing, is the same.

const state = window.testState;
return cy
  .then(() => state.onStartScenario(scenario, indexedSteps))
  .then(() =>
    resolveAndRunBeforeHooks.call(this, scenario.tags, state.feature.name)
  )
  .then(() =>
    indexedSteps.forEach((step) =>
      stepTest.call(this, state, step, rowData)
    )
  )
  .then(() => state.onFinishScenario(scenario));

Is this something from mochawesome or is it from Cypress itself?

guruprasadsr2805
@guruprasadsr2805
Hi All. I am using mochawesome to generate reports for my supertest API tests. I have observed that whenever tests fail on the pipeline, the reports are not generated. I want to host the generated reports on github pages. The report generation works fine on my local. Can some please help me?
Rogelio Garcia
@rogelioagarcia
Would it be possible to for mochawesome to generate a report that is only HTML and CSS? Serving up JS code from Jenkins is not ideal from a security point of view.
Or are there other reporters that generate html and have the option to save it to a file?