test/test-automation/style.xsl
changeset 5748 91a7152856f3
parent 5739 be70f1dfd7aa
child 5755 35d4ae5dea90
equal deleted inserted replaced
5747:cba233c8f7fa 5748:91a7152856f3
   100 	/* Initially everything is hidden */
   100 	/* Initially everything is hidden */
   101 	$("div.tests").hide();
   101 	$("div.tests").hide();
   102 	$("div.asserts").hide();
   102 	$("div.asserts").hide();
   103 	
   103 	
   104 	/* Color the tests based on the result */
   104 	/* Color the tests based on the result */
   105 	$("div.test[result='passed']").addClass('passed');
   105 	$("span.testResult[result='passed']").addClass('passed');
   106 	$("div.test[result='failed']").addClass('failed');
   106 	$("span.testResult[result='failed']").addClass('failed');
   107 	
   107 	
   108 	/* Color the asserts based on the result */
   108 	/* Color the asserts based on the result */
   109 	$("div.assert[result='pass']").addClass('passed');
   109 	$("span.assertResult[result='pass']").addClass('passed');
   110 	$("div.assert[result='failure']").addClass('failed');
   110 	$("span.assertResult[result='failure']").addClass('failed');
   111 });
   111 });
   112 
   112 
   113 </script>
   113 </script>
   114 <style>
   114 <style>
   115 
   115 
   116 div, h1 {
   116 div, h1 {
   117   padding: 3px 10px 2px 10px;
   117   padding: 2px 10px 2px 10px;
   118   margin: 5px 0px 5px 0px;
   118   margin: 5px 0px 5px 0px;
       
   119 }
       
   120 
       
   121 .assert {
       
   122   padding: 0px 10px 0px 10px;
       
   123   margin: 0px 0px 0px 0px;
   119 }
   124 }
   120 
   125 
   121 .document {
   126 .document {
   122   font-family: Arial;
   127   font-family: Arial;
   123   font-size: 11pt;
   128   font-size: 11pt;
   137   font-weight: bold;
   142   font-weight: bold;
   138 }
   143 }
   139 	
   144 	
   140 .switch {
   145 .switch {
   141   font-style: italic;
   146   font-style: italic;
   142   color: rgb(10, 10, 200); /*#024A68;*/
   147   color: rgb(10, 10, 200); 
   143   font-size: 10pt;
   148   font-size: 10pt;
   144   cursor: pointer;
   149   cursor: pointer;
   145 }	
   150 }	
   146 	
   151 	
   147 .passed {
   152 .passed {
   148  background-color: #64AA2B;
   153  color: green;
   149 }
   154 }
   150 
   155 
   151 .failed {
   156 .failed {
   152  background-color: #FF6E40;
   157  color: red;
   153 }
   158 }
   154 
   159 
   155 </style>
   160 </style>
   156 
   161 
   157 </head>
   162 </head>
   191 		Total runtime: <xsl:value-of select="totalRuntime"/> seconds. <br/>
   196 		Total runtime: <xsl:value-of select="totalRuntime"/> seconds. <br/>
   192 		<span class="show-tests switch" uid="{generate-id(test)}">[Show tests]</span>
   197 		<span class="show-tests switch" uid="{generate-id(test)}">[Show tests]</span>
   193         <div class="tests" uid="{generate-id(test)}">
   198         <div class="tests" uid="{generate-id(test)}">
   194 	      <xsl:for-each select="test">
   199 	      <xsl:for-each select="test">
   195 			<div class="test">
   200 			<div class="test">
       
   201 			Test <span class="title"><xsl:value-of select="name"/>: </span>
       
   202 			<span class="testResult">
   196 			  <xsl:attribute name="result">
   203 			  <xsl:attribute name="result">
   197 			    <xsl:value-of select="result"/>
   204 			    <xsl:value-of select="result"/> 
   198 	          </xsl:attribute>
   205 	           </xsl:attribute><xsl:value-of select="result"/> 
   199 		      
   206 	        </span> 
   200 		      Name:  <xsl:value-of select="name"/> (<xsl:value-of select="startTime"/>  - <xsl:value-of select="endTime"/>  ) <br/>
   207 			(Total runtime: <xsl:value-of select="totalRuntime"/> seconds)<br/>
   201 		      Description: <span class="description"> <xsl:value-of select="description"/> </span><br/> 
   208 			Description: <span class="description"> <xsl:value-of select="description"/> </span><br/>
   202 		
       
   203 	          Total runtime: <xsl:value-of select="totalRuntime"/> seconds  <br/>
       
   204 		      Result: <xsl:value-of select="result"/>  <br/>
       
   205 		      
       
   206 		      <span class="switch show-asserts" uid="{generate-id(assertSummary)}">[Show Assert Summary]</span><br/>
   209 		      <span class="switch show-asserts" uid="{generate-id(assertSummary)}">[Show Assert Summary]</span><br/>
   207 			  <div class="asserts" uid="{generate-id(assertSummary)}">
   210 			  <div class="asserts" uid="{generate-id(assertSummary)}">
   208 		        <xsl:for-each select="assert"> 
   211 		        <xsl:for-each select="assert"> 
   209 			      <div class="assert">
   212 			      <div class="assert">
   210   			        <xsl:attribute name="result">
   213 					<xsl:value-of select="name"/>: 
   211 				      <xsl:value-of select="result"/>
   214 					<span class="assertResult">
   212 				    </xsl:attribute>
   215 						<xsl:attribute name="result">
   213 		            Assert name: <xsl:value-of select="name"/> <br/>
   216 					      <xsl:value-of select="result"/>
   214 		            Result: <xsl:value-of select="result"/> <br/>
   217 					    </xsl:attribute>
   215 		            Message <xsl:value-of select="message"/> <br/>
   218 					  <xsl:value-of select="result"/>  
   216 		            Time <xsl:value-of select="time"/> <br/>
   219 					</span>.
       
   220 					 Message: <span class="description"><xsl:value-of select="message"/></span>
   217 		          </div>
   221 		          </div>
   218 		        </xsl:for-each>
   222 		        </xsl:for-each>
   219 		        AssertSummary:
   223 				Asserts in total: <xsl:value-of select="assertSummary/assertCount"/> (passed: <xsl:value-of select="assertSummary/assertsPassed"/>, failed: <xsl:value-of select="assertSummary/assertsFailed"/>)
   220 		        Assert count: <xsl:value-of select="assertSummary/assertCount"/> <br/>
       
   221 		        Asserts Passed <xsl:value-of select="assertSummary/assertsPassed"/> <br/>
       
   222 		        Asserts Failed <xsl:value-of select="assertSummary/assertsFailed"/> <br/>
       
   223 		      </div>
   224 		      </div>
   224     		</div>
   225     		</div>
   225 		  </xsl:for-each>
   226 		  </xsl:for-each>
   226 	    </div>
   227 	    </div>
   227 	</div>
   228 	</div>