Software maintenance involves modifying, updating, and improving software after deployment. Explanation:
API testing verifies if APIs function correctly by checking requests, responses, and data validation. Explanation: Example API Test (Python – requests) import requestsresponse = requests.get(“https://jsonplaceholder.typicode.com/posts/1”)print(response.json()) # Prints API response
Selenium is an automation testing framework used to test web applications. Explanation: Example Selenium Test (Python) python from selenium import webdriverdriver = webdriver.Chrome()driver.get(“https://www.google.com”)print(driver.title) # Prints webpage titledriver.quit()
JUnit is a Java testing framework used for unit testing and ensuring code correctness. Explanation: Example JUnit Test: import org.junit.Test;import static org.junit.Assert.assertEquals;public class CalculatorTest { @Test public void testAddition() { assertEquals(5, 2 + 3); }}
Mock testing is a software testing technique where simulated objects replace real components to test functionality in isolation. Explanation: Example (Python Mock Test using unittest.mock) from unittest.mock import Mock# Create a mock objectdatabase = Mock()database.get_user.return_value = {‘id’: 1, ‘name’: ‘Alice’}# Test function using the mockprint(database.get_user(1)) # Output: {‘id’: 1, ‘name’: ‘Alice’}
White box testing examines internal code structure, logic, and flow to find defects. Explanation: Example (Python Unit Test): import unittestdef add(x, y): return x + yclass TestAddition(unittest.TestCase): def test_add(self): self.assertEqual(add(2, 3), 5)if __name__ == “__main__”: unittest.main()
Black box testing is a testing method that evaluates software functionality without accessing internal code. Explanation: Example:
A test plan is a document outlining the testing scope, strategy, objectives, and timeline. Explanation: Key Components of a Test Plan:
A test case is a set of conditions and steps used to verify whether a software feature works as expected. Explanation: Example Test Case: Test ID Description Input Expected Output Result TC001 Login with valid user User1 Success message Passed TC002 Login with wrong password User1, wrong pass Error message Failed
Bug tracking is the process of identifying, recording, and managing software defects. Explanation: Bug Lifecycle: