收藏
回答

「Minium」在继承minium.MiniTest的类里写测试用例,用例没有执行,这是为什么?

这是config.json

这是suite.json

这是minium的版本

这是代码

import minium


class ExceptionTest(minium.MiniTest):
    def test_call_wx_method(self):
        sys_info = self.app.call_wx_method("getSystemInfo")
        # print(sys_info)
        self.assertIn("SDKVersion", sys_info.result.result)
    def test_get_current_page(self):
        self.assertEqual(self.page.path,"/pages/mainPackage/device/device")
        self.assertIsInstance(self.page.query,dict)

运行结果

这是官方的小程序示例里的一段代码,不知道为什么在自己建的项目里就没有执行起来,直接调用类里的方法,则会报错:AttributeError: 'ExceptionTest' object has no attribute 'app'

回答关注问题邀请回答
收藏

1 个回答

登录 后发表内容
问题标签