問題 ActivityInstrumentationTestCase2を継承したクラスでAndroidJUnit4を使うとテストが実行されないことがあります とりあえず、Android Studio 1.1.0 + Espresso 2.0で確認 @RunWith(AndroidJUnit4.class) @LargeTest public class MainActivityTest extends ActivityInstrumentationTestCase2<MainActivity> { private MainActivity mActivity; public MainActivityTest() { super(MainActivity.class); } @Before public void before() throws Exception { this.setUp(
![Android StudioでAndroidJUnit4を使うとテストが実行されない場合がある - Qiita](https://cdn-ak-scissors.b.st-hatena.com/image/square/e532a3d5b6c93aa4fb9850d13754be9026d217a8/height=288;version=1;width=512/https%3A%2F%2Fqiita-user-contents.imgix.net%2Fhttps%253A%252F%252Fcdn.qiita.com%252Fassets%252Fpublic%252Farticle-ogp-background-412672c5f0600ab9a64263b751f1bc81.png%3Fixlib%3Drb-4.0.0%26w%3D1200%26mark64%3DaHR0cHM6Ly9xaWl0YS11c2VyLWNvbnRlbnRzLmltZ2l4Lm5ldC9-dGV4dD9peGxpYj1yYi00LjAuMCZ3PTk3MiZoPTM3OCZ0eHQ9QW5kcm9pZCUyMFN0dWRpbyVFMyU4MSVBN0FuZHJvaWRKVW5pdDQlRTMlODIlOTIlRTQlQkQlQkYlRTMlODElODYlRTMlODElQTglRTMlODMlODYlRTMlODIlQjklRTMlODMlODglRTMlODElOEMlRTUlQUUlOUYlRTglQTElOEMlRTMlODElOTUlRTMlODIlOEMlRTMlODElQUElRTMlODElODQlRTUlQTAlQjQlRTUlOTAlODglRTMlODElOEMlRTMlODElODIlRTMlODIlOEImdHh0LWFsaWduPWxlZnQlMkN0b3AmdHh0LWNvbG9yPSUyMzIxMjEyMSZ0eHQtZm9udD1IaXJhZ2lubyUyMFNhbnMlMjBXNiZ0eHQtc2l6ZT01NiZzPWQwZTRlNThjYTc0NjdiZTg5ZWZlMWQ3YTc5NTNlNzIz%26mark-x%3D142%26mark-y%3D57%26blend64%3DaHR0cHM6Ly9xaWl0YS11c2VyLWNvbnRlbnRzLmltZ2l4Lm5ldC9-dGV4dD9peGxpYj1yYi00LjAuMCZoPTc2Jnc9NzcwJnR4dD0lNDBkaWdpdGFsanVua3kmdHh0LWNvbG9yPSUyMzIxMjEyMSZ0eHQtZm9udD1IaXJhZ2lubyUyMFNhbnMlMjBXNiZ0eHQtc2l6ZT0zNiZ0eHQtYWxpZ249bGVmdCUyQ3RvcCZzPWQ0YmViZmU0ZGI5NDUxZjZlZjA3YjBlYmE0OGNmYWZl%26blend-x%3D142%26blend-y%3D486%26blend-mode%3Dnormal%26s%3D8ed6a0ddcff100a833d07086c75cff3f)