public void AddBackendListener() { //arrange JmeterScript jmeterScript = new JmeterScript(jmeterScriptFileName); //act jmeterScript.AddBackEndListener(); jmeterScript.WriteNewFile("backendlistener.jmx"); //assert Assert.IsTrue(true); }
static void RunOptions(Options opts) { string testScript = Path.GetFileName(opts.TestScript); var workingDir = Path.GetDirectoryName(opts.TestScript); Directory.SetCurrentDirectory(workingDir); string testScriptNew = Path.GetFileNameWithoutExtension(testScript) + "-modified.jmx"; Logger.Info($"Opening {testScript}"); JmeterScript jmeterScript = new JmeterScript(testScript, Logger); if (opts.AddBackEndListener) { Logger.Info("Adding Influx DB backend listener."); jmeterScript.AddBackEndListener(); } Logger.Info("Checking for CSV config elements"); if (jmeterScript.HasEnabledCsvControl()) { Logger.Info("Starting to process the Csv Configs"); jmeterScript.AddRedisControl(opts.ContinueOnError); jmeterScript.WriteNewFile(testScriptNew); } }