Esempio n. 1
0
    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.get_widget()
        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"))