- #135
- #134
Why E2E automated tests still can't (completely) solve software testing problems
Recently, we’ve been discussing how to introduce automated testing into products. A common thought comes up: AI is so powerful now! It can generate browser automation scripts quickly and accurately—shouldn’t it be able to replace manual testing right away and cover every scenario?
Running E2E (End-to-End) tests has an undeniable appeal:
- Black-box testing is easy to execute
- It provides the highest level of confidence
- It validates the entire codebase in one go
- AI-generated test scripts can be stable, consistent, and efficient
However, in real-world environments, the challenges are hard to ignore:
- Unclear specifications: If the expected system behavior isn’t well-defined, what exactly are you testing?
- Side effects: Test actions can affect the test environment
- Test environments: Building a fully realistic environment is slow
- Instability: Code changes can easily break tests
- …
Take a simple “delete role” feature as an example: “Click the delete button and the role disappears.” What does this actually imply?
Feature: Delete RoleScenario: Successful deletionGiven an authenticated adminWhen deleting a roleThen the role is successfully deletedScenario: Missing parametersGiven an authenticated adminWhen deleting a role (with missing required parameters)Then an invalid parameter error is shownScenario: No admin privilegesGiven an authenticated non-admin userWhen deleting a roleThen a permission denied error is shownScenario: Deleting oneselfGiven an authenticated adminWhen deleting their own roleThen an error is shown indicating self-deletion is not allowedScenario: Deleting a non-existent roleGiven an authenticated adminWhen deleting a non-existent roleThen a role not found error is shownScenario: Deleting a super adminGiven an authenticated adminWhen deleting a super admin roleThen an error is shown indicating the super admin cannot be deleted- Even a seemingly simple feature can involve multiple preconditions and failure. AI does not inherently understand how your business logic should behave, and most legacy systems lack clearly defined specifications.
- Six scenarios mean restarting the entire service six times for a single feature. If you don’t, test side effects will inevitably interfere with each other, leading to false confidence and false alarms.
- Every test is an asset that requires maintenance to remain effective—otherwise, it becomes a burden. E2E tests are the most fragile and hardest to maintain among all testing types.
AI solves the problem of generating automated test scripts, but that’s only one bottleneck. Achieving effective testing requires much more:
- A deep understanding of how the product works and the ability to clearly define specifications
- The ability to choose and apply the right testing strategies and tools (static testing, unit testing, component testing, integration testing, E2E testing, mock data, CI feedback loops, layered architecture, etc.)
- #133
- #132
- #131
- #130
- #129
- #128
- #127
- #126
- #125
- #124
- #123
- #122
- #121
- #120
- #119
- #118
- #117
- #116
- #115
- #114
- #113
- #112
- #111
- #110
- #109
- #108
- #107
- #106
- #105
- #104
- #103
- #102
- #101
- #100
- #99
- #98
- #97
- #96
- #95
- #94
- #93
- #92
- #91
- #90
- #89
- #88
- #87
- #86
- #85
- #84
- #83
- #82
- #81
- #80
- #79
- #78
- #77
- #76
- #75
- #74
- #73
- #72
- #71
- #70
- #69
- #68
- #67
- #66
- #65
- #64
- #63
- #62
- #61
- #60
- #59
- #58
- #57
- #56
- #55
- #54
- #53
- #52
- #51
- #50
- #49
- #48
- #47
- #46
- #45
- #44
- #43
- #42
- #41
- #40
- #39
- #38
- #37
- #36
- #35
- #34
- #33
- #32
- #31
- #30
- #29
- #28
- #27
- #26
- #25
- #24
- #23
- #22
- #21
- #20
- #19
- #18
- #17
- #16
- #15
- #14
- #13
- #12
- #11
- #10
- #9
- #8
- #7
- #6
- #5
- #4
- #3
- #2
- #1