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
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
@@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 ?!
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
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.
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
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
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.
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
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
"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
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
@@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
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.
@@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.
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
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
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
Is there any way to send the report to Xray (Jira plugin)? Do you think is possible?
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
Can you please make a video on how to mask sensitive data in allure reports? Thanks
Glad you enjoyed the content. Will definitely consider creating a video on it.
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
Can we extract this to pdf so we can send it to stakeholders?
Hi dude, do you know if it's possible to run individuals tests with allure reporter? i know that only with --spec [ ]
Can we categories failed test cases ?
How can I get the history/trend to show? Is it bc we are deleting the past results every time we run -clean?
You should see the trends when you go through multiple runs.
Sir how to clear old run results from the report ?
Using the --clean flag like this - allure generate [allure_output_dir] --clean && allure open
@@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 ?!
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
@@sdetunicorns How to delete it manually?
@@sdetunicorns please if you could help me deleting history manually please tell me how 🥺
bro could you please tell me how to open allure reports automatically without providing command line in terminal
You can add the report generate in the onComplete hook - webdriver.io/docs/allure-reporter/#autogenerate-report
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.
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
How can we auto generate the allure report too?
You can add the script to the onComplete function in wdio.conf.js file --> webdriver.io/docs/allure-reporter/#autogenerate-report
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
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
@@sdetunicorns thanku
I am seeing a blank allure report getting generated with the message "ALLURE REPORT UNKNOWN, 0 Test cases, NaN%". How can we fix this?
You are probably not passing in the correct folder path when generating results.
@@sdetunicorns Actually that's correct. I realized it later. Thanks though!
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.
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
@@sdetunicorns Right now, doing the alternative. Will try the one with the Babel setup. Thanks for the reply.
Can you please share comand to clean allure results, I tried "allure clean"
allure generate allure-results --clean
How to retry failed test cases using allure ? Please provide solution
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
"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
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
@@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
If I copy paste your code instead report class issue seeing ''' mochaOpts: {
^
SyntaxError: Unexpected token ':'
'''
error
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.
@@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.
will this work with version 4 of webdriver.io?
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
@@sdetunicorns cool thanks! i'll let you know what I find
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
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