def setUp(self): self.browser = Slot.browser() self.com = Common(self.browser) self.wg = WebGame(self.browser) self.pg = PlayGame(self.browser) self.wr = WebRecord(self.browser) self.csv = "../data/game_list.csv"
class SlotQ2(unittest.TestCase): def setUp(self): self.browser = Slot.browser() self.com = Common(self.browser) self.wg = WebGame(self.browser) self.pg = PlayGame(self.browser) self.wr = WebRecord(self.browser) self.csv = "../data/game_list.csv" def tearDown(self): self.browser.quit() def testA(self): """季度:Slot-2018-Q2,项目:黄金右脚,环境:PRO,用例:游戏能正常运行""" data = self.com.get_csv_data(self.csv, 81) self.wg.all_agg(",".join(data)) self.pg.execute_wait_lading() self.wr.open_record() try: self.assertTrue(self.wr.new_record(",".join(data))) except AssertionError: raise def testB(self): """季度:Slot-2018-Q2,项目:人猿泰山,环境:PRO,用例:游戏能正常运行""" data = self.com.get_csv_data(self.csv, 82) self.wg.all_agg(",".join(data)) self.pg.execute_wait_lading() self.wr.open_record() try: self.assertTrue(self.wr.new_record(",".join(data))) except AssertionError: raise def testC(self): """季度:Slot-2018-Q2,项目:世界杯吉祥物,环境:PRO,用例:游戏能正常运行""" data = self.com.get_csv_data(self.csv, 83) self.wg.all_agg(",".join(data)) self.pg.execute_wait_lading() self.wr.open_record() try: self.assertTrue(self.wr.new_record(",".join(data))) except AssertionError: raise def testD(self): """季度:Slot-2018-Q2,项目:金球争霸,环境:PRO,用例:游戏能正常运行""" data = self.com.get_csv_data(self.csv, 84) self.wg.all_agg(",".join(data)) self.pg.execute_wait_lading() self.wr.open_record() try: self.assertTrue(self.wr.new_record(",".join(data))) except AssertionError: raise def testE(self): """季度:Slot-2018-Q2,项目:潘帕斯雄鹰,环境:PRO,用例:游戏能正常运行""" data = self.com.get_csv_data(self.csv, 85) self.wg.all_agg(",".join(data)) self.pg.execute_wait_lading() self.wr.open_record() try: self.assertTrue(self.wr.new_record(",".join(data))) except AssertionError: raise def testF(self): """季度:Slot-2018-Q2,项目:群星闪耀,环境:PRO,用例:游戏能正常运行""" data = self.com.get_csv_data(self.csv, 86) self.wg.all_agg(",".join(data)) self.pg.execute_wait_lading() self.wr.open_record() try: self.assertTrue(self.wr.new_record(",".join(data))) except AssertionError: raise def testG(self): """季度:Slot-2018-Q2,项目:激情世界杯,环境:PRO,用例:游戏能正常运行""" data = self.com.get_csv_data(self.csv, 87) self.wg.all_agg(",".join(data)) self.pg.execute_wait_lading() self.wr.open_record() try: self.assertTrue(self.wr.new_record(",".join(data))) except AssertionError: raise def testH(self): """季度:Slot-2018-Q2,项目:船长宝藏,环境:PRO,用例:游戏能正常运行""" data = self.com.get_csv_data(self.csv, 88) self.wg.all_agg(",".join(data)) self.pg.execute_wait_lading() self.wr.open_record() try: self.assertTrue(self.wr.new_record(",".join(data))) except AssertionError: raise def testI(self): """季度:Slot-2018-Q2,项目:金靴争霸,环境:PRO,用例:游戏能正常运行""" data = self.com.get_csv_data(self.csv, 89) self.wg.all_agg(",".join(data)) self.pg.execute_wait_lading() self.wr.open_record() try: self.assertTrue(self.wr.new_record(",".join(data))) except AssertionError: raise def testJ(self): """季度:Slot-2018-Q2,项目:激情球迷,环境:PRO,用例:游戏能正常运行""" data = self.com.get_csv_data(self.csv, 90) self.wg.all_agg(",".join(data)) self.pg.execute_wait_lading() self.wr.open_record() try: self.assertTrue(self.wr.new_record(",".join(data))) except AssertionError: raise
# Spin后按钮及滚轴状态 def spin_after(self): logging.info("==========Spin后按钮及滚轴状态==========") try: assert str(self.start_btn_status()) == "playing" assert self.slot_machine_rolling() is True except AssertionError: logging.error("Spin after game AssertionError!") self.get_screen_shot("Spin after game AssertionError") raise else: time.sleep(6) # 执行spin方法 def execute_wait_lading(self): logging.info("==========集合wait_loading方法==========") self.loading_pass() logging.info("==========集合spin方法==========") self.spin_first() self.spin() self.spin_after() if __name__ == '__main__': browser = Slot.browser() pg = PlayGame(browser) wg = WebGame(browser) wg.all_agg("激情世界杯") pg.execute_wait_lading()
class SlotQ3(unittest.TestCase): def setUp(self): self.browser = Slot.browser() self.com = Common(self.browser) self.wg = WebGame(self.browser) self.pg = PlayGame(self.browser) self.wr = WebRecord(self.browser) self.csv = "../data/game_list.csv" def tearDown(self): self.browser.quit() def testA(self): """季度:Slot-2017-Q3,项目:变形金刚,环境:PRO,用例:游戏能正常运行""" data = self.com.get_csv_data(self.csv, 1) self.wg.all_agg(",".join(data)) self.pg.execute_wait_lading() self.wr.open_record() try: self.assertTrue(self.wr.new_record(",".join(data))) except AssertionError: raise def testB(self): """季度:Slot-2017-Q3,项目:中世纪特权,环境:PRO,用例:游戏能正常运行""" data = self.com.get_csv_data(self.csv, 2) self.wg.all_agg(",".join(data)) self.pg.execute_wait_lading() self.wr.open_record() try: self.assertTrue(self.wr.new_record(",".join(data))) except AssertionError: raise def testC(self): """季度:Slot-2017-Q3,项目:淘金热,环境:PRO,用例:游戏能正常运行""" data = self.com.get_csv_data(self.csv, 3) self.wg.all_agg(",".join(data)) self.pg.execute_wait_lading() self.wr.open_record() try: self.assertTrue(self.wr.new_record(",".join(data))) except AssertionError: raise def testD(self): """季度:Slot-2017-Q3,项目:摸金校尉,环境:PRO,用例:游戏能正常运行""" data = self.com.get_csv_data(self.csv, 4) self.wg.all_agg(",".join(data)) self.pg.execute_wait_lading() self.wr.open_record() try: self.assertTrue(self.wr.new_record(",".join(data))) except AssertionError: raise def testE(self): """季度:Slot-2017-Q3,项目:66路,环境:PRO,用例:游戏能正常运行""" data = self.com.get_csv_data(self.csv, 5) self.wg.all_agg(",".join(data)) self.pg.execute_wait_lading() self.wr.open_record() try: self.assertTrue(self.wr.new_record(",".join(data))) except AssertionError: raise def testF(self): """季度:Slot-2017-Q3,项目:大秦帝国,环境:PRO,用例:游戏能正常运行""" data = self.com.get_csv_data(self.csv, 6) self.wg.all_agg(",".join(data)) self.pg.execute_wait_lading() self.wr.open_record() try: self.assertTrue(self.wr.new_record(",".join(data))) except AssertionError: raise def testG(self): """季度:Slot-2017-Q3,项目:阿兹特克,环境:PRO,用例:游戏能正常运行""" data = self.com.get_csv_data(self.csv, 7) self.wg.all_agg(",".join(data)) self.pg.execute_wait_lading() self.wr.open_record() try: self.assertTrue(self.wr.new_record(",".join(data))) except AssertionError: raise def testH(self): """季度:Slot-2017-Q3,项目:狂欢,环境:PRO,用例:游戏能正常运行""" data = self.com.get_csv_data(self.csv, 8) self.wg.all_agg(",".join(data)) self.pg.execute_wait_lading() self.wr.open_record() try: self.assertTrue(self.wr.new_record(",".join(data))) except AssertionError: raise def testI(self): """季度:Slot-2017-Q3,项目:指环王,环境:PRO,用例:游戏能正常运行""" data = self.com.get_csv_data(self.csv, 9) self.wg.all_agg(",".join(data)) self.pg.execute_wait_lading() self.wr.open_record() try: self.assertTrue(self.wr.new_record(",".join(data))) except AssertionError: raise def testJ(self): """季度:Slot-2017-Q3,项目:怪物命运,环境:PRO,用例:游戏能正常运行""" data = self.com.get_csv_data(self.csv, 10) self.wg.all_agg(",".join(data)) self.pg.execute_wait_lading() self.wr.open_record() try: self.assertTrue(self.wr.new_record(",".join(data))) except AssertionError: raise def testK(self): """季度:Slot-2017-Q3,项目:80天旅行,环境:PRO,用例:游戏能正常运行""" data = self.com.get_csv_data(self.csv, 11) self.wg.all_agg(",".join(data)) self.pg.execute_wait_lading() self.wr.open_record() try: self.assertTrue(self.wr.new_record(",".join(data))) except AssertionError: raise def testL(self): """季度:Slot-2017-Q3,项目:海盗财富,环境:PRO,用例:游戏能正常运行""" data = self.com.get_csv_data(self.csv, 12) self.wg.all_agg(",".join(data)) self.pg.execute_wait_lading() self.wr.open_record() try: self.assertTrue(self.wr.new_record(",".join(data))) except AssertionError: raise def testM(self): """季度:Slot-2017-Q3,项目:封神榜,环境:PRO,用例:游戏能正常运行""" data = self.com.get_csv_data(self.csv, 13) self.wg.all_agg(",".join(data)) self.pg.execute_wait_lading() self.wr.open_record() try: self.assertTrue(self.wr.new_record(",".join(data))) except AssertionError: raise def testN(self): """季度:Slot-2017-Q3,项目:荣耀王者,环境:PRO,用例:游戏能正常运行""" data = self.com.get_csv_data(self.csv, 14) self.wg.all_agg(",".join(data)) self.pg.execute_wait_lading() self.wr.open_record() try: self.assertTrue(self.wr.new_record(",".join(data))) except AssertionError: raise def testO(self): """季度:Slot-2017-Q3,项目:仙剑,环境:PRO,用例:游戏能正常运行""" data = self.com.get_csv_data(self.csv, 15) self.wg.all_agg(",".join(data)) self.pg.execute_wait_lading() self.wr.open_record() try: self.assertTrue(self.wr.new_record(",".join(data))) except AssertionError: raise def testP(self): """季度:Slot-2017-Q3,项目:白蛇传,环境:PRO,用例:游戏能正常运行""" data = self.com.get_csv_data(self.csv, 16) self.wg.all_agg(",".join(data)) self.pg.execute_wait_lading() self.wr.open_record() try: self.assertTrue(self.wr.new_record(",".join(data))) except AssertionError: raise def testQ(self): """季度:Slot-2017-Q3,项目:梦游仙境,环境:PRO,用例:游戏能正常运行""" data = self.com.get_csv_data(self.csv, 17) self.wg.all_agg(",".join(data)) self.pg.execute_wait_lading() self.wr.open_record() try: self.assertTrue(self.wr.new_record(",".join(data))) except AssertionError: raise
class SlotQ1(unittest.TestCase): def setUp(self): self.browser = Slot.browser() self.com = Common(self.browser) self.wg = WebGame(self.browser) self.pg = PlayGame(self.browser) self.wr = WebRecord(self.browser) self.csv = "../data/game_list.csv" def tearDown(self): self.browser.quit() def testA(self): """季度:Slot-2018-Q1,项目:湛蓝深海,环境:PRO,用例:游戏能正常运行""" data = self.com.get_csv_data(self.csv, 66) self.wg.all_agg(",".join(data)) self.pg.execute_wait_lading() self.wr.open_record() try: self.assertTrue(self.wr.new_record(",".join(data))) except AssertionError: raise def testB(self): """季度:Slot-2018-Q1,项目:哥谭魅影猫女,环境:PRO,用例:游戏能正常运行""" data = self.com.get_csv_data(self.csv, 67) self.wg.all_agg(",".join(data)) self.pg.execute_wait_lading() self.wr.open_record() try: self.assertTrue(self.wr.new_record(",".join(data))) except AssertionError: raise def testC(self): """季度:Slot-2018-Q1,项目:招财进宝,环境:PRO,用例:游戏能正常运行""" data = self.com.get_csv_data(self.csv, 68) self.wg.all_agg(",".join(data)) self.pg.execute_wait_lading() self.wr.open_record() try: self.assertTrue(self.wr.new_record(",".join(data))) except AssertionError: raise def testD(self): """季度:Slot-2018-Q1,项目:十二生肖,环境:PRO,用例:游戏能正常运行""" data = self.com.get_csv_data(self.csv, 69) self.wg.all_agg(",".join(data)) self.pg.execute_wait_lading() self.wr.open_record() try: self.assertTrue(self.wr.new_record(",".join(data))) except AssertionError: raise def testE(self): """季度:Slot-2018-Q1,项目:捕鱼达人,环境:PRO,用例:游戏能正常运行""" data = self.com.get_csv_data(self.csv, 70) self.wg.all_agg(",".join(data)) self.pg.execute_wait_lading() self.wr.open_record() try: self.assertTrue(self.wr.new_record(",".join(data))) except AssertionError: raise def testF(self): """季度:Slot-2018-Q1,项目:愤怒的小鸟,环境:PRO,用例:游戏能正常运行""" data = self.com.get_csv_data(self.csv, 71) self.wg.all_agg(",".join(data)) self.pg.execute_wait_lading() self.wr.open_record() try: self.assertTrue(self.wr.new_record(",".join(data))) except AssertionError: raise def testG(self): """季度:Slot-2018-Q1,项目:十二星座,环境:PRO,用例:游戏能正常运行""" data = self.com.get_csv_data(self.csv, 72) self.wg.all_agg(",".join(data)) self.pg.execute_wait_lading() self.wr.open_record() try: self.assertTrue(self.wr.new_record(",".join(data))) except AssertionError: raise def testH(self): """季度:Slot-2018-Q1,项目:角斗士,环境:PRO,用例:游戏能正常运行""" data = self.com.get_csv_data(self.csv, 73) self.wg.all_agg(",".join(data)) self.pg.execute_wait_lading() self.wr.open_record() try: self.assertTrue(self.wr.new_record(",".join(data))) except AssertionError: raise def testI(self): """季度:Slot-2018-Q1,项目:恭贺新春,环境:PRO,用例:游戏能正常运行""" data = self.com.get_csv_data(self.csv, 74) self.wg.all_agg(",".join(data)) self.pg.execute_wait_lading() self.wr.open_record() try: self.assertTrue(self.wr.new_record(",".join(data))) except AssertionError: raise def testJ(self): """季度:Slot-2018-Q1,项目:埃及女王,环境:PRO,用例:游戏能正常运行""" data = self.com.get_csv_data(self.csv, 75) self.wg.all_agg(",".join(data)) self.pg.execute_wait_lading() self.wr.open_record() try: self.assertTrue(self.wr.new_record(",".join(data))) except AssertionError: raise def testK(self): """季度:Slot-2018-Q1,项目:金狗旺财,环境:PRO,用例:游戏能正常运行""" data = self.com.get_csv_data(self.csv, 76) self.wg.all_agg(",".join(data)) self.pg.execute_wait_lading() self.wr.open_record() try: self.assertTrue(self.wr.new_record(",".join(data))) except AssertionError: raise def testL(self): """季度:Slot-2018-Q1,项目:闹元宵,环境:PRO,用例:游戏能正常运行""" data = self.com.get_csv_data(self.csv, 77) self.wg.all_agg(",".join(data)) self.pg.execute_wait_lading() self.wr.open_record() try: self.assertTrue(self.wr.new_record(",".join(data))) except AssertionError: raise def testM(self): """季度:Slot-2018-Q1,项目:森林舞会,环境:PRO,用例:游戏能正常运行""" data = self.com.get_csv_data(self.csv, 78) self.wg.all_agg(",".join(data)) self.pg.execute_wait_lading() self.wr.open_record() try: self.assertTrue(self.wr.new_record(",".join(data))) except AssertionError: raise def testN(self): """季度:Slot-2018-Q1,项目:神雕侠侣,环境:PRO,用例:游戏能正常运行""" data = self.com.get_csv_data(self.csv, 79) self.wg.all_agg(",".join(data)) self.pg.execute_wait_lading() self.wr.open_record() try: self.assertTrue(self.wr.new_record(",".join(data))) except AssertionError: raise def testO(self): """季度:Slot-2018-Q1,项目:抢红包,环境:PRO,用例:游戏能正常运行""" data = self.com.get_csv_data(self.csv, 80) self.wg.all_agg(",".join(data)) self.pg.execute_wait_lading() self.wr.open_record() try: self.assertTrue(self.wr.new_record(",".join(data))) except AssertionError: raise