Learn Allure Report in Webdriver IO

Introduction

In this blog, we will look at how to set up allure report in our WebdriverIO Test Automation project.

Reports are an important part of Test Automation. It helps us analyze and depict the results of test run in a pictorial manner so that it is easy to comprehend for the QA Leads/Managers.

Let's go ahead and configure the allure report

Prerequisite

WebdriverIO Project Setup done.

Steps to configure Allure report

Step 1

Open the Terminal in the Visual studio code

Step 2

Install allure webdriverIO package from npm by running the below command

npm install @wdio/allure-reporter --save-dev

Step 3

Now add the below allure reports settings at the reporters section of the wdio.conf.js file

reporters: ['spec',['allure', {
        outputDir: 'allure-results',
        disableWebdriverStepsReporting: false,
        disableWebdriverScreenshotsReporting: false,
    }]],

Note

Spec reporter will already be present just put comma and add these allure report settings

  • disableWebdriverStepsReporting is set to false meaning it will not add any custom allure logs to the reporter.
  • disableWebdriverScreenshotsReporting is set to false meaning we can add screenshots to the reporter using the aftertest hook.

Step 4

Now run any tests from your tests folder.

Step 5

After running you will see the allure-results folder created inside your project.

Step 6

Now install the Allure command line

npm i allure-commandline

Step 7

Now with the help of allure commandline and allure-results folder we can generate allure results by running the below command

npx allure generate allure-results && npx allure open

The above command will access the allure modules which gets installed in your node modules and generates the report by reading the contents in allure-results folder.

npx allure open will open the report in your browser.

You will see an allure report folder generated in your project once you run this command

Every time you run the test and generate report using command you need to clean the contents of the allure-results folder to generate the report

So just add the flag --clean while generating allure report

npx allure generate --clean allure-results && npx allure open

Allure report in Webdriver IO

Allure report in Webdriver IO

If you want screenshot to be attached to allure report when tests fails then add the below code in the after test hook.

Save it run the tests(make the test fail purposely) and generate the allure results again and see Now screenshot will get attached in allure report.

afterTest: async function(test, context, { error}) {
       if (error) {
           await browser.takeScreenshot();
         }
   },

Allure report in Webdriver IO

Summary

Hope this blog will be helpful for generating and setting up allure reports in WebDriverIO Test Automation Project.

Thanks..........

Happy learning..........

Original article source at: https://www.c-sharpcorner.com/

#webdriverio #test 

Learn Allure Report in Webdriver IO
Automation Bro

Automation Bro

1664491490

Mobile Automation Testing using WebdriverIO

Get started with Mobile Automation Testing using WebdriverIO & Appium. In this video, we will cover - 

  • Introduction (Appium & WebdriverIO)
  •  Pre-requisite & Setup
  • Installation
  •  Config Overview & Setup
  •  Setup Appium Inspector 
  • Write Tests 
  • Interacting with Accessibility ID, Class Name & XPath

#webdriverio #testing #automation #javascript #appium 

https://youtu.be/XXaxOL-6gPA

Mobile Automation Testing using WebdriverIO

Mobile Automation with Appium 2.0 and WebdriverIO in 2022

Development of mobile apps is increasing rapidly year by year. As of 2021, there are roughly 2.6M apps on Google app store & 3.6M apps on apple play store. As the development increases, the demand of putting quality apps out there increases as well. After this course, with the help of mobile automation, you will be able to help companies launch top quality applications without worrying about any regression issues.

This course will teach you the latest version of Appium (2.0) and WebdriverIO (v7). Along the way, I will teach you all the best practices that will put on the path of becoming one of the Top Automation Engineer.

Here's what we will be covering in this course:

- Appium & WebdriverIO Introduction
- Setup & Installation
- Different strategies to find elements for both iOS & Android apps
- Working with native features
- Practicing skills on a real-world application
- Page Object Model setup
- Building test framework 
- Optimizing framework
- BrowserStack integration to run tests on cloud server
- GitHub Action for CI integration
- and much more...

All of the topics are taught with real examples. The course will include exercises & quizzes that will challenge you & allow you to practice what you learned.

This course will get constantly updated so that you no longer have to worry about outdated content.

#Mobile #webdriverio #appium 

Mobile Automation with Appium 2.0 and WebdriverIO in 2022

WebdriverIO Course Giveaway Winners Week 3-4

Learn & Implement WebdriverIO with JavaScript from scratch! Start with WebdriverIO Course Giveaway Winners Week 3-4.

JavaScript Web Automation is the future! WebdriverIO is one of the most popular JavaScript test automation frameworks in the industry. It is being used by major companies around the world such Google, Netflix, Microsoft, Mozilla and many more...

WebdriverIO is extremely beginner-friendly, it has huge community support & is actively maintained by the community. Best of all, it is free to use for anyone (startups to enterprise).

This course will take you from the very basics where I will teach you about what WebdriverIO is and how to setup your first test with WebdriverIO, to all the way to teaching how to build a fully functional framework with WebdriverIO. Along the way, I will teach you all the best practices that will put on the path of becoming one of the Top Automation Engineer.

Here's what we will be covering in this course:

- JavaScript & HTML/CSS Basics
- What is WebdriverIO & Why to use it?
- Setting up your machine for perfect automation experience
- Installation & Setup
- Step by step guide on how to write tests
- Working with different types of elements
- Learning about how wait commands work
- How to use assertions & advantages of using them
- How to debug your tests when it fails
- Setting up a fully functional framework
- Page Object Model - What is it & how to set it up?
- Optimizing your framework
- Building beautiful reports
- Running tests in BrowserStack
- Running tests in Jenkins

And much more...

All of the topics are taught with real examples. The course will include exercises & quizzes that will challenge you & allow you to practice what you learned.

This course will get constantly updated so that you no longer have to worry about outdated content.

#webdriverio 

WebdriverIO Course Giveaway Winners Week 3-4

WebdriverIO Course Giveaway Winners Week 1

Learn & Implement WebdriverIO with JavaScript from scratch! Let's start with WebdriverIO Course Giveaway Winners Week 1.

JavaScript Web Automation is the future! WebdriverIO is one of the most popular JavaScript test automation frameworks in the industry. It is being used by major companies around the world such Google, Netflix, Microsoft, Mozilla and many more...

WebdriverIO is extremely beginner-friendly, it has huge community support & is actively maintained by the community. Best of all, it is free to use for anyone (startups to enterprise).

This course will take you from the very basics where I will teach you about what WebdriverIO is and how to setup your first test with WebdriverIO, to all the way to teaching how to build a fully functional framework with WebdriverIO. Along the way, I will teach you all the best practices that will put on the path of becoming one of the Top Automation Engineer.

Here's what we will be covering in this course:

- JavaScript & HTML/CSS Basics
- What is WebdriverIO & Why to use it?
- Setting up your machine for perfect automation experience
- Installation & Setup
- Step by step guide on how to write tests
- Working with different types of elements
- Learning about how wait commands work
- How to use assertions & advantages of using them
- How to debug your tests when it fails
- Setting up a fully functional framework
- Page Object Model - What is it & how to set it up?
- Optimizing your framework
- Building beautiful reports
- Running tests in BrowserStack
- Running tests in Jenkins

And much more...

All of the topics are taught with real examples. The course will include exercises & quizzes that will challenge you & allow you to practice what you learned.

This course will get constantly updated so that you no longer have to worry about outdated content.

#webdriverio 

WebdriverIO Course Giveaway Winners Week 1

Free WebdriverIO Course Giveaway!

JavaScript Web Automation is the future! WebdriverIO is one of the most popular JavaScript test automation frameworks in the industry. It is being used by major companies around the world such Google, Netflix, Microsoft, Mozilla and many more...

WebdriverIO is extremely beginner-friendly, it has huge community support & is actively maintained by the community. Best of all, it is free to use for anyone (startups to enterprise).

This course will take you from the very basics where I will teach you about what WebdriverIO is and how to setup your first test with WebdriverIO, to all the way to teaching how to build a fully functional framework with WebdriverIO. Along the way, I will teach you all the best practices that will put on the path of becoming one of the Top Automation Engineer.

Here's what we will be covering in this course:

- JavaScript & HTML/CSS Basics
- What is WebdriverIO & Why to use it?
- Setting up your machine for perfect automation experience
- Installation & Setup
- Step by step guide on how to write tests
- Working with different types of elements
- Learning about how wait commands work
- How to use assertions & advantages of using them
- How to debug your tests when it fails
- Setting up a fully functional framework
- Page Object Model - What is it & how to set it up?
- Optimizing your framework
- Building beautiful reports
- Running tests in BrowserStack
- Running tests in Jenkins

And much more...

All of the topics are taught with real examples. The course will include exercises & quizzes that will challenge you & allow you to practice what you learned.

This course will get constantly updated so that you no longer have to worry about outdated content.

#javascript #webdriverio 

Free WebdriverIO Course Giveaway!

WebdriverIO Tutorial Series Review #20

In this video, we will do a quick wrap up on everything we have covered so far in this series.

In this tutorial series, we will be building a fully functional test automation framework in JavaScript using WebdriverIO and integrate our tests with Mocha, Chai, Allure, BrowserStack, JUnit, and Jenkins.
https://www.youtube.com/playlist?list=PL6AdzyjjD5HBbt9amjf3wIVMaobb28ZYN

All the code is available on Github - https://github.com/automationbro/webdriverio-tutorial

Thanks for watching :)

Automation Bro

#webdriverio #tutorial #beginner

WebdriverIO Tutorial Series Review  #20

Integrate Tests with Jenkins - WebdriverIO #19

In this video, we will integrate our tests with Jenkins. We will set up a new Jenkins job, install JUnit reporting, and run tests in Jenkins.

Timestamps:
0:00 - Introduction
0:20 - JUnit Reporter Installation and Configuration
3:20 - Jenkins Job Setup
7:35 - Run Tests
8:28 - Jenkins JUnit Setup
12:40 - Run Tests with JUnit Reporting
13:45 - Wrap up

In this tutorial series, we will be building a fully functional test automation framework in JavaScript using WebdriverIO and integrate our tests with Mocha, Chai, Allure, BrowserStack, JUnit, and Jenkins.
https://www.youtube.com/playlist?list=PL6AdzyjjD5HBbt9amjf3wIVMaobb28ZYN

All the code is available on Github - https://github.com/automationbro/webdriverio-tutorial

Thanks for watching :)

Automation Bro

#webdriverio #jenkins #tests

Integrate Tests with Jenkins - WebdriverIO #19

Jenkins Installation - WebdriverIO #18

In this video, we will take a look at how to install and configure Jenkins CI/CD tool.

Prerequisites: https://www.jenkins.io/doc/book/installing/

Timestamps:
0:00 - Introduction
0:35 - Installation and Configuration
4:00 - Wrap up

In this tutorial series, we will be building a fully functional test automation framework in JavaScript using WebdriverIO and integrate our tests with Mocha, Chai, Allure, BrowserStack, JUnit, and Jenkins.
https://www.youtube.com/playlist?list=PL6AdzyjjD5HBbt9amjf3wIVMaobb28ZYN

All the code is available on Github - https://github.com/automationbro/webdriverio-tutorial

Thanks for watching :)

Automation Bro

#webdriverio #jenkins #installation

Jenkins Installation - WebdriverIO #18

Integrate tests with BrowserStack - WebdriverIO #17

#webdriverio #javascript #browserstack
In this video, we will learn how we can integrate our tests with BrowserStack.

Timestamps:
0:00 - What is BrowserStack?
0:30 - Getting started with BrowserStack
2:20 - BrowserStack Configuration
5:01 - BrowserStack Dashboard
5:50 - Wrap up

In this tutorial series, we will be building a fully functional test automation framework in JavaScript using WebdriverIO and integrate our tests with Mocha, Chai, Allure, BrowserStack, JUnit, and Jenkins.
https://www.youtube.com/playlist?list=PL6AdzyjjD5HBbt9amjf3wIVMaobb28ZYN

All the code is available on Github - https://github.com/automationbro/webdriverio-tutorial

Thanks for watching :)

Automation Bro

#webdriverio #javascript #browserstack

Integrate tests with BrowserStack - WebdriverIO #17

Attach Screenshots on Test Failure - WebdriverIO #16

In this video, we will learn how we can take screenshot when the test fails and attach it to our Allure reports.

Timestamps:
0:00 - Introduction
0:40 - Screenshot Configuration
2:35 - Screenshot on test failure
4:30 - Wrap up

In this tutorial series, we will be building a fully functional test automation framework in JavaScript using WebdriverIO and integrate our tests with Mocha, Chai, Allure, BrowserStack, JUnit, and Jenkins.
https://www.youtube.com/playlist?list=PL6AdzyjjD5HBbt9amjf3wIVMaobb28ZYN

All the code is available on Github - https://github.com/automationbro/webdriverio-tutorial

Thanks for watching :)

Automation Bro

#webdriverio #reporting #screenshot

Attach Screenshots on Test Failure - WebdriverIO #16

Cross Browser Testing - WebdriverIO #13

In this video, we will take a look at how we can do cross-browser testing. Cross-browser testing is essential to ensure your website is functional on all popular browsers and this can be easily achieved using WebdriverIO. Let’s take a look at how to do that in this video.

In this tutorial series, we will be building a fully functional test automation framework in JavaScript using WebdriverIO and integrate our tests with Mocha, Chai, Allure, BrowserStack, JUnit, and Jenkins.
https://www.youtube.com/playlist?list=PL6AdzyjjD5HBbt9amjf3wIVMaobb28ZYN

All the code is available on Github - https://github.com/automationbro/webdriverio-tutorial

Thanks for watching :)

Automation Bro

#webdriverio #crossbrowser #javascript

Cross Browser Testing - WebdriverIO #13

How to Upload File on A Hidden input

In this video, we will learn how to upload a file on a hidden input using WebdriverIO.

All the code is available on Github - https://github.com/automationbro/webdriverio-quick

Resources:

To learn more about WebdriverIO, check out my tutorial series where we will be building a fully functional test automation framework and integrating our tests with Mocha, Chai, Allure, BrowserStack, JUnit, and Jenkins.
https://www.youtube.com/playlist?list=PL6AdzyjjD5HBbt9amjf3wIVMaobb28ZYN

Thanks for watching :)

Automation Bro

#javascript #upload #webdriverio

How to Upload File on A Hidden input

Wrap WebdriverIO to Build your Test Framework

Although WebdriverIO is an extremely powerful and simple tool to use, most of the folks find it extremely difficult to create test framework with WebdriverIO and eventually dropout using the same. Through this presentation and the demo’s, Soumya will show quick cool tweaks that you can perform on the tool to successfully build a test framework with WebdriverIO. He will show how WebdriverIO is actually a very simple tool to use. He will also talk about how you can scale thousand’s of your tests in no time and perform multiple browser testing with ease with centralised reporting with Allure where you can preserve the historical information of the runs.

#webdriverio

Wrap WebdriverIO to Build your Test Framework

WebdriverIO Upload File Example

In this video, we will learn how to upload a test file in WebdriverIO.

All the code is available on Github - https://github.com/automationbro/webdriverio-quick

Resources:

To learn more about WebdriverIO, check out my tutorial series where we will be building a fully functional test automation framework and integrating our tests with Mocha, Chai, Allure, BrowserStack, JUnit, and Jenkins.
https://www.youtube.com/playlist?list=PL6AdzyjjD5HBbt9amjf3wIVMaobb28ZYN

Thanks for watching :)

Automation Bro

#javascript #webdriverio

WebdriverIO Upload File Example