クラス SpringRunner
java.lang.ObjectSE
org.junit.runner.Runner
org.junit.runners.ParentRunner<FrameworkMethod>
org.junit.runners.BlockJUnit4ClassRunner
org.springframework.test.context.junit4.SpringJUnit4ClassRunner
org.springframework.test.context.junit4.SpringRunner
- 実装されているすべてのインターフェース:
Describable、Filterable、Orderable、Sortable
SpringRunner は SpringJUnit4ClassRunner のエイリアスです。 このクラスを使用するには、JUnit 4 ベースのテストクラスに @RunWith(SpringRunner.class) でアノテーションを付けます。
Spring TestContext フレームワークをこのランナー以外のランナーで使用する場合は、SpringClassRule および SpringMethodRule を使用します。
注意 : このクラスには、JUnit 4.12 以上が必要です。
- 導入:
- 4.3
- 作成者:
- Sam Brannen
- 関連事項:
コンストラクターの概要
コンストラクターメソッドのサマリー
クラス org.springframework.test.context.junit4. SpringJUnit4ClassRunner から継承されたメソッド
createTest, createTestContextManager, getDescription, getExpectedException, getJUnitTimeout, getSpringTimeout, getTestContextManager, isTestMethodIgnored, methodBlock, possiblyExpectingExceptions, run, runChild, withAfterClasses, withAfters, withAfterTestExecutionCallbacks, withBeforeClasses, withBefores, withBeforeTestExecutionCallbacks, withPotentialRepeat, withPotentialTimeoutクラス org.junit.runners.BlockJUnit4ClassRunner から継承されたメソッド
collectInitializationErrors, computeTestMethods, createTest, describeChild, getChildren, getTestRules, isIgnored, methodInvoker, rules, testName, validateConstructor, validateFields, validateInstanceMethods, validateNoNonStaticInnerClass, validateOnlyOneConstructor, validateTestMethods, validateZeroArgConstructorクラス org.junit.runners.ParentRunner から継承されたメソッド
childrenInvoker, classBlock, classRules, createTestClass, filter, getName, getRunnerAnnotations, getTestClass, order, runLeaf, setScheduler, sort, validatePublicVoidNoArgMethods, withInterruptIsolation
コンストラクターの詳細
SpringRunner
新しいSpringRunnerを作成し、TestContextManagerを初期化して、標準の JUnit 4 テストに Spring Test 機能を提供します。- パラメーター:
clazz- 実行するテストクラス- 例外:
InitializationError- 関連事項: