CS FundamentalsVery hardProduct-company placement
A codebase reports 100% line coverage, but the mutation score is only 20%. What is the most likely explanation?
- A. The mutation tool is broken
- B. The code has no bugs
- C. Most mutants are equivalent mutants
- D. The tests execute the code but assert little or nothing about the results, so they cannot detect changed behaviour
Correct answer: D. The tests execute the code but assert little or nothing about the results, so they cannot detect changed behaviour
Coverage only shows code was run; mutation score shows whether tests notice when it behaves differently. Tests without meaningful assertions give high coverage and low mutation scores.
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
- In TDD, a developer has one failing test, assertEqual(add(2, 3), 5), and makes it pass with return 5. What is the next step according to…
- A legacy COBOL system with no documentation is analysed to recover its design (step 1), restructured and migrated to Java with the same…
- In software configuration management, the approved requirements specification is frozen and further changes need formal approval by a…
- A team records, in short version-controlled documents, why it chose PostgreSQL over MongoDB, the context, the options considered and the…
- A request passes through 6 microservices and is sometimes slow. Logs and per-service CPU metrics look normal. Which observability tool…
- A team deliberately terminates random instances and injects latency in production during business hours, with monitoring and a way to stop…