How to Choose an Automation Tool

Rate this content
Bookmark

What are the aspects you should think when choosing an automation framework. Some main differences on available frameworks.

Explain the main differences between the most known frameworks for automation: Selenium, Cypress, Playwright and Robot Framework. Positives and negatives about the frameworks. Depending on the needs of the project your work what is the best framework to use. Small talk about how frameworks integrate with some test management tools.

This talk has been presented at TestJS Summit 2022, check out the latest edition of this JavaScript Conference.

FAQ

The speaker is Lia, a software engineer at Nocare specializing in test automation.

The main topic is how to choose an automation tool for software testing and an overall comparison of three frameworks: Selenium, Cypress, and Playwright.

The three steps are: 1) Analyze, 2) Search, and 3) Plan.

In the 'Analyze' phase, you should understand your application, identify weak points and edge cases, list necessary tests, and consult with the development team regarding unit test coverage.

Selenium has a large community, requires third-party integrations for some tests, does not support parallel testing or in-built reporting, and struggles with iframes and popups.

Cypress is an all-in-one tool with in-built reporting and high compatibility with JavaScript. However, it does not support parallel testing or multitap testing and only works with JavaScript.

Playwright supports all types of tests, parallel testing, context isolation, and can capture videos and screenshots. However, it is relatively new with a smaller community and less mature documentation.

AX can be integrated for accessibility testing, and ApliTools can be used for visual testing with Selenium, Cypress, and Playwright.

Xray and TestRail are reporting tools. Xray integrates well with Jira for creating test plans and executions, while TestRail is more suitable for use by the quality team separately from other teams.

Documentation helps share knowledge, ensures everyone understands what is being tested, and provides a reference for future work, making it easier to manage and maintain the automation process.

Lia Moreira
Lia Moreira
21 min
03 Nov, 2022

Comments

Sign in or register to post your comment.

Video Summary and Transcription

I am Lia, a software engineer at Nocare, and I'm going to show you a process to choose an automation tool. I'll compare three frameworks and discuss other integration options. Selenium is a well-established framework with a large community, but it requires third-party integrations for certain types of tests. Cypress is an all-in-one tool that supports unit testing, but it only works with JavaScript and lacks parallel testing capabilities. Playwright is a newer framework that is more complete and supports parallel testing, but it has a smaller community and less mature documentation. If you want a framework that does it all, choose Playwright. Documentation is essential to remember your initial thoughts, show others what is being tested, and establish good practice. Once you have your test list, chosen framework, and prioritizations, schedule a meeting with management. Present your work confidently, as it is the best approach for the team and product.

1. Choosing an Automation Tool

Short description:

I am Lia, a software engineer at Nocare, and I'm going to show you a process to choose an automation tool. I'll compare three frameworks and discuss other integration options. Analyzing your application is the first step, understanding its weak points and creating a test list. Talk to the development team to avoid duplication of work. If they don't have unit testing, consider implementing automation tests throughout the process. Decide if you want to code and choose a comfortable language. If not, there are inclusive options like testing and perfecto. If you prefer coding, I'll compare Selenium, Cypress, and Playwrights.

I hope everyone is feeling good and before anything, I want to thank you all so much for being here today. I am Lia, and I'm going to show you a process that you can use to choose an automation tool. I am going to do an overall comparison of three frameworks that I think are the best at this moment, and I'm going to talk a little bit about other tools that you can integrate in your automation process.

So a quick insight into who I am. I am a software engineer at Nocare. My main focus is on test automation. And let's dive into this. So this is a three-step process, like all the good ones, of course. But each step will need attention and work. So let's move on and dive into the first phase, that is, analyze.

So analyzing means answering some questions. And the first one is not really a question. It's understand your application. So look at it and be really critical about it. Try to understand what are the weak points, the features that you can break more easily, and try to think of edge cases in the application. So just have an overall picture of the application that you are going to test and make a list. Make a list of the tests that you want or need to do. And at this moment, it will be a good idea to talk with the development team and try to understand what are the coverage of unit testing that they have, if they have, and knowing their coverage you can avoid duplication of work by your side.

And if they don't have unit testing, it's a really good opportunity to meet with them and with the management team and think of a way to do a coverage since the develop until the production. And this means that have automation tests in all parts of the process. So the development team will have unit testing and you can have end-to-end security, accessibility, whatever types you think are more suitable for you. So having this, you will need to ask yourself if you want to call or not, and ask your team if they feel comfortable doing this. And in which language do they feel they will be more comfortable working. So having this, you will end up with a list more or less like this in what you have, the development team has unit testing or not, what type of tests that you are going to do, and you will have a language that you feel more comfortable working with, if you choose to code.

So if you do not want to code, that is not a problem because here we are inclusive and we have options for everyone. And if you don't want to code, I will give you two options that I know, and be aware that I believe there are a lot more options for you, so if this option that I am going to give you does not suit your or accommodates your needs, just search for it. And we are kind of entering here in the next part that is search, but I am going to previously tell you about testing and perfecto, and this two are similar in the things that they can do, but just in a quick explanation, this two record your manual testing, and for each action that you do in the browser they make a block. And when you finish you will have your test case and your automation that is a group of blocks and just like in coding you can create a group of blocks that you can reuse between tests, you can create folders to run in each deployment, you have a full group of options that you can have just like in the coding. So if you don't want to code, just take a look at this tool and dive into this because I'm sure that you will have options for you as well. So if you do want to code, I'm going to do some comparison between Selenium, Cypress and Playwrights.

2. Comparing Selenium, Cypress, and Playwright

Short description:

Selenium is a well-established framework with a large community, but it requires third-party integrations for certain types of tests. It does not support parallel testing or iframes. Cypress is an all-in-one tool that supports unit testing, but it only works with JavaScript and lacks parallel testing capabilities. Playwright is a newer framework that is more complete and supports parallel testing, but it has a smaller community and less mature documentation.

And this is more or less what you are going to do in the search part with the frameworks that you choose to compare. And for Selenium, starting with Selenium. Selenium is a framework that is here for a long time, and this means that Selenium has a large community supporting it. And you will not be alone working because you will have a Stack Overflow to help you with a large group of people that can help you.

And overall, it is a really good framework, but it will need third parties to work with certain types of tests. So Selenium automates the browser. So it simulates a real browser interaction, meaning that if you need to do API testing, you will need to integrate with a third party to have the API testing. And since Selenium does not support by itself parallel testing, you will need to integrate with Selenium Grid and a cross-browser tool to make it work. And for me, the most downsides for Selenium is it does not have an in-built report tool, so you will need to have a third party like X-Ray or Test Rail, that I'm going to talk a little bit in the end, to support this. And it does not support iframes or popups. So, if your application depends on third party iframes, Selenium is going to be a really not go-to framework. But, if this is something that you can live without, Selenium is really really good to work with a large set of tests, but, like I told you, it will need third parties integration for some type of test, and this will make it more difficult to work in the beginning. I'm not saying that it's impossible because nothing is impossible, but, you will need to have some experience and some expertise to understand what are the workarounds that you need to do here, okay.

So, it is a good tool. If you want something easier to start with, let's move on to the other tool and understand what are the differences here. So, with Cypress, Cypress is a all-in-one tool, meaning that you can have the development team doing unit testing and you doing the other types of tests in your site, and have the whole team working with the same framework, and this is cool because you can take it out with each other and try to understand and review code from each other, and it is very complete, it has an in-built report, you don't need to integrate with any third parties here, but the downside is that you only work with JavaScript here and it does not support parallel testing and multitap testing, meaning that if you need to have certain types of configurations that need to be run at the same time, for example, if you want to have a browser with a device and various configurations about this, you will need to run them separately. So, it will be a very huge time running the test case. If you need to have various set of configurations here, various environments running at the same time, you need to consider if Cypress is going to be a good tool for you. But for starters, and for a small medium group of tests, Cypress is really good. It's a very simple tool to work with if you work with javascript, of course. It's a very simple tool to work with and it has a lot of documentation, the community is growing so you will have help for with Stack Overflow for any type of data that you need. But it has its downsides, just like all frameworks that you will encounter here.

Moving on to Playwright, Playwright is a fair new framework. The first time that I heard about it it was here in 2020, if I'm not mistaken, and it is, I think, the most complete of the three. You can have all types of tests running in Playwright, it supports parallel testing so you can have various sets of configurations and environments running at the same time. It has context isolation so you can have tests for new tabs and clicks open in a new tab, it can capture videos and screenshots so you can have visual testing in comparison. But it is a new framework so be aware there are some types of features that are not completely developed so if you look for a framework that is settled, maybe playwright is not the go-to. And since it is a new framework, the community is not very large compared to the other two, so you will need to have some experience with coding and expertise, programming and searching for things because you are going to be a little bit alone in this. You will have the community of playwrights taking doubts, but Stack Overflow is not really filled with questions and answers for how to move with playwrights. So, be aware that you will need to take a lot of time trying to move with playwrights and documentation is a bit confused because since it does a lot of things it's kind of messy to work around with.