Example #1
0
 public TCReport(TestCase tc) {
   this.testGUID = tc.getTestGUID();
   if (tc.getImages() != null)
     for (String img : tc.getImages()) {
       this.images = (this.images != null ? this.images + "," : "") + prefix + img;
     }
   this.qtName = (tc.getQtName() == null ? tc.getTestGUID() : tc.getQtName());
   this.exceptionImage = (tc.getExceptionImage() != null ? prefix + tc.getExceptionImage() : null);
   this.fullLog = (tc.getFullLog() != null ? prefix + tc.getFullLog() : null);
   this.shortLog = (tc.getShortLog() != null ? prefix + tc.getShortLog() : null);
   this.cookies = (tc.getCookies() != null ? prefix + tc.getCookies() : null);
   this.testStatus = STATUS.valueOf(tc.getTestStatus().toString());
   if (tc.getStopped() != null && tc.getStarted() != null) {
     this.duration = tc.getStopped().getTime() - tc.getStarted().getTime();
   }
 }