Bird
Raised Fist0
Testing Fundamentalstesting~10 mins

Acceptance criteria verification in Testing Fundamentals - Interactive Code Practice

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

Complete the code to check if the feature meets the acceptance criteria by verifying the output status.

Testing Fundamentals
def test_feature_output():
    output = feature_function()
    assert output.status == [1]
Drag options to blanks, or click blank then click option'
A"passed"
B"completed"
C"done"
D"success"
Attempts:
3 left
💡 Hint
Common Mistakes
Using synonyms like 'completed' or 'done' instead of the exact 'success' string.
2fill in blank
medium

Complete the code to verify the acceptance criteria that the returned list contains exactly 3 items.

Testing Fundamentals
def test_list_length():
    result = get_items()
    assert len(result) == [1]
Drag options to blanks, or click blank then click option'
A2
B4
C3
D5
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect expected length values like 2 or 4.
3fill in blank
hard

Fix the error in the assertion to correctly verify the acceptance criteria that the user role must be 'admin'.

Testing Fundamentals
def test_user_role():
    user = get_current_user()
    assert user.role == [1]
Drag options to blanks, or click blank then click option'
A"admin"
B"guest"
C"user"
D"moderator"
Attempts:
3 left
💡 Hint
Common Mistakes
Using roles other than 'admin' in the assertion.
4fill in blank
hard

Fill both blanks to verify acceptance criteria: the response code must be 200 and the response message must be 'OK'.

Testing Fundamentals
def test_response():
    response = get_response()
    assert response.code == [1]
    assert response.message == [2]
Drag options to blanks, or click blank then click option'
A200
B404
C"OK"
D"Error"
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong status codes like 404 or messages like 'Error'.
5fill in blank
hard

Fill all three blanks to verify acceptance criteria: the data dictionary must have key 'id' with value 123, and key 'status' with value 'active'.

Testing Fundamentals
def test_data_dict():
    data = get_data()
    assert data[[1]] == [2]
    assert data[[3]] == "active"
Drag options to blanks, or click blank then click option'
A"id"
B123
C"status"
D"inactive"
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong keys or values like 'inactive' instead of 'active'.

Practice

(1/5)
1. What is the main purpose of acceptance criteria in software testing?
easy
A. To write code for the feature
B. To define what 'done' means for a feature
C. To design the user interface
D. To create test automation scripts

Solution

  1. Step 1: Understand acceptance criteria role

    Acceptance criteria specify the conditions that must be met for a feature to be considered complete.
  2. Step 2: Differentiate from other tasks

    Writing code, designing UI, and creating automation are separate activities, not the main purpose of acceptance criteria.
  3. Final Answer:

    To define what 'done' means for a feature -> Option B
  4. Quick Check:

    Acceptance criteria = Definition of done [OK]
Hint: Acceptance criteria define 'done' clearly [OK]
Common Mistakes:
  • Confusing acceptance criteria with coding tasks
  • Thinking acceptance criteria are test scripts
  • Mixing acceptance criteria with UI design
2. Which of the following is the correct way to write an acceptance criterion?
easy
A. Users might be able to reset passwords sometimes.
B. Reset password feature is cool and works well.
C. The system shall allow users to reset their password via email.
D. Password reset should be fast and secure.

Solution

  1. Step 1: Identify clear, testable criteria

    The system shall allow users to reset their password via email. clearly states a specific, testable behavior: users can reset passwords via email.
  2. Step 2: Evaluate other options for clarity and testability

    The other options are vague or subjective and cannot be directly tested.
  3. Final Answer:

    The system shall allow users to reset their password via email. -> Option C
  4. Quick Check:

    Clear and testable = The system shall allow users to reset their password via email. [OK]
Hint: Look for clear, testable statements [OK]
Common Mistakes:
  • Choosing vague or subjective statements
  • Ignoring testability of criteria
  • Confusing feature description with acceptance criteria
3. Given the acceptance criterion: The login button must be disabled until both username and password fields are filled. Which test case will verify this criterion correctly?
medium
A. Check if login button is disabled when username is filled but password is empty.
B. Check if login button is enabled when both fields are empty.
C. Check if login button is disabled when both fields are filled.
D. Check if login button is enabled when username is filled but password is empty.

Solution

  1. Step 1: Understand the criterion condition

    The login button should be disabled until both fields have values.
  2. Step 2: Identify the correct test case

    Check if login button is disabled when username is filled but password is empty. tests that the button is disabled when only username is filled, which matches the criterion.
  3. Final Answer:

    Check if login button is disabled when username is filled but password is empty. -> Option A
  4. Quick Check:

    Button disabled until both fields filled = Check if login button is disabled when username is filled but password is empty. [OK]
Hint: Test partial inputs to check button state [OK]
Common Mistakes:
  • Testing button enabled when fields are empty
  • Expecting button disabled when both fields filled
  • Ignoring partial input cases
4. You have this acceptance criterion: The search results must display within 2 seconds after submitting a query. Which of the following is the best way to debug a failing test that shows results after 5 seconds?
medium
A. Check network speed and server response times.
B. Ignore the delay since results eventually appear.
C. Change the acceptance criterion to 5 seconds.
D. Remove the timer from the test case.

Solution

  1. Step 1: Analyze the cause of delay

    Since results take 5 seconds, check network and server performance to find bottlenecks.
  2. Step 2: Avoid ignoring or changing criteria improperly

    Ignoring delay or changing criteria without cause is incorrect; removing timer hides the problem.
  3. Final Answer:

    Check network speed and server response times. -> Option A
  4. Quick Check:

    Debug performance issues first = Check network speed and server response times. [OK]
Hint: Investigate environment before changing criteria [OK]
Common Mistakes:
  • Ignoring the delay problem
  • Changing acceptance criteria without reason
  • Removing test validations
5. A feature has these acceptance criteria:
1. Users can add items to the cart.
2. Cart updates total price correctly.
3. Cart shows an error if quantity exceeds stock.

During testing, you find the cart updates price but does not show an error when quantity is too high. What should you do next?
hard
A. Change acceptance criteria to remove error message requirement.
B. Mark the feature as complete since price updates correctly.
C. Ignore the error message since it is not critical.
D. Report a bug for missing error message and retest after fix.

Solution

  1. Step 1: Verify all acceptance criteria

    The feature meets price update but fails to show error for quantity exceeding stock.
  2. Step 2: Take appropriate action

    Since one criterion fails, report a bug and plan to retest after the fix.
  3. Final Answer:

    Report a bug for missing error message and retest after fix. -> Option D
  4. Quick Check:

    Failing criteria means report bug = Report a bug for missing error message and retest after fix. [OK]
Hint: Failing any criterion means report bug [OK]
Common Mistakes:
  • Ignoring failed criteria
  • Marking incomplete features as done
  • Changing acceptance criteria to hide bugs
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