Our project was a classic example of Selenium gone wild! As our team embraced the test automation journey, we went crazy and implemented tons of Selenium tests, one for every permutation possible. Soon we realized our feedback cycles were delayed. Our builds were taking hours instead of minutes. And we had a set of complex, fragile tests, which resulted in a lot of false-negative scenarios and finger pointing.
At this point, our team had realized that this is not the path forward. We decided to seriously look at our Selenium tests. We pretty much moved 80% of our Se tests to lower-layers (non-GUI based) tests. And now we have the right testing pyramid on our project.
In this presentation, Naresh Jain explains IDeaS' journey (strategy, techniques, tools, mindset-change and approaches we took) through this transition.
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Selenium DeTox for Achieving the Right Testing Pyramid
1. ManualChecking
End-to End Selenium Tests 70%
Integration Tests
20%
Unit Tests
10%
Unit Tests 70%
Domain Logic Acceptance Tests 10%
Integration Tests 9%
Workflow API Tests 6%
End to End Flow Tests 4%
UI 1%
Naresh Jain @nashjain
Selenium Detox for Achieving the Right Test Pyramid
2. Selenium Detox for Achieving the Right Test Pyramid
Naresh Jain
@nashjain
5. Background
IDeaS is capable of applying 25 years of experience, expertise and client dedication toward an expanding suite of automated revenue management solutions.
18. State of the Product
Tightlycoupledwith UI
Browser DependentData tests
Falsefails
Difficult to pinpoint real culprit
Difficult to maintainand time consuming as test are fragile
Laggingwith current release development
Image Courtesy: Alex Yakyma
20. State of the Product
ManualChecking
End-to End Selenium Tests 70%
Integration Tests
20%
Unit Tests
10%
21. ManualChecking
End-to End Selenium Tests 70%
Integration Tests
20%
Unit Tests
10%
Unit Tests 70%
Domain Logic Acceptance Tests 10%
Integration Tests 9%
Workflow API Tests 6%
End to End Flow Tests 4%
UI 1%
Typical test strategies lead to an inverted testing pyramid
This is the need of the hour….
Courtesy: Naresh Jain @AgileFAQs.com
The Test Pyramid
22. Our transition story…
•We decided to "Test things right , at right place on right time" which would result in "right test pyramid“
Unit Tests 70%
Domain Logic Acceptance Tests 10%
Integration Tests 9%
Workflow API Tests 6%
End to End Flow Tests 4%
UI 1%
23. Our transition story…
Application UI
Service Layer
DAO Layer
Automated UI Tests
Tightly Coupled
Fragile
Lag with current development
Automate One Level Below UI
UI Independent
Robust & Stable
With current devcycle
Fast Execution
31. Pain points
•Learning curve for the team
•Difficult to implement in case where no API is exposed or tight coupling with UI
•Heavy dependency on pre-populated database
32. Looking ahead
•Expose RESTful APIs for all upcoming features
•Move BDD specs to lower layers
•Moving away from baseline database
Courtesy: http://3.bp.blogspot.com/