/// <summary>
        /// Adds the HTML reporter to this run, using the specified settings.
        /// </summary>
        /// <param name="settings">The settings.</param>
        /// <param name="configure">Action to configure the HTML reporter.</param>
        /// <returns>The updated settings.</returns>
        public static NewmanSettings UseHtmlReporter(this NewmanSettings settings,
                                                     Action <HtmlReporterSettings> configure)
        {
            var html = new HtmlReporterSettings();

            configure?.Invoke(html);
            settings.Reporters.Add("html", html);
            return(settings);
        }
コード例 #2
0
 /// <summary>
 /// Specify a path to the custom template which will be used to render the HTML report.
 /// </summary>
 /// <remarks>
 /// Sets the <see cref="HtmlReporterSettings.TemplateFile"/> property.</remarks>
 /// <param name="settings">The settings.</param>
 /// <param name="templateFile">The path for the template file to use.</param>
 /// <returns>The updated settings.</returns>
 public static HtmlReporterSettings UseTemplateFile(this HtmlReporterSettings settings, FilePath templateFile)
 {
     settings.TemplateFile = templateFile;
     return(settings);
 }
コード例 #3
0
 /// <summary>
 /// Specify a path where the output HTML file will be written to disk.
 /// </summary>
 /// <remarks>
 /// Sets the <see cref="HtmlReporterSettings.OutputFile"/> property.</remarks>
 /// <param name="settings">The settings.</param>
 /// <param name="outputFile">The path for the output file to be written to.</param>
 /// <returns>The updated settings.</returns>
 public static HtmlReporterSettings UseOutputFile(this HtmlReporterSettings settings, FilePath outputFile)
 {
     settings.OutputFile = outputFile;
     return(settings);
 }