What is the main purpose of testing in the software development lifecycle?
Testing helps find and fix problems early to make sure the software works well and meets user needs.
Click to reveal answer
beginner
Name two common types of testing done during the software development lifecycle.
Unit testing (checks small parts of code) and system testing (checks the whole software together).
Click to reveal answer
intermediate
At which phase of the software development lifecycle should testing start?
Testing should start early, even during the requirements and design phases, to catch issues before coding.
Click to reveal answer
intermediate
What is regression testing and why is it important?
Regression testing checks that new changes do not break existing features. It keeps software stable over time.
Click to reveal answer
intermediate
How does automated testing help in the software development lifecycle?
Automated testing runs tests quickly and often, saving time and catching problems early without manual effort.
Click to reveal answer
When should testing ideally begin in the software development lifecycle?
AAfter deployment
BOnly after coding is complete
CDuring user training
DDuring the requirements phase
✗ Incorrect
Testing should start early, even during requirements, to find issues before coding begins.
Which type of testing focuses on checking small parts of the code individually?
AUnit testing
BSystem testing
CAcceptance testing
DPerformance testing
✗ Incorrect
Unit testing checks individual pieces of code to ensure they work correctly.
What is the main goal of regression testing?
ACheck if old features still work after changes
BTest new features only
CTest software speed
DTest user interface design
✗ Incorrect
Regression testing ensures that recent changes do not break existing functionality.
How does automated testing benefit the development process?
AIt slows down testing
BIt requires more manual work
CIt runs tests faster and more often
DIt replaces all manual testing
✗ Incorrect
Automated testing speeds up testing and allows frequent checks without extra manual effort.
Which phase is NOT typically part of the software development lifecycle where testing occurs?
ADesign
BMarketing
CMaintenance
DDeployment
✗ Incorrect
Marketing is outside the software development lifecycle phases where testing happens.
Explain why testing early in the software development lifecycle is beneficial.
Think about how fixing problems early is easier than later.
You got /4 concepts.
Describe the difference between unit testing and system testing.
Compare testing a single piece versus the entire product.
You got /4 concepts.
Practice
(1/5)
1. Which phase in the software development lifecycle is primarily responsible for planning how testing will be done?
easy
A. Deployment
B. Coding
C. Requirement Analysis
D. Maintenance
Solution
Step 1: Understand the role of Requirement Analysis
This phase gathers and analyzes what the software should do, including defining test requirements.
Step 2: Identify testing planning activities
Planning how to test is done early, during Requirement Analysis, to ensure tests cover all needs.
Final Answer:
Requirement Analysis -> Option C
Quick Check:
Testing plan starts in Requirement Analysis [OK]
Hint: Testing plans start with requirements, not coding [OK]
Common Mistakes:
Confusing coding phase with testing planning
Thinking deployment includes test planning
Assuming maintenance is for initial test planning
2. Which of the following is the correct syntax to describe a test case in a test plan document?
easy
A. Test Case ID: TC001\nDescription: Verify login functionality\nExpected Result: User logs in successfully
B. Test Case: Verify login\nResult: Success\nID: 001
C. ID: 001\nTest: Login check\nOutcome: Pass
D. Case Test 1\nCheck login\nExpected: true
Solution
Step 1: Identify standard test case format
Standard test cases include clear ID, description, and expected result fields.
Step 2: Compare options to standard format
Test Case ID: TC001\nDescription: Verify login functionality\nExpected Result: User logs in successfully matches the clear, structured format; others are incomplete or unclear.
Final Answer:
Test Case ID: TC001\nDescription: Verify login functionality\nExpected Result: User logs in successfully -> Option A
Quick Check:
Clear ID, description, expected result = Test Case ID: TC001\nDescription: Verify login functionality\nExpected Result: User logs in successfully [OK]
Hint: Look for clear ID, description, expected result format [OK]
Common Mistakes:
Using unclear or incomplete test case fields
Mixing field names or order
Omitting expected results
3. Consider this code snippet representing a simple test function in Python:
def test_addition():
result = 2 + 3
assert result == 5
print('Test passed')
What will be the output when this test runs?
medium
A. SyntaxError
B. Test passed
C. No output
D. AssertionError
Solution
Step 1: Analyze the test function logic
The function adds 2 + 3, stores 5 in result, then asserts result equals 5, which is true.
Step 2: Determine output after assertion
Since assertion passes, the print statement runs, outputting 'Test passed'.
Final Answer:
Test passed -> Option B
Quick Check:
Assertion true means print runs [OK]
Hint: If assert condition is true, print runs [OK]
Common Mistakes:
Thinking assertion always raises error
Expecting no output from print
Confusing syntax with runtime error
4. A tester wrote this test script snippet:
def test_divide():
result = 10 / 0
assert result == 0
What is the main problem with this test?
medium
A. Test function name is incorrect
B. Assertion should check for 10, not 0
C. Missing print statement
D. Division by zero causes runtime error
Solution
Step 1: Identify the operation causing error
Dividing 10 by 0 causes a ZeroDivisionError at runtime.
Step 2: Understand impact on test execution
Because of the error, assertion is never reached and test fails with exception.
Final Answer:
Division by zero causes runtime error -> Option D
Quick Check:
Division by zero = runtime error [OK]
Hint: Division by zero always causes error [OK]
Common Mistakes:
Ignoring runtime error and focusing on assertion
Thinking assertion is wrong instead
Assuming print statement needed
5. In a software project, testing is integrated throughout the lifecycle. Which testing type is best suited to catch issues caused by changes in code after deployment?
hard
A. Regression Testing
B. Unit Testing
C. Acceptance Testing
D. Smoke Testing
Solution
Step 1: Understand testing types and their purpose
Unit Testing checks small code parts; Acceptance Testing checks user needs; Smoke Testing checks basic functionality.
Step 2: Identify testing for post-deployment changes
Regression Testing reruns tests to ensure new changes don't break existing features after deployment.