简体   繁体   English

Android CTS-随机测试失败

[英]Android CTS - Random test fails

When I run android CTS full test using below command 当我使用以下命令运行android CTS完整测试时

run cts --plan CTS

Every time it shows different result for some of the packages, I mean some packages some tests passes/fails randomly every time I re-run full test. 每次它对某些软件包显示不同的结果时,我的意思是某些软件包每次重新运行完全测试时都会随机通过/失败。 But when I run package individually (The package in which some tests failed), all the tests passes in it. 但是,当我单独运行程序包(某些测试失败的程序包)时,所有测试都通过了。

Why I am seeing this behavior? 为什么我看到这种行为?

Environment: OS: Android L CTS version: 5.1_r7 环境:操作系统:Android L CTS版本:5.1_r7

有时某个测试会随机失败,这是因为一段时间未满足测试条件,有时会因为超时测试而失败。

Some cts tests involve specific timeouts set for some event to occur. 某些cts测试涉及为某些事件发生设置的特定超时。 For example if you are running cts test related to data calls like turning mobile data off/on and timeout to get mobile data connected is set to 10 seconds, then some time this test will pass and sometime it will fail. 例如,如果您正在运行与数据呼叫相关的cts测试(例如关闭/打开移动数据以及连接移动数据的超时时间设置为10秒),则此测试将通过一段时间,而有时将失败。 In this case, increasing that timeout will resolve this issue. 在这种情况下,增加该超时将解决此问题。

Regarding issue of test case failing when running multiple packages, there could be possibility that test case before failed one has not set device in a neutral/original state for next test. 关于在运行多个程序包时测试用例失败的问题,有可能失败之前的测试用例没有将设备设置为中性/原始状态以进行下一个测试。 It is a good practice to revert all changes made during a test while exiting a test case. 优良作法是在退出测试用例时还原测试期间进行的所有更改。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM