Items in a factory are weighed automatically. The weight is stored as an integer value representing the item weight to the nearest gram (g). A function is written to validate the weight of each item. The function will return "PASS" if the weight of the item is within the acceptable range, otherwise the function will return "FAIL". The acceptable weight range for an item is 150g to 155 g inclusive. The validation function is to be properly tested. Black-box testing will be used and a test plan needs to be produced. Complete the table by writing additional tests to test this function. | Type of test data | Example test value | Expected return value | Explanation | |---|---|---|---| | Normal | 153 | "PASS" | Value within the acceptable range |
- (a)Items in a factory are weighed automatically. The weight is stored as an integer value representing the item weight to the nearest gram (g). A function is written to validate the weight of each item. The function will return "PASS" if the weight of the item is within the acceptable range, otherwise the function will return "FAIL". The acceptable weight range for an item is 150g to 155 g inclusive. The validation function is to be properly tested. Black-box testing will be used and a test plan needs to be produced. Complete the table by writing additional tests to test this function. | Type of test data | Example test value | Expected return value | Explanation | |---|---|---|---| | Normal | 153 | "PASS" | Value within the acceptable range |[4]
Mark scheme
Marking points from the official mark scheme (May/June 2022). The mark or mark type is shown in brackets.
- [4] One mark per row 2 to 7 to Max 4
- [4] Row: Abnormal; Example: < 149; Expected: "FAIL"; Explanation: Outside acceptable range / too small
- [4] Row: Abnormal / Boundary; Example: 149; Expected: "FAIL"; Explanation: Maximum unacceptable
- [4] Row: Boundary / Extreme / Normal; Example: 150; Expected: "PASS"; Explanation: Minimum acceptable
- [4] Row: Boundary / Extreme / Normal; Example: 155; Expected: "PASS"; Explanation: Maximum acceptable
- [4] Row: Abnormal / Boundary; Example: 156; Expected: "FAIL"; Explanation: Minimum unacceptable
- [4] Row: Abnormal; Example: >156; Expected: "FAIL"; Explanation: Outside acceptable range / too large
Write your answer and get it marked
On Oracle Prep you can write or photograph your own answer and have it marked by AI against this mark scheme, with feedback on what you missed.
Sign up free →