Most visited

Recently visited

Added in API level 1
Deprecated since API level 24

InstrumentationTestSuite

public class InstrumentationTestSuite
extends TestSuite

java.lang.Object
    junit.framework.TestSuite
      android.test.InstrumentationTestSuite


此类在API级别24中已被弃用。
改为使用InstrumentationRegistry 新的测试应该使用Android Testing Support Library编写

一个 TestSuite ,在运行之前将 Instrumentation注入到 InstrumentationTestCase

摘要(Summary)

Public constructors

InstrumentationTestSuite(Instrumentation instr)
InstrumentationTestSuite(String name, Instrumentation instr)
InstrumentationTestSuite(Class theClass, Instrumentation instr)

公共方法(Public methods)

void addTestSuite(Class testClass)

将给定类中的测试添加到套件中

void runTest(Test test, TestResult result)

继承方法(Inherited methods)

From class junit.framework.TestSuite
From class java.lang.Object
From interface junit.framework.Test

Public constructors

InstrumentationTestSuite

Added in API level 1
InstrumentationTestSuite (Instrumentation instr)

参数(Parameters)
instr Instrumentation: The instrumentation that will be injected into each test before running it.

InstrumentationTestSuite

Added in API level 1
InstrumentationTestSuite (String name, 
                Instrumentation instr)

参数(Parameters)
name String
instr Instrumentation

InstrumentationTestSuite

Added in API level 1
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

Added in API level 1
void addTestSuite (Class testClass)

将给定类中的测试添加到套件中

参数(Parameters)
testClass Class

runTest

Added in API level 1
void runTest (Test test, 
                TestResult result)

参数(Parameters)
test Test
result TestResult

Hooray!