我们如何在 CTS 运行期间跳过任何测试用例?
我们如何才能完成以下任务:
在运行期间我们可以跳过任何包或案例...?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
我们如何才能完成以下任务:
在运行期间我们可以跳过任何包或案例...?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(3)
您不能直接在 CTS 中跳过特定的测试用例。为此,您必须手动执行您想要执行的测试用例。由于有数千个测试用例,因此有一种简短的方法来执行测试用例,请使用常见的短包名称。
例如。您可以使用 $ start --plan CTS -p android.app
因此,这将执行以名称 android.app 开头的所有测试用例,例如
android.app.cts.ActivityGroupTest
android.app.cts.AlarmManagerTest
android.app.cts.AlertDialogTest
android.app.cts.InstrumentationTest
等等...
You can not skip the particular test cases directly in CTS. For that you have to execute the Test Cases manually which you want to execute. Since there are thousands of test cases so there is a short way to execute test cases, use the short package name which is common.
eg. you can use $ start --plan CTS -p android.app
So this will executes all the test cases which starts with name android.app, like
android.app.cts.ActivityGroupTest
android.app.cts.AlarmManagerTest
android.app.cts.AlertDialogTest
android.app.cts.InstrumentationTest
and so on...
在本地运行 CTS 时,我们实际上可以编写一个
.xml
文件(例如foo.xml
),该文件保存在android-cts/repository/plans
下> 目录。
下的测试用例将不会针对该包执行。然后我们可以像下面的示例一样运行
cts run -s device_ip:port --plan foo
这在调试 CTS 问题时很有帮助
while running CTS locally we can actually write a
.xml
file (sayfoo.xml
) which cab be kept underandroid-cts/repository/plans
directory. Test cases under<Entry exclude="class#method;class#method name="package"/>
will not be executed for the package.And then we can run like below example
cts run -s device_ip:port --plan foo
This is helpful while debugging CTS issues
我们可以通过编辑 Plans 文件夹中的 xml 文件来跳过特定的测试用例。
例如在文件夹中
android-cts/repository/plans/CTS.xml
这包含要执行的所有包的列表。只需删除要排除的包并使用其他名称保存它,例如
CTS_1.xml 并运行。
We can skip the particular test case by editing the xml file in the Plans folder .
For eg in the folder
android-cts/repository/plans/CTS.xml
This contains list of all the packages to be executed.Simply delete the package which you want to exclude and save it with other name like
CTS_1.xml and run.