feat(测试跟踪): 测试计划报告表格通过率保留两位小数
This commit is contained in:
parent
4f7d1af0f8
commit
7000e965e0
|
@ -1758,7 +1758,7 @@ public class TestPlanService {
|
||||||
if (report.getExecuteCount() != 0 && report.getCaseCount() != null) {
|
if (report.getExecuteCount() != 0 && report.getCaseCount() != null) {
|
||||||
double executeRate = Double.parseDouble(rateFormat.format((double) report.getExecuteCount() / (double) report.getCaseCount()));
|
double executeRate = Double.parseDouble(rateFormat.format((double) report.getExecuteCount() / (double) report.getCaseCount()));
|
||||||
if (executeRate == 1 && report.getExecuteCount() < report.getCaseCount()) {
|
if (executeRate == 1 && report.getExecuteCount() < report.getCaseCount()) {
|
||||||
report.setExecuteRate(0.99);
|
report.setExecuteRate(0.9999);
|
||||||
} else {
|
} else {
|
||||||
report.setExecuteRate(executeRate);
|
report.setExecuteRate(executeRate);
|
||||||
}
|
}
|
||||||
|
@ -1768,7 +1768,7 @@ public class TestPlanService {
|
||||||
if (report.getPassCount() != 0 && report.getCaseCount() != null) {
|
if (report.getPassCount() != 0 && report.getCaseCount() != null) {
|
||||||
double passRate = Double.parseDouble(rateFormat.format((double) report.getPassCount() / (double) report.getCaseCount()));
|
double passRate = Double.parseDouble(rateFormat.format((double) report.getPassCount() / (double) report.getCaseCount()));
|
||||||
if (passRate == 1 && report.getPassCount() < report.getCaseCount()) {
|
if (passRate == 1 && report.getPassCount() < report.getCaseCount()) {
|
||||||
report.setPassRate(0.99);
|
report.setPassRate(0.9999);
|
||||||
} else {
|
} else {
|
||||||
report.setPassRate(passRate);
|
report.setPassRate(passRate);
|
||||||
}
|
}
|
||||||
|
|
|
@ -143,7 +143,7 @@
|
||||||
<template v-slot:default="scope">
|
<template v-slot:default="scope">
|
||||||
<span v-if="scope.row.status === 'RUNNING' || scope.row.status === 'Running'"> - </span>
|
<span v-if="scope.row.status === 'RUNNING' || scope.row.status === 'Running'"> - </span>
|
||||||
<span v-else> {{
|
<span v-else> {{
|
||||||
(scope.row.passRate ? (scope.row.passRate * 100).toFixed(1) : 0) + "%"
|
(scope.row.passRate ? (scope.row.passRate * 100).toFixed(2) : 0) + "%"
|
||||||
}}</span>
|
}}</span>
|
||||||
</template>
|
</template>
|
||||||
</ms-table-column>
|
</ms-table-column>
|
||||||
|
|
Loading…
Reference in New Issue