Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]接口转性能测试,全局断言影响结果 #30679

Open
legend818 opened this issue May 7, 2024 · 1 comment
Open

[BUG]接口转性能测试,全局断言影响结果 #30679

legend818 opened this issue May 7, 2024 · 1 comment

Comments

@legend818
Copy link

联系方式

No response

MeterSphere 版本

v2.10.13-lts-163a8232

使用外置数据库

问题描述

[BUG]接口转性能测试,全局断言影响结果

重现步骤

1、接口测试case使用全局断言
2、转性能测试case
3、执行性能测试事务全失败(之前有个开发让上传一个jar包)

期待的正确结果

优化,减少这个全局断言影响

相关日志输出

No response

附加信息

import org.json.*;

//获取上一个请求的返回
String jsonString = prev.getResponseDataAsString();
JSONObject responseJson = new JSONObject(jsonString);

String fbpcontent = responseJson.getString("message");

value = fbpcontent;
//result = value.contains("成功");
result = value.contains("成功")||value.contains("已下发")||value.contains("已修改")||value.contains("新的事件待审批")||value.contains("已提交")||value.contains("运行或稽查部门无查看权限")||value.contains("一条工单只能延期一次")||value.contains("终止任务失败")||value.contains("已全部")||value.contains("审核完成");
if (!result){

msg = "assertion [" + value + " contains '成功']: false;";
AssertionResult.setFailureMessage(msg);
AssertionResult.setFailure(true);

// else if
}

@github-actions github-actions bot added the 状态:待处理 已分配给相关处理人等待处理人处理并更新状态 label May 7, 2024
@13290445582
Copy link

您好,上传jar包是无法解决此问题了吗?可以提供下您的jmx文件吗。

@github-actions github-actions bot added 状态:待用户反馈 and removed 状态:待处理 已分配给相关处理人等待处理人处理并更新状态 labels May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants