InstrumentationTestSuite
public class InstrumentationTestSuite
extends TestSuite
此类在API级别24中已被弃用。
改为使用InstrumentationRegistry 。 新的测试应该使用Android Testing Support Library编写 。
一个 TestSuite
,在运行之前将 Instrumentation
注入到 InstrumentationTestCase
。
Summary
Public constructors
InstrumentationTestSuite
InstrumentationTestSuite (Instrumentation instr)
Parameters |
instr |
Instrumentation : The instrumentation that will be injected into each test before running it. |
InstrumentationTestSuite
InstrumentationTestSuite (String name,
Instrumentation instr)
Parameters |
name |
String
|
instr |
Instrumentation
|
InstrumentationTestSuite
InstrumentationTestSuite (Class theClass,
Instrumentation instr)
Parameters |
theClass |
Class : Inspected for methods starting with 'test' |
instr |
Instrumentation : The instrumentation to inject into each test before running. |
Public methods
addTestSuite
void addTestSuite (Class testClass)
将给定类中的测试添加到套件中
Parameters |
testClass |
Class
|
runTest
void runTest (Test test,
TestResult result)
Parameters |
test |
Test
|
result |
TestResult
|