我们如何在 CTS 运行期间跳过任何测试用例?

发布于 2024-12-05 19:30:25 字数 50 浏览 1 评论 0 原文

我们如何才能完成以下任务:

在运行期间我们可以跳过任何包或案例...?

How we can do the following task:

During the running time we can skip the any package or case...?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

悟红尘 2024-12-12 19:30:25

您不能直接在 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...

哀由 2024-12-12 19:30:25

在本地运行 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 (say foo.xml) which cab be kept under android-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

彻夜缠绵 2024-12-12 19:30:25

我们可以通过编辑 Plans 文件夹中的 xml 文件来跳过特定的测试用例。
例如在文件夹中
android-cts/repository/plans/CTS.xml

这包含要执行的所有包的列表。只需删除要排除的包并使用其他名称保存它,例如
CTS_1.xml 并运行。

运行 cts --plan CTS1

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.

run cts --plan CTS1

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文