0

非常に多くのテスト ケースを実装しましたが、それらを一度にすべて実行することは避けたいと考えています。

それらの束だけを選択するために、独自の 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

アイデアが不足しています。誰もそれを行う方法を知っていますか?

ありがとう、ヴィンセント

4

1 に答える 1

0

私はこの分野の専門家ではありませんが、アドバイスすることが 1 つあります。CTS には、xml ファイルを含む plan ディレクトリがあります。それらには、startcts で使用される CTS テストのリストが含まれています。あなたのテストはそれらのいずれかにありますか?

于 2012-02-24T05:37:17.427 に答える