API and Manual Testing Interview Guide
API and Manual Testing Interview Guide
Functional testing focuses on verifying that an application performs its intended functions correctly, thus checking feature accuracy in both manual and automated settings . Performance testing, however, measures how well the system performs under load; it focuses on speed, responsiveness, and stability rather than functionality itself .
Manual testing remains relevant because it allows testers to understand the application more deeply and catch issues that automation may miss. It is particularly useful when requirements frequently change, allowing testers to quickly adapt without needing to update test scripts . Additionally, manual testing is essential for exploratory and usability testing, which require human judgment and intuition .
Automation testing is recommended for regression tests, repeated test cases, and tests that are time-intensive when done manually. Automated tests are also beneficial for data-driven scenarios where the same test must be executed with different inputs. This practice saves time, reduces human error, and allows tests to be run frequently and efficiently .
When API documentation is unavailable, testers can refer to existing Swagger or Postman collections, track network calls in browser developer tools, consult with developers for insights, and engage in a trial-and-error approach with various request and response scenarios to infer the functionality . This process requires initiative and technical intuition to understand and test the API effectively.
TestNG and JUnit are frameworks that organize test cases, run them in groups, and generate reports, which enhances the process of automation testing with Selenium by providing structure, efficiency, and insights into test execution. These frameworks support parallel testing, dependency management, and integrate seamlessly with build tools like Maven and Jenkins, significantly easing the automation process .
UI changes can cause automation scripts to break, as locators and page structures may change. Testers can handle these challenges by employing dynamic locators and robust frameworks like Selenium Grid for parallel testing, integrating visual testing to spot UI discrepancies, and regularly refactoring scripts to align with UI updates . Additionally, using Object Repository patterns can help manage locator changes more efficiently.
To confirm a secure and functional execution when testing a Login API in Postman, check for a status code of 200 indicating success, ensure a token or session ID is returned, validate correct error handling by sending incorrect credentials to trigger a 401 status code, and verify error messages by submitting incomplete requests to receive a 400 status code .
REST APIs are known for being simple and fast, utilizing JSON or XML data formats, and are commonly used today . On the other hand, SOAP APIs primarily use XML, are considered heavier, and have more security layers compared to REST, although they are generally older .
The absence of proper documentation can significantly impede API testing by making it difficult to understand API functionalities and expected behaviors. This challenge can be mitigated by examining Swagger or Postman collections, analyzing network calls through browser developer tools, consulting developers, and experimenting with requests and responses to deduce functionalities .
Black box testing assesses the system based on inputs and outputs without knowledge of the internal code structure, focusing on functional aspects . In contrast, white box testing involves examining the internal logic and code structure to validate performance, informed by understanding code paths, conditions, and logic . These approaches differ in transparency and focus but complement each other in a holistic test strategy.