Beispiel #1
0
        /// <summary>
        /// Create the template output
        /// </summary>
        public virtual string TransformText()
        {
            this.Write(@"<html>
<head>
<style>
.table_main {border:solid 2px darkgrey;border-collapse:collapse;}
.title {text-align: center;}
.th_main {padding: 10px;font-variant: small-caps;text-align: center;border-width:2px;border-color:darkgrey;border-style:solid;background-color: lightgrey;}
.td_main {padding: 10px;border-width:2px;border-color:darkgrey;border-style:solid;}
.warning {background-color: bisque;color:black;font-weight:bold;}
.warning_no_data {background-color: beige;color:black;font-weight:bold;}
.false_positive {background-color: green;color:white;font-weight:bold;}
.error {background-color: Red;color:white;font-weight:bold;}
.success {color:black;font-weight:bold;}
.error_with_explanation {background-color: orange;color:white;font-weight:bold;}
.error_data {color: white;font-weight: bold;background-color: red;font-size: 2em; text-align: center;}
</style>
</head>
<body>
	<h1 id=""top"" class=""title"">Summary Report</h1>
	<hr/>

	"    );

            #line 29 "\\psf\Home\Desktop\TestMVC4App\Profile-System-Testing\TestMVC4ConsoleApp\Templates\SummaryReport.tt"
            if (!string.IsNullOrEmpty(SharedDataObject.ErrorHappened))
            {
                string message = "UNKNOWN ERROR(S) MAY MAKE THESE RESULTS INCONSISTENT/UNRELIABLE !";
                if (SharedDataObject.ErrorHappened == "HTTP")
                {
                    message = "PROBLEMS CONNECTING TO DATA SERVICES MAKE THESE RESULTS INCONSISTENT/UNRELIABLE !";
                }

            #line default
            #line hidden
                this.Write("\t <p class=\"error_data\">");

            #line 32 "\\psf\Home\Desktop\TestMVC4App\Profile-System-Testing\TestMVC4ConsoleApp\Templates\SummaryReport.tt"
                this.Write(this.ToStringHelper.ToStringWithCulture(message));

            #line default
            #line hidden
                this.Write("<br/>");

            #line 32 "\\psf\Home\Desktop\TestMVC4App\Profile-System-Testing\TestMVC4ConsoleApp\Templates\SummaryReport.tt"
                this.Write(this.ToStringHelper.ToStringWithCulture(SharedDataObject.ErrorMessage));

            #line default
            #line hidden
                this.Write("</p>\r\n\t <hr/>\r\n\t");

            #line 34 "\\psf\Home\Desktop\TestMVC4App\Profile-System-Testing\TestMVC4ConsoleApp\Templates\SummaryReport.tt"
            }

            #line default
            #line hidden
            this.Write("\r\n\t<h2>Overview</h2>\r\n\t<p>End time : ");

            #line 37 "\\psf\Home\Desktop\TestMVC4App\Profile-System-Testing\TestMVC4ConsoleApp\Templates\SummaryReport.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(SharedDataObject.StartTime));

            #line default
            #line hidden
            this.Write("<br/>\r\n\tTotal count of tests run : ");

            #line 38 "\\psf\Home\Desktop\TestMVC4App\Profile-System-Testing\TestMVC4ConsoleApp\Templates\SummaryReport.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(String.Format("{0:0,0}", SharedDataObject.CountTestsRun)));

            #line default
            #line hidden
            this.Write("<br/>\r\n\tCount of tests per user profile : ");

            #line 39 "\\psf\Home\Desktop\TestMVC4App\Profile-System-Testing\TestMVC4ConsoleApp\Templates\SummaryReport.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(String.Format("{0:0,0}", SharedDataObject.CountTestsPerUser)));

            #line default
            #line hidden
            this.Write("<br/>\r\n\tCount of user profiles tested : ");

            #line 40 "\\psf\Home\Desktop\TestMVC4App\Profile-System-Testing\TestMVC4ConsoleApp\Templates\SummaryReport.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(String.Format("{0:0,0}", SharedDataObject.CountProfilesTested)));

            #line default
            #line hidden
            this.Write("<br/>\r\n\tCount of user profiles ignored : ");

            #line 41 "\\psf\Home\Desktop\TestMVC4App\Profile-System-Testing\TestMVC4ConsoleApp\Templates\SummaryReport.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(String.Format("{0:0,0}", SharedDataObject.CountProfilesIgnored)));

            #line default
            #line hidden
            this.Write("<br/>\r\n\tCount of user profiles free from any kind of warning : ");

            #line 42 "\\psf\Home\Desktop\TestMVC4App\Profile-System-Testing\TestMVC4ConsoleApp\Templates\SummaryReport.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(String.Format("{0:0,0}", SharedDataObject.CountProfilesWithoutWarnings)));

            #line default
            #line hidden
            this.Write("<br/>\r\n\tProfile Average Testing Duration : ");

            #line 43 "\\psf\Home\Desktop\TestMVC4App\Profile-System-Testing\TestMVC4ConsoleApp\Templates\SummaryReport.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(SharedDataObject.Duration.ToString("hh'h: 'mm'mn:'ss's:'FFFFFFF")));

            #line default
            #line hidden
            this.Write("</p>\r\n\t<p>Average Duration by User Profile : ");

            #line 44 "\\psf\Home\Desktop\TestMVC4App\Profile-System-Testing\TestMVC4ConsoleApp\Templates\SummaryReport.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(SharedDataObject.AverageDurationPerProfile.ToString("hh'h: 'mm'mn:'ss's:'FFFFFFF")));

            #line default
            #line hidden
            this.Write("</p>\r\n\t<br/>\r\n\t<table class=\"table_main\">\r\n\t\t<tr>\r\n\t\t<th class=\"th_main\">Result</" +
                       "th>\r\n\t\t<th class=\"th_main\">Count</th>\r\n\t\t<th class=\"th_main\">Description</th>\r\n\t" +
                       "\t</tr>\r\n\t\t");

            #line 52 "\\psf\Home\Desktop\TestMVC4App\Profile-System-Testing\TestMVC4ConsoleApp\Templates\SummaryReport.tt"
            foreach (KeyValuePair <EnumResultSeverityType, int> countPerSeverity in SharedDataObject.CountBySeverity)
            {
            #line default
            #line hidden
                this.Write("\t\t<tr>\r\n\t\t\t");

            #line 54 "\\psf\Home\Desktop\TestMVC4App\Profile-System-Testing\TestMVC4ConsoleApp\Templates\SummaryReport.tt"
                switch (countPerSeverity.Key)
                {
                case EnumResultSeverityType.FALSE_POSITIVE:

            #line default
            #line hidden
                    this.Write("\t\t<td class=\"false_positive td_main\">\r\n\t\t\t");

            #line 57 "\\psf\Home\Desktop\TestMVC4App\Profile-System-Testing\TestMVC4ConsoleApp\Templates\SummaryReport.tt"
                    break;

                case EnumResultSeverityType.WARNING:
                case EnumResultSeverityType.WARNING_ONLY_NEW:

            #line default
            #line hidden
                    this.Write("\t\t<td class=\"warning td_main\">\r\n\t\t\t");

            #line 61 "\\psf\Home\Desktop\TestMVC4App\Profile-System-Testing\TestMVC4ConsoleApp\Templates\SummaryReport.tt"
                    break;

                case EnumResultSeverityType.WARNING_NO_DATA:

            #line default
            #line hidden
                    this.Write("\t\t<td class=\"warning_no_data td_main\">\r\n\t\t\t");

            #line 64 "\\psf\Home\Desktop\TestMVC4App\Profile-System-Testing\TestMVC4ConsoleApp\Templates\SummaryReport.tt"
                    break;

                case EnumResultSeverityType.ERROR_WITH_EXPLANATION:
                case EnumResultSeverityType.ERROR_ONLY_OLD:

            #line default
            #line hidden
                    this.Write("\t\t<td class=\"error_with_explanation td_main\">\r\n\t\t\t");

            #line 68 "\\psf\Home\Desktop\TestMVC4App\Profile-System-Testing\TestMVC4ConsoleApp\Templates\SummaryReport.tt"
                    break;

                case EnumResultSeverityType.ERROR:

            #line default
            #line hidden
                    this.Write("\t\t<td class=\"error td_main\">\r\n\t\t\t");

            #line 71 "\\psf\Home\Desktop\TestMVC4App\Profile-System-Testing\TestMVC4ConsoleApp\Templates\SummaryReport.tt"
                    break;

                default:

            #line default
            #line hidden
                    this.Write("\t\t<td class=\"success td_main\">\r\n\t\t\t");

            #line 74 "\\psf\Home\Desktop\TestMVC4App\Profile-System-Testing\TestMVC4ConsoleApp\Templates\SummaryReport.tt"
                    break;
                }

            #line default
            #line hidden
                this.Write("\t\t");

            #line 76 "\\psf\Home\Desktop\TestMVC4App\Profile-System-Testing\TestMVC4ConsoleApp\Templates\SummaryReport.tt"
                this.Write(this.ToStringHelper.ToStringWithCulture(countPerSeverity.Key));

            #line default
            #line hidden
                this.Write("</td>\r\n\t\t<td class=\"td_main\">");

            #line 77 "\\psf\Home\Desktop\TestMVC4App\Profile-System-Testing\TestMVC4ConsoleApp\Templates\SummaryReport.tt"
                this.Write(this.ToStringHelper.ToStringWithCulture(String.Format("{0:0,0}", countPerSeverity.Value)));

            #line default
            #line hidden
                this.Write("</td>\r\n\t\t<td class=\"td_main\" style=\"color:darkgrey;\">");

            #line 78 "\\psf\Home\Desktop\TestMVC4App\Profile-System-Testing\TestMVC4ConsoleApp\Templates\SummaryReport.tt"
                this.Write(this.ToStringHelper.ToStringWithCulture(ParsingHelper.GetDescription(countPerSeverity.Key)));

            #line default
            #line hidden
                this.Write("</td>\r\n\t</tr>\r\n\t");

            #line 80 "\\psf\Home\Desktop\TestMVC4App\Profile-System-Testing\TestMVC4ConsoleApp\Templates\SummaryReport.tt"
            }

            #line default
            #line hidden
            this.Write("\t</table>\r\n\t<br/>\r\n\t<br/>\r\n\t<hr/>\r\n\t<h2>Overview By Test Name Per User Profile</h" +
                       "2>\r\n\t<a href=\"");

            #line 86 "\\psf\Home\Desktop\TestMVC4App\Profile-System-Testing\TestMVC4ConsoleApp\Templates\SummaryReport.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(SharedDataObject.Link2ProfileFile));

            #line default
            #line hidden
            this.Write(@""">Go to Overview of Results by OldId</a>
	<br/>
	<hr/>
	<h2>Overview By Test Name</h2>
	<br/>
	<p>A red background to the test name means that some results are missing. Check the logs for more details.</p>
	<br/>
	<table class=""table_main"">
	<tr>
		<th class=""th_main"">Test Name</th>
		<th class=""th_main"">Overall Success</th>
		<th class=""th_main"">Result Severity</th>
		<th class=""th_main"">Observations</th>
		<th class=""th_main"">Sample Data</th>
		<th class=""th_main"">Average Duration</th>
		<th class=""th_main"">More Info</th>
	</tr>
	"    );

            #line 103 "\\psf\Home\Desktop\TestMVC4App\Profile-System-Testing\TestMVC4ConsoleApp\Templates\SummaryReport.tt"
            foreach (var testName in SharedDataObject.FrequencySuccessByTestName.Keys)
            {
            #line default
            #line hidden
                this.Write("\t<tr>\r\n\t\t");

            #line 105 "\\psf\Home\Desktop\TestMVC4App\Profile-System-Testing\TestMVC4ConsoleApp\Templates\SummaryReport.tt"
                if (SharedDataObject.Not100PercentReturned.Contains(testName))
                {
            #line default
            #line hidden
                    this.Write("\t\t<td class=\"td_main error\">");

            #line 106 "\\psf\Home\Desktop\TestMVC4App\Profile-System-Testing\TestMVC4ConsoleApp\Templates\SummaryReport.tt"
                    this.Write(this.ToStringHelper.ToStringWithCulture(testName));

            #line default
            #line hidden
                    this.Write("</td>\r\n\t\t");

            #line 107 "\\psf\Home\Desktop\TestMVC4App\Profile-System-Testing\TestMVC4ConsoleApp\Templates\SummaryReport.tt"
                }
                else
                {
            #line default
            #line hidden
                    this.Write("\t\t<td class=\"td_main\">");

            #line 108 "\\psf\Home\Desktop\TestMVC4App\Profile-System-Testing\TestMVC4ConsoleApp\Templates\SummaryReport.tt"
                    this.Write(this.ToStringHelper.ToStringWithCulture(testName));

            #line default
            #line hidden
                    this.Write("</td>\r\n\t\t");

            #line 109 "\\psf\Home\Desktop\TestMVC4App\Profile-System-Testing\TestMVC4ConsoleApp\Templates\SummaryReport.tt"
                }

            #line default
            #line hidden
                this.Write("\t\t<td class=\"th_main\">\r\n\t\t\t");

            #line 111 "\\psf\Home\Desktop\TestMVC4App\Profile-System-Testing\TestMVC4ConsoleApp\Templates\SummaryReport.tt"
                this.Write(this.ToStringHelper.ToStringWithCulture(SharedDataObject.FrequencySuccessByTestName[testName].ToString("P")));

            #line default
            #line hidden
                this.Write("\r\n\t\t</td>\r\n\t\t<td class=\"td_main\">\r\n\t\t\t<table class=\"table_main\">\r\n\t\t\t");

            #line 115 "\\psf\Home\Desktop\TestMVC4App\Profile-System-Testing\TestMVC4ConsoleApp\Templates\SummaryReport.tt"
                foreach (KeyValuePair <EnumResultSeverityType, int> countPerSeverity in SharedDataObject.CountSeverityByTestName[testName])
                {
            #line default
            #line hidden
                    this.Write("\t\t\t<tr>\r\n\t\t\t");

            #line 117 "\\psf\Home\Desktop\TestMVC4App\Profile-System-Testing\TestMVC4ConsoleApp\Templates\SummaryReport.tt"
                    switch (countPerSeverity.Key)
                    {
                    case EnumResultSeverityType.FALSE_POSITIVE:

            #line default
            #line hidden
                        this.Write("\t\t\t\t<td class=\"false_positive td_main\">\r\n\t\t\t\t");

            #line 120 "\\psf\Home\Desktop\TestMVC4App\Profile-System-Testing\TestMVC4ConsoleApp\Templates\SummaryReport.tt"
                        break;

                    case EnumResultSeverityType.WARNING:
                    case EnumResultSeverityType.WARNING_ONLY_NEW:

            #line default
            #line hidden
                        this.Write("\t\t\t\t<td class=\"warning td_main\">\r\n\t\t\t\t");

            #line 124 "\\psf\Home\Desktop\TestMVC4App\Profile-System-Testing\TestMVC4ConsoleApp\Templates\SummaryReport.tt"
                        break;

                    case EnumResultSeverityType.WARNING_NO_DATA:

            #line default
            #line hidden
                        this.Write("\t\t\t\t<td class=\"warning_no_data td_main\">\r\n\t\t\t\t");

            #line 127 "\\psf\Home\Desktop\TestMVC4App\Profile-System-Testing\TestMVC4ConsoleApp\Templates\SummaryReport.tt"
                        break;

                    case EnumResultSeverityType.ERROR_WITH_EXPLANATION:
                    case EnumResultSeverityType.ERROR_ONLY_OLD:

            #line default
            #line hidden
                        this.Write("\t\t\t\t<td class=\"error_with_explanation td_main\">\r\n\t\t\t\t");

            #line 131 "\\psf\Home\Desktop\TestMVC4App\Profile-System-Testing\TestMVC4ConsoleApp\Templates\SummaryReport.tt"
                        break;

                    case EnumResultSeverityType.ERROR:

            #line default
            #line hidden
                        this.Write("\t\t\t\t<td class=\"error td_main\">\r\n\t\t\t\t");

            #line 134 "\\psf\Home\Desktop\TestMVC4App\Profile-System-Testing\TestMVC4ConsoleApp\Templates\SummaryReport.tt"
                        break;

                    default:

            #line default
            #line hidden
                        this.Write("\t\t\t\t<td class=\"success td_main\">\r\n\t\t\t\t");

            #line 137 "\\psf\Home\Desktop\TestMVC4App\Profile-System-Testing\TestMVC4ConsoleApp\Templates\SummaryReport.tt"
                        break;
                    }

            #line default
            #line hidden
                    this.Write("\t\t\t\t");

            #line 139 "\\psf\Home\Desktop\TestMVC4App\Profile-System-Testing\TestMVC4ConsoleApp\Templates\SummaryReport.tt"
                    this.Write(this.ToStringHelper.ToStringWithCulture(countPerSeverity.Key));

            #line default
            #line hidden
                    this.Write("</td>\r\n\t\t\t\t<td class=\"td_main\">");

            #line 140 "\\psf\Home\Desktop\TestMVC4App\Profile-System-Testing\TestMVC4ConsoleApp\Templates\SummaryReport.tt"
                    this.Write(this.ToStringHelper.ToStringWithCulture(String.Format("{0:0,0}", countPerSeverity.Value)));

            #line default
            #line hidden
                    this.Write("</td>\r\n\t\t\t\t<td class=\"td_main\">\r\n\t\t\t\t\t");

            #line 142 "\\psf\Home\Desktop\TestMVC4App\Profile-System-Testing\TestMVC4ConsoleApp\Templates\SummaryReport.tt"
                    double frequency = (double)countPerSeverity.Value / (double)SharedDataObject.CountProfilesTested;
                    if (frequency > 0)
                    {
            #line default
            #line hidden
                        this.Write("\t\t\t\t\t");

            #line 144 "\\psf\Home\Desktop\TestMVC4App\Profile-System-Testing\TestMVC4ConsoleApp\Templates\SummaryReport.tt"
                        this.Write(this.ToStringHelper.ToStringWithCulture(frequency.ToString("P")));

            #line default
            #line hidden
                        this.Write("\r\n\t\t\t\t\t");

            #line 145 "\\psf\Home\Desktop\TestMVC4App\Profile-System-Testing\TestMVC4ConsoleApp\Templates\SummaryReport.tt"
                    }

            #line default
            #line hidden
                    this.Write("\t\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t");

            #line 148 "\\psf\Home\Desktop\TestMVC4App\Profile-System-Testing\TestMVC4ConsoleApp\Templates\SummaryReport.tt"
                }

            #line default
            #line hidden
                this.Write("\t\t\t</table>\r\n\t\t</td>\r\n\t\t<td class=\"td_main\">\r\n\t\t\t<table class=\"table_main\">\r\n\t\t\t\t" +
                           "<tr>\r\n\t\t\t\t\t<th class=\"th_main\">Identified Data Behavior</th>\r\n\t\t\t\t\t<th class=\"th" +
                           "_main\">Count</th>\r\n\t\t\t\t</tr>\r\n\t\t\t\t");

            #line 157 "\\psf\Home\Desktop\TestMVC4App\Profile-System-Testing\TestMVC4ConsoleApp\Templates\SummaryReport.tt"
                if (SharedDataObject.CountIdentifiedDataBehaviorByTestName.ContainsKey(testName))
                {
                    foreach (KeyValuePair <EnumIdentifiedDataBehavior, int> countPerIdentifiedDataBehavior in SharedDataObject.CountIdentifiedDataBehaviorByTestName[testName])
                    {
                        if (countPerIdentifiedDataBehavior.Value > 0)
                        {
            #line default
            #line hidden
                            this.Write("\t\t\t\t<tr>\r\n\t\t\t\t\t<td class=\"td_main\">");

            #line 161 "\\psf\Home\Desktop\TestMVC4App\Profile-System-Testing\TestMVC4ConsoleApp\Templates\SummaryReport.tt"
                            this.Write(this.ToStringHelper.ToStringWithCulture(LogManager.IdentifiedBehaviorsDescriptions[countPerIdentifiedDataBehavior.Key]));

            #line default
            #line hidden
                            this.Write("</td>\r\n\t\t\t\t\t<td class=\"td_main\">");

            #line 162 "\\psf\Home\Desktop\TestMVC4App\Profile-System-Testing\TestMVC4ConsoleApp\Templates\SummaryReport.tt"
                            this.Write(this.ToStringHelper.ToStringWithCulture(String.Format("{0:0,0}", countPerIdentifiedDataBehavior.Value)));

            #line default
            #line hidden
                            this.Write("</td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t");

            #line 164 "\\psf\Home\Desktop\TestMVC4App\Profile-System-Testing\TestMVC4ConsoleApp\Templates\SummaryReport.tt"
                        }
                    }
                }

            #line default
            #line hidden
                this.Write("\t\t\t</table>\r\n\t\t</td>\r\n\t\t<td class=\"td_main\">\r\n\t\t\t");

            #line 168 "\\psf\Home\Desktop\TestMVC4App\Profile-System-Testing\TestMVC4ConsoleApp\Templates\SummaryReport.tt"
                if (SharedDataObject.SampleDataByTestName.ContainsKey(testName))
                {
            #line default
            #line hidden
                    this.Write("\t\t\t");

            #line 169 "\\psf\Home\Desktop\TestMVC4App\Profile-System-Testing\TestMVC4ConsoleApp\Templates\SummaryReport.tt"
                    this.Write(this.ToStringHelper.ToStringWithCulture(SharedDataObject.SampleDataByTestName[testName]));

            #line default
            #line hidden
                    this.Write("\r\n\t\t\t");

            #line 170 "\\psf\Home\Desktop\TestMVC4App\Profile-System-Testing\TestMVC4ConsoleApp\Templates\SummaryReport.tt"
                }

            #line default
            #line hidden
                this.Write("\t\t</td>\r\n\t\t<td class=\"td_main\">\r\n\t\t");

            #line 173 "\\psf\Home\Desktop\TestMVC4App\Profile-System-Testing\TestMVC4ConsoleApp\Templates\SummaryReport.tt"
                if (SharedDataObject.AverageDurationByTestName.ContainsKey(testName))
                {
            #line default
            #line hidden
                    this.Write("\t\t\t");

            #line 174 "\\psf\Home\Desktop\TestMVC4App\Profile-System-Testing\TestMVC4ConsoleApp\Templates\SummaryReport.tt"
                    this.Write(this.ToStringHelper.ToStringWithCulture(SharedDataObject.AverageDurationByTestName[testName].ToString("hh'h: 'mm'mn:'ss's:'FFFFFFF")));

            #line default
            #line hidden
                    this.Write("\r\n\t\t\t");

            #line 175 "\\psf\Home\Desktop\TestMVC4App\Profile-System-Testing\TestMVC4ConsoleApp\Templates\SummaryReport.tt"
                }

            #line default
            #line hidden
                this.Write("\t\t</td>\r\n\t\t<td class=\"td_main\">\r\n\t\t\t<a href=\"");

            #line 178 "\\psf\Home\Desktop\TestMVC4App\Profile-System-Testing\TestMVC4ConsoleApp\Templates\SummaryReport.tt"
                this.Write(this.ToStringHelper.ToStringWithCulture(testName));

            #line default
            #line hidden

            #line 178 "\\psf\Home\Desktop\TestMVC4App\Profile-System-Testing\TestMVC4ConsoleApp\Templates\SummaryReport.tt"
                this.Write(this.ToStringHelper.ToStringWithCulture(SharedDataObject.LinkEnd2TestNameFile));

            #line default
            #line hidden
                this.Write("\">Test Details</a>\r\n\t\t</td>\r\n\t</tr>\r\n\t");

            #line 181 "\\psf\Home\Desktop\TestMVC4App\Profile-System-Testing\TestMVC4ConsoleApp\Templates\SummaryReport.tt"
            }

            #line default
            #line hidden
            this.Write("\t</table>\r\n</body>\r\n</html>\r\n");
            return(this.GenerationEnvironment.ToString());
        }