Android Studio运行错误的测试 - 从androidTest包执行单元测试

时间:2017-11-25 23:12:40

标签: android testing android-studio-3.0

我有两个测试,一个单元测试和一个仪器测试: { "entry": [ { "changes": [ { "field": "feed", "value": { "story": "Some page added an event.", "item": "event", "event_id": "2277580782468248", "post_id": "1442694315844896_2277580782468248", "verb": "add", "created_time": 1511651353, "message": "test event" } } ], "id": "1442694315844895", "time": 1511651355 } ], "object": "page" [...]/src/androidTest/java/com/mydomain/api/ApiClientTest.java

右键单击[...]/src/test/java/com/mydomain/api/ApiClientTest.java并选择“运行ApiClientTest”正在androidTest/.../ApiClientTest.java中运行测试类,而不是test/中的测试类

1 个答案:

答案 0 :(得分:0)

我通过将androidTest/测试类重命名为androidTest

来解决此问题

既然名称没有重复,我也没有问题。