当前位置: 首页>>代码示例>>Python>>正文


Python SeleniumExecutor.settings方法代码示例

本文整理汇总了Python中bzt.modules.selenium.SeleniumExecutor.settings方法的典型用法代码示例。如果您正苦于以下问题:Python SeleniumExecutor.settings方法的具体用法?Python SeleniumExecutor.settings怎么用?Python SeleniumExecutor.settings使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在bzt.modules.selenium.SeleniumExecutor的用法示例。


在下文中一共展示了SeleniumExecutor.settings方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_selenium_startup_shutdown_java_folder

# 需要导入模块: from bzt.modules.selenium import SeleniumExecutor [as 别名]
# 或者: from bzt.modules.selenium.SeleniumExecutor import settings [as 别名]
    def test_selenium_startup_shutdown_java_folder(self):
        """
        run tests from .java files
        :return:
        """
        obj = SeleniumExecutor()
        obj.engine = self.engine_obj
        obj.settings = self.selenium_config
        obj.engine.config.merge({'execution': {'scenario': {'script': 'tests/selenium/java/'}, 'executor': 'selenium'},
                                 'reporting': [{'module': 'junit-xml'}]})
        obj.engine.config.merge({"provisioning": "local"})
        obj.execution = obj.engine.config['execution']
        obj.settings.merge(obj.engine.config.get("modules").get("selenium"))
        obj.prepare()
        obj.startup()
        while not obj.check():
            time.sleep(1)
        obj.shutdown()

        prepared_files = os.listdir(obj.runner.working_dir)
        java_files = [file for file in prepared_files if file.endswith(".java")]
        class_files = [file for file in prepared_files if file.endswith(".class")]
        jars = [file for file in prepared_files if file.endswith(".jar")]
        self.assertEqual(2, len(java_files))
        self.assertEqual(2, len(class_files))
        self.assertEqual(1, len(jars))
        self.assertTrue(os.path.exists(os.path.join(obj.runner.working_dir, "compiled.jar")))
        self.assertTrue(os.path.exists(obj.runner.settings.get("report-file")))
开发者ID:vasischev,项目名称:taurus,代码行数:30,代码来源:test_SeleniumExecutor.py

示例2: test_selenium_startup_shutdown_jar_single

# 需要导入模块: from bzt.modules.selenium import SeleniumExecutor [as 别名]
# 或者: from bzt.modules.selenium.SeleniumExecutor import settings [as 别名]
    def test_selenium_startup_shutdown_jar_single(self):
        """
        runt tests from single jar
        :return:
        """
        obj = SeleniumExecutor()
        obj.engine = self.engine_obj
        obj.settings = self.selenium_config
        obj.engine.config.merge(yaml.load(open("tests/yaml/selenium_executor_jar.yml").read()))
        obj.engine.config.merge({"provisioning": "local"})
        obj.execution = obj.engine.config["execution"]
        obj.execution.merge({"scenario": {"script": ABS_PATH("/../../tests/selenium/jar/dummy.jar")}})
        obj.settings.merge(obj.engine.config.get("modules").get("selenium"))
        obj.prepare()
        obj.startup()
        while not obj.check():
            time.sleep(1)
        obj.shutdown()

        prepared_files = os.listdir(obj.runner.working_dir)
        java_files = [file for file in prepared_files if file.endswith(".java")]
        class_files = [file for file in prepared_files if file.endswith(".class")]
        jars = [file for file in prepared_files if file.endswith(".jar")]
        self.assertEqual(len(java_files), 0)
        self.assertEqual(len(class_files), 0)
        self.assertEqual(len(jars), 1)
        self.assertTrue(os.path.exists(obj.runner.settings.get("report-file")))
开发者ID:kobi1023,项目名称:taurus,代码行数:29,代码来源:test_SeleniumExecutor.py

示例3: test_selenium_startup_shutdown_java_folder

# 需要导入模块: from bzt.modules.selenium import SeleniumExecutor [as 别名]
# 或者: from bzt.modules.selenium.SeleniumExecutor import settings [as 别名]
    def test_selenium_startup_shutdown_java_folder(self):
        """
        run tests from .java files
        :return:
        """
        obj = SeleniumExecutor()
        obj.engine = self.engine_obj
        obj.settings = self.selenium_config
        obj.engine.config.merge(yaml.load(open("tests/yaml/selenium_executor_java.yml").read()))
        obj.engine.config.merge({"provisioning": "local"})
        obj.execution = obj.engine.config["execution"]
        obj.settings.merge(obj.engine.config.get("modules").get("selenium"))
        obj.prepare()
        obj.startup()
        while not obj.check():
            time.sleep(1)
        obj.shutdown()

        prepared_files = os.listdir(obj.runner.working_dir)
        java_files = [file for file in prepared_files if file.endswith(".java")]
        class_files = [file for file in prepared_files if file.endswith(".class")]
        jars = [file for file in prepared_files if file.endswith(".jar")]
        self.assertEqual(2, len(java_files))
        self.assertEqual(2, len(class_files))
        self.assertEqual(1, len(jars))
        self.assertTrue(os.path.exists(os.path.join(obj.runner.working_dir, "compiled.jar")))
        self.assertTrue(os.path.exists(obj.runner.settings.get("report-file")))
开发者ID:kobi1023,项目名称:taurus,代码行数:29,代码来源:test_SeleniumExecutor.py

示例4: test_selenium_startup_shutdown_jar_single

# 需要导入模块: from bzt.modules.selenium import SeleniumExecutor [as 别名]
# 或者: from bzt.modules.selenium.SeleniumExecutor import settings [as 别名]
    def test_selenium_startup_shutdown_jar_single(self):
        """
        runt tests from single jar
        :return:
        """
        obj = SeleniumExecutor()
        obj.engine = self.engine_obj
        obj.settings = self.selenium_config
        obj.engine.config.merge(
            {'execution': {'scenario': {'script': __dir__() + '/../selenium/jar/'}, 'executor': 'selenium'},
             'reporting': [{'module': 'junit-xml'}]})
        obj.engine.config.merge({"provisioning": "local"})
        obj.execution = obj.engine.config['execution']
        obj.execution.merge(
            {"scenario": {"script": __dir__() + "/../selenium/jar/dummy.jar"}})
        obj.settings.merge(obj.engine.config.get("modules").get("selenium"))
        obj.prepare()
        obj.startup()
        while not obj.check():
            time.sleep(1)
        obj.shutdown()

        prepared_files = os.listdir(obj.runner.working_dir)
        java_files = [fname for fname in prepared_files if fname.endswith(".java")]
        class_files = [fname for fname in prepared_files if fname.endswith(".class")]
        jars = [fname for fname in prepared_files if fname.endswith(".jar")]
        self.assertEqual(len(java_files), 0)
        self.assertEqual(len(class_files), 0)
        self.assertEqual(len(jars), 1)
        self.assertTrue(os.path.exists(obj.runner.settings.get("report-file")))
开发者ID:arunselvarajdb,项目名称:taurus,代码行数:32,代码来源:test_SeleniumExecutor.py

示例5: test_fail_on_zero_results

# 需要导入模块: from bzt.modules.selenium import SeleniumExecutor [as 别名]
# 或者: from bzt.modules.selenium.SeleniumExecutor import settings [as 别名]
    def test_fail_on_zero_results(self):
        obj = SeleniumExecutor()
        obj.engine = self.engine_obj
        obj.settings = self.selenium_config
        obj.engine.config.merge(yaml.load(open(__dir__() + "/../yaml/selenium_executor_requests.yml").read()))
        obj.engine.config.merge({"provisioning": "local"})
        obj.execution = obj.engine.config['execution']

        obj.prepare()
        self.assertRaises(RuntimeWarning, obj.post_process)
开发者ID:azweb76,项目名称:taurus,代码行数:12,代码来源:test_SeleniumExecutor.py

示例6: test_prepare_jar_single

# 需要导入模块: from bzt.modules.selenium import SeleniumExecutor [as 别名]
# 或者: from bzt.modules.selenium.SeleniumExecutor import settings [as 别名]
 def test_prepare_jar_single(self):
     """
     Check if jar exists in working dir
     :return:
     """
     obj = SeleniumExecutor()
     obj.engine = self.engine_obj
     obj.settings = self.selenium_config
     obj.execution = BetterDict()
     obj.execution.merge({"scenario": {"script": ABS_PATH("/../../tests/selenium/jar/dummy.jar")}})
     obj.prepare()
     self.assertTrue(os.path.exists(os.path.join(obj.runner.working_dir, "dummy.jar")))
开发者ID:kobi1023,项目名称:taurus,代码行数:14,代码来源:test_SeleniumExecutor.py

示例7: test_javac_fail

# 需要导入模块: from bzt.modules.selenium import SeleniumExecutor [as 别名]
# 或者: from bzt.modules.selenium.SeleniumExecutor import settings [as 别名]
 def test_javac_fail(self):
     """
     Test RuntimeError when compilation fails
     :return:
     """
     obj = SeleniumExecutor()
     obj.engine = self.engine_obj
     obj.settings = self.selenium_config
     obj.engine.config = BetterDict()
     obj.engine.config.merge(
         {"execution": {"executor": "selenium", "scenario": {"script": "tests/selenium/invalid/invalid.java"}}})
     obj.execution = obj.engine.config['execution']
     self.assertRaises(RuntimeError, obj.prepare)
开发者ID:vasischev,项目名称:taurus,代码行数:15,代码来源:test_SeleniumExecutor.py

示例8: test_resource_files_collection_remote_jar

# 需要导入模块: from bzt.modules.selenium import SeleniumExecutor [as 别名]
# 或者: from bzt.modules.selenium.SeleniumExecutor import settings [as 别名]
    def test_resource_files_collection_remote_jar(self):
        obj = SeleniumExecutor()
        obj.engine = self.engine_obj
        obj.settings = self.selenium_config
        obj.engine.config.merge({'execution': {'scenario': {'script': 'tests/selenium/jar/'}, 'executor': 'selenium'},
                                 'reporting': [{'module': 'junit-xml'}]})
        obj.engine.config.merge({"provisioning": "local"})
        obj.execution = obj.engine.config['execution']
        obj.settings.merge(obj.engine.config.get("modules").get("selenium"))

        res_files = obj.resource_files()
        res_artifacts = os.listdir(os.path.join(obj.engine.artifacts_dir, res_files))
        self.assertEqual(len(res_artifacts), 2)
开发者ID:vasischev,项目名称:taurus,代码行数:15,代码来源:test_SeleniumExecutor.py

示例9: test_prepare_java_single

# 需要导入模块: from bzt.modules.selenium import SeleniumExecutor [as 别名]
# 或者: from bzt.modules.selenium.SeleniumExecutor import settings [as 别名]
 def test_prepare_java_single(self):
     """
     Check if script exists in working dir
     :return:
     """
     obj = SeleniumExecutor()
     obj.engine = self.engine_obj
     obj.settings = self.selenium_config
     obj.execution.merge({"scenario": {"script": ABS_PATH("/../../tests/selenium/java/TestBlazemeterFail.java")}})
     obj.prepare()
     self.assertTrue(os.path.exists(os.path.join(obj.runner.working_dir, "TestBlazemeterFail.java")))
     self.assertTrue(os.path.exists(os.path.join(obj.runner.working_dir, "TestBlazemeterFail.class")))
     self.assertTrue(os.path.exists(os.path.join(obj.runner.working_dir, "compiled.jar")))
开发者ID:kobi1023,项目名称:taurus,代码行数:15,代码来源:test_SeleniumExecutor.py

示例10: test_prepare_java_package

# 需要导入模块: from bzt.modules.selenium import SeleniumExecutor [as 别名]
# 或者: from bzt.modules.selenium.SeleniumExecutor import settings [as 别名]
 def test_prepare_java_package(self):
     """
     Check if scripts exist in working dir
     :return:
     """
     obj = SeleniumExecutor()
     obj.engine = self.engine_obj
     obj.settings = self.selenium_config
     obj.execution = BetterDict()
     obj.execution.merge(
         {"scenario": {"script": __dir__() + "/../selenium/java_package/"}})
     obj.prepare()
     self.assertTrue(os.path.exists(os.path.join(obj.runner.working_dir, "compiled.jar")))
开发者ID:arunselvarajdb,项目名称:taurus,代码行数:15,代码来源:test_SeleniumExecutor.py

示例11: test_prepare_jar_folder

# 需要导入模块: from bzt.modules.selenium import SeleniumExecutor [as 别名]
# 或者: from bzt.modules.selenium.SeleniumExecutor import settings [as 别名]
 def test_prepare_jar_folder(self):
     """
     Check if jars exist in working dir
     :return:
     """
     obj = SeleniumExecutor()
     obj.engine = self.engine_obj
     obj.settings = self.selenium_config
     obj.execution = BetterDict()
     obj.execution.merge({"scenario": {"script": ABS_PATH("/../../tests/selenium/jar/")}})
     obj.prepare()
     java_scripts = os.listdir(obj.runner.working_dir)
     self.assertEqual(len(java_scripts), 2)
开发者ID:kobi1023,项目名称:taurus,代码行数:15,代码来源:test_SeleniumExecutor.py

示例12: test_requests

# 需要导入模块: from bzt.modules.selenium import SeleniumExecutor [as 别名]
# 或者: from bzt.modules.selenium.SeleniumExecutor import settings [as 别名]
    def test_requests(self):
        obj = SeleniumExecutor()
        obj.engine = self.engine_obj
        obj.settings = self.selenium_config
        obj.engine.config.merge(yaml.load(open(__dir__() + "/../yaml/selenium_executor_requests.yml").read()))
        obj.engine.config.merge({"provisioning": "local"})
        obj.execution = obj.engine.config['execution']

        obj.prepare()
        obj.startup()
        while not obj.check():
            time.sleep(1)
        obj.shutdown()
        with open(os.path.join(obj.engine.artifacts_dir, "junit.err")) as fds:
            contents = fds.read()
            self.assertEqual(1, contents.count("ok"))
            self.assertEqual(1, contents.count("OK"))
开发者ID:VegiS,项目名称:taurus,代码行数:19,代码来源:test_SeleniumExecutor.py

示例13: test_no_test_in_name

# 需要导入模块: from bzt.modules.selenium import SeleniumExecutor [as 别名]
# 或者: from bzt.modules.selenium.SeleniumExecutor import settings [as 别名]
 def test_no_test_in_name(self):
     """
     Test exact number of tests when annotations used and no "test" in class name
     :return:
     """
     obj = SeleniumExecutor()
     obj.engine = self.engine_obj
     obj.settings = self.selenium_config
     obj.engine.config.merge({ScenarioExecutor.EXEC: {
         "executor": "selenium",
         "scenario": {"script": __dir__() + "/../selenium/invalid/selenium1.java"}
     }})
     obj.execution = obj.engine.config['execution']
     obj.prepare()
     obj.startup()
     while not obj.check():
         time.sleep(1)
     obj.shutdown()
开发者ID:azweb76,项目名称:taurus,代码行数:20,代码来源:test_SeleniumExecutor.py

示例14: test_prepare_java_folder

# 需要导入模块: from bzt.modules.selenium import SeleniumExecutor [as 别名]
# 或者: from bzt.modules.selenium.SeleniumExecutor import settings [as 别名]
 def test_prepare_java_folder(self):
     """
     Check if scripts exist in working dir
     :return:
     """
     obj = SeleniumExecutor()
     obj.engine = self.engine_obj
     obj.settings = self.selenium_config
     obj.execution = BetterDict()
     obj.execution.merge({"scenario": {"script": ABS_PATH("/../../tests/selenium/java/")}})
     obj.prepare()
     prepared_files = os.listdir(obj.runner.working_dir)
     java_files = [file for file in prepared_files if file.endswith(".java")]
     class_files = [file for file in prepared_files if file.endswith(".class")]
     jars = [file for file in prepared_files if file.endswith(".jar")]
     self.assertEqual(len(java_files), 2)
     self.assertEqual(len(class_files), 2)
     self.assertEqual(len(jars), 1)
开发者ID:kobi1023,项目名称:taurus,代码行数:20,代码来源:test_SeleniumExecutor.py

示例15: test_samples_count_testcase

# 需要导入模块: from bzt.modules.selenium import SeleniumExecutor [as 别名]
# 或者: from bzt.modules.selenium.SeleniumExecutor import settings [as 别名]
 def test_samples_count_testcase(self):
     """
     Test exact number of tests when test class extends JUnit TestCase
     :return:
     """
     obj = SeleniumExecutor()
     obj.engine = self.engine_obj
     obj.settings = self.selenium_config
     obj.engine.config.merge({ScenarioExecutor.EXEC: {
         "executor": "selenium",
         "scenario": {"script": __dir__() + "/../selenium/invalid/SimpleTest.java"}
     }})
     obj.execution = obj.engine.config['execution']
     obj.prepare()
     obj.startup()
     while not obj.check():
         time.sleep(1)
     obj.shutdown()
开发者ID:azweb76,项目名称:taurus,代码行数:20,代码来源:test_SeleniumExecutor.py


注:本文中的bzt.modules.selenium.SeleniumExecutor.settings方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。