Bird
Raised Fist0
Testing Fundamentalstesting~20 mins

Defect lifecycle in Testing Fundamentals - Practice Problems & Coding Challenges

Choose your learning style10 modes available
Challenge - 5 Problems
🎖️
Defect Lifecycle Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Defect Status Transition

In a typical defect lifecycle, what is the correct next status after a defect is marked as Fixed by the developer?

AClosed
BReopened
CDeferred
DRetest
Attempts:
2 left
💡 Hint

Think about who verifies the fix after the developer marks it as fixed.

🧠 Conceptual
intermediate
2:00remaining
Defect Lifecycle Final Status

Which status indicates that a defect is completely resolved and no further action is needed?

ADeferred
BRejected
CClosed
DDuplicate
Attempts:
2 left
💡 Hint

This status means the defect is done and verified.

❓ Predict Output
advanced
2:00remaining
Defect Status Flow Simulation Output

Consider this Python code simulating defect status changes. What is the final status printed?

Testing Fundamentals
defect_status = 'New'

transitions = {
    'New': 'Assigned',
    'Assigned': 'Fixed',
    'Fixed': 'Retest',
    'Retest': 'Closed'
}

for _ in range(4):
    defect_status = transitions.get(defect_status, defect_status)

print(defect_status)
AClosed
BRetest
CFixed
DAssigned
Attempts:
2 left
💡 Hint

Follow the status changes step by step.

❓ assertion
advanced
2:00remaining
Assertion on Defect Status Validity

Which assertion correctly checks that a defect status is valid from the allowed set?

Aassert defect_status in ['New', 'Assigned', 'Fixed', 'Retest', 'Closed']
Bassert defect_status == ['New', 'Assigned', 'Fixed', 'Retest', 'Closed']
Cassert defect_status not in ['New', 'Assigned', 'Fixed', 'Retest', 'Closed']
Dassert defect_status is ['New', 'Assigned', 'Fixed', 'Retest', 'Closed']
Attempts:
2 left
💡 Hint

Check if the status is one of the allowed strings.

🔧 Debug
expert
3:00remaining
Debug Defect Status Transition Code

Find the error in this Python code simulating defect status transitions and select the option that describes the error.

Testing Fundamentals
defect_status = 'New'

transitions = {
    'New': 'Assigned',
    'Assigned': 'Fixed',
    'Fixed': 'Retest',
    'Retest': 'Closed'
}

for i in range(5):
    defect_status = transitions[defect_status]

print(defect_status)
ASyntaxError due to missing colon in dictionary
BKeyError occurs on 5th iteration because 'Closed' is not a key in transitions
CTypeError because transitions is not a dictionary
DIndexError because range is out of bounds
Attempts:
2 left
💡 Hint

Check what happens when the loop tries to access a key not in the dictionary.

Practice

(1/5)
1. Which state in the defect lifecycle indicates that a bug has been found but not yet assigned to a developer?
easy
A. New
B. Fixed
C. Retest
D. Closed

Solution

  1. Step 1: Understand the meaning of 'New' state

    The 'New' state means the defect is just reported and has not been assigned yet.
  2. Step 2: Compare with other states

    'Fixed' means the bug is corrected, 'Retest' means testing the fix, and 'Closed' means the bug is resolved and accepted.
  3. Final Answer:

    New -> Option A
  4. Quick Check:

    New = Bug found but unassigned [OK]
Hint: New means just found, not assigned yet [OK]
Common Mistakes:
  • Confusing 'New' with 'Open' or 'Assigned'
  • Thinking 'Fixed' means bug is new
  • Mixing 'Retest' with initial bug discovery
2. Which of the following is the correct order of states in a typical defect lifecycle?
easy
A. New -> Assigned -> Open -> Fixed -> Retest -> Closed
B. Fixed -> New -> Assigned -> Open -> Retest -> Closed
C. New -> Open -> Assigned -> Fixed -> Closed -> Retest
D. Assigned -> New -> Open -> Fixed -> Retest -> Closed

Solution

  1. Step 1: Recall the standard defect lifecycle sequence

    The typical order is New (reported), Assigned (developer assigned), Open (work started), Fixed (bug fixed), Retest (testing fix), Closed (bug resolved).
  2. Step 2: Match the options with this sequence

    New -> Assigned -> Open -> Fixed -> Retest -> Closed matches the correct order exactly; others have states out of order.
  3. Final Answer:

    New -> Assigned -> Open -> Fixed -> Retest -> Closed -> Option A
  4. Quick Check:

    Lifecycle order = B [OK]
Hint: Follow the bug from report to closure in order [OK]
Common Mistakes:
  • Mixing 'Assigned' and 'Open' order
  • Placing 'Fixed' before 'Assigned'
  • Confusing 'Retest' and 'Closed' positions
3. Consider this defect lifecycle snippet:
defect_states = ['New', 'Assigned', 'Open', 'Fixed', 'Retest', 'Closed']
current_state = 'Fixed'
next_state = defect_states[defect_states.index(current_state) + 1]
print(next_state)

What will be the output?
medium
A. Fixed
B. Retest
C. Open
D. Closed

Solution

  1. Step 1: Find the index of 'Fixed' in the list

    'Fixed' is at index 3 in defect_states list.
  2. Step 2: Calculate next_state using index + 1

    Index 3 + 1 = 4, so next_state = defect_states[4] which is 'Retest'.
  3. Final Answer:

    Retest -> Option B
  4. Quick Check:

    Next after Fixed = Retest [OK]
Hint: Index +1 gives next lifecycle state [OK]
Common Mistakes:
  • Choosing 'Closed' instead of 'Retest'
  • Confusing index positions
  • Assuming current_state prints itself
4. A tester reports a defect and marks it as 'Closed' immediately without retesting. What is the likely issue in this defect lifecycle process?
medium
A. Opening defect after fixing
B. Assigning defect before it is New
C. Reopening defect without fixing
D. Skipping the Retest phase

Solution

  1. Step 1: Understand the defect lifecycle phases

    After fixing, the defect should be retested before closing to confirm the fix.
  2. Step 2: Identify the problem with skipping Retest

    Marking as 'Closed' without retesting skips verification, risking unresolved bugs.
  3. Final Answer:

    Skipping the Retest phase -> Option D
  4. Quick Check:

    Retest must happen before Close [OK]
Hint: Always retest before closing a defect [OK]
Common Mistakes:
  • Closing defect without verification
  • Confusing 'Closed' with 'Fixed'
  • Ignoring defect assignment order
5. A defect is marked as 'Reopened' after failing retest. Which of the following best describes the next correct step in the defect lifecycle?
hard
A. Mark the defect as 'New' again and wait for retest
B. Close the defect immediately as it failed retest
C. Assign the defect back to the developer for fixing
D. Skip fixing and move to 'Retest' again

Solution

  1. Step 1: Understand 'Reopened' state meaning

    'Reopened' means the defect was fixed but failed retesting, so it needs fixing again.
  2. Step 2: Determine the next lifecycle step

    The defect should be assigned back to the developer to fix the issue properly before retesting.
  3. Final Answer:

    Assign the defect back to the developer for fixing -> Option C
  4. Quick Check:

    Reopened = Assign to developer [OK]
Hint: Reopened defects go back to developer for fix [OK]
Common Mistakes:
  • Closing defect after failed retest
  • Resetting defect to 'New' incorrectly
  • Skipping fix and retesting again
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard