Test Strategy: Unit, Integration and End to End · seed 1 · A4, ink-friendly. The answer key prints on its own page for grown-ups.
به انگلیسی

Choose tests for the risks

Computing · Software Engineering · ages 20-21
Name ______________________   Date ____________
  1. Which level exercises an assembled application from choosing a book through checkout to receipt?

    • End-to-end journey tests
    • Isolated totals-function tests
    • Payment-adapter integration tests
  2. Using this lesson's terms, which level checks a small piece of logic in isolation from external services?

    • Journey tests
    • Integration tests
    • Isolated unit tests
  3. An integration test can exercise a real exchange that an isolated test using a dependency double does not exercise.

    Circle one:   True   False

  4. Every arithmetic check runs through a slow browser checkout. What problem can this strategy create?

    • Delayed feedback and harder fault location
    • Reduced need to choose arithmetic inputs
    • More precise failure messages from spanning more components
  5. A payment adapter sends a request format the provider rejects. Which focused check exercises that real boundary without charging live customers?

    • An adapter test using a hand-written response stub
    • An integration check using the provider's test environment
    • A contract check using a local provider imitation
  6. The suspected defect is entirely in a totals function's arithmetic. Which check most directly exercises that calculation?

    • A browser test of checkout's displayed total
    • An integration check of totals and payment
    • An isolated test of the totals function
  7. A team deletes focused tests and moves every check into slow journey tests. Which revision better matches checks to risks?

    • Replace the journeys with unit checks on their component functions
    • Restore focused checks and retain journeys for workflow risks
    • Speed up the browser suite and keep arithmetic checks there
  8. You run the real discount, refund and receipt components together without a browser to check their combination. Using this lesson's terms, what is this?

    • An integration test of selected components
    • A unit test with dependency doubles
    • A unit test of discount logic
LightMySky · lightmysky.comW1-mt_fdAvx1MMFE-s1

Answer key

For grown-ups. Fold this page away before handing over the rest.

Choose tests for the risks W1-mt_fdAvx1MMFE-s1

  1. End-to-end journey tests · This is a complete user journey. A passing run establishes that tested journey under its conditions.
  2. Isolated unit tests · The lesson calls these unit tests. Speed alone does not define the level.
  3. True · The integration check can use the actual tested boundary. A double substitutes for that dependency.
  4. Delayed feedback and harder fault location · The broad, slow route can delay feedback and make a local arithmetic fault harder to locate.
  5. An integration check using the provider's test environment · The provider's test environment exercises its interface without making a live customer charge.
  6. An isolated test of the totals function · The totals function contains the stated arithmetic. A direct test avoids unrelated workflow and service setup.
  7. Restore focused checks and retain journeys for workflow risks · Use focused checks for local detail, integration checks for selected interactions and journeys for workflow risks.
  8. An integration test of selected components · The check exercises selected real components together. A combination does not automatically require a complete journey.
Worksheet · LightMySky