Testing and Deployment

A developer uses Kiro to expand a unit test suite. Coverage results show that several error-handling branches remain untested; which request would BEST address the gap?

Show the answer

Correct answerD. Generate tests for uncovered branches using the coverage report

AWhy not this: Additional successful inputs can exercise the same paths while leaving the error branches uncovered.

BWhy not this: Another environment does not supply the missing unit tests for error-handling branches.

CWhy not this: Replacing error assertions with successful responses removes validation of the behavior that needs testing.

DWhy this is right: The coverage report directs test generation toward the specific branches that lack execution.

Coverage reports identify unexercised code paths that can guide targeted AI-generated tests. Generating more successful inputs may increase the test count without exercising missing error-handling branches.