Test run failed: Instrumentation run failed due to 'Process crashed.' when testing multiple Android activity

前端 未结 4 1201
说谎
说谎 2021-01-11 10:00

I\'ve got an issue with testing my android application.
I have 2 testCase class, if I execute them separately, there is no problem, the tests run until the end. But if I

4条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-11 10:49

    I used to get this error when I used System.exit(0) on my test Activity's onFinish like below:

    @Override
        public void finish() {
            super.finish();
            System.exit(0);
    
        }
    

    So check your Main activity's onFinish method.

提交回复
热议问题