Ejemplo n.º 1
0
    def test_physics_g3(self):
        self.pys_g3 = PublicMethod(self.driver)

        if self.FILENAME == 'run_all_ko.py':
            self.pys_g3.generate_access_code(ExamPath_KO.physics_g3)
            self.pys_g3.access(ExamPath_KO.physics_g3)
        elif self.FILENAME == 'run_all_en.py':
            pass
        elif self.FILENAME == 'run_all_cn.py':
            pass
        self.pys_g3.begin_exam()
        self.pys_g3.select_answers()
Ejemplo n.º 2
0
    def setUp(self):
        self.driver = webdriver.Remote(command_executor=ConfigData.EXECUTOR, desired_capabilities=ConfigData.desired_cap)
        self.cr = PublicMethod(self.driver)

        if FILENAME == 'run_all_ko.py':
            self.cr.generate_access_code(ExamPath_KO.cr)
            self.cr.access(ExamPath_KO.cr)

        elif FILENAME == 'run_all_en.py':
            pass
        elif FILENAME == 'run_all_cn.py':
            pass
Ejemplo n.º 3
0
    def test_creativity(self):
        self.cr = PublicMethod(self.driver)

        if self.FILENAME == 'run_all_ko.py':
            self.cr.generate_access_code(ExamPath_KO.cr)
            self.cr.access(ExamPath_KO.cr)

        elif self.FILENAME == 'run_all_en.py':
            pass
        elif self.FILENAME == 'run_all_cn.py':
            pass

        self.cr.creativity_answers()
Ejemplo n.º 4
0
    def test_math_g1(self):
        self.math_g1 = PublicMethod(self.driver)
        if self.FILENAME == 'run_all_ko.py':
            self.math_g1.generate_access_code(ExamPath_KO.math_g1)
            self.math_g1.access(ExamPath_KO.math_g1)

        elif self.FILENAME == 'run_all_en.py':
            pass
        elif self.FILENAME == 'run_all_cn.py':
            pass

        self.math_g1.begin_exam()
        self.math_g1.select_answers()
Ejemplo n.º 5
0
    def test_ct(self):
        self.ct = PublicMethod(self.driver)

        if self.FILENAME == 'run_all_ko.py':
            self.ct.generate_access_code(ExamPath_KO.ct)
            self.ct.access(ExamPath_KO.ct)

        elif self.FILENAME == 'run_all_en.py':
            pass
        elif self.FILENAME == 'run_all_cn.py':
            pass
        self.ct.ct_sample_instruction()
        self.ct.ct_sample_exam()
        self.ct.ct_real_exam()
Ejemplo n.º 6
0
    def test_fa_cn(self):
        self.fa = PublicMethod(self.driver)

        if self.FILENAME == 'run_all_ko.py':
            self.fa.generate_access_code(ExamPath_KO.ct)
            self.fa.access(ExamPath_KO.ct)

        elif self.FILENAME == 'run_all_en.py':
            pass

        elif self.FILENAME == 'run_all_cn.py':
            print 111
            self.fa.generate_access_code(ExamPath_CN.random_fa)
            self.fa.access(ExamPath_CN.random_fa)
Ejemplo n.º 7
0
class QL(test_env.TestEnv):

    def test_ql(self):
        self.ct = PublicMethod(self.driver)
        if self.FILENAME == 'run_all_ko.py':
            self.ct.generate_access_code(ExamPath_KO.ct)
            self.ct.access(ExamPath_KO.ct)

        elif self.FILENAME == 'run_all_en.py':
            pass
        elif self.FILENAME == 'run_all_cn.py':
            pass

        self.ct.ct_sample_instruction()
        self.ct.ct_sample_exam()
        self.ct.ct_real_exam()
Ejemplo n.º 8
0
    def test_random_cs_g1(self):

        for _ in range(10):

            self.random_cs_g1 = PublicMethod(self.driver)
            if self.FILENAME == 'run_all_ko.py':
                self.random_cs_g1.generate_access_code(ExamPath_KO.random_g1)
                self.random_cs_g1.access(ExamPath_KO.random_g1)
                self.random_cs_g1.insturction_in_email()

            elif self.FILENAME == 'run_all_en.py':
                self.random_cs_g1.generate_access_code(ExamPath_EN.random_g1)
                self.random_cs_g1.access(ExamPath_EN.random_g1)

            elif self.FILENAME == 'run_all_cn.py':
                pass

            self.random_cs_g1.random_exam()
    def test_mathphyiscs_g1(self):

        self.mathphyiscs_g1 = PublicMethod(self.driver)
        if self.FILENAME == 'run_all_ko.py':
            self.mathphyiscs_g1.generate_access_code(ExamPath_KO.random_g1)
            self.mathphyiscs_g1.access(ExamPath_KO.random_g1)
            self.mathphyiscs_g1.insturction_in_email()

        elif self.FILENAME == 'run_all_en.py':
            self.mathphyiscs_g1.generate_access_code(ExamPath_EN.random_g1)
            self.mathphyiscs_g1.access(ExamPath_EN.random_g1)

        elif self.FILENAME == 'run_all_cn.py':
            pass

        self.mathphyiscs_g1.begin_exam()
        self.mathphyiscs_g1.select_answers()
        self.mathphyiscs_g1.begin_exam()
        self.mathphyiscs_g1.select_answers()
Ejemplo n.º 10
0
    def test_physics_g3(self):
        self.pys_g3 = PublicMethod(self.driver)

        if self.FILENAME == 'run_all_ko.py':
            self.pys_g3.generate_access_code(ExamPath_KO.physics_g3)
            self.pys_g3.access(ExamPath_KO.physics_g3)
        elif self.FILENAME == 'run_all_en.py':
            pass
        elif self.FILENAME == 'run_all_cn.py':
            pass
        self.pys_g3.begin_exam()
        self.pys_g3.select_answers()
Ejemplo n.º 11
0
class Physics_G1(test_env.TestEnv):

    def test_physics_g1(self):
        self.pys_g1 = PublicMethod(self.driver)

        if self.FILENAME == 'run_all_ko.py':
            self.pys_g1.generate_access_code(ExamPath_KO.physics_g1)
            self.pys_g1.access(ExamPath_KO.physics_g1)
        elif self.FILENAME == 'run_all_en.py':
            pass
        elif self.FILENAME == 'run_all_cn.py':
            pass
        self.pys_g1.begin_exam()
        self.pys_g1.select_answers()
Ejemplo n.º 12
0
class Math_G3(test_env.TestEnv):

    def test_math_g3(self):
        self.math_g3 = PublicMethod(self.driver)
        if self.FILENAME == 'run_all_ko.py':
            self.math_g3.generate_access_code(ExamPath_KO.math_g3)
            self.math_g3.access(ExamPath_KO.math_g3)

        elif self.FILENAME == 'run_all_en.py':
            pass
        elif self.FILENAME == 'run_all_cn.py':
            pass
        self.math_g3.begin_exam()
        self.math_g3.select_answers()
Ejemplo n.º 13
0
    def test_creativity(self):
        self.cr = PublicMethod(self.driver)

        if self.FILENAME == 'run_all_ko.py':
            self.cr.generate_access_code(ExamPath_KO.cr)
            self.cr.access(ExamPath_KO.cr)

        elif self.FILENAME == 'run_all_en.py':
            pass
        elif self.FILENAME == 'run_all_cn.py':
            pass

        self.cr.creativity_answers()
Ejemplo n.º 14
0
    def test_math_g1(self):
        self.math_g1 = PublicMethod(self.driver)
        if self.FILENAME == 'run_all_ko.py':
            self.math_g1.generate_access_code(ExamPath_KO.math_g1)
            self.math_g1.access(ExamPath_KO.math_g1)

        elif self.FILENAME == 'run_all_en.py':
            pass
        elif self.FILENAME == 'run_all_cn.py':
            pass

        self.math_g1.begin_exam()
        self.math_g1.select_answers()
Ejemplo n.º 15
0
    def test_fa_cn(self):
        self.fa = PublicMethod(self.driver)

        if self.FILENAME == 'run_all_ko.py':
            self.fa.generate_access_code(ExamPath_KO.ct)
            self.fa.access(ExamPath_KO.ct)

        elif self.FILENAME == 'run_all_en.py':
            pass

        elif self.FILENAME == 'run_all_cn.py':
            print 111
            self.fa.generate_access_code(ExamPath_CN.random_fa)
            self.fa.access(ExamPath_CN.random_fa)
Ejemplo n.º 16
0
    def test_random_cs_g1(self):

        for _ in range(10):

            self.random_cs_g1 = PublicMethod(self.driver)
            if self.FILENAME == 'run_all_ko.py':
                self.random_cs_g1.generate_access_code(ExamPath_KO.random_g1)
                self.random_cs_g1.access(ExamPath_KO.random_g1)
                self.random_cs_g1.insturction_in_email()

            elif self.FILENAME == 'run_all_en.py':
                self.random_cs_g1.generate_access_code(ExamPath_EN.random_g1)
                self.random_cs_g1.access(ExamPath_EN.random_g1)

            elif self.FILENAME == 'run_all_cn.py':
                pass

            self.random_cs_g1.random_exam()
Ejemplo n.º 17
0
class SampleQL(unittest.TestCase):
    def setUp(self):
        self.driver = webdriver.Remote(command_executor=ConfigData.EXECUTOR, desired_capabilities=ConfigData.desired_cap)
        self.cr = PublicMethod(self.driver)

        if FILENAME == 'run_all_ko.py':
            self.cr.generate_access_code(ExamPath_KO.cr)
            self.cr.access(ExamPath_KO.cr)

        elif FILENAME == 'run_all_en.py':
            pass
        elif FILENAME == 'run_all_cn.py':
            pass

    def test_creativity(self):
        self.cr.creativity_answers()

    def tearDown(self):
        self.driver.quit()