Top SDET frequently asked interview questions.
In this post we will look at SDET - Software Development Engineer in Test Interview questions.
Examples are provided with explanations.
-
Verification vs Validation:
Can you explain the difference between verification and validation in software testing?
-
Regression vs Retesting:
What's the difference between regression testing and retesting? When would you use each?
-
Test Automation Framework:
How would you design a test automation framework from scratch for a web application? Walk me through your approach.
-
Selenium Waits:
What's the difference between implicit and explicit waits in Selenium? When would you use each?
-
API Testing:
How would you test a REST API? What tools would you use and what aspects would you verify?
-
Login Page Testing:
Explain how you would test a login page. Include both positive and negative test scenarios.
-
Password Validation Testing:
Write a test case for validating a password field with these requirements:
- Minimum 8 characters
- At least one uppercase letter
- At least one number
- At least one special character
-
Cyclomatic Complexity:
What is cyclomatic complexity? How does it help in determining test cases?
-
Dynamic Elements:
How would you handle dynamic elements in web automation, especially when IDs or classes change frequently?
-
Test Pyramids:
Explain the concept of test pyramids. How would you determine the right balance of tests for a project?
-
Mocking vs Stubbing:
What's the difference between mocking and stubbing? Provide an example of when you'd use each.
-
Performance Testing:
How would you test a feature that involves processing large amounts of data? What performance metrics would you consider?
-
Test Data Management:
How do you handle test data in your automation framework? Explain your approach to test data management.
-
SQL Testing:
Write a SQL query to find duplicate records in a table. How would you test this query?
-
E-commerce Testing:
Design test cases for an e-commerce shopping cart. Consider edge cases and potential integration points.
Q: Can you explain the difference between verification and validation in software testing?
A:
- Verification is checking whether we are building the product RIGHT
- Validation is checking whether we are building the RIGHT product
Key differences:
- Timing:
- Verification occurs early in development (reviews, inspections)
- Validation occurs after the software is built (testing)
- Focus:
- Verification: Reviews documentation, code, requirements
- Validation: Tests actual software functionality
- Question answered:
- Verification: "Are we building it according to specifications?"
- Validation: "Does it fulfill the user's actual needs?"
Q: What's the difference between regression testing and retesting? When would you use each?
A:
Regression Testing:
- Testing done to ensure new code changes haven't broken existing functionality
- Covers wider scope of application
- Usually automated
- Performed after every significant change
- Example: Running full test suite after adding new feature
Retesting (Confirmation Testing):
- Testing specifically to verify fixed defects
- Focused on specific bug fixes
- Usually manual
- Performed after bug fixes
- Example: Verifying a specific bug fix works as expected
Q: How would you design a test automation framework from scratch for a web application?
A:
Step-by-step approach:
- Choose Core Technologies:
- Programming language (e.g., Java, Python)
- Testing framework (e.g., TestNG, PyTest)
- Web automation tool (e.g., Selenium WebDriver)
- Build tool (e.g., Maven, Gradle)
- Design Framework Architecture:
- Page Object Model (POM) design pattern
- Configuration management
- Test data management
- Reporting mechanism (e.g., Extent Reports)
- Logging system
- Framework Components:
- Base classes for common functions
- Utility classes for reusable methods
- Configuration files for different environments
- Test data files (Excel, JSON, etc.)
- Test runners and suites