![]()
How to Build E2E Test Cases
Developing end-to-end (E2E) test cases poses a substantial challenge compared to writing unit and API test cases. Blocks of code and APIs can be tested against a well-defined, limited, and predetermined set of business rules. Test-driven-development (TDD) techniques can empower developers to write relevant tests alongside their code.
Developing E2E tests requires a fully different approach. This level of testing is meant to replicate user behavior that’s interacting with many blocks of code and multiple APIs simultaneously. Below we recommend a process that will help you build accurate, effective test cases for your E2E testing regime. Note that we will not cover test scripting here, but only test case development.
Here are the four major considerations to explore:
How to Scope E2E Testing
The goal of E2E testing is to make sure that users can use your application without running into trouble. Usually, this is done by running automated E2E regression tests against said application. One approach to choosing your scope could be to test every possible way users could use an application. This would certainly represent true 100% coverage. Unfortunately, it would also yield a testing codebase even larger than the product codebase, and a test runtime that is likely as long as it takes to write the build being tested.
Senior QA Engineers are often used to determining scope as well. Combining experience, knowledge of the code-base, and knowledge of the web app’s business metrics, a QA engineer can propose tests that should stop your users from encountering bugs when performing high-value actions.
Unfortunately, “should” is the weakness of this approach: biased understanding of the web app, cost, and reliance on one individual leads inevitably to bugs making their way into production.
The team should therefore instead test only how users are actually using the application. Doing so yields the optimal balance of achieving thorough test coverage without expending excessive resources or runtime or relying on an expert to predict how customers use the website.
This approach requires user data, rather than an expansive exploration of the different feature options in the application, to manage. To mine user data, you’ll need to use some form of product analytics to understand how your users currently use your application.
What Bugs to Target
E2E testing should not replace or substantially repeat the efforts of unit and API testing. Unit and API testing should test business logic. Generally, a unit test ensures that a block of code always results in the correct output variable(s) for given input variable(s). An API test ensures that for a given call, the correct response occurs.
E2E testing is meant to ensure that user interactions always work and that a user can complete a workflow successfully. E2E test validations should therefore make certain that an interaction point (button, form, page, etc) exists and can be used.
Then, they should verify that a user can move through all of these interactions and, at the end, the application returns what is expected in both the individual elements and also the result of user-initiated data transformations.
Well-built tests will also look for javascript or browser errors. If tests are written in this way, the relevant blocks of code and APIs will all be tested for functionality during the test execution.
Which User Flows to Follow
The risk of a bloated test suite, beyond high maintenance cost, is the runtime that grows too long for tests to be run in the deployment process for each build. If you keep runtimes to only a few minutes, you can test every build and provide developers immediate feedback about what they may have broken, so they can rapidly fix the bug.
To prevent test suite bloat, we suggest splitting your test cases into two groups: core and edge. Core test cases are meant to reflect your core features—what people are doing repeatedly. These are usually associated with revenue or bulk usability; a significant number of users are doing them, so if they fail you’re in trouble. Edge cases are the ways that people use the application that are unexpected, unintended, or rare, but might still break the application in an important way.
The testing team will need to pick and choose which of these cases to include based on business value. It’s important to be careful of writing edge case tests for every edge bug that occurs. Endlessly playing “whack a mole” can again cause the edge test suite to become bloated and excessively resource-intensive to maintain.
If runtime allows, we recommend running your core and edge tests with every build. Failing that, we recommend running core feature tests with every build, and running the longer-runtime edge case tests occasionally, in order to provide feedback on edge case bugs at a reasonable frequency.
How to Design Test Cases
Every test case, whether it is core or edge, should focus on a full and substantial user experience. At the end of a passing test, you should be certain that the user will have completed a given task to their satisfaction.
Each test will be a series of interactions, with an element on the page: a link, a button, a form, a drawing element, etc. For each element, the test should validate that it exists and that it can be interacted with. Between interactions, the test writer should look for meaningful changes in the application on the DOM that indicate whether or not the application has responded in the accepted way.
Finally, the data in the test (an address, a product selected, some other string or variable entered into the test) should be used to ensure that the test transforms or returns that data in the way that it’s expected to.
If you build E2E test cases with this process in mind, you will achieve high-fidelity continuous testing of your application without pouring unnecessary or marginally-valuable hours into maintaining the suite. You will be able to affordably ensure that users can use your application in the way they intend to do so.
Written by Dan Widing, Co-founder and CEO of ProdPerfect
- All
- Agile Testing
- Bug/Defect
- Certification
- Conferences
- Database Testing
- Functional Test
- Integration Testing
- Interview
- Java Testing
- Magazine
- Manual Testing
- Methodology
- Mobile Testing
- Network Testing
- Performance Test
- Requirement
- Review
- Risk Management
- Security Testing
- Software Testing
- Standard
- System Testing
- Test Automation
- Test Case
- Test Data
- Test Environment
- Test Estimation
- Test Management
- Tester Career
- Testing News
- Test Plan
- Unit Testing
- Video Tutorial
- Web Testing
- Webinar
| Number | Title | Author | Date | Votes | Views |
| 20613 |
SileniusStor is specialized in reselling Cheap Aquafadas software online.
Softwareces
|
2022.09.15
|
Votes 0
|
Views 55822092
|
Softwareces | 2022.09.15 | 0 | 55822092 |
| 20612 |
CSStore is specialized in reselling Cheap Steinberg software online.
Softwareces
|
2022.09.04
|
Votes 0
|
Views 55614158
|
Softwareces | 2022.09.04 | 0 | 55614158 |
| 20611 |
Software Tester Community Website
ItSeTsQtBer
|
2021.04.11
|
Votes 0
|
Views 56111804
|
ItSeTsQtBer | 2021.04.11 | 0 | 56111804 |
| 20610 |
SoapUI Certification Course Content
Steveskok
|
2021.02.08
|
Votes 0
|
Views 56826195
|
Steveskok | 2021.02.08 | 0 | 56826195 |
| 20609 |
JavaScript Course Content
Steveskok
|
2021.02.08
|
Votes 0
|
Views 56003705
|
Steveskok | 2021.02.08 | 0 | 56003705 |
| 20608 |
Why most mobile testing is not continuous?
(TestExpert)
|
2021.02.04
|
Votes 0
|
Views 56652959
|
(TestExpert) | 2021.02.04 | 0 | 56652959 |
| 20607 |
8 Common Mistakes When Planning and Documenting Your Tests
(TestExpert)
|
2021.02.04
|
Votes 0
|
Views 58093799
|
(TestExpert) | 2021.02.04 | 0 | 58093799 |
| 20606 |
Types of Performance Testing
Jamessmith
|
2021.01.17
|
Votes 0
|
Views 57191049
|
Jamessmith | 2021.01.17 | 0 | 57191049 |
| 20605 |
How to Build E2E Test Cases (1)
tanthanh
|
2020.05.28
|
Votes 0
|
Views 57047594
|
tanthanh | 2020.05.28 | 0 | 57047594 |
| 20604 |
[White Paper] Delivering better software using Test Automation
tanthanh
|
2020.05.28
|
Votes 0
|
Views 56585110
|
tanthanh | 2020.05.28 | 0 | 56585110 |
| 20603 |
[Whitepaper] How to choose the right API Testing Solution
tanthanh
|
2020.05.28
|
Votes 0
|
Views 56501989
|
tanthanh | 2020.05.28 | 0 | 56501989 |
| 20602 |
[Whitepaper] How to choose the right API Testing Solution
tanthanh
|
2020.05.28
|
Votes 0
|
Views 56374116
|
tanthanh | 2020.05.28 | 0 | 56374116 |
| 20601 |
TestOps Introduction
VTB
|
2020.03.23
|
Votes 0
|
Views 55767477
|
VTB | 2020.03.23 | 0 | 55767477 |
| 20600 |
TestOps Implementation Case Study
VTB
|
2020.03.23
|
Votes 0
|
Views 56830793
|
VTB | 2020.03.23 | 0 | 56830793 |
| 20599 |
Selenium Automation Tester Certification Sample Exam Set 3
(TestExpert)
|
2020.02.03
|
Votes 0
|
Views 57085271
|
(TestExpert) | 2020.02.03 | 0 | 57085271 |
| 20598 |
Selenium Automation Tester Certification Sample Exam Set 2
(TestExpert)
|
2020.02.03
|
Votes 0
|
Views 57007861
|
(TestExpert) | 2020.02.03 | 0 | 57007861 |
| 20597 |
Selenium Automation Tester Certification : Sample Exam Set 1
(TestExpert)
|
2020.02.03
|
Votes 0
|
Views 56331440
|
(TestExpert) | 2020.02.03 | 0 | 56331440 |
| 20596 |
What is agile testing? why is agile testing? and what is the benefits? (20)
oishichip
|
2019.12.26
|
Votes 0
|
Views 55591155
|
oishichip | 2019.12.26 | 0 | 55591155 |
| 20595 |
Crowd Testing — Vantagens para testadores, plataformas e clientes [pt-br]
soikmd2
|
2019.12.14
|
Votes 0
|
Views 56158043
|
soikmd2 | 2019.12.14 | 0 | 56158043 |
| 20594 |
Software Testing Industry Report (Turkey) 2018-2019 (2)
ItSeTsQtB
|
2019.08.08
|
Votes 0
|
Views 56779148
|
ItSeTsQtB | 2019.08.08 | 0 | 56779148 |
| 20593 |
How to bypass security in integration tests in ASP.Net Core
ItSeTsQtB
|
2019.08.08
|
Votes 0
|
Views 57965323
|
ItSeTsQtB | 2019.08.08 | 0 | 57965323 |
| 20592 |
For agile testing, fail fast with test impact analysis
ItSeTsQtB
|
2019.08.08
|
Votes 0
|
Views 56828181
|
ItSeTsQtB | 2019.08.08 | 0 | 56828181 |
| 20591 |
Career Path in Software Testing
^Software^
|
2019.07.28
|
Votes 0
|
Views 56901258
|
^Software^ | 2019.07.28 | 0 | 56901258 |
| 20590 |
Challenges in Big Data Testing
^Software^
|
2019.07.22
|
Votes 0
|
Views 57112297
|
^Software^ | 2019.07.22 | 0 | 57112297 |
| 20589 |
Essential Necessities In Big Data Testing
^Software^
|
2019.07.22
|
Votes 0
|
Views 55495971
|
^Software^ | 2019.07.22 | 0 | 55495971 |
| 20588 |
5 Test Data Generation Techniques
^Software^
|
2019.07.22
|
Votes 0
|
Views 56831876
|
^Software^ | 2019.07.22 | 0 | 56831876 |
| 20587 |
CI and CD for ETL (Extract-Transform-Load) testing.
^Software^
|
2019.07.22
|
Votes 0
|
Views 56522179
|
^Software^ | 2019.07.22 | 0 | 56522179 |
| 20586 |
Quest for Quality Conference : 5-6 Nov 2019 at Dublin, Ireland
VTB
|
2019.07.08
|
Votes 0
|
Views 56384198
|
VTB | 2019.07.08 | 0 | 56384198 |
| 20585 |
TestBash Essentials Conference 2019
VTB
|
2019.07.08
|
Votes 0
|
Views 56604560
|
VTB | 2019.07.08 | 0 | 56604560 |
| 20584 |
UKSTAR Conference : 11-03-2019
VTB
|
2019.07.08
|
Votes 0
|
Views 55801336
|
VTB | 2019.07.08 | 0 | 55801336 |
| 20583 |
Testing in Context Conference Australia (TiCCA) 2019
VTB
|
2019.07.08
|
Votes 0
|
Views 56262027
|
VTB | 2019.07.08 | 0 | 56262027 |
| 20582 |
European Testing Conference 2019
VTB
|
2019.07.08
|
Votes 0
|
Views 56333818
|
VTB | 2019.07.08 | 0 | 56333818 |
| 20581 |
Automation Guild Online Conference 2019
VTB
|
2019.07.08
|
Votes 0
|
Views 57680824
|
VTB | 2019.07.08 | 0 | 57680824 |
| 20580 |
Software Quality Days 2019 : 15 Jan 2019 (1)
VTB
|
2019.07.08
|
Votes 0
|
Views 56573403
|
VTB | 2019.07.08 | 0 | 56573403 |
| 20579 |
Skills required to become a Software Tester (1)
IT-Tester
|
2019.07.08
|
Votes 0
|
Views 56754871
|
IT-Tester | 2019.07.08 | 0 | 56754871 |
| 20578 |
Automated Unit Testing with Randoop, JWalk and µJava versus Manual JUnit Testing
IT-Tester
|
2019.07.08
|
Votes 0
|
Views 55073952
|
IT-Tester | 2019.07.08 | 0 | 55073952 |
| 20577 |
Scrum Testing Guide Book (2)
IT-Tester
|
2019.06.26
|
Votes 0
|
Views 55870179
|
IT-Tester | 2019.06.26 | 0 | 55870179 |
| 20576 |
Acceptance Testing Definition in Testing vs Scrum
IT-Tester
|
2019.06.26
|
Votes 0
|
Views 56680221
|
IT-Tester | 2019.06.26 | 0 | 56680221 |
| 20575 |
User Acceptance Testing Checklist
VTB
|
2019.06.20
|
Votes 0
|
Views 57048552
|
VTB | 2019.06.20 | 0 | 57048552 |
| 20574 |
Firewalls and Types (1)
VTB
|
2018.11.14
|
Votes 0
|
Views 55649942
|
VTB | 2018.11.14 | 0 | 55649942 |
| 20573 |
Senior Test Engineer (1)
VTB
|
2018.11.05
|
Votes 0
|
Views 56709166
|
VTB | 2018.11.05 | 0 | 56709166 |
| 20572 |
Junior Test Analyst
kornadian2
|
2018.11.04
|
Votes 0
|
Views 56737818
|
kornadian2 | 2018.11.04 | 0 | 56737818 |
| 20571 |
Senior Test Engineer
kornadian2
|
2018.11.04
|
Votes 0
|
Views 56175276
|
kornadian2 | 2018.11.04 | 0 | 56175276 |
| 20570 |
Programme Test Manager, 12m, Immed Start, $NEG
kornadian2
|
2018.11.04
|
Votes 0
|
Views 57942418
|
kornadian2 | 2018.11.04 | 0 | 57942418 |
| 20569 |
Junior Test Analyst
kornadian2
|
2018.11.04
|
Votes 0
|
Views 56604997
|
kornadian2 | 2018.11.04 | 0 | 56604997 |
| 20568 |
Dev & Test Manager
kornadian2
|
2018.11.04
|
Votes 0
|
Views 57444556
|
kornadian2 | 2018.11.04 | 0 | 57444556 |
| 20567 |
Senior Test Analyst (Performance Tester)
kornadian2
|
2018.11.04
|
Votes 0
|
Views 57401244
|
kornadian2 | 2018.11.04 | 0 | 57401244 |
| 20566 |
QA Automation Test Analyst
kornadian2
|
2018.11.04
|
Votes 0
|
Views 56360884
|
kornadian2 | 2018.11.04 | 0 | 56360884 |
| 20565 |
Software/Field Testing Engineer
kornadian2
|
2018.11.04
|
Votes 0
|
Views 55984183
|
kornadian2 | 2018.11.04 | 0 | 55984183 |
| 20564 |
Compliance Technician (Tester)
kornadian2
|
2018.11.04
|
Votes 0
|
Views 56437956
|
kornadian2 | 2018.11.04 | 0 | 56437956 |
Thanks for the article authors. Refer to the tester course here: https://testerprovn.com/