非常に多くのテスト ケースを実装しましたが、それらを一度にすべて実行することは避けたいと考えています。
それらの束だけを選択するために、独自の TestSuite を作成しました。
package com.mytests;
import junit.framework.Test;
import junit.framework.TestSuite;
import com.mytests.MyTestClass1;
import com.mytests.MyTestClass2;
import com.mytests.MyTestClass3;
public class CustomSuite extends TestSuite {
public static Test suite() {
TestSuite suite = new TestSuite();
suite.addTest(createTest(MyTestClass1.class, "test3"));
suite.addTest(createTest(MyTestClass2.class, "test2"));
suite.addTestSuite(MyTestClass3.class);
return suite;
問題なくEclipse(Run As >> Android JUnit Test)から起動できます。しかし、私の目標は、startcts スクリプトを介して実行できるようにすることです。
cts_host > start --plan MyPlan -p com.mytests.CustomSuite
The specific test package does not exist: com.mytests.CustomSuite
cts_host > start --plan MyPlan -t com.mytests.CustomSuite#Test
The specific test does not exist: com.mytests.CustomSuite#Test
アイデアが不足しています。誰もそれを行う方法を知っていますか?
ありがとう、ヴィンセント