Jacoco with Robolectric , coverage is zero

46 views
Skip to first unread message

weijian ni

unread,
Nov 4, 2021, 6:06:22 AM11/4/21
to JaCoCo and EclEmma Users
In Android module,the test dir, 
code like this:
@RunWith(RobolectricTestRunner.class)
public class UserTest {
         @Test
         public void user() {
                     User user = new User(2, "aaa", 1, "");
                     assertEquals(2, user.getUserId());
          }
}

run jacoco, coverage is zero, but when remove “@RunWith(RobolectricTestRunner.class)”, the coverage  is ok,why?how can fix it?
Message has been deleted

Arti Gupta

unread,
Nov 18, 2023, 6:44:26 PM11/18/23
to JaCoCo and EclEmma Users
Hi Weijian,

Have you found out the solution?
Reply all
Reply to author
Forward
0 new messages