#TestCulture ๐Ÿฆ… Episode 14 - Test coverage problems

mathilde_llg

Mathilde Lelong

Posted on July 28, 2022

#TestCulture ๐Ÿฆ… Episode 14 - Test coverage problems

๐—ช๐—ต๐—ฎ๐˜ ๐—ถ๐˜€ ๐˜๐—ฒ๐˜€๐˜ ๐—ฐ๐—ผ๐˜ƒ๐—ฒ๐—ฟ๐—ฎ๐—ด๐—ฒ? Test coverage helps determine whether a test case is covering the application code and how much code is exercised when those test cases are runned.

Test coverage enables testers to identify gaps at early stages, get better coverage and to remove redundant cases. It basically saves ๐š๐š’๐š–๐šŽ and ๐š–๐š˜๐š—๐šŽ๐šข.

๐Ÿ‘‰ Function coverage: ๐™ท๐šŠ๐šœ ๐šŽ๐šŸ๐šŽ๐š›๐šข ๐š๐šž๐š—๐šŒ๐š๐š’๐š˜๐š— ๐š’๐š— ๐š๐š‘๐šŽ ๐š™๐š›๐š˜๐š๐š›๐šŠ๐š– ๐š‹๐šŽ๐šŽ๐š— ๐šŒ๐šŠ๐š•๐š•๐šŽ๐š?

๐Ÿ‘‰ Statement coverage: ๐™ท๐šŠ๐šœ ๐šŽ๐šŸ๐šŽ๐š›๐šข ๐š•๐š’๐š—๐šŽ ๐š˜๐š ๐šŒ๐š˜๐š๐šŽ ๐š‹๐šŽ๐šŽ๐š— ๐šŽ๐šก๐šŽ๐šŒ๐šž๐š๐šŽ๐š ๐šŠ๐š—๐š ๐šŸ๐šŽ๐š›๐š’๐š๐š’๐šŽ๐š?

๐Ÿ‘‰ Condition coverage: ๐™ฐ๐š›๐šŽ ๐šŠ๐š•๐š• ๐šŒ๐š˜๐š—๐š๐š’๐š๐š’๐š˜๐š—๐šœ ๐šŽ๐šก๐šŽ๐šŒ๐šž๐š๐šŽ๐š ๐šŠ๐š—๐š ๐šŸ๐šŽ๐š›๐š’๐š๐š’๐šŽ๐š?

๐Ÿ‘‰ Path coverage: ๐™ท๐šŠ๐šœ ๐šŽ๐šŸ๐šŽ๐š›๐šข ๐š™๐š˜๐šœ๐šœ๐š’๐š‹๐š•๐šŽ ๐š›๐š˜๐šž๐š๐šŽ ๐š‹๐šŽ๐šŽ๐š— ๐šŽ๐šก๐šŽ๐šŒ๐šž๐š๐šŽ๐š ๐šŠ๐š—๐š ๐šŸ๐šŽ๐š›๐š’๐š๐š’๐šŽ๐š?

โš ๏ธ Some methods are related, for example:

  • Path coverage implies both instruction coverage and test point coverage;
  • Instruction coverage does not imply test point coverage.

But test coverage is challengingโ€ฆ
1๏ธโƒฃ With test coverage, it is hard to access accurate test results. Testers are having a hard time to understand why a test is returned ๐•’๐•ค ๐•‚๐•† or to increase coverage through ๐•ก๐• ๐•ค๐•š๐•ฅ๐•š๐•ง๐•– ๐•’๐•Ÿ๐•• ๐•Ÿ๐•–๐•˜๐•’๐•ฅ๐•š๐•ง๐•– ๐•ฅ๐•–๐•ค๐•ฅ ๐••๐•’๐•ฅ๐•’. We must get rid of ๐—ณ๐—น๐—ฎ๐—ธ๐˜† ๐˜๐—ฒ๐˜€๐˜๐˜€ and maintain tests based on the evolution of user stories. ๐Ÿ‘

2๏ธโƒฃ ๐™ฒ๐šž๐šœ๐š๐š˜๐š–๐šŽ๐š›๐šœ can now use complex user paths with multiple data, on multiple devices and with multiple navigators. The need to perform multiple types of data tests, on access control of an application, on object' transitions subject to a workflow ๐—ถ๐—บ๐—ฝ๐—น๐—ถ๐—ฒ๐˜€ ๐—ฑ๐—ฒ๐—ฝ๐˜๐—ต ๐—ผ๐—ป ๐—ณ๐˜‚๐—ป๐—ฐ๐˜๐—ถ๐—ผ๐—ป๐—ฎ๐—น ๐˜๐—ฒ๐˜€๐˜๐˜€. But also the ability to manage ๐—ฎ ๐—ต๐—ถ๐—ด๐—ต ๐˜ƒ๐—ผ๐—น๐˜‚๐—บ๐—ฒ ๐—ผ๐—ณ ๐˜€๐˜๐—ฒ๐—ฝ๐˜€. โ˜๏ธ

3๏ธโƒฃ Manual validation is made by developers or project managers and takes ๐˜๐—ผ๐—ผ ๐—บ๐˜‚๐—ฐ๐—ต ๐˜๐—ถ๐—บ๐—ฒ ๐—ฐ๐—ผ๐—บ๐—ฝ๐—ฎ๐—ฟ๐—ฒ๐—ฑ ๐˜๐—ผ ๐—ฑ๐—ฒ๐˜ƒ๐—ฒ๐—น๐—ผ๐—ฝ๐—บ๐—ฒ๐—ป๐˜ ๐—ฎ๐—ฐ๐˜๐—ถ๐˜ƒ๐—ถ๐˜๐—ถ๐—ฒ๐˜€. โŒ› On the other hand, regular changes of UI makes it hard to maintain automated tests.

Time spent ๐—ฏ๐—ฒ๐—ฐ๐—ผ๐—บ๐—ฒ๐˜€ ๐—ต๐—ฎ๐—ฟ๐—ฑ ๐˜๐—ผ ๐—ท๐˜‚๐˜€๐˜๐—ถ๐—ณ๐˜† ๐˜๐—ผ ๐˜€๐˜๐—ฎ๐—ธ๐—ฒ๐—ต๐—ผ๐—น๐—ฑ๐—ฒ๐—ฟ๐˜€ when it comes to creating and running tests, as well as the high cost of test-related services and infrastructure. ๐Ÿ˜จ


๐Ÿ“š ๐•Š๐• ๐•ฆ๐•ฃ๐•”๐•–๐•ค:
๐Ÿฆ… https://agilitest.com/challenges/test-coverage
๐ŸŽด http://agilitest.com/cards/understand-what-to-test


Thread on Twitter.

๐Ÿ’– ๐Ÿ’ช ๐Ÿ™… ๐Ÿšฉ
mathilde_llg
Mathilde Lelong

Posted on July 28, 2022

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

ยฉ TheLazy.dev

About