[英]How to call other test class in Android Espresso?
I am writing testcases using Android Espresso. 我正在使用Android Espresso编写测试用例。
I have two activities: activity A and activity B. Also I am having a separate test class for both the activities. 我有两个活动:活动A和活动B。另外,我对这两个活动都有单独的测试课程。
After I execute all the testcases in activity A, I don't know how to run the testcases in activity B continuously. 在执行活动A中的所有测试用例之后,我不知道如何连续运行活动B中的测试用例。
How can I go to activity B test class from activity A test class? 我如何从活动A的测试班参加活动B的测试班?
If I understand your question correctly, would something like a separate "test suite" class work for you? 如果我正确理解了您的问题,那么像一个单独的“测试套件”类会为您工作吗? For example:
例如:
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@RunWith(Suite.class)
@Suite.SuiteClasses({
activityATest.class,
activityBTest.class,
activityCTest.class
})
public class ActivityTestSuite {
}
And then you would just run your tests from this suite 然后,您只需在此套件中运行测试
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.