Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
369 views
in Technique[技术] by (71.8m points)

android - Instrumented Tested via jacoco report and report shows 0% coverage

I have integrated android studio with jacoco gradle. Report is getting generated but with 0% .

I can see report for instrumented test and debug report as well jacoco report.

Instrumented Test - Shows in android test folder and shows only one report on which device we are executing.

Debug report shows - 0% coverage. it shows one time login activity some percentage after that it not showing.

Jacoco also shows 0% coverage. 0% coverage. it shows one time login activity some percentage after that it not showing.

We have unit test that are getting executed just trial once.

Now wanted to understand -

  1. How instrumented test get executed ? Which command ? Do we need write more cases in AndroidTest ? Or instrumented test means - if i create build(Apk after jacoco integration) and executed cases manually or automation it will record and then test coverage report will get generated.

  2. Does debug always shows 0% coverage?

  3. jacoco TestReport also shows 0% - which command to use. it get executed (install build and get uninstall) . Don't know how it shows correct report one time with login activity and all. After that it not showing.

So what all are the difference between Instrumented Test (Does it will execute on real device and generate test coverage > If yes how?

For Test Coverage does i need to write Unit test or basic jacoco report will get generated.

i already did lot of research and posted questions.

question from:https://stackoverflow.com/questions/65847767/instrumented-tested-via-jacoco-report-and-report-shows-0-coverage

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...