Ejemplo n.º 1
0
    def setUp(self):
        #默认项检查,目前假设默认wifi 名字是frt_test,密码时iot23321
        self.testcaseinfo = TestCaseInfo(id=27, name="不输入wifi密码时是否可以保存成功 ")

        config = configparser.ConfigParser()
        config.read(r"./common/data.ini")
        filepath = config.get("logfile", "logfile")
        self.log = logger(filepath)
        self.reportfile = config.get("report", "xlsfile")
        self.row = config.get("report", "line")
        self.teststarttime = config.get("teststarttime", "teststarttime")
        config.set("report", "line", str(int(self.row) + 1))
        config.write(open("./common/data.ini", "w"))
        # 读取报告行数和报告名称
        self.wifipage = WifiPage()
Ejemplo n.º 2
0
    def setUp(self):

        self.testcaseinfo = TestCaseInfo(id=30, name="关闭wifi 后,查看电脑的无线列表 ")

        config = configparser.ConfigParser()
        config.read(r"./common/data.ini")
        filepath = config.get("logfile", "logfile")
        self.log = logger(filepath)
        self.reportfile = config.get("report", "xlsfile")
        self.row = config.get("report", "line")
        self.teststarttime = config.get("teststarttime", "teststarttime")
        config.set("report", "line", str(int(self.row) + 1))
        config.write(open("./common/data.ini", "w"))
        # 读取报告行数和报告名称
        self.wifipage = WifiPage()
Ejemplo n.º 3
0
class NoWifiPasswordEnter(unittest.TestCase):
    def setUp(self):
        #默认项检查,目前假设默认wifi 名字是frt_test,密码时iot23321
        self.testcaseinfo = TestCaseInfo(id=27, name="不输入wifi密码时是否可以保存成功 ")

        config = configparser.ConfigParser()
        config.read(r"./common/data.ini")
        filepath = config.get("logfile", "logfile")
        self.log = logger(filepath)
        self.reportfile = config.get("report", "xlsfile")
        self.row = config.get("report", "line")
        self.teststarttime = config.get("teststarttime", "teststarttime")
        config.set("report", "line", str(int(self.row) + 1))
        config.write(open("./common/data.ini", "w"))
        # 读取报告行数和报告名称
        self.wifipage = WifiPage()

    def test_no_wifi_password_enter(self):
        """不填写密码时,可以保存成功,自动化脚本无法检测是否不填写无线密码就可以不输入密码直接连上"""
        try:

            # L.info("test_login_right: test START")
            self.starttime = time.strftime("%Y-%m-%d %H:%M:%S")
            self.testcaseinfo.starttime = self.starttime
            self.wifipage.goto_wifi()
            time.sleep(5)
            self.wifipage.clear_wifi_password()
            self.wifipage.scroll_window()
            self.wifipage.click_savebutton()
            time.sleep(3)
            self.wifipage.click_confirm()
            self.wifipage.wait_pop_alert_disappear()
            time.sleep(5)
            password = self.wifipage.get_wifi_password()
            try:
                self.assertEqual(password, "")
            except Exception as e:
                self.log.error(traceback.format_exc())
                self.testcaseinfo.result = "Fail"
                self.testcaseinfo.errorinfo = str(e)
            else:
                self.testcaseinfo.result = "Pass"

        except Exception as err:
            self.testcaseinfo.errorinfo = str(err)
            self.log.error(traceback.format_exc())
            self.testcaseinfo.result = "error"

    def tearDown(self):
        endtime = time.strftime("%Y-%m-%d %H:%M:%S")
        self.testcaseinfo.endtime = endtime

        self.testcaseinfo.secondsDuration = str(datetime.strptime(endtime, "%Y-%m-%d %H:%M:%S") \
                                                - datetime.strptime(self.starttime, "%Y-%m-%d %H:%M:%S"))
        self.log.info([self.testcaseinfo.get_case_info()])
        self.log.info("测试完成后恢复wifi密码")

        self.wifipage.set_wifi_password("iot123321")
        self.wifipage.scroll_window()
        self.wifipage.click_savebutton()
        time.sleep(5)
        self.wifipage.click_confirm()
        self.wifipage.wait_pop_alert_disappear()

        self.wifipage.quit()
        repr = xlrd.open_workbook(self.reportfile, formatting_info=True)
        self.log.info(repr)
        newrepr = copy(repr)
        self.log.info(newrepr)
        newreprs = newrepr.get_sheet(0)
        tr.write_data(newreprs, self.teststarttime, int(self.row),
                      *list(self.testcaseinfo.get_case_info()))
        newrepr.save(self.reportfile)


# if __name__ == '__main__':
#     unittest.main()
Ejemplo n.º 4
0
class IllegalWifiPassword(unittest.TestCase):
    def setUp(self):
        #默认项检查,目前假设默认wifi 名字是frt_test,密码时iot23321
        self.testcaseinfo = TestCaseInfo(id=28, name="输入错误格式的wifi 密码,提示语检查 ")

        config = configparser.ConfigParser()
        config.read(r"./common/data.ini")
        filepath = config.get("logfile", "logfile")
        self.log = logger(filepath)
        self.reportfile = config.get("report", "xlsfile")
        self.row = config.get("report", "line")
        self.teststarttime = config.get("teststarttime", "teststarttime")
        config.set("report", "line", str(int(self.row) + 1))
        config.write(open("./common/data.ini", "w"))
        # 读取报告行数和报告名称
        self.wifipage=WifiPage()

    def test_illegal_wifi_password(self):
        """正确的密码登录是否能登录成功"""
        try:

            # L.info("test_login_right: test START")
            self.starttime = time.strftime("%Y-%m-%d %H:%M:%S")
            self.testcaseinfo.starttime = self.starttime
            self.wifipage.goto_wifi()
            time.sleep(5)
            result=0
            wifipassword = ["ee", "hello world", "你好"]
            for i in wifipassword:
                self.wifipage.clear_wifi_password()
                self.wifipage.set_wifi_password(i)
                self.wifipage.scroll_window()
                self.wifipage.click_savebutton()
                time.sleep(5)
                if self.wifipage.is_error_info2_displayed():
                    errorinfo = self.wifipage.get_error_info2()
                    if (errorinfo=="2.4G无线密码不能包含空格,请重新输入。") \
                            or (errorinfo=="2.4G无线密码长度错误,请输入8至63个字符。") \
                            or (errorinfo=="2.4G无线密码中存在非法字符,请重新输入。"):
                        self.testcaseinfo.result="Pass"
                    else:
                        self.testcaseinfo.result="Fail"
                else:
                    self.testcaseinfo.result = "Fail"
        except Exception as err:
            self.testcaseinfo.errorinfo = str(err)
            self.log.error(traceback.format_exc())
            self.testcaseinfo.result = "error"

    def tearDown(self):
        endtime = time.strftime("%Y-%m-%d %H:%M:%S")
        self.testcaseinfo.endtime = endtime

        self.testcaseinfo.secondsDuration = str(datetime.strptime(endtime, "%Y-%m-%d %H:%M:%S") \
                                                - datetime.strptime(self.starttime, "%Y-%m-%d %H:%M:%S"))

        self.log.info([self.testcaseinfo.get_case_info()])
        self.log.info("测试完成恢复wifi密码")
        self.wifipage.clear_wifi_password()
        time.sleep(3)
        self.wifipage.set_wifi_password("iot123321")
        self.wifipage.scroll_window()
        self.wifipage.click_savebutton()
        time.sleep(3)
        self.wifipage.click_confirm()
        self.wifipage.wait_pop_alert_disappear()
        self.wifipage.quit()
        repr = xlrd.open_workbook(self.reportfile, formatting_info=True)
        self.log.info(repr)
        newrepr = copy(repr)
        self.log.info(newrepr)
        newreprs = newrepr.get_sheet(0)
        tr.write_data(newreprs, self.teststarttime,int(self.row), *list(self.testcaseinfo.get_case_info()))
        newrepr.save(self.reportfile)

# if __name__ == '__main__':
#     unittest.main()
Ejemplo n.º 5
0
class CloseWifi(unittest.TestCase):
    def setUp(self):

        self.testcaseinfo = TestCaseInfo(id=30, name="关闭wifi 后,查看电脑的无线列表 ")

        config = configparser.ConfigParser()
        config.read(r"./common/data.ini")
        filepath = config.get("logfile", "logfile")
        self.log = logger(filepath)
        self.reportfile = config.get("report", "xlsfile")
        self.row = config.get("report", "line")
        self.teststarttime = config.get("teststarttime", "teststarttime")
        config.set("report", "line", str(int(self.row) + 1))
        config.write(open("./common/data.ini", "w"))
        # 读取报告行数和报告名称
        self.wifipage = WifiPage()

    def test_close_wifi(self):
        """正确的密码登录是否能登录成功"""
        try:

            # L.info("test_login_right: test START")
            self.starttime = time.strftime("%Y-%m-%d %H:%M:%S")
            self.testcaseinfo.starttime = self.starttime
            self.wifipage.goto_wifi()
            time.sleep(5)
            self.wifipage.click_wifi_button()
            time.sleep(5)
            self.wifipage.click_wifi_close_confirm()
            self.wifipage.wait_pop_alert_disappear()
            result = True
            p = subprocess.Popen('netsh wlan show network',
                                 stdout=subprocess.PIPE)
            # print(p.stdout.readlines())
            for line in p.stdout.readlines():
                if not re.search('SSID\s+\d+\s+:\frt_test', str(line)):
                    self.log.info("no found")
                else:
                    result = False
                    break
            try:
                self.assertTrue(result)
            except Exception as err:
                self.testcaseinfo.errorinfo = str(err)
                self.log.error(traceback.format_exc())
                self.testcaseinfo.result = "Fail"
            else:
                self.testcaseinfo.result = "Pass"

        except Exception as err:
            self.testcaseinfo.errorinfo = str(err)
            self.log.error(traceback.format_exc())
            self.testcaseinfo.result = "error"

    def tearDown(self):
        endtime = time.strftime("%Y-%m-%d %H:%M:%S")
        self.testcaseinfo.endtime = endtime

        self.testcaseinfo.secondsDuration = str(datetime.strptime(endtime, "%Y-%m-%d %H:%M:%S") \
                                                - datetime.strptime(self.starttime, "%Y-%m-%d %H:%M:%S"))

        self.log.info([self.testcaseinfo.get_case_info()])
        self.log.info("测试完成后恢复到wifi打开的状态")
        self.wifipage.click_wifi_button()
        self.wifipage.wait_pop_alert_disappear()
        self.wifipage.quit()
        repr = xlrd.open_workbook(self.reportfile, formatting_info=True)
        self.log.info(repr)
        newrepr = copy(repr)
        self.log.info(newrepr)
        newreprs = newrepr.get_sheet(0)
        tr.write_data(newreprs, self.teststarttime, int(self.row),
                      *list(self.testcaseinfo.get_case_info()))
        newrepr.save(self.reportfile)


# if __name__ == '__main__':
#     unittest.main()
Ejemplo n.º 6
0
class LegalWifiPassword(unittest.TestCase):
    def setUp(self):
        #默认项检查,目前假设默认wifi 名字是frt_test,密码时iot23321
        self.testcaseinfo = TestCaseInfo(id=29, name="是否支持各种格式的wifi密码 ")

        config = configparser.ConfigParser()
        config.read(r"./common/data.ini")
        filepath = config.get("logfile", "logfile")
        self.log = logger(filepath)
        self.reportfile = config.get("report", "xlsfile")
        self.row = config.get("report", "line")
        self.teststarttime = config.get("teststarttime", "teststarttime")
        config.set("report", "line", str(int(self.row) + 1))
        config.write(open("./common/data.ini", "w"))
        # 读取报告行数和报告名称
        self.wifipage=WifiPage()

    def test_legal_wifi_password(self):
        """正确的密码登录是否能登录成功"""
        try:

            self.starttime = time.strftime("%Y-%m-%d %H:%M:%S")
            self.testcaseinfo.starttime = self.starttime
            self.wifipage.goto_wifi()
            time.sleep(5)
            result=0
            wifipassword = ["werwerwer", ":#$@Q#$@Q#$@Q", "@!$as@!$as@!$as", "@#$12@#$12", "!@#$%^a!", "iot123321"]
            for i in wifipassword:
                time.sleep(2)
                self.wifipage.clear_wifi_password()
                self.wifipage.set_wifi_password(i)
                self.wifipage.scroll_window()
                self.wifipage.click_savebutton()
                time.sleep(5)
                self.wifipage.click_confirm()
                self.wifipage.wait_pop_alert_disappear()
                time.sleep(5)
                if self.wifipage.get_wifi_password()==i:
                    result+=1
                else:
                    self.testcaseinfo.result="Fail"
            try:
                self.assertEqual(result,len(wifipassword))
            except Exception as err:
                self.testcaseinfo.errorinfo = str(err)
                self.log.error(traceback.format_exc())
                self.testcaseinfo.result = "Fail"
            else:
                self.testcaseinfo.result="Pass"

        except Exception as err:
            self.testcaseinfo.errorinfo = str(err)
            self.log.error(traceback.format_exc())
            self.testcaseinfo.result = "error"

    def tearDown(self):
        endtime = time.strftime("%Y-%m-%d %H:%M:%S")
        self.testcaseinfo.endtime = endtime

        self.testcaseinfo.secondsDuration = str(datetime.strptime(endtime, "%Y-%m-%d %H:%M:%S") \
                                                - datetime.strptime(self.starttime, "%Y-%m-%d %H:%M:%S"))
        self.log.info([self.testcaseinfo.get_case_info()])
        self.log.info("测试完成恢复wifi密码")
        time.sleep(3)
        self.wifipage.clear_wifi_password()
        time.sleep(3)
        self.wifipage.set_wifi_password("iot123321")
        self.wifipage.scroll_window()
        self.wifipage.click_savebutton()
        time.sleep(5)
        self.wifipage.click_confirm()
        self.wifipage.wait_pop_alert_disappear()
        self.wifipage.quit()
        repr = xlrd.open_workbook(self.reportfile, formatting_info=True)
        self.log.info(repr)
        newrepr = copy(repr)
        self.log.info(newrepr)
        newreprs = newrepr.get_sheet(0)
        tr.write_data(newreprs,self.teststarttime, int(self.row), *list(self.testcaseinfo.get_case_info()))
        newrepr.save(self.reportfile)

# if __name__ == '__main__':
#     unittest.main()
Ejemplo n.º 7
0
class NoWifiNameEnter(unittest.TestCase):
    def setUp(self):
        #默认项检查,目前假设默认wifi 名字是frt_test,密码时iot23321
        self.testcaseinfo = TestCaseInfo(id=26, name="不输入wifi名称时的提示语检查 ")

        config = configparser.ConfigParser()
        config.read(r"./common/data.ini")
        filepath = config.get("logfile", "logfile")
        self.log = logger(filepath)
        self.reportfile = config.get("report", "xlsfile")
        self.row = config.get("report", "line")
        self.teststarttime = config.get("teststarttime", "teststarttime")
        config.set("report", "line", str(int(self.row) + 1))
        config.write(open("./common/data.ini", "w"))
        # 读取报告行数和报告名称
        self.wifipage=WifiPage()

    def test_no_wifi_name_enter(self):
        """正确的密码登录是否能登录成功"""
        try:

            # L.info("test_login_right: test START")
            self.starttime = time.strftime("%Y-%m-%d %H:%M:%S")
            self.testcaseinfo.starttime = self.starttime
            self.wifipage.goto_wifi()
            time.sleep(5)
            self.wifipage.clear_wifi_name()
            self.wifipage.scroll_window()
            self.wifipage.click_savebutton()
            if self.wifipage.is_error_info1_displayed():
                errorinfo1=self.wifipage.get_error_info1()
                self.log.info(errorinfo1)

                try:
                    self.assertEqual(errorinfo1, "请输入2.4G无线名称。")
                except Exception as e:
                    self.log.error(traceback.format_exc())
                    self.testcaseinfo.result = "Fail"
                    self.testcaseinfo.errorinfo = str(e)
                else:
                    self.testcaseinfo.result = "Pass"
            else:
                self.testcaseinfo.result = "error"

        except Exception as err:
            self.testcaseinfo.errorinfo = str(err)
            self.log.error(traceback.format_exc())
            self.testcaseinfo.result = "error"

    def tearDown(self):
        endtime = time.strftime("%Y-%m-%d %H:%M:%S")
        self.testcaseinfo.endtime = endtime

        self.testcaseinfo.secondsDuration = str(datetime.strptime(endtime, "%Y-%m-%d %H:%M:%S") \
                                                - datetime.strptime(self.starttime, "%Y-%m-%d %H:%M:%S"))
        self.log.info([self.testcaseinfo.get_case_info()])
        self.wifipage.quit()
        repr = xlrd.open_workbook(self.reportfile, formatting_info=True)
        self.log.info(repr)
        newrepr = copy(repr)
        self.log.info(newrepr)
        newreprs = newrepr.get_sheet(0)
        tr.write_data(newreprs,self.teststarttime, int(self.row), *list(self.testcaseinfo.get_case_info()))
        newrepr.save(self.reportfile)

# if __name__ == '__main__':
#     unittest.main()
Ejemplo n.º 8
0
class GotoWifi(unittest.TestCase):
    def setUp(self):

        self.testcaseinfo = TestCaseInfo(id=23, name="是否能顺利跳转到无线wifi设置界面 ")

        config = configparser.ConfigParser()
        config.read(r"./common/data.ini")
        filepath = config.get("logfile", "logfile")
        self.log = logger(filepath)
        self.reportfile = config.get("report", "xlsfile")
        self.row = config.get("report", "line")
        self.teststarttime = config.get("teststarttime", "teststarttime")
        config.set("report", "line", str(int(self.row) + 1))
        config.write(open("./common/data.ini", "w"))
        # 读取报告行数和报告名称
        self.wifipage = WifiPage()

    def test_goto_wifi(self):
        """正确的密码登录是否能登录成功"""
        try:

            # L.info("test_login_right: test START")
            self.starttime = time.strftime("%Y-%m-%d %H:%M:%S")
            self.testcaseinfo.starttime = self.starttime
            self.wifipage.goto_wifi()
            time.sleep(5)
            expecturl = "http://192.168.0.1/Wireless.html"
            try:
                self.assertEqual(expecturl, self.wifipage.getCurrentUrl())
            except Exception as e:
                self.log.error(traceback.format_exc())
                self.testcaseinfo.result = "Fail"
                self.testcaseinfo.errorinfo = str(e)
            else:
                self.testcaseinfo.result = "Pass"

        except Exception as err:
            self.testcaseinfo.errorinfo = str(err)
            self.log.error(traceback.format_exc())
            self.testcaseinfo.result = "error"

    def tearDown(self):
        endtime = time.strftime("%Y-%m-%d %H:%M:%S")
        self.testcaseinfo.endtime = endtime

        self.testcaseinfo.secondsDuration = str(datetime.strptime(endtime, "%Y-%m-%d %H:%M:%S") \
                                                - datetime.strptime(self.starttime, "%Y-%m-%d %H:%M:%S"))
        self.log.info([self.testcaseinfo.get_case_info()])
        self.wifipage.quit()
        repr = xlrd.open_workbook(self.reportfile, formatting_info=True)
        self.log.info(repr)
        newrepr = copy(repr)
        self.log.info(newrepr)
        newreprs = newrepr.get_sheet(0)
        tr.write_data(newreprs, self.teststarttime, int(self.row),
                      *list(self.testcaseinfo.get_case_info()))
        newrepr.save(self.reportfile)


# if __name__ == '__main__':
#     unittest.main()
Ejemplo n.º 9
0
class WifiDefault(unittest.TestCase):
    def setUp(self):
        #默认项检查,目前假设默认wifi 名字是frt_test,密码时iot23321
        self.testcaseinfo = TestCaseInfo(id=24, name="wifi页面默认项检查 ")

        config = configparser.ConfigParser()
        config.read(r"./common/data.ini")
        filepath = config.get("logfile", "logfile")
        self.log = logger(filepath)
        self.reportfile = config.get("report", "xlsfile")
        self.row = config.get("report", "line")
        self.teststarttime = config.get("teststarttime", "teststarttime")
        config.set("report", "line", str(int(self.row) + 1))
        config.write(open("./common/data.ini", "w"))
        # 读取报告行数和报告名称
        self.wifipage=WifiPage()

    def test_wifi_default(self):
        """正确的密码登录是否能登录成功"""
        try:

            self.starttime = time.strftime("%Y-%m-%d %H:%M:%S")
            self.testcaseinfo.starttime = self.starttime
            self.wifipage.goto_wifi()
            time.sleep(5)
            self.wifiname=self.wifipage.get_wifi_name()
            self.log.info("wifiname:%s" % self.wifiname)
            self.wifipassword=self.wifipage.get_wifi_password()
            self.log.info("wifiname:%s" % self.wifipassword)
            try:
                if self.wifiname=="frt_test" and self.wifipassword=="iot123321":
                    self.testcaseinfo.result='Pass'
            except Exception as e:
                self.log.error(traceback.format_exc())
                self.testcaseinfo.result = "Fail"
                self.testcaseinfo.errorinfo = str(e)



        except Exception as err:
            self.testcaseinfo.errorinfo = str(err)
            self.log.error(traceback.format_exc())
            self.testcaseinfo.result = "error"

    def tearDown(self):
        endtime = time.strftime("%Y-%m-%d %H:%M:%S")
        self.testcaseinfo.endtime = endtime

        self.testcaseinfo.secondsDuration = str(datetime.strptime(endtime, "%Y-%m-%d %H:%M:%S") \
                                                - datetime.strptime(self.starttime, "%Y-%m-%d %H:%M:%S"))
        self.log.info([self.testcaseinfo.get_case_info()])
        self.wifipage.quit()
        repr = xlrd.open_workbook(self.reportfile, formatting_info=True)
        self.log.info(repr)
        newrepr = copy(repr)
        self.log.info(newrepr)
        newreprs = newrepr.get_sheet(0)
        tr.write_data(newreprs,self.teststarttime, int(self.row), *list(self.testcaseinfo.get_case_info()))
        newrepr.save(self.reportfile)

# if __name__ == '__main__':
#     unittest.main()
Ejemplo n.º 10
0
class WifiNameLegal(unittest.TestCase):
    def setUp(self):
        #默认项检查,目前假设默认wifi 名字是frt_test,密码时iot23321
        self.testcaseinfo = TestCaseInfo(id=25, name="wifi名称各种组合是否支持 ")

        config = configparser.ConfigParser()
        config.read(r"./common/data.ini")
        filepath = config.get("logfile", "logfile")
        self.log = logger(filepath)
        self.reportfile = config.get("report", "xlsfile")
        self.row = config.get("report", "line")
        self.teststarttime = config.get("teststarttime", "teststarttime")
        config.set("report", "line", str(int(self.row) + 1))
        config.write(open("./common/data.ini", "w"))
        # 读取报告行数和报告名称
        self.wifipage = WifiPage()

    def test_wifi_name_legal(self):
        """正确的密码登录是否能登录成功"""
        try:

            # L.info("test_login_right: test START")
            self.starttime = time.strftime("%Y-%m-%d %H:%M:%S")
            self.testcaseinfo.starttime = self.starttime
            self.wifipage.goto_wifi()
            time.sleep(5)
            result = 0
            wifiname = [
                'wer', '#¥@', '@!$as', '@#¥12', '1',
                '22222222________!!!!!!!!aaaaaaaa', '测试', 'hello world',
                "frt_test"
            ]

            for name in wifiname:
                time.sleep(2)
                self.wifipage.clear_wifi_name()
                self.wifipage.set_wifi_name(name)

                self.wifipage.scroll_window()
                self.wifipage.click_savebutton()
                time.sleep(5)
                self.wifipage.click_confirm()
                self.wifipage.wait_pop_alert_disappear()
                time.sleep(5)
                changedwifiname = self.wifipage.get_wifi_name()
                if changedwifiname == name:
                    result += 1
                else:
                    self.testcaseinfo.result = 'Fail'
                    self.log.info("wifi 名称不等于填入的")
            try:
                self.assertEqual(result, len(wifiname))
            except Exception as e:
                self.log.error(traceback.format_exc())
                self.testcaseinfo.result = "Fail"
                self.testcaseinfo.errorinfo = str(e)
            else:
                self.testcaseinfo.result = "Pass"
        except Exception as err:
            self.testcaseinfo.errorinfo = str(err)
            self.log.error(traceback.format_exc())
            self.testcaseinfo.result = "error"

    def tearDown(self):
        endtime = time.strftime("%Y-%m-%d %H:%M:%S")
        self.testcaseinfo.endtime = endtime

        self.testcaseinfo.secondsDuration = str(datetime.strptime(endtime, "%Y-%m-%d %H:%M:%S") \
                                                - datetime.strptime(self.starttime, "%Y-%m-%d %H:%M:%S"))

        self.log.info([self.testcaseinfo.get_case_info()])
        self.wifipage.quit()
        repr = xlrd.open_workbook(self.reportfile, formatting_info=True)
        self.log.info(repr)
        newrepr = copy(repr)
        self.log.info(newrepr)
        newreprs = newrepr.get_sheet(0)
        tr.write_data(newreprs, self.teststarttime, int(self.row),
                      *list(self.testcaseinfo.get_case_info()))
        newrepr.save(self.reportfile)


# if __name__ == '__main__':
#     unittest.main()