当前位置:   article > 正文

jmeter进行运算逻辑计算_jmeter 金额运算计算

jmeter 金额运算计算

Bellshell 前置变量 :

在这里插入图片描述

在这里插入图片描述

// 提取变量并转换为int类型,real_amount_1为数据库提取字段
int amount=Integer.parseInt(vars.get("real_amount_1")); 
//提取变量并转换为int类型,discount为设置的用户参数
int discount= Integer.parseInt(vars.get("discount"));
// 进行运算逻辑计算
int discountedAmount=amount-discount;
System.out.println("实际支付金额是is:"+amount); 
System.out.println("优惠金额is:"+discount); 
System.out.println("11是is:"+discountedAmount)
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/爱喝兽奶帝天荒/article/detail/830119
推荐阅读
相关标签
  

闽ICP备14008679号