Question: I am trying to see test coverage line by line in a class, however, only the first line is highlighted.

[![enter image description here](https://i.stack.imgur.com/uW3o7.png)](https://i.stack.imgur.com/uW3o7.png)

The *Show Inline Statistics* setting is enabled.

[![enter image description here](https://i.stack.imgur.com/H4R7a.png)](https://i.stack.imgur.com/H4R7a.png)

I get the test coverage for the **class**, **methods** and **lines** as below:

[![enter image description here](https://i.stack.imgur.com/gydYw.png)](https://i.stack.imgur.com/gydYw.png)

I remember this worked in a previous version of Android Studio (ca't exactly remember which). How can enable the feature so that coverage is shown for all lines.

Answer: 
Step 1 - 
Run **testDebugUnitTest** with coverage 
[Click here to see unit test coverage](https://i.stack.imgur.com/Yy5oF.png)

Step 2 - 
Generate coverage report - click on icon as shown in above image (yellow highlighted) give exported path to generate html file. 

Step 3 - Click on index.html file to view report. 

You will get test coverage percentage for **class, method and line** as shown in below image 
 [Click here to see test coverage class](https://i.stack.imgur.com/guNFM.png)

[click here to see overall coverage summary](https://i.stack.imgur.com/JWvoT.png)
Run the test with coverage, then you can see it line by line:

[![enter image description here](https://i.stack.imgur.com/q8pgp.png)](https://i.stack.imgur.com/q8pgp.png)