JUnit - Suite Test, запуск нескольких тестовых случаев
В JUnit вы можете запускать несколько тестовых случаев с аннотациями@RunWith
и@Suite
. См. Следующие примеры:
SuiteAbcTest.java
package com.example; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.Suite; @RunWith(Suite.class) @Suite.SuiteClasses({ Exception1Test.class, //test case 1 TimeoutTest.class //test case 2 }) public class SuiteAbcTest { //normally, this is an empty class }
P.S Tested with JUnit 4.12