3

I am a bit new to testing world in flutter. what I want to achieve is to determine my test coverage in flutter.

but I don't know any way to determine my test coverage , any help is appreciated.

Thanks.

2 Answers 2

3

Running the tests with

flutter test --coverage

should generate a file

/coverage/Icov.info

Which holds the information you need.

You can now extract infos from the file in various methods as described here

Sign up to request clarification or add additional context in comments.

3 Comments

hi , is there any way to install lcov on windows ?
hi, I don't know, I'm not a Windows user :(
You can follow this link: txt.arboreus.com/2015/05/29/…
0

In a easy way, you can determine the test coverage threshold using this package https://pub.dev/packages/dlcov

usage example:

dlcov --lcov-gen="flutter test --coverage" --coverage=100

--lcov-gen Generate the lcov.info file

--coverage=100 To determine if the test coverage threshold is 100%

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.