我想在测试步骤中使用减法功能。 下面是我想使用减法的代码
<Payment>
<Paymentmethod PartialAmount="${TestStep1#Response#//Node1/Price}">
</Payment>
在上面的代码中,我想从Property中减去一个值。例如,属性值代码是$ {TC-property#cash}
我怎样才能做到这一点。
答案 0 :(得分:0)
您应该能够使用简单的Groovy单行脚本:
<Payment>
<Paymentmethod PartialAmount="${= Double.parseDouble('${TC-property#cash}') - 10.0 }">
</Payment>