Careeroza
Test Suite Table
What Is Automated
| Area | Test | Groups | Data setup |
|---|---|---|---|
| Auth | valid login, wrong password, locked account, logout | smoke, regression | API user |
| Search | search by name, no results, sort by price, filter by brand | smoke, regression | seeded catalog |
| Product | details shown, out-of-stock disables Add to Cart, reviews API down | regression | API product |
| Cart | add, update quantity, remove, cart count badge | smoke, regression | API session cookie |
| Checkout | COD order, UPI sandbox, coupon SAVE10, address validation | smoke, regression, payments | API user + cart |
| Orders | history shows new order, cancel order | regression | API order |
| Admin | add product, edit price, product appears in search | regression, admin | admin user |
Coverage Check in Plain Java
Example
Before each release the QA lead checks that every critical feature has at least one smoke test. A fixed list of test metadata:
import java.util.*;
import java.util.stream.*;
public class Main {
record TestCase(String name, String area, Set<String> groups) {}
public static void main(String[] args) {
List<TestCase> suite = List.of(
new TestCase("validLogin", "Auth", Set.of("smoke", "regression")),
new TestCase("wrongPassword", "Auth", Set.of("regression")),
new TestCase("searchByName", "Search", Set.of("smoke", "regression")),
new TestCase("addToCart", "Cart", Set.of("smoke", "regression")),
new TestCase("codOrder", "Checkout", Set.of("smoke", "regression", "payments")),
new TestCase("cancelOrder", "Orders", Set.of("regression")),
new TestCase("addProduct", "Admin", Set.of("regression", "admin")));
List<String> critical = List.of("Auth", "Search", "Cart", "Checkout", "Orders");
Map<String, Long> smokePerArea = suite.stream()
.filter(t -> t.groups().contains("smoke"))
.collect(Collectors.groupingBy(TestCase::area, TreeMap::new, Collectors.counting()));
System.out.println("Smoke tests per area: " + smokePerArea);
for (String area : critical) {
if (!smokePerArea.containsKey(area)) System.out.println("MISSING smoke test for " + area);
}
System.out.println("Total tests: " + suite.size() + ", smoke: "
+ smokePerArea.values().stream().mapToLong(Long::longValue).sum());
}
}Output
Smoke tests per area: {Auth=1, Cart=1, Checkout=1, Search=1}
MISSING smoke test for Orders
Total tests: 7, smoke: 4