2011-09-14 42 views
0

我已經實現了大量的測試用例,並且希望避免一次全部運行它們。CTS無法啓動自定義TestSuite

我創建了自己的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中(運行方式>> Android的JUnit測試)沒有任何問題啓動它。但我的目標是能夠通過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 

我已經沒有想法了。有誰知道這是怎麼做到的嗎?

感謝, 文森特

回答

0

我不是這方面的專家,但我有一件事的意見。 在CTS中,有包含xml文件的計劃目錄。它們包含用於開始的CTS測試列表。你的測試是否在其中任何一個?