Bird
Raised Fist0
Testing Fundamentalstesting~10 mins

Test case components (steps, expected, actual) 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 define the first step in a test case.

Testing Fundamentals
test_steps = ["[1] the login page"]
Drag options to blanks, or click blank then click option'
AClose
BOpen
CDelete
DRefresh
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'Close' or 'Delete' as the first step.
2fill in blank
medium

Complete the code to specify the expected result after login.

Testing Fundamentals
expected_result = "User [1] successfully"
Drag options to blanks, or click blank then click option'
Aregisters
Blogs out
Clogs in
Ddeletes account
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing login with logout or account deletion.
3fill in blank
hard

Fix the error in the actual result assignment.

Testing Fundamentals
actual_result = "User [1] successfully"
Drag options to blanks, or click blank then click option'
Alogged in
Bloged in
Clog in
Dlogin
Attempts:
3 left
💡 Hint
Common Mistakes
Misspelling 'logged' as 'loged'.
Using 'login' as a verb incorrectly.
4fill in blank
hard

Fill both blanks to complete the test case dictionary with steps and expected result.

Testing Fundamentals
test_case = {
  "steps": ["Enter username", "[1] password"],
  "expected": "User [2] successfully"
}
Drag options to blanks, or click blank then click option'
AEnter
Blogs in
Clogs out
DDelete
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'logs out' as expected result.
Using 'Delete' as a step.
5fill in blank
hard

Fill all three blanks to complete the test case with steps, expected, and actual results.

Testing Fundamentals
test_case = {
  "steps": ["Open login page", "Enter username", "Enter [1]"],
  "expected": "User [2] successfully",
  "actual": "User [3] successfully"
}
Drag options to blanks, or click blank then click option'
Apassword
Blogs in
Clogged in
Dlog in
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up tenses in expected and actual results.
Using 'log in' instead of 'logs in' or 'logged in'.

Practice

(1/5)
1. Which component of a test case describes the actions a tester must perform?
easy
A. Test steps
B. Expected results
C. Actual results
D. Test summary

Solution

  1. Step 1: Understand test case components

    Test cases have steps, expected results, and actual results.
  2. Step 2: Identify which describes actions

    Test steps tell the tester what to do, the actions to perform.
  3. Final Answer:

    Test steps -> Option A
  4. Quick Check:

    Actions = Test steps [OK]
Hint: Steps = actions to perform in test case [OK]
Common Mistakes:
  • Confusing expected results with steps
  • Thinking actual results describe actions
  • Mixing test summary with steps
2. Which of the following is the correct way to write the expected result in a test case?
easy
A. User clicks the login button and waits.
B. Click the login button to open the login page.
C. Login page appears sometimes after clicking.
D. The system should display the login page after clicking the login button.

Solution

  1. Step 1: Identify expected result format

    Expected results describe what should happen clearly and precisely.
  2. Step 2: Compare options

    The system should display the login page after clicking the login button. clearly states the expected system behavior after an action.
  3. Final Answer:

    The system should display the login page after clicking the login button. -> Option D
  4. Quick Check:

    Expected result = clear system behavior [OK]
Hint: Expected result = clear, precise system behavior [OK]
Common Mistakes:
  • Writing steps instead of expected results
  • Being vague or uncertain in expected results
  • Mixing user actions with expected outcomes
3. Given this test case snippet:
Steps: 1. Enter username 'user1'
2. Enter password 'pass123'
3. Click 'Submit'
Expected: User is logged in and dashboard appears
Actual: Error message 'Invalid credentials'

What does this test result indicate?
medium
A. Test failed due to incorrect actual result
B. Expected result is wrong
C. Test steps are incomplete
D. Test passed successfully

Solution

  1. Step 1: Compare expected and actual results

    Expected is successful login; actual shows error message.
  2. Step 2: Determine test outcome

    Mismatch means test failed due to unexpected actual result.
  3. Final Answer:

    Test failed due to incorrect actual result -> Option A
  4. Quick Check:

    Expected ≠ Actual = Fail [OK]
Hint: If actual ≠ expected, test fails [OK]
Common Mistakes:
  • Assuming test passed despite different actual result
  • Confusing steps with results
  • Ignoring error messages in actual results
4. A tester wrote this test case:
Steps: 1. Open app
2. Click 'Settings'
Expected: Settings page opens
Actual: Settings page opens

But the test is marked as failed. What is the most likely error?
medium
A. Steps are missing details
B. Actual result was not recorded correctly
C. Expected result is unclear
D. Test case lacks test data

Solution

  1. Step 1: Check expected vs actual results

    Both say settings page opens, so results match.
  2. Step 2: Consider why test marked failed

    If test failed despite matching results, actual result might be recorded incorrectly or test status set wrongly.
  3. Final Answer:

    Actual result was not recorded correctly -> Option B
  4. Quick Check:

    Matching results but fail = recording error [OK]
Hint: Matching expected and actual means test should pass [OK]
Common Mistakes:
  • Assuming missing steps cause fail here
  • Confusing unclear expected with fail reason
  • Ignoring test status errors
5. You have a test case with these components:
Steps: 1. Add item to cart
2. Proceed to checkout
Expected: Total price updates correctly
Actual: Total price remains unchanged

How should you update the test case to better capture the issue?
hard
A. Remove actual result to avoid confusion
B. Change expected result to match actual price
C. Add detailed steps to verify price calculation and record exact actual price
D. Skip the test since actual differs from expected

Solution

  1. Step 1: Analyze test case problem

    Actual result shows a bug: price not updating as expected.
  2. Step 2: Improve test case details

    Adding detailed steps and exact actual price helps reproduce and fix the bug.
  3. Final Answer:

    Add detailed steps to verify price calculation and record exact actual price -> Option C
  4. Quick Check:

    More detail = better bug capture [OK]
Hint: Add details and exact actual results to clarify bugs [OK]
Common Mistakes:
  • Changing expected to hide bugs
  • Removing actual results loses evidence
  • Skipping tests hides problems
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