1 / 5
Only 50% of the code is exercised by tests. The team wants to test more of it, so they aim to ___ coverage.
-
-
-
-
Increase coverage (or
improve /
raise coverage) is the standard collocation.
- increase / improve test coverage
- Coverage = the percentage of code exercised by tests
"Widen up" and "raise out" aren't idiomatic. Example:
"We increased coverage from 50% to 85% this sprint."
2 / 5
A test passes sometimes and fails other times for no code reason. Engineers call it a ___ test.
-
-
-
-
A
flaky test is one with non-deterministic results — it passes and fails intermittently.
- a flaky test / test flakiness
- Common causes: timing, ordering, shared state, network
"Shaky"/"wobbly" aren't the technical term. Example:
"That flaky test fails about one run in ten — please quarantine it."
3 / 5
To test a unit in isolation, you replace its external service with a fake you can control. You ___ the dependency.
-
-
-
-
Mock a dependency means replacing it with a controllable fake that records/verifies interactions.
- mock a dependency / a service / an API
- Related: a stub returns canned data; a mock also lets you assert how it was called
"Dummy up" and "sham" aren't standard. Example:
"Mock the payment gateway so the test runs offline."
4 / 5
In a test, you check that the result equals the expected value. You ___ that the output is correct.
-
-
-
-
Assert is the verb for checking an expected condition in a test.
- assert that / an assertion — verify the outcome
- A failed assertion fails the test
"Claim off" and "affirm up" aren't test terms. Example:
"Assert that the response status is 200 and the body matches."
5 / 5
You provide a simple canned return value for a function call during a test, without verifying calls. You ___ it.
-
-
-
-
Stub means replacing a function/method with one that returns fixed, canned values.
- stub a method / a call — provide a hardcoded response
- Lighter than a mock, which also verifies interactions
"Plug off" and "cap up" aren't standard. Example:
"Stub the clock so the test always sees the same time."