Allure Reporter - WebdriverIO | #15

Поділитися
Вставка
  • Опубліковано 17 лис 2024

КОМЕНТАРІ • 56

  • @vlatkod1065
    @vlatkod1065 3 роки тому +2

    Is there any way to send the report to Xray (Jira plugin)? Do you think is possible?

  • @gugaperanidze
    @gugaperanidze 10 місяців тому

    I have set up the Allure reporter in my WebDriverIO configuration, following the steps you provided. Despite trying various solutions, including reinstalling the Allure reporter and adjusting its configuration, I continue to encounter an error: TypeError: ReporterClass is not a constructor. I have verified that I am using the latest versions of WebDriverIO and the Allure reporter in my project's devDependencies.also reportes configuration: reporters: [ 'spec', ['allure', { outputDir: 'allure-results', disableWebdriverStepsReporting: false, disableWebdriverScreenshotsReporting: false, }], ], However, the error persists.
    If you have any more advice or suggestions to help me fix this issue, I'd really appreciate it

  • @madiharehman1820
    @madiharehman1820 Рік тому +1

    Can you please make a video on how to mask sensitive data in allure reports? Thanks

    • @sdetunicorns
      @sdetunicorns  Рік тому

      Glad you enjoyed the content. Will definitely consider creating a video on it.

  • @srinidhireddypalwai3721
    @srinidhireddypalwai3721 2 роки тому

    Thanks for sharing the information. I'm seeing "allure-report for the report is already in use, add a '--clean' option to overwrite" even after executing this command "allure generate allure-results --clean". could you please help me

  • @rayhan15243
    @rayhan15243 3 роки тому +1

    Can we extract this to pdf so we can send it to stakeholders?

  • @lucasstefano3851
    @lucasstefano3851 2 роки тому

    Hi dude, do you know if it's possible to run individuals tests with allure reporter? i know that only with --spec [ ]

  • @SukhvirSingh-ke6dm
    @SukhvirSingh-ke6dm 2 роки тому

    Can we categories failed test cases ?

  • @brianlee3446
    @brianlee3446 3 роки тому

    How can I get the history/trend to show? Is it bc we are deleting the past results every time we run -clean?

    • @sdetunicorns
      @sdetunicorns  3 роки тому

      You should see the trends when you go through multiple runs.

  • @Od3o_ela_sabil_rabek
    @Od3o_ela_sabil_rabek 2 роки тому

    Sir how to clear old run results from the report ?

    • @sdetunicorns
      @sdetunicorns  2 роки тому

      Using the --clean flag like this - allure generate [allure_output_dir] --clean && allure open

    • @Od3o_ela_sabil_rabek
      @Od3o_ela_sabil_rabek 2 роки тому

      @@sdetunicorns I try to use it and the folder of results is removed but after recreating the report the history of old run still exist in the report ?!

    • @sdetunicorns
      @sdetunicorns  2 роки тому

      You are supposed to see the history so that Allure can show you past trends of test runs. This is one reasons people use Allure.
      If you don't want it you can manually delete it

    • @Od3o_ela_sabil_rabek
      @Od3o_ela_sabil_rabek 2 роки тому

      @@sdetunicorns How to delete it manually?

    • @Od3o_ela_sabil_rabek
      @Od3o_ela_sabil_rabek 2 роки тому

      @@sdetunicorns please if you could help me deleting history manually please tell me how 🥺

  • @AsifKhan-ve1ky
    @AsifKhan-ve1ky 2 роки тому

    bro could you please tell me how to open allure reports automatically without providing command line in terminal

    • @sdetunicorns
      @sdetunicorns  2 роки тому

      You can add the report generate in the onComplete hook - webdriver.io/docs/allure-reporter/#autogenerate-report

  • @stith_pragya
    @stith_pragya 3 роки тому

    Hi bro.... my report is succesfully generated but not opening in the browser....in browser(chrome) its showing - "This site can't be reached...and keep on loading and loading.

    • @sdetunicorns
      @sdetunicorns  3 роки тому

      You also need to make sure that you are running the Allure server as well. It should run the server after this command - allure generate [allure_output_dir] && allure open

  • @davidyang424
    @davidyang424 2 роки тому

    How can we auto generate the allure report too?

    • @sdetunicorns
      @sdetunicorns  2 роки тому +1

      You can add the script to the onComplete function in wdio.conf.js file --> webdriver.io/docs/allure-reporter/#autogenerate-report

  • @jenikachauhan6907
    @jenikachauhan6907 2 роки тому

    hello sir my report is succesfully generated but not opening in the browser....in browser(chrome) its showing - "This site can't be reached...and keep on loading and loading. and 'allure' is not recognized as an internal or external command,
    operable program or batch file. showing error
    plz help me

    • @sdetunicorns
      @sdetunicorns  2 роки тому +1

      Seems like your cli is not recognizing allure, try to run allure within your project using `npx allure` or install allure globally and try again

    • @jenikachauhan6907
      @jenikachauhan6907 2 роки тому

      @@sdetunicorns thanku

  • @abhilashn9425
    @abhilashn9425 3 роки тому

    I am seeing a blank allure report getting generated with the message "ALLURE REPORT UNKNOWN, 0 Test cases, NaN%". How can we fix this?

    • @sdetunicorns
      @sdetunicorns  3 роки тому

      You are probably not passing in the correct folder path when generating results.

    • @abhilashn9425
      @abhilashn9425 3 роки тому

      @@sdetunicorns Actually that's correct. I realized it later. Thanks though!

  • @indhunataraj6473
    @indhunataraj6473 4 роки тому

    Can you explain how to use the import statement of Allure reporter? It gives me an error "Cannot use import outside the module". When I looked for solutions, there were answers like type:module has to be included in package.json file and there were few other things explained w.r.t extensions like .js and .mjs. dint understand much.

    • @sdetunicorns
      @sdetunicorns  4 роки тому +2

      Hi, 'import' is part of the Javascript ES6 feature and by default, Webdriverio doesn't support that. To make it compatible with ES6, you need to setup Babel with your tests. I have explained how to do that in my previous video - ua-cam.com/video/a9v9wn_P3Uk/v-deo.html. Skip to 9:45 to jump on to the Babel setup part.
      As an alternative, you can also use ES5 with your tests this way - const { addSeverity } = require('@wdio/allure-reporter').default

    • @indhunataraj6473
      @indhunataraj6473 4 роки тому +1

      @@sdetunicorns Right now, doing the alternative. Will try the one with the Babel setup. Thanks for the reply.

  • @kameshkaran4085
    @kameshkaran4085 3 роки тому

    Can you please share comand to clean allure results, I tried "allure clean"

    • @sdetunicorns
      @sdetunicorns  3 роки тому

      allure generate allure-results --clean

  • @chandrasmiling4908
    @chandrasmiling4908 4 роки тому

    How to retry failed test cases using allure ? Please provide solution

    • @sdetunicorns
      @sdetunicorns  4 роки тому

      You can retry individual test by applying number of reruns as the last parameter of the 'it' block or you can retry entire spec file by updating 'specFileRetries' option in 'wdio.conf.js'. You can read more about it here - webdriver.io/docs/retry.html#add-retries-on-a-per-specfile-basis

  • @krupas4895
    @krupas4895 4 роки тому

    "Failed launching test session: TypeError: ReporterClass is not a constructor
    at BaseReporter.initReporter (/Users/+++++++/webdriverio-test/node_modules/@wdio/runner/build/reporter.js:100:20) " seeing this error after adding allure code in config file, can you help me to fix this

    • @sdetunicorns
      @sdetunicorns  4 роки тому

      Make sure your configuration is setup properly, you can check out my github repo to compare your code - github.com/automationbro/webdriverio-tutorial/blob/master/wdio.conf.js#L134

    • @krupas4895
      @krupas4895 4 роки тому

      @@sdetunicorns reporters: [
      [
      'allure',
      {
      outputDir: 'allure-results',
      },
      ],
      ],
      //
      // Options to be passed to Mocha.
      // See the full list at mochajs.org/
      mochaOpts: {
      ui: 'bdd',
      timeout: 60000
      },
      I am really not sure where I am missing here is my config code

    • @krupas4895
      @krupas4895 4 роки тому

      If I copy paste your code instead report class issue seeing ''' mochaOpts: {
      ^
      SyntaxError: Unexpected token ':'
      '''
      error

    • @sdetunicorns
      @sdetunicorns  4 роки тому

      your configuration seems ok based on what you pasted over here. I'd recommend try to create a new project and setup allure in it to see if it works for you there and then compare the code. If you can provide me the access to your github repo then I can help take a look also.

    • @krupas4895
      @krupas4895 4 роки тому

      @@sdetunicorns npm install -g allure-commandline --save-dev when I am trying to install allure-command line I am seeing below error, if I remove g(globally) able to install, does it affect my allure report related stuff?
      npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
      npm ERR! code EACCES
      npm ERR! syscall access
      npm ERR! path /usr/local/lib/node_modules
      npm ERR! errno -13
      npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
      npm ERR! [Error: EACCES: permission denied, access '/usr/local/lib/node_modules'] {
      npm ERR! errno: -13,
      npm ERR! code: 'EACCES',
      npm ERR! syscall: 'access',
      npm ERR! path: '/usr/local/lib/node_modules'
      npm ERR! }
      npm ERR!
      npm ERR! The operation was rejected by your operating system.
      npm ERR! It is likely you do not have the permissions to access this file as the current user
      npm ERR!
      npm ERR! If you believe this might be a permissions issue, please double-check the
      npm ERR! permissions of the file and its containing directories, or try running
      npm ERR! the command again as root/Administrator.

  • @lunar-ix9vu
    @lunar-ix9vu 3 роки тому

    will this work with version 4 of webdriver.io?

    • @sdetunicorns
      @sdetunicorns  3 роки тому +1

      It should work although you will need to use the older version of Allure. You can refer to this link from v4 documentation - v4.webdriver.io/guide/reporters/allure.html

    • @lunar-ix9vu
      @lunar-ix9vu 3 роки тому

      @@sdetunicorns cool thanks! i'll let you know what I find

  • @sidricky1
    @sidricky1 3 роки тому

    I am trying to populate trend graph by running the tests multiple times without clearing the historical data but still the graph is not getting populated. I can see the retries section for test case is getting populated but i still cant figure why the History section or Trend graph is not populated. Any help over here is much appreciated ! Thanks in advance

    • @sdetunicorns
      @sdetunicorns  3 роки тому +2

      This would work in CI with allure plugin but locally you need to make some extra changes i.e. storing the history folder from the allure-report to allure-results before you do npx allure generate so that it has history of previous runs