michaelleeallen / mocha-junit-reporter

A JUnit XML reporter for mocha.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Outputs not printing to xml as described in README

AmberWilkie opened this issue · comments

Hello. I have added the following to my test file, as per the README:

  it('should capture output', function () {
    this.test.consoleOutputs = ['output from the basic test']
  })

I run my tests with this command:

npx cypress run --env configFile=prod --spec "cypress/integration/testfile.js" --reporter junit --reporter-options "mochaFile=results/[hash].xml,outputs=true,toConsole=true"

If the test errors, I get a <failure> but I never get a <system-out>.

Maybe this isn't an issue and there's something wrong with my code above. If so, I'd be very grateful if someone could tell me what I've done wrong. If not, any other help?

We are also facing same issue. It looks like defect.
I came across this - cypress-io/cypress#4245

Same issue here.

same issue here