gpt4 book ai didi

android - INFO 暂时找不到正在跳过的测试类 SampleTest

转载 作者:行者123 更新时间:2023-11-29 02:20:16 26 4
gpt4 key购买 nike

我将 SL4A 与 ACTS(Android 通信测试套件)结合使用来运行一些简单的测试用例。但我收到错误

INFO Cannot find test class SampleTest skipping for now.

这是我的配置类,即 Sample.json

    {   "_description": "This is an example skeleton test configuration file.",
"testbed":
[
{
"_description": "Sample testbed with no devices",
"name": "SampleTestBed"
}
],
"logpath": "/tmp/logs",
"testpaths": ["../tests/sample"],
"custom_param1": {"favorite_food": "Icecream!"}
}

这是我的类(class),即 SampleTest.py

from acts.base_test import BaseTestClass


class SampleTest(BaseTestClass):

def __init__(self, controllers):
BaseTestClass.__init__(self, controllers)
self.tests = (
"test_make_toast",
)

"""Tests"""

def test_make_toast(self):
for ad in self.android_devices:
ad.droid.makeToast("Hello World...")
return True

这就是我运行 ACT 的方式,如下所示

act.py -c Sample.json -tb SampleTestBed -tc SampleTest:test_make_toast

但我收到上述错误。有帮助吗?

最佳答案

这是一个简单的问题。我在配置文件中添加了标签“AndroidDevice”:“*”。问题得到解决。

 {   "_description": "This is an example skeleton test configuration file.",
"testbed":
[
{
"_description": "Sample testbed with no devices",
"name": "SampleTestBed"
"AndroidDevice": "*"

}
],
"logpath": "/tmp/logs",
"testpaths": ["../tests/sample"],
"custom_param1": {"favorite_food": "Icecream!"}
}

关于android - INFO 暂时找不到正在跳过的测试类 SampleTest,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56523297/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com