QuestionQ13
Test Analysis and Test DesignA route-finding application takes a starting point, an ending point, and a map containing information about one-way streets as inputs. It returns the length, in meters, of the shortest possible route.
You want to verify this system’s correctness with metamorphic testing using these two metamorphic relations:
- MR1: For a route from point A to point B, changing one or more one-way streets to two-way streets cannot increase the route length.
- MR2: For a map and points A, B, and C, the route length from A to C cannot exceed the combined lengths of the routes from A to B and from B to C.
You have two source test cases:
- TC1: Start: P1, end: P2, one-way streets: S1, S2, S3. Result: route length = 1680 m.
- TC2: Start: P2, end: P3, one-way streets: S1, S2, S3. Result: route length = 400 m.
Which test case exposes a system failure caused by violating metamorphic relation MR1 or MR2?
- A Start: P1, end: P3, one-way streets: S1, S2. Result: route length = 500 m
- B Start: P1, end: P3, one-way streets: S1, S2, S3. Result: route length = 2080 m
- C Start: P2, end: P3, one-way streets: S1, S3. Result: route length = 580 m
- D Start: P1, end: P2. one-way streets: S1, S2, S3. Result: route length = 1500 m
Community Discussion