Types of Tests Automated with Selenium
In most Selenium automation projects, the following test types are prioritized:
1. Regression Testing (Primary focus) Verifies that new code changes haven''t broken existing functionality. Run after every sprint/release.
- Login flow still works after new UI changes
- Cart calculations correct after payment module update
- Search returns correct results after database changes
2. Smoke Testing Quick sanity check of critical paths after a new build deployment (~15-30 tests, ~5 minutes).
- Can the application launch?
- Can a user login?
- Is the home page loading?
- Is the main navigation working?
3. Sanity Testing Focused testing of a specific feature or bug fix — narrower than regression, deeper than smoke.
- Verify the specific bug fix works correctly
- Check only the affected module after a patch
4. End-to-End (E2E) Testing Tests the complete user workflow from start to finish.
@Test
public void completeCheckoutFlow() {
loginPage.login("user@example.com", "password");
homePage.searchProduct("Laptop");
productPage.addToCart();
cartPage.proceedToCheckout();
checkoutPage.fillShippingDetails();
checkoutPage.placeOrder();
Assert.assertTrue(confirmationPage.isOrderConfirmed());
}
5. Integration Testing Verifies that different modules work correctly together.
Typical automation pyramid:
[E2E Tests — few, slow]
[Integration Tests — some]
[Unit Tests — many, fast]
Project-specific decisions:
- ✓Frequency: Regression runs nightly; smoke runs on every deployment
- ✓Coverage: Aim for 70-80% of critical paths automated
- ✓Priority: High-risk, high-frequency test cases first
Key answer: Main focus is to automate test cases for Regression testing, Smoke testing, and Sanity testing. Sometimes based on the project and the test time estimation, we also focus on End-to-End testing.
