开发者

CTS cannot launch Custom TestSuite

开发者 https://www.devze.com 2023-04-05 02:04 出处:网络
I have implemented a very high number of test cases and I would like to avoid running them all at once.

I have implemented a very high number of test cases and I would like to avoid running them all at once.

I created my own TestSuite in order to select only a bunch of them:

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;

I am able to launch it through Eclipse (Run As >> Android 开发者_StackOverflowJUnit Test) without any problem. But my goal is to be able to run it through the startcts script.

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

I am running out of ideas. Does anyone know how to do that?

Thanks, Vincent


I'm not expert in this area, but I have one thing to advice. In CTS, there is plans directory which contains xml files. They contains list of CTS test which is used startcts. Is your test in any of them?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号