SDET Resources & Best Practices

A curated collection of interview questions, coding standards, and testing checklists.

Manual Testing

Severity is the impact on the system (e.g., system crash).
Priority is how urgently it needs to be fixed (e.g., stopping a release).
Example: A typo in the company logo is Low Severity but High Priority. A crash in a rarely used legacy module is High Severity but Low Priority.

Re-testing: Checking a specific defect to ensure it is fixed.
Regression Testing: Checking the entire application to ensure the fix didn't break existing functionality.

Automation & SDET

POM is a design pattern where each web page is represented as a class.
  • Locators are kept as private members.
  • Actions are public methods (e.g., `login(u, p)`).
This improves code reusability and maintainability.

Use Explicit Waits (WebDriverWait) for specific conditions (element visible, clickable). Avoid Thread.sleep() as it slows down tests unnecessarily. Implicit waits set a global timeout but are less flexible.

Effective Java for SDETs

1. Use Meaningful Naming Conventions

Avoid x, y, temp. Use descriptive names.

// Bad
public void test1() { ... }

// Good
public void shouldReturnErrorMessage_WhenLoginFails() { ... }
2. Avoid Hardcoding Data

Never hardcode URLs, credentials, or test data in your test scripts. Use properties files or data providers.

// Bad
driver.get("http://localhost:8080");

// Good
driver.get(ConfigLoader.getProperty("baseUrl"));
3. Exception Handling

Don't just catch generic exceptions. Catch specific ones and log meaningful errors.

4. Arrange-Act-Assert Pattern

Structure your tests clearly.

  • Arrange: Set up the state (login, navigate).
  • Act: Perform the action (click button).
  • Assert: Verify the result (check text).
UI Testing Checklist
  • Check broken links (404s).
  • Verify font consistency and alignment.
  • Test responsiveness on Mobile/Tablet.
  • Check tab order for keyboard navigation.
  • Validate all input fields (Max length, types).
API Testing Checklist
  • Verify status codes (200, 201, 400, 401, 500).
  • Validate JSON Schema structure.
  • Check response time (Performance).
  • Test invalid headers/parameters (Negative Testing).