Skip to content

Commit

Permalink
Improve e2e material
Browse files Browse the repository at this point in the history
  • Loading branch information
JuhQ committed Nov 11, 2024
1 parent ddeb200 commit 11ea2a0
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions end-to-end-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,29 @@

End-to-end testing, or E2E, is a software testing methodology to test an application flow from start to finish. It is used to validate the system under test and its components. End-to-end testing is performed from the user's perspective to ensure that the application behaves as expected. The term `end-to-end` refers to the entire process, from the user input to the output, where the frontend application interacts with the backend services.

This kind of testing methodology is often used to test web applications, where the user interacts with the application through a web browser. The purpose is to simulate real user scenarios and ensure that the application works as expected. For example, we can write test case to validate that a form can be filled, submitted and then the results can be displayed on the screen.
This kind of testing methodology is often used to test web applications, where the user interacts with the application through a web browser. The purpose is to simulate real user scenarios and ensure that the application works as expected. For example, we can write test case to validate that a form can be filled, submitted and then the results can be displayed on the screen. Implementation details do not matter here, and with the end-to-end tests validating the expected behavior, the implementation can be safely changed.

End-to-end testing can be performed manually or automated. Automated end-to-end testing is preferred because it is faster, more reliable, and can be run multiple times. There are many tools available to automate end-to-end testing, such as Selenium, Playwright, Puppeteer, and Cypress. We will focus on Playwright.
End-to-end testing can be performed manually or automated. Automated end-to-end testing is preferred because it is faster, more reliable, and can be run multiple times. Many tools are available to automate end-to-end testing, such as Selenium, Playwright, Puppeteer, and Cypress. We will focus on Playwright.

At first end-to-end testing, or any kind of testing, might seem like a waste of time and an activity which slows down the development process. However, testing is an essential part of software development. It helps to catch bugs early, ensure that the application works as expected, and provides confidence to developers to make changes without breaking the application. How many times have you made some changes to only realise that they break something else? Or that someone else broke your code? Automated testing can help to catch these issues early and prevent them from happening.
At first end-to-end testing, or any kind of testing, might seem like a waste of time and an activity which slows down the development process. However, testing is an essential part of software development. It helps to catch bugs early, ensure that the application works as expected, and provides confidence to developers to make changes without breaking the application. How many times have you made some changes to only realise that they break something else? Or that someone else broke your code? Automated testing can help to catch these issues early and prevent them from happening. The earlier the bugs are caught, the cheaper they are to fix.

## End-to-end testing automation

Automated end-to-end testing is the process of writing scripts to test the application automatically. These scripts simulate user interactions with the application, such as clicking buttons, filling forms, and validating the results. The scripts are written to test the application flow and ensure that the application works as expected.

The tests script can be executed manually, or automatically by listening to file changes, git commits (git hooks), or in a CI/CD pipeline after code has been pushed to a remote repository. Usually all of these steps are used within a single project to ensure that the application is tested at every stage of development.
The tests script can be executed manually, or automatically by listening to file changes, or in git hooks (automatically running tests before pushing code to a remote repository), or in a CI/CD pipeline after code has been pushed to a remote repository. Usually all of these steps are used within a single project to ensure that the application is tested at every stage of development.

Automation can utilise multiple different project configurations, such as different user roles, working vs non-working databases etc. Also different client configurations, such as different browsers, devices, and screen sizes and their combinations. This way the application can be tested in multiple different scenarios to ensure that it works as expected.

These tests can be executed in parallel, to further save time.

## End-to-end testing manually

End-to-end testing can be performed manually by following the steps of the application flow. This is a time-consuming process and can be error-prone. Manual testing is usually performed by a tester or a quality assurance engineer. The tester follows the steps of the application flow, interacts with the application, and validates the results. The tester can use a checklist to ensure that all the steps are covered and the application behaves as expected.
End-to-end testing can be performed manually by following the steps of the application flow. This is a time-consuming process and can be error-prone. Manual testing is usually performed by a tester or a quality assurance (QA) engineer. The tester follows a script with steps of how to interact with the application and then validates the results. The tester can use a checklist to ensure that all the steps are covered and the application behaves as expected.

However, manual testing is not scalable. It is difficult to test the application flow multiple times, and it is hard to catch all the edge cases. Automated testing is preferred because it is faster, more reliable, and can be run multiple times, with multiple different devices, configurations etc.
However, manual testing is not scalable. It is difficult to test the application flow multiple times, and it is hard to catch all the edge cases. Automated testing is preferred because it is faster, more reliable, and can be run multiple times, with multiple different devices, configurations etc. Adding more test cases to the test suite is easier with automation, and the tests can be run multiple times to ensure that the application works as expected.

Imaging that after each larger change you would manually test the application flow in multiple browsers, devices, and configurations. Human intervention is always prone to errors. Testing the changes on a laptop, couple different mobile devices, and different browsers is a tedious task manually, which will result in forgotten steps. Also the cost increases as the number of devices and configurations increases. Automation can simulate different devices, or some services, such as browserstack, provides an array of real devices with different settings.
Imaging that after each larger change you would manually test the application flow in multiple browsers, devices, and configurations. Human intervention is always prone to errors. Testing the changes on a laptop, on a couple of different mobile devices, and on different browsers is a tedious task manually, which will for sure result in forgotten steps. Also the cost increases as the number of devices and configurations increases. Automation can simulate different devices, or some services, such as browserstack, provides an array of real devices with different settings.

Manual testing often can not be executed in parallel.

Expand Down

0 comments on commit 11ea2a0

Please sign in to comment.