同じものを販売しているいくつかのサイトをテストする必要がありますが、別のテンプレートがあります.
したがって、いくつかの入力パラメーターを指定して各 MainTestClass を実行したいとします。
Java -jar SeleniumServerStandalone-2.0b2.jar -ポート 5555 (template_id=5)
出来ますか?
class MainTestCases(unittest.TestCase):
def setUp(self):
#self.template_id=template_id I want something like that
self.verificationErrors = []
self.selenium = selenium("localhost", 5555, "*chrome", "http://www.google.com/")
time.sleep(5)
self.selenium.start()
def test_test1(self):
if self.template_id==1:
...
elif self.template_id==2:
...
def test_test2(self):
if self.template_id==1:
...
elif self.template_id==2:
...
def tearDown(self):
self.selenium.stop()
self.assertEqual([], self.verificationErrors)
if __name__ == "__main__":
unittest.main()