本文整理汇总了Python中bzt.modules.selenium.SeleniumExecutor.resource_files方法的典型用法代码示例。如果您正苦于以下问题:Python SeleniumExecutor.resource_files方法的具体用法?Python SeleniumExecutor.resource_files怎么用?Python SeleniumExecutor.resource_files使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类bzt.modules.selenium.SeleniumExecutor
的用法示例。
在下文中一共展示了SeleniumExecutor.resource_files方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_remote_prov_requests
# 需要导入模块: from bzt.modules.selenium import SeleniumExecutor [as 别名]
# 或者: from bzt.modules.selenium.SeleniumExecutor import resource_files [as 别名]
def test_remote_prov_requests(self):
obj = SeleniumExecutor()
obj.engine = EngineEmul()
obj.execution.merge({
"scenario": {
"requests": [
"http://blazedemo.com"
]
}
})
obj.resource_files()
示例2: test_resource_files_collection_remote_nose
# 需要导入模块: from bzt.modules.selenium import SeleniumExecutor [as 别名]
# 或者: from bzt.modules.selenium.SeleniumExecutor import resource_files [as 别名]
def test_resource_files_collection_remote_nose(self):
obj = SeleniumExecutor()
obj.engine = EngineEmul()
obj.execution.merge({"scenario": {"script": __dir__() + "/../selenium/python/"}})
obj.settings.merge(obj.engine.config.get("modules").get("selenium"))
self.assertEqual(len(obj.resource_files()), 1)
示例3: test_resource_files_collection_remote_nose
# 需要导入模块: from bzt.modules.selenium import SeleniumExecutor [as 别名]
# 或者: from bzt.modules.selenium.SeleniumExecutor import resource_files [as 别名]
def test_resource_files_collection_remote_nose(self):
obj = SeleniumExecutor()
obj.engine = EngineEmul()
obj.execution.merge({"scenario": {"script": __dir__() + "/../selenium/python/"}})
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[0]))
self.assertEqual(len(res_artifacts), 2)
示例4: test_resource_files_collection_remote_jar
# 需要导入模块: from bzt.modules.selenium import SeleniumExecutor [as 别名]
# 或者: from bzt.modules.selenium.SeleniumExecutor import resource_files [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)
示例5: test_dont_copy_local_script_to_artifacts
# 需要导入模块: from bzt.modules.selenium import SeleniumExecutor [as 别名]
# 或者: from bzt.modules.selenium.SeleniumExecutor import resource_files [as 别名]
def test_dont_copy_local_script_to_artifacts(self):
"ensures that .java file is not copied into artifacts-dir"
obj = SeleniumExecutor()
obj.engine = EngineEmul()
filename = "BlazeDemo.java"
script_path = __dir__() + "/../data/" + filename
obj.execution.merge({
"scenario": {
"script": script_path,
}
})
obj.prepare()
files = obj.resource_files()
self.assertIn(script_path, files)
artifacts_script = os.path.join(obj.engine.artifacts_dir, filename)
self.assertFalse(os.path.exists(artifacts_script))