CS FundamentalsVery hardService-company placement · ISTQB-style
A state machine has transitions a: S1→S2, b: S2→S3, c: S3→S1 and d: S2→S1. How many test items does 0-switch (every transition) coverage need, and how many does 1-switch (every valid pair of consecutive transitions) coverage need?
- A. 4 and 5
- B. 4 and 16
- C. 4 and 8
- D. 3 and 5
Correct answer: A. 4 and 5
0-switch covers the 4 transitions. For pairs, multiply arrivals into each state by departures from it: into S1 (c, d) × out (a) = 2; into S2 (a) × out (b, d) = 2; into S3 (b) × out (c) = 1; total 5. 16 counts all 4 × 4 ordered pairs, most of which cannot follow each other.
Practise more Software Engineering, Git and Cloud Basics questionsSoftware Engineering, Git and Cloud Basics: notes and key points
More Software Engineering, Git and Cloud Basics questions
- How many of these statements about data-flow coverage criteria are correct? 1. All-uses subsumes all-defs (when every definition reaches…
- The condition x > 5 and x >= 0 (x an integer) is mutated four ways. Which mutant is equivalent, so that no test can kill it?
- Under basic COCOMO organic mode (Effort = 2.4 × KLOC^1.05 person-months), how does productivity in LOC per person-month for a 100 KLOC…
- Application A maintains the Customer master data. A separate Payroll application reads that customer data from A's database to print…
- A customer-maintenance screen lets users add, change and delete customers, each with its own processing. A search screen shows customer…
- What does this code print? python ops = [lambda x: x k for k in range(1, 4)] print([op(10) for op in ops])