[FOLIO-1242] add mocha junit report to ui-testing Created: 04/May/18  Updated: 12/Nov/18  Resolved: 05/Sep/18

Status: Closed
Project: FOLIO
Components: None
Affects versions: None
Fix versions: None

Type: Task Priority: P3
Reporter: John Malconian Assignee: John Malconian
Resolution: Won't Do Votes: 0
Labels: ci, sprint38, sprint39, sprint40, sprint41, sprint42, sprint43, sprint44, sprint45
Remaining Estimate: Not Specified
Time Spent: 2 hours
Original estimate: Not Specified

Issue links:
Relates
relates to STCLI-84 Add mocha-jenkins-reporter to stripes... Closed
Sprint:

 Description   

I'm attempting to add the mocha-junit-reporter to ui-testing so that I can get pretty XML-based test reults from ui-testing. However, running 'yarn test' with the reporter option returns a "unrecognized option" error.



 Comments   
Comment by John Malconian [ 04/May/18 ]

Basically, following the instructions from here:
https://www.npmjs.com/package/mocha-junit-reporter

jenkins@4b2c2841753b:~/ui-testing$ yarn test --reporter mocha-junit-reporter --reporter-options mochaFile=test-out.xml

yarn run v1.6.0

$ ./node_modules/.bin/mocha test/120-auth-fail.js test/dependencies.js test/exercise.js test/codex-search.js test/vendor.js test-module.js --run=/checkin/checkout/users/inventory/requests/circulation --reporter mocha-junit-reporter --reporter-options mochaFile=test-out.xml
Ignoring unrecognized option:  reporter
Ignoring unrecognized option:  reporter-options

          Found user estefania
          Test suite   @folio/checkout:1.1.3000131
          Live module  @folio/checkout:1.1.3000131 (http://folio-snapshot-latest.aws.indexdata.com)
          Test suite   @folio/users:2.12.2000311
          Live module  @folio/users:2.12.2000311 (http://folio-snapshot-latest.aws.indexdata.com)
        (found user ID keenan)
        (found patron group ID e4d9d945-7004-44a9-b7f3-39a98bf5cd0c)
        (found "Staff" group ID 02fc5e0f-8cf6-4394-b720-c8dd34540173)
          Test suite   @folio/users:2.12.2000311
          Live module  @folio/users:2.12.2000311 (http://folio-snapshot-latest.aws.indexdata.com)
          Test suite   @folio/users:2.12.2000311
          Live module  @folio/users:2.12.2000311 (http://folio-snapshot-latest.aws.indexdata.com)
          ID of deleted permission set: 16ae2fc6-1baa-4ab9-b5e0-e1a609af5692
          Test suite   @folio/users:2.12.2000311
          Live module  @folio/users:2.12.2000311 (http://folio-snapshot-latest.aws.indexdata.com)
          Test suite   @folio/inventory:1.0.2000180
          Live module  @folio/inventory:1.0.2000180 (http://folio-snapshot-latest.aws.indexdata.com)
          Test suite   @folio/inventory:1.0.2000180
          Live module  @folio/inventory:1.0.2000180 (http://folio-snapshot-latest.aws.indexdata.com)
          Test suite   @folio/inventory:1.0.2000180
          Live module  @folio/inventory:1.0.2000180 (http://folio-snapshot-latest.aws.indexdata.com)
          Test suite   @folio/requests:1.1.300079
          Live module  @folio/requests:1.1.300079 (http://folio-snapshot-latest.aws.indexdata.com)
        Found 43563912038699
          Test suite   @folio/requests:1.1.300079
          Live module  @folio/requests:1.1.300079 (http://folio-snapshot-latest.aws.indexdata.com)
error Command failed with exit code 4.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Comment by John Malconian [ 04/May/18 ]

funny enough the xml file is still generated and looks good. But the output to STDOUT is not so good now. Clearly, I'm missing something.

Comment by John Malconian [ 04/May/18 ]

https://github.com/juhovh/mocha-jenkins-reporter looks like a better bet - The output to STDOUT is fine and the report is generated. Still getting the 'Ignoring unrecognized option: reporter' error, however.

Comment by John Malconian [ 09/Aug/18 ]

STCLI-84 Closed supercedes this.

Generated at Thu Feb 08 23:11:53 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d.