【发布时间】:2019-06-10 08:57:00
【问题描述】:
我正在使用带有 ACTS(Android Comms Test Suite)的 SL4A 来运行一些简单的测试用例。但我收到错误
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!"}
}
这是我的课,即 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
但我收到上述错误。有什么帮助吗?
【问题讨论】:
标签: android python-3.x sl4a