Exemple #1
0
from parameterized import parameterized
import unittest

from selenium.webdriver.common.by import By

from woniuboss.lib.woniuboss_gui.financial_management.financial_management import FinancialManagement
from woniuboss.tools.woniuboss_gui.utility import Utility
from woniuboss.tools.woniuboss_gui.service import Service
# 在该页面调试时test_config_info里需要多加一层跳出"..\\",testdata也需要多加一层
# 准备数据
test_config_info = Utility.get_json(
    '..\\..\\conf\\woniuboss_gui\\FM\\testdata.conf')
fm_financial_info = Utility.get_excel_to_tuple(test_config_info[0])
fm_financial_user_info = Utility.get_excel_to_user(test_config_info[0])
fm_1_subject_info = Utility.get_excel_to_tuple(test_config_info[1])
fm_2_subject_info = Utility.get_excel_to_tuple(test_config_info[2])
fm_financial_query_info = Utility.get_excel_to_tuple(test_config_info[3])
fm_last_month_query_info = Utility.get_excel_to_tuple(test_config_info[4])
fm_month_query_info = Utility.get_excel_to_tuple(test_config_info[5])
fm_new_water_info = Utility.get_excel_to_tuple(test_config_info[6])
fm_modify_water_info = Utility.get_excel_to_tuple(test_config_info[7])
fm_accounts_info = Utility.get_excel_to_tuple(test_config_info[8])
fm_students_info = Utility.get_excel_to_tuple(test_config_info[9])
fm_search_info = Utility.get_excel_to_tuple(test_config_info[10])
ffm_state_query_info = Utility.get_excel_to_tuple(test_config_info[11])
fm_name_query_info = Utility.get_excel_to_tuple(test_config_info[12])
fm_payment_refund_info = Utility.get_excel_to_tuple(test_config_info[13])

# ('http://192.168.75.128:8080/WoniuBoss2.5/user/login', 'POST',
# {'username': '******', 'password': '******', 'verifycode': '0000'}, 200, 'employment_management-pass'),
# login_info中[]的需要参照上面选取
Exemple #2
0
import urllib

from parameterized import parameterized
import unittest

from selenium.webdriver.common.by import By

from woniuboss.lib.woniuboss_gui.employment_management.employment_management import EmploymentManagement
from woniuboss.tools.woniuboss_gui.utility import Utility
from woniuboss.tools.woniuboss_gui.service import Service
from urllib import parse,request
# 在该页面调试时test_config_info里需要多加一层跳出"..\\",testdata也需要多加一层
# 准备数据
test_config_info=Utility.get_json('..\\..\\conf\\woniuboss_gui\\EM\\testdata.conf')
em_technology_info = Utility.get_excel_to_tuple(test_config_info[0])
em_technology_user_info = Utility.get_excel_to_user(test_config_info[0])
em_interview_info = Utility.get_excel_to_tuple(test_config_info[1])
em_interview_query_info = Utility.get_excel_to_tuple(test_config_info[2])
em_technology_interview_info = Utility.get_excel_to_tuple(test_config_info[3])
em_employment_info = Utility.get_excel_to_tuple(test_config_info[4])
em_class_info = Utility.get_excel_to_tuple(test_config_info[5])
em_direction_info = Utility.get_excel_to_tuple(test_config_info[6])
em_class_query_info = Utility.get_excel_to_tuple(test_config_info[7])
emdirection_query_info = Utility.get_excel_to_tuple(test_config_info[8])
em_name_query_info = Utility.get_excel_to_tuple(test_config_info[9])
em_student_id_query_info = Utility.get_excel_to_tuple(test_config_info[10])
em_mock_interviews_info = Utility.get_excel_to_tuple(test_config_info[11])
em_real_interview_info = Utility.get_excel_to_tuple(test_config_info[12])
em_induction_info = Utility.get_excel_to_tuple(test_config_info[13])
em_submit_info = Utility.get_excel_to_tuple(test_config_info[14])
Exemple #3
0
from parameterized import parameterized
import unittest

from selenium.webdriver.common.by import By

from woniuboss.lib.woniuboss_gui.administrative_management.administrative_management import AdministrativeManagement
from woniuboss.tools.woniuboss_gui.utility import Utility
from woniuboss.tools.woniuboss_gui.service import Service
from urllib import parse, request
# 在该页面调试时test_config_info里需要多加一层跳出"..\\",testdata也需要多加一层
# 准备数据
test_config_info = Utility.get_json(
    '..\\..\\conf\\woniuboss_gui\\AM\\testdata.conf')

am_management_info = Utility.get_excel_to_tuple(test_config_info[0])
am_management_user_info = Utility.get_excel_to_user(test_config_info[0])

am_recipients_info = Utility.get_excel_to_tuple(test_config_info[1])

am_return_info = Utility.get_excel_to_tuple(test_config_info[2])

# ('http://192.168.75.128:8080/WoniuBoss2.5/user/login', 'POST',
# {'username': '******', 'password': '******', 'verifycode': '0000'}, 200, 'employment_management-pass'),
# login_info中[]的需要参照上面选取


class AdministrativeManagementTest(unittest.TestCase):
    @classmethod
    def setUpClass(cls):
        print("test start")
        cls.driver = Service.get_driver(am_management_user_info)
Exemple #4
0
import time

from selenium.webdriver.common.by import By

from woniuboss.lib.woniuboss_gui.login.decrypt import Decrypt
from woniuboss.lib.woniuboss_gui.student_manage.basic_info import BasicInfo
from woniuboss.tools.woniuboss_gui.service import Service
import unittest
from woniuboss.tools.woniuboss_gui.utility import Utility
from parameterized import parameterized
test_config_info = Utility.get_json(
    '..\\..\\conf\\woniuboss_gui\\testdata_stu_manage.conf')
search_stu_info = Utility.get_excel_to_tuple(test_config_info[0])
search_stu_user_info = Utility.get_excel_to_user(test_config_info[0])

modify_stu_info = Utility.get_excel_to_tuple(test_config_info[1])
# modify_stu_user_info = Utility.get_excel_to_user(test_config_info[1])


class BasicInfoTest(unittest.TestCase):
    @classmethod
    def setUpClass(cls):
        cls.driver = Service.get_driver(search_stu_user_info)
        cls.basic_info = BasicInfo(cls.driver)
        Service.miss_login(cls.driver, search_stu_user_info)
        Decrypt(cls.driver).do_decrypt(search_stu_user_info['secondpwd'])

    @classmethod
    def tearDownClass(cls):
        cls.driver.quit()
import time
from selenium.webdriver.common.by import By
from woniuboss.lib.woniuboss_gui.login.decrypt import Decrypt
from woniuboss.lib.woniuboss_gui.student_manage.morning_exam_record import MorningExamRecord

from woniuboss.tools.woniuboss_gui.service import Service
import unittest
from woniuboss.tools.woniuboss_gui.utility import Utility
from parameterized import parameterized

test_config_info = Utility.get_json(
    '..\\..\\conf\\woniuboss_gui\\testdata_stu_manage.conf')
query_all_parameter = Utility.get_excel_to_tuple(test_config_info[11])
user_info = Utility.get_excel_to_user(test_config_info[11])

query_part_parameter = Utility.get_excel_to_tuple(test_config_info[12])


class MorningExamTest(unittest.TestCase):
    @classmethod
    def setUpClass(cls):
        cls.driver = Service.get_driver(user_info)
        cls.exam_record = MorningExamRecord(cls.driver)
        Service.miss_login(cls.driver, user_info)
        Decrypt(cls.driver).do_decrypt(user_info['secondpwd'])

    @classmethod
    def tearDownClass(cls):
        cls.driver.quit()

    @parameterized.expand(query_all_parameter)
Exemple #6
0
from parameterized import parameterized
from selenium.webdriver.common.by import By
from woniuboss.lib.woniuboss4_gui.login.decrypt import Decrypt
from woniuboss.lib.woniuboss4_gui.login.login import Login
from woniuboss.tools.woniuboss_gui.service import Service
from woniuboss.tools.woniuboss_gui.utility import Utility
import unittest

test_config_info = Utility.get_json('..\\..\\conf\\woniuboss4_gui\\login.conf')
decrypt_info = Utility.get_excel_to_tuple(test_config_info[3])
decrypt_user_info = Utility.get_excel_to_user(test_config_info[3])


class DecryptTest(unittest.TestCase):
    @classmethod
    def setUpClass(cls):
        cls.driver = Service.get_driver(decrypt_user_info)
        Login(cls.driver).login(decrypt_user_info)
        cls.decrypt = Decrypt(cls.driver)

    @classmethod
    def tearDownClass(cls):
        cls.driver.quit()

    @parameterized.expand(decrypt_info)
    def test_decrypt(cls, second_pwd, expect):
        cls.decrypt.do_decrypt(second_pwd)
        if Service.is_element_present(
                cls.driver, By.CSS_SELECTOR,
                'body > div.bootbox.modal.fade.mydialog.in > div > '
                'div > div.modal-body > div'):
from selenium.webdriver.common.by import By
from woniuboss.lib.woniuboss_gui.login.decrypt import Decrypt
from woniuboss.lib.woniuboss_gui.student_manage.today_attendance import TodayAttendance
from woniuboss.tools.woniuboss_gui.service import Service
import unittest
from woniuboss.tools.woniuboss_gui.utility import Utility
from parameterized import parameterized
test_config_info = Utility.get_json(
    '..\\..\\conf\\woniuboss_gui\\testdata_stu_manage.conf')
search_attendance_info = Utility.get_excel_to_tuple(test_config_info[2])
search_att_user_info = Utility.get_excel_to_user(test_config_info[2])

attendance_one_info = Utility.get_excel_to_tuple(test_config_info[3])

attendance_all_info = Utility.get_excel_to_tuple(test_config_info[4])
import time
local_time = time.strftime('%Y-%m-%d', time.localtime(time.time()))


class TodayAttendanceTest(unittest.TestCase):
    @classmethod
    def setUpClass(cls):
        cls.driver = Service.get_driver(search_att_user_info)
        cls.today_attendance = TodayAttendance(cls.driver)
        Service.miss_login(cls.driver, search_att_user_info)
        Decrypt(cls.driver).do_decrypt(search_att_user_info['secondpwd'])

    @classmethod
    def tearDownClass(cls):
        cls.driver.quit()
Exemple #8
0
import time

from selenium.webdriver.common.by import By

from woniuboss.lib.woniuboss4_gui.login.login import Login
from woniuboss.lib.woniuboss4_gui.login.modify_password import ModifyPassWord
from woniuboss.tools.woniuboss_gui.service import Service
from woniuboss.tools.woniuboss_gui.utility import Utility
import unittest
from parameterized import parameterized
test_config_info = Utility.get_json('..\\..\\conf\\woniuboss4_gui\\login.conf')
modify_passwd_login_info = Utility.get_excel_to_tuple(test_config_info[1])
login_user_info = Utility.get_excel_to_user(test_config_info[1])
modify_passwd_second_info = Utility.get_excel_to_tuple(test_config_info[2])
second_user_info = Utility.get_excel_to_user(test_config_info[2])


class ModifyPasswdTest(unittest.TestCase):
    @classmethod
    def setUpClass(cls):
        cls.driver = Service.get_driver(login_user_info)
        Login(cls.driver).login(login_user_info)
        cls.modify_passwd = ModifyPassWord(cls.driver)

    @classmethod
    def tearDownClass(cls):
        cls.driver.quit()

    @parameterized.expand(modify_passwd_login_info)
    def test_a_modify_login_passwd(self, old, new1, new2, expect):
        self.modify_passwd.do_modify_login_passwd(old, new1, new2)
from woniuboss.lib.woniuboss_gui.login.decrypt import Decrypt
from woniuboss.lib.woniuboss_gui.student_manage.today_morning_exam import TodayMorningExam
from woniuboss.tools.woniuboss_gui.service import Service
import unittest
from woniuboss.tools.woniuboss_gui.utility import Utility
from parameterized import parameterized

test_config_info = Utility.get_json(
    '..\\..\\conf\\woniuboss_gui\\testdata_stu_manage.conf')
today_morning_exam_info = Utility.get_excel_to_tuple(test_config_info[5])
today_morning_exam_user_info = Utility.get_excel_to_user(test_config_info[5])


class TodayMorningExamTest(unittest.TestCase):
    @classmethod
    def setUpClass(cls):
        cls.driver = Service.get_driver(today_morning_exam_user_info)
        cls.today_morning_exam = TodayMorningExam(cls.driver)
        Service.miss_login(cls.driver, today_morning_exam_user_info)
        Decrypt(cls.driver).do_decrypt(
            today_morning_exam_user_info['secondpwd'])

    @classmethod
    def tearDownClass(cls):
        cls.driver.quit()

    #今日晨考
    @parameterized.expand(today_morning_exam_info)
    def test_today_morning_exam(cls, method, score, question, expect):
        import time
        local_time = time.strftime('%Y-%m-%d', time.localtime(time.time()))
Exemple #10
0
from parameterized import parameterized
import unittest

from selenium.webdriver.common.by import By

from woniuboss.lib.woniuboss_gui.personnel_management.personnel_management import PersonnelManagement
from woniuboss.tools.woniuboss_gui.utility import Utility
from woniuboss.tools.woniuboss_gui.service import Service
# 在该页面调试时test_config_info里需要多加一层跳出"..\\",testdata也需要多加一层
# 准备数据
test_config_info = Utility.get_json(
    '..\\..\\conf\\woniuboss_gui\\PM\\testdata.conf')
pm_employees_info = Utility.get_excel_to_tuple(test_config_info[0])
pm_employees_user_info = Utility.get_excel_to_user(test_config_info[0])
pm_area_info = Utility.get_excel_to_tuple(test_config_info[1])
pm_department_info = Utility.get_excel_to_tuple(test_config_info[2])
pm_state_info = Utility.get_excel_to_tuple(test_config_info[3])
pm_area_query_info = Utility.get_excel_to_tuple(test_config_info[4])
pm_department_query_info = Utility.get_excel_to_tuple(test_config_info[5])
pm_state_query_info = Utility.get_excel_to_tuple(test_config_info[6])
pm_name_input_query_info = Utility.get_excel_to_tuple(test_config_info[7])
pm_new_input_info = Utility.get_excel_to_tuple(test_config_info[8])
pm_modify_input_info = Utility.get_excel_to_tuple(test_config_info[9])

# ('http://192.168.75.128:8080/WoniuBoss2.5/user/login', 'POST',
# {'username': '******', 'password': '******', 'verifycode': '0000'}, 200, 'employment_management-pass'),
# login_info中[]的需要参照上面选取


class PersonnelManagementTest(unittest.TestCase):
    @classmethod