私のpythonスクリプトがリストされています:
==========================================
class ExampleTestCase(unittest.TestCase):
capabilities = None
def setUp(self):
self.driver = webdriver.Remote(desired_capabilities={ "browserName": broswer, "platform": platform, "node": node })
def test_example(self):
self.driver.get("www.360logica.com")
self.assertEqual(self.driver.title, "360logica")
def tearDown(self):
self.driver.quit()
if __name__ == "__main__":
#unittest.main()
args = sys.argv
port = args[1]
platform = args[2]
broswer = args[3]
suite = unittest.TestSuite()
suite.addTest(ExampleTestCase("test_example"))
runner = XMLTestRunner(file('results_ExampleTestCase_%s.xml' % (broswer), "w"))
runner.run(suite)
==============================================
実行コマンドは次のとおりです。
$ ./python.exe Grid_1.py 5555 WINDOW firefox
==============================================
ビルド エラー ログは次のとおりです。
$ ./python.exe Grid_1.py 5555 WINDOW firefox
Traceback (most recent call last):
File "Grid_1.py", line 31, in <module>
suite.addTest(ExampleTestCase("test_example"))
File "C:\Python27\Lib\unittest\case.py", line 191, in __init__
(self.__class__, methodName))
ValueError: no such test method in <class '__main__.ExampleTestCase'>: test_example
================================================== =
私を助けてください。私はそのビルドエラーに悩まされており、修正方法がわかりません。