Exemple #1
0
class TestMain:
    def setup(self):
        self.main = Main(reuse=True)

    @pytest.mark.parametrize(
        "username, english_name,user_id, "
        "sex_zip_code, zipCode, mobile, tel, email, address, "
        "dep, pos, identity_code, "
        "out_pos, customize, send_email", userData)
    def test_add_member(self, username, english_name, user_id, sex_zip_code,
                        zipCode, mobile, tel, email, address, dep, pos,
                        identity_code, out_pos, customize, send_email):
        """添加成员"""
        # 页面之间的跳转,返回其他的po,使用链式调用,实现多页面的操作。
        self.main.add_member().add_member(username, english_name, user_id,
                                          sex_zip_code, zipCode, mobile, tel,
                                          email, address, dep, pos,
                                          identity_code, out_pos, customize,
                                          send_email)
        assert "aaa" in self.main.get_massage()

    def test_import_user(self):
        """导入成员"""
        self.main.import_user("xxxx.file")
        assert "success" in self.main.import_user().get_massage()

    def test_send_message(self):
        """发送消息"""
        message = self.main.send_massage()
        message.send(app="", content="", group="")
Exemple #2
0
class TestMain:
    def setup(self):
        self.main = Main(reuse=True)

    def test_add_member(self):
        self.main.add_member().add_member("xxx")
        assert "aaa" in self.main.import_user().get_message()

    def test_import_user(self):
        self.main.import_user("/Users/chenyifei/Desktop/1.xlsx")
        # assert "success" in self.main.get_message()

    def test_send_message(self):
        message = self.main.send_message()
        message.send(app="十一", content="content", group="十一")
        assert "content" in message.get_history()
Exemple #3
0
class TestMain:
    def setup(self):
        self.main = Main(reuse=True)

    def test_add_member(self):
        self.main.add_member().add_member("xxx")
        assert "aaa" in self.main.import_user().get_message()

    def test_import_user(self):
        self.main.import_user(
            "/Users/seveniruby/PycharmProjects/HogwartsSDET11/selenium_test1/testcase/通讯录批量导入模板.xlsx")
        # assert "success" in self.main.get_message()

    def test_send_message(self):
        message = self.main.send_message();
        message.send(app="十一", content="content", group="十一")
        assert "content" in message.get_history()
Exemple #4
0
class TestMain:
    def setup(self):
        self.main = Main(reuse=True)

    def test_add_member(self):
        self.main.add_member().add_member("xxx")
        assert "aaa" in self.main.import_user().get_message()

    def test_import_user(self):
        self.main.import_user(
            "/Users/seveniruby/PycharmProjects/HogwartsSDET11/test_selenium/testcase/通讯录批量导入模板.xlsx"
        )
        # assert "success" in self.main.get_message()

    def test_send_message(self):
        main.send_message()
        assert "" in main.get_message()
Exemple #5
0
class TestMain:
    def setup(self):
        self.main = Main(reuse=True)

    def test_add_member(self):
        self.main.add_member().add_member("xxxxx")
        assert "aaa" in self.main.import_user().get_message()

    def test_import_user(self):
        self.main.import_user(
            "D:\\pycharm\\SDET11\\test_selenium\\testcases\\通讯录批量导入模板.xlsx")
        # assert "success" in self.main.get_message()

    def test_send_message(self):
        message = self.main.send_message()
        message.send(app="开发", content="content", group="学习")
        assert "content" in message.get_history()
Exemple #6
0
class TestMain:
    def setup(self):
        self.main = Main(reuse=True)

    def test_add_member(self):
        self.main.add_member().add_member("xxx")
        assert "aaa" in self.main.import_user().get_message()

    def test_import_user(self):
        self.main.import_user(
            r"C:\Users\Administrator\Pictures\通讯录批量导入模板.xlsx")
        # assert "success" in self.main.get_message()

    def test_send_message(self):
        message = self.main.send_message()
        message.send(app="xiaobin网络科技有限公司", content="content", group="李四")
        assert "content" in message.get_history()
Exemple #7
0
class TestMain:
    def setup(self):
        self.main=Main(reuse=True)
    def test_add_member(self):
        self.main.goto_add_member().add_member("aaa")
        assert "aaa" in self.main.import_user().get_message()

    def test_import_user(self):
        self.main.import_user("D://test/pycharm/script/test_selenium/通讯录批量导入模板.xlsx")
        #assert  "success" in self.main.get_message()

    def test_add_image(self):
        self.main.goto_manageTools().add_image("D://test/pycharm/script/test_selenium/1.png")


    def test_send_message(self):
        message= self.main.send_message()
        message.send(app="十一",content="content",group="十一",member="王贝贝")
        #assert "content" in message.get_history()
        #  pass
Exemple #8
0
class TestMain:
    def setup(self):
        self.main = Main(reuse=True)

    def test_add_member(self):
        self.main.add_member().add_member("xxx")
        assert "aaa" in self.main.import_user().get_message()

    def test_import_user(self):
        self.main.import_user(
            "E:\\TestDevelopment\\PycharmProjects\\pythonProject\\test_selenium\\testcase\\通讯录批量导入模板.xlsx"
        )
        # assert "success" in self.main.get_message()

    def test_send_message(self):
        message = self.main.send_message()
        message.send(app="公告",
                     title="title",
                     content="contect",
                     group="羽汐动漫社",
                     author="author")
 def test_add_member(self):
     main = Main()
     main.add_menber().add_menber("xx")
     #链式调用,跳转多个页面,使多个页面链接起来进行测试
     main.import_user().get_message()
Exemple #10
0
 def test_add_member(self):
     main = Main()
     main.add_member().add_member("xxx")
     assert "aaa" in main.import_user().get_message()
Exemple #11
0
 def test_add_member(self):
     main = Main(reuse=True)
     main.add_member().add_member('xxx')
     assert 'aaa' in main.import_user().get_message()