Skip to content

Commit

Permalink
added search to test run page + product display on test run page.
Browse files Browse the repository at this point in the history
  • Loading branch information
gitorko committed Feb 17, 2016
1 parent 5de721f commit d836121
Show file tree
Hide file tree
Showing 7 changed files with 133 additions and 108 deletions.
4 changes: 4 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
</properties>
<name>excord</name>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>springloaded</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ public String reportExecution(Model model) {
@RequestMapping(value = "/testplan_metric", method = RequestMethod.GET)
public String testplanMetric(Model model, @RequestParam(value = "testplanId", required = true) Long testplanId) {
List<Object[]> metricLst = tpDao.findByPriorityByTester(testplanId);
List<Object[]> tmLst = tpDao.findProductMetricsByTestplanId(testplanId);
List<TestPlanMetricVo> testPlanMetricLst = BizUtil.INSTANCE.flattenTestPlanMetricsByProduct(tmLst);
List<Object[]> tmLst = tpDao.findMetricsByTestplanId(testplanId);
List<TestPlanMetricVo> testPlanMetricLst = BizUtil.INSTANCE.flattenTestPlanMetricsByFolder(tmLst);
model.addAttribute("testPlanMetricLst", testPlanMetricLst);
model.addAttribute("metricLst", metricLst);
return "testplan_metric";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ public String viewTestPlan(Model model, HttpSession session, @RequestParam(value
FlashMsgUtil.INSTANCE.checkFlashMsg(session, model);
EcTestplan testPlan = tpDao.findOne(testplanId);
List<EcTestplanTestcaseMapping> tptcLst = tptcDao.findByTestplanId(testPlan);
List<Object[]> tmLst = tpDao.findMetricsByTestplanId(testplanId);
List<TestPlanMetricVo> testPlanMetricLst = BizUtil.INSTANCE.flattenTestPlanMetricsByFolder(tmLst);
List<Object[]> tmLst = tpDao.findProductMetricsByTestplanId(testplanId);
List<TestPlanMetricVo> testPlanMetricLst = BizUtil.INSTANCE.flattenTestPlanMetricsByProduct(tmLst);
Integer totalPassCount = 0;
Integer totalCount = 0;
Integer totalNotRunCount = 0;
Expand Down
4 changes: 4 additions & 0 deletions src/main/resources/public/js/custom/testplan_run.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
$(document).ready(function () {

$('#testplanrun-ele').DataTable({
"bPaginate": false
});

$("#checkAll").click(function (event) {
$('input:checkbox').not(this).prop('checked', this.checked);
});
Expand Down
75 changes: 40 additions & 35 deletions src/main/resources/templates/testplan_metric.ftl.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,50 @@
</div>
</div>
<br/><br/>

<div class="row">
<div class="col-md-12">
<table id="testmetric-ele" class="table table-striped table-bordered" width="100%" cellspacing="0">
<thead>
<tr>
<th colspan="4">Detailed Breakup</th>
</tr>
<tr>
<th>Priority</th>
<th>Tester</th>
<th>Status</th>
<th>Count</th>
</tr>
</thead>
<tbody>
<#list metricLst as metric>
<tr>
<#list metric as m>
<td>
<#if m??>
${m}
<#else>
-
</#if>
</td>
</#list>
</tr>

</#list>
</tbody>
</table>
</div>
</div>

<div class="row">
<div class="col-md-12">
<table class="table table-striped table-bordered" width="100%" cellspacing="0">
<thead>
<tr>
<th colspan="9">Progress Report By Product</th>
<th colspan="9">Progress Report</th>
</tr>
<tr>
<th>Product</th>
<th>Test Case Node</th>
<th>PASSED</th>
<th>FAILED</th>
<th>BLOCKED</th>
Expand All @@ -38,7 +73,7 @@
<tbody>
<#list testPlanMetricLst as tpm>
<tr>
<td>${tpm.product}</td>
<td><a href="/testcase?nodeId=${tpm.folderId?c}">${tpm.folderName}</a></td>
<td>${tpm.passCount}</td>
<td>${tpm.failCount}</td>
<td>${tpm.blockedCount}</td>
Expand All @@ -47,45 +82,15 @@
<td>${tpm.total}</td>
<td>${tpm.passRate}%</td>
<td>${tpm.progressRate}%</td>

</tr>
</#list>
</tbody>
</table>
</div>
</div>
<div class="row">
<div class="col-md-12">
<table id="testmetric-ele" class="table table-striped table-bordered" width="100%" cellspacing="0">
<thead>
<tr>
<th colspan="4">Detailed Breakup</th>
</tr>
<tr>
<th>Priority</th>
<th>Tester</th>
<th>Status</th>
<th>Count</th>
</tr>
</thead>
<tbody>
<#list metricLst as metric>
<tr>
<#list metric as m>
<td>
<#if m??>
${m}
<#else>
-
</#if>
</td>
</#list>
</tr>

</#list>
</tbody>
</table>
</div>
</div>

<div class="row">
<div class="col-md-12 text-center">
<button type="button" name="action" id="back" value="back" class="btn btn-info" onclick="history.back()">Back</button>
Expand Down
140 changes: 77 additions & 63 deletions src/main/resources/templates/testplan_run.ftl.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ <h3>Run Test Plan</h3>
<th>Test Id</th>
<th>Test Folder</th>
<th>Test Name</th>
<th>Product</th>
<th>Assigned</th>
<th>Priority</th>
<th>Comments</th>
Expand All @@ -60,69 +61,82 @@ <h3>Run Test Plan</h3>
<th>Status</th>
</tr>
</thead>
<tbody>
<#if testCaseLst??>
<#list testCaseLst as tc>
<tr>
<td class="no-sort">
<input type="checkbox" name="testcaseChk" value="${tc.id?c}"/>
</td>
<td style="white-space: nowrap">
<a href="#" class="teststepShow" id="${tc.id?c}">${tc.id?c} &nbsp;<i class="fa fa-sort-desc"></i></a>
</td>
<td>
<a href="/testcase?nodeId=${tc.folderId.id?c}">
${tc.folderId.name}
</a>
</td>
<td style="word-break:break-all;"><a href="/testcase_edit?testcaseId=${tc.id?c}">${tc.name}</a></td>
<td>
<#list tptcLst as tptc>
<#if tptc.testcaseId.id?c == tc.id?c>
<#if tptc.assignedTo??>
${tptc.assignedTo}
</#if>
</#if>
</#list>
</td>
<td>
<#if tc.priority??>
${tc.priority}
</#if>
</td>
<td><input type="text" name="tcomments_${tc.id?c}" size="55" value="<#if trMap[tc.id?c]??>${trMap[tc.id?c].note}</#if>"/></td>
<td><input type="text" name="tbug_${tc.id?c}" size="10" value="<#if trMap[tc.id?c]??>${trMap[tc.id?c].bugTicket}</#if>"/></td>
<td><#if trMap[tc.id?c]??>${trMap[tc.id?c].environment}</#if></td>
<td>
<#if trMap[tc.id?c]??>${trMap[tc.id?c].timestamp}</#if>
</td>
<td><#if trMap[tc.id?c]??>${trMap[tc.id?c].tester}</#if></td>
<td>
<#if trMap[tc.id?c]??>
<#switch trMap[tc.id?c].status>
<#case "PASSED">
<span class="label label-success"><#if trMap[tc.id?c]??>${trMap[tc.id?c].status}</#if></span>
<#break>
<#case "FAILED">
<span class="label label-danger"><#if trMap[tc.id?c]??>${trMap[tc.id?c].status}</#if></span>
<#break>
<#case "NOT_RUN">
<span class="label label-warning"><#if trMap[tc.id?c]??>${trMap[tc.id?c].status}</#if></span>
<#break>
<#default>
<span class="label label-primary"><#if trMap[tc.id?c]??>${trMap[tc.id?c].status}</#if></span>
</#switch>
</#if>
</td>
</tr>
<tr>
<td colspan="12" class="no-sort">
<div id="tcstep_${tc.id?c}"></div>
</td>
</tr>
</#list>
</#if>
</tbody>

<#if testCaseLst??>
<#list testCaseLst as tc>
<tr>
<td class="no-sort">
<input type="checkbox" name="testcaseChk" value="${tc.id?c}"/>
</td>
<td style="white-space: nowrap">
<a href="#" class="teststepShow" id="${tc.id?c}">${tc.id?c} &nbsp;<i class="fa fa-sort-desc"></i></a>
</td>
<td>
<a href="/testcase?nodeId=${tc.folderId.id?c}">
${tc.folderId.name}
</a>
</td>
<td style="word-break:break-all;"><a href="/testcase_edit?testcaseId=${tc.id?c}">${tc.name}</a></td>
<td>${tc.product}</td>
<td>
<#list tptcLst as tptc>
<#if tptc.testcaseId.id?c == tc.id?c>
<#if tptc.assignedTo??>
${tptc.assignedTo}
</#if>
</#if>
</#list>
</td>
<td>
<#if tc.priority??>
${tc.priority}
</#if>
</td>
<td><input type="text" name="tcomments_${tc.id?c}" size="55" value="<#if trMap[tc.id?c]??>${trMap[tc.id?c].note}</#if>"/></td>
<td><input type="text" name="tbug_${tc.id?c}" size="10" value="<#if trMap[tc.id?c]??>${trMap[tc.id?c].bugTicket}</#if>"/></td>
<td><#if trMap[tc.id?c]??>${trMap[tc.id?c].environment}</#if></td>
<td>
<#if trMap[tc.id?c]??>${trMap[tc.id?c].timestamp}</#if>
</td>
<td><#if trMap[tc.id?c]??>${trMap[tc.id?c].tester}</#if></td>
<td>
<#if trMap[tc.id?c]??>
<#switch trMap[tc.id?c].status>
<#case "PASSED">
<span class="label label-success"><#if trMap[tc.id?c]??>${trMap[tc.id?c].status}</#if></span>
<#break>
<#case "FAILED">
<span class="label label-danger"><#if trMap[tc.id?c]??>${trMap[tc.id?c].status}</#if></span>
<#break>
<#case "NOT_RUN">
<span class="label label-warning"><#if trMap[tc.id?c]??>${trMap[tc.id?c].status}</#if></span>
<#break>
<#default>
<span class="label label-primary"><#if trMap[tc.id?c]??>${trMap[tc.id?c].status}</#if></span>
</#switch>
</#if>
</td>
</tr>
<tr>
<td colspan="13">
<div id="tcstep_${tc.id?c}"></div>
</td>
<td style="display: none;"></td>
<td style="display: none;"></td>
<td style="display: none;"></td>
<td style="display: none;"></td>
<td style="display: none;"></td>
<td style="display: none;"></td>
<td style="display: none;"></td>
<td style="display: none;"></td>
<td style="display: none;"></td>
<td style="display: none;"></td>
<td style="display: none;"></td>
<td style="display: none;"></td>
</tr>
</#list>
</#if>

</table>
</div>
</div>
Expand Down
10 changes: 4 additions & 6 deletions src/main/resources/templates/testplan_view.ftl.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,15 @@ <h3>Test Plan View</h3>
<div id="linechartContainer" style="min-width: 310px; height: 400px; max-width: 600px; margin: 0 auto"></div>
</div>
</div>

<div class="row">
<div class="col-md-12">
<table class="table table-striped table-bordered" width="100%" cellspacing="0">
<thead>
<tr>
<th colspan="9">Progress Report</th>
<th colspan="9">Progress Report By Product</th>
</tr>
<tr>
<th>Test Case Node</th>
<th>Product</th>
<th>PASSED</th>
<th>FAILED</th>
<th>BLOCKED</th>
Expand All @@ -112,7 +111,7 @@ <h3>Test Plan View</h3>
<tbody>
<#list testPlanMetricLst as tpm>
<tr>
<td><a href="/testcase?nodeId=${tpm.folderId?c}">${tpm.folderName}</a></td>
<td>${tpm.product}</td>
<td>${tpm.passCount}</td>
<td>${tpm.failCount}</td>
<td>${tpm.blockedCount}</td>
Expand All @@ -121,14 +120,13 @@ <h3>Test Plan View</h3>
<td>${tpm.total}</td>
<td>${tpm.passRate}%</td>
<td>${tpm.progressRate}%</td>

</tr>
</#list>

</tbody>
</table>
</div>
</div>

<#if testPlan.enabled?c == 'true'>
<div class="row">
<div class="col-md-1">
Expand Down

0 comments on commit d836121

Please sign in to comment.