Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Any plans on adding allure reporting? (or any other reporting mechanism) #6

Closed
kumarpatel opened this issue Apr 17, 2019 · 2 comments

Comments

@kumarpatel
Copy link

kumarpatel commented Apr 17, 2019

I tried added @wdio/allure-reporter to the npm global install list in Dockerfile

RUN apk --no-cache add \
    nodejs \
    npm \
    ffmpeg \
    android-tools@edgetesting \
  && npm install -g \
    npm@latest \
    @wdio/cli@^5.7.13 \
    @wdio/local-runner@^5.7.13 \
    @wdio/mocha-framework@^5.7.13 \
    @wdio/spec-reporter@^5.7.13 \
    @wdio/allure-reporter \
    @wdio/sync@^5.7.13 \
    chai@^4.2.0 \
    mailhog@^4.1.0 \
    uuid@^3.3.2 \
    wdio-screen-commands@^2.6.0 \
    webdriverio@^5.7.13 \
    lodash@^4.17.11 \

and added the config in wdio.conf.js

reporters: ["spec", "allure"],
  reporterOptions: {
    allure: {
      outputDir: "allure-results",
      disableWebdriverStepsReporting: true,
      disableWebdriverScreenshotsReporting: true,
      useCucumberStepReporter: false
    }
  },

Here's the error I get

Stderr:
wdio_1          | [0-0] 2019-04-17T11:59:36.703Z ERROR @wdio/local-runner: Failed launching test session: Error: Couldn't find plugin "allure" reporter, neither as wdio scoped package "@wdio/allure-reporter" nor as community package "wdio-allure-reporter". Please make sure you have it installed!
wdio_1          |     at initialisePlugin (/usr/lib/node_modules/@wdio/local-runner/node_modules/@wdio/utils/build/initialisePlugin.js:62:9)
wdio_1          |     at BaseReporter.initReporter (/usr/lib/node_modules/@wdio/local-runner/node_modules/@wdio/runner/build/reporter.js:189:51)
wdio_1          |     at Array.map (<anonymous>)
wdio_1          |     at new BaseReporter (/usr/lib/node_modules/@wdio/local-runner/node_modules/@wdio/runner/build/reporter.js:34:39)
wdio_1          |     at Runner.run (/usr/lib/node_modules/@wdio/local-runner/node_modules/@wdio/runner/build/index.js:89:21)
wdio_1          |     at process.on.m (/usr/lib/node_modules/@wdio/local-runner/build/run.js:37:20)
wdio_1          |     at process.emit (events.js:187:15)
wdio_1          |     at emit (internal/child_process.js:812:12)
wdio_1          |     at process._tickCallback (internal/process/next_tick.js:63:19)

Thoughts on what I'm doing wrong?

@kumarpatel kumarpatel changed the title Question: Any plans on adding allure reporting? Question: Any plans on adding allure reporting? (or any other reporting mechanism) Apr 17, 2019
@blueimp
Copy link
Owner

blueimp commented Apr 19, 2019

Maybe you forgot to rebuild the Docker image?

I don't have plans to add additional packages to the blueimp/wdio Docker image.

The purpose of this project is more like a starter kit, so it's recommended to fork it and create your own Docker Hub Automated build if you require additional software inside the Docker image.

So if you make changes to the Dockerfile, you should build your own image, e.g.:

docker build -t YOUR_USERNAME/wdio .

Then in docker-compose.yml, replace blueimp/wdio with YOUR_USERNAME/wdio.

Also, the Allure outputDir must be in a writable directory, for example reports/allure:

exports.config = Object.assign({}, require('./hooks'), {
  // ...
  reporters: [
    'spec',
    [
      'allure',
      {
        outputDir: 'reports/allure',
        disableWebdriverStepsReporting: true,
        disableWebdriverScreenshotsReporting: true
      }
    ]
  ],
  // ...
})

@kumarpatel
Copy link
Author

oh, I see.
I'll give that approach a try.
Thanks again for your help.

yamafaktory pushed a commit to allthings-archive/wdio that referenced this issue Jul 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants