def test_install_Gatling(self): path = os.path.abspath( __dir__() + "/../../build/tmp/gatling-taurus/bin/gatling.sh") shutil.rmtree(os.path.dirname(os.path.dirname(path)), ignore_errors=True) # backup download link and version gatling_link = GatlingExecutor.DOWNLOAD_LINK gatling_ver = GatlingExecutor.VERSION GatlingExecutor.DOWNLOAD_LINK = "file://" + __dir__( ) + "/../data/gatling-dist-{version}_{version}.zip" GatlingExecutor.VERSION = '2.1.4' self.assertFalse(os.path.exists(path)) obj = GatlingExecutor() obj.engine = EngineEmul() obj.settings.merge({"path": path}) obj.execution = BetterDict() obj.execution.merge({ "scenario": { "script": "tests/gatling/BasicSimulation.scala", "simulation": "mytest.BasicSimulation" } }) obj.prepare() self.assertTrue(os.path.exists(path)) obj.prepare() GatlingExecutor.DOWNLOAD_LINK = gatling_link GatlingExecutor.VERSION = gatling_ver
def test_install_Gatling(self): path = os.path.abspath(__dir__() + "/../../build/tmp/gatling-taurus/bin/gatling" + EXE_SUFFIX) shutil.rmtree(os.path.dirname(os.path.dirname(path)), ignore_errors=True) # backup download link and version gatling_link = GatlingExecutor.DOWNLOAD_LINK gatling_ver = GatlingExecutor.VERSION mirrors_link = GatlingExecutor.MIRRORS_SOURCE GatlingExecutor.DOWNLOAD_LINK = "file:///" + __dir__() + "/../data/gatling-dist-{version}_{version}.zip" GatlingExecutor.VERSION = '2.1.4' GatlingExecutor.MIRRORS_SOURCE = "file:///" + __dir__() + "/../data/unicode_file" self.assertFalse(os.path.exists(path)) obj = GatlingExecutor() obj.engine = EngineEmul() obj.settings.merge({"path": path}) obj.execution = BetterDict() obj.execution.merge({"scenario": {"script": "tests/gatling/BasicSimulation.scala", "simulation": "mytest.BasicSimulation"}}) obj.prepare() self.assertTrue(os.path.exists(path)) obj.prepare() GatlingExecutor.DOWNLOAD_LINK = gatling_link GatlingExecutor.VERSION = gatling_ver GatlingExecutor.MIRRORS_SOURCE = mirrors_link