INFO 找不到测试 class 暂时跳过 SampleTest
INFO Cannot find test class SampleTest skipping for now
我将 SL4A 与 ACTS(Android 通信测试套件)一起用于 运行 一些简单的测试用例。但我收到错误
INFO Cannot find test class SampleTest skipping for now.
这是我的配置 class 即 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!"}
}
我将 SL4A 与 ACTS(Android 通信测试套件)一起用于 运行 一些简单的测试用例。但我收到错误
INFO Cannot find test class SampleTest skipping for now.
这是我的配置 class 即 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!"}
}