【问题标题】:INFO Cannot find test class SampleTest skipping for nowINFO 暂时找不到测试类 SampleTest 正在跳过
【发布时间】: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


    【解决方案1】:

    这是一个简单的问题。我在配置文件中添加了标签“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!"}
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-01-04
      • 1970-01-01
      • 2019-03-30
      • 2018-08-16
      • 1970-01-01
      • 2020-10-15
      相关资源
      最近更新 更多