1 package okw.log.log2html;
7 protected Integer ErrorCount = 0;
8 protected Integer ExceptionCount = 0;
9 protected Integer WarningCount = 0;
10 protected Integer PassedCount = 0;
11 protected Integer PrintCount = 0;
24 protected Boolean bWarning =
false;
26 protected void setWarning()
35 myParent.setWarning();
40 protected Boolean getWarning()
46 protected Boolean bException =
false;
48 protected void setException()
57 myParent.setException();
63 protected Boolean getException()
69 protected Boolean bError =
false;
71 protected void setError()
85 protected Boolean getError()
107 protected void ErrorCount()
112 if ( myParent !=
null )
114 myParent.ErrorCount();
119 protected void ExceptionCount()
122 this.bException =
true;
124 if ( myParent !=
null )
126 myParent.ExceptionCount();
131 protected void WarningCount()
134 this.bWarning =
true;
136 if ( myParent !=
null )
138 myParent.WarningCount();
143 protected void PassedCount()
147 if ( myParent !=
null )
149 myParent.PassedCount();
154 protected void PrintCount()
158 if ( myParent !=
null )
160 myParent.PrintCount();
165 protected void TestcaseCount()
170 protected void TestcaseFail()
175 protected void TestcasePass()
180 protected void FunctionCount()
185 protected void FunctionFail()
190 protected void FunctionPass()
195 protected void KeyWordCount()
200 protected void KeyWordFail()
205 protected void KeyWordPass()
210 protected void SequenceCount()
215 protected void SequenceFail()
220 protected void SequencePass()
226 protected void StepCount()
231 protected void StepFail()
236 protected void StepPass()
242 protected void LocalACCallCount()
247 protected void LocalACCallFail()
252 protected void LocalACCallPass()
258 protected void RemoteACCallCount()
263 protected void RemoteACCallFail()
268 protected void RemoteACCallPass()
273 protected String getJSONStatistics()
275 StringBuilder myJSON =
new StringBuilder();
278 myJSON.append( this.jsonElement(
"ErrorCount", this.ErrorCount ) );
279 myJSON.append( this.jsonElement(
"ExceptionCount", this.ExceptionCount ) );
280 myJSON.append( this.jsonElement(
"WarningCount", this.WarningCount ) );
281 myJSON.append( this.jsonElement(
"PassedCount", this.PassedCount ) );
282 myJSON.append( this.jsonElement(
"PrintCount", this.PrintCount ) );
284 return myJSON.toString();
288 protected String getJSONResult()
291 StringBuilder myJSON =
new StringBuilder();
294 myJSON.append( this.jsonArray(
"statistics", this.getJSONStatistics() ) );
298 if (
"false".equals( okw.OKW_Properties.getInstance().getProperty(
"Log2HTML.Test",
"false" ) ) )
300 myJSON.append( this.jsonElement(
"Start time", this.myDuration.getStartTime() ) );
301 myJSON.append( this.jsonElement(
"End time", this.myDuration.getEndTime() ) );
302 myJSON.append( this.jsonElement(
"duration", this.myDuration.getSeconds(
"#0.000") ) );
306 myJSON.append( this.jsonElement(
"Start time",
"Start time TestMode" ) );
307 myJSON.append( this.jsonElement(
"End time",
"End time TestMode" ) );
308 myJSON.append( this.jsonElement(
"duration",
"Duration TestMode" ) );
314 for(
LogBase myLog: this.myLogs )
318 myJSON.append( this.jsonArrayElement( myLog.getJSONResult() ) );
321 return myJSON.toString();