0
0
Testing Fundamentalstesting~10 mins

Defect lifecycle in Testing Fundamentals - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to name the initial state of a defect after it is found.

Testing Fundamentals
defect_state = "[1]"  # Initial state when a defect is found
Drag options to blanks, or click blank then click option'
AOpen
BClosed
CRejected
DDeferred
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing 'Closed' because it sounds final, but defects start as 'Open'.
2fill in blank
medium

Complete the code to show the state when a defect is fixed by developers.

Testing Fundamentals
defect_state = "[1]"  # State after defect is fixed
Drag options to blanks, or click blank then click option'
ADeferred
BOpen
CRejected
DFixed
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing 'Closed' too early before retesting.
3fill in blank
hard

Fix the error in the code to represent the state when a defect is not accepted.

Testing Fundamentals
defect_state = "[1]"  # State when defect is invalid or not accepted
Drag options to blanks, or click blank then click option'
ARejected
BFixed
CClosed
DOpen
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing 'Rejected' with 'Closed'.
4fill in blank
hard

Fill both blanks to complete the defect lifecycle transition code.

Testing Fundamentals
if defect_state == "Open":
    defect_state = "[1]"  # Developer fixes the defect
elif defect_state == "[2]":
    defect_state = "Closed"  # Tester closes after retest
Drag options to blanks, or click blank then click option'
AFixed
BRejected
COpen
DDeferred
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up 'Rejected' and 'Open' states.
5fill in blank
hard

Fill all three blanks to complete the defect lifecycle dictionary comprehension filtering defects by state.

Testing Fundamentals
defects = {id: state for id, state in defect_list.items() if state == "[1]" or state == "[2]" or state == "[3]"}
Drag options to blanks, or click blank then click option'
AOpen
BFixed
CRejected
DClosed
Attempts:
3 left
💡 Hint
Common Mistakes
Including 'Rejected' which is not part of active lifecycle filtering.