/// <summary> /// Create simple output for exporting a report to json /// </summary> /// <param name="testReport">TestReport instance</param> /// <param name="settings">Output configuration</param> public FileSystemOutputDefinition(TestReport testReport, IDictionary<string, string> settings) : base(testReport) { if (settings == null) { throw new Exception("Could not find reportOutput-Settings in fileSystem output configuration"); } if (!settings.ContainsKey("reportOutput")) { throw new Exception("Could not find reportOutput in fileSystem output settings"); } reportOutput = settings["reportOutput"]; }
/// <summary> /// Create test-process by a jsonConfiguration /// </summary> /// <param name="jsonConfiguration">Configuration of the current adaptive test.</param> /// <param name="listener">Error-Listener</param> /// <param name="autoPlugInDetection">If set to true, the system will look for plugins in the current AppDomain</param> public TestProcess(string jsonConfiguration, IListener listener, bool autoPlugInDetection = true) { this.listener = listener; plugInManager = new PlugIns.PlugInManager(listener); // Load module definitions if autoPlugInDetection is enabled if (autoPlugInDetection) { plugInManager.LoadPlugIns(); } configuration = JsonConvert.DeserializeObject<TestConfiguration>(jsonConfiguration); // Validate configuration errorsOccured = !Validate(configuration); testCollection = new TestCollection(); testReport = new TestReport(this, configuration.Settings.Output); }
/// <summary> /// Create simple output for exporting a report to html /// </summary> /// <param name="testReport">TestReport instance</param> /// <param name="settings">Output configuration</param> public HtmlOutputDefinition(TestReport testReport, IDictionary<string, string> settings) : base(testReport) { if (settings == null) { throw new Exception("Could not find reportOutput-Settings in html output configuration"); } if (!settings.ContainsKey("reportOutput")) { throw new Exception("Could not find reportOutput in html output settings"); } if (!settings.ContainsKey("theme")) { throw new Exception("Could not find theme in html output settings"); } reportOutput = settings["reportOutput"]; reportOutput = reportOutput.Replace("[WorkingDir]", System.Windows.Forms.Application.StartupPath); theme = settings["theme"]; theme = theme.Replace("[WorkingDir]", System.Windows.Forms.Application.StartupPath); }
/// <summary> /// Create new report output base /// </summary> /// <param name="testReport">instance of the reporting system</param> public ReportOutput(TestReport testReport) { this.testReport = testReport; }