fix(接口测试): 修复未执行的场景通过率显示NaN的缺陷
--bug=1028834 --user=王孝刚 【接口测试】场景含脚本-导致场景未执行-通过率显示NaN https://www.tapd.cn/55049933/s/1404654
This commit is contained in:
parent
eac007c3e4
commit
0d935c0bfe
|
@ -19,6 +19,7 @@ public class ResultVO {
|
||||||
}
|
}
|
||||||
|
|
||||||
public String computerPassRate() {
|
public String computerPassRate() {
|
||||||
|
if (this.scenarioTotal == 0) return null;
|
||||||
return new DecimalFormat("0%").format((float) this.scenarioSuccess / this.scenarioTotal);
|
return new DecimalFormat("0%").format((float) this.scenarioSuccess / this.scenarioTotal);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue