问题标签 [gatling]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
scala - Getting the String out of a Gatling expression
I want to write a function to format Vaadin messages. These messages have the format
The first number is the length then there some kind of session id (later called vaadin_security_key) followed by the payload. (In this example I set the value "Agent00232" to the textfield with the connector id "0_11_12_13_login_username") I wrote a function like this:
I'd like to use this method like this and use EL expressions in the string:
Therefore I have to evaluate the String before calculating the length. The method ELCompiler.compile()... returns a Expression[String]. The problem is that I need this string and concat it with the calculated length. When I do message2.toString it returns
Success(0ff1255e-e2be-4e7b-ac5c-1ff2709ce886[["0_11_12_13_login_username","v","v",["text",["s","Agent00232"]]]])
and therefor I have to use substring(8, message2.length - 2) to get the evaluated payload (with the security key) to calculate the length of it.
Is there a better (more elegant) way to extract the String out of the expression then the use of substring(...)
?
gatling - 根据先前的响应以编程方式获取资源
我需要在 REST Web 服务上生成负载测试。它的一个端点以客户端需要发布一些数据的方式工作,然后它启动一些后台任务并返回一组需要并行查询以获取后台任务的最终结果的动态资源 URL。我想出了这样的事情:
一个明显的问题是内部的请求.resource
需要是动态的,并且返回的资源数量也可能根据配置/输入参数而变化。
如果加特林有一个.resources(session => {..})
变种会相对容易,但不幸的是它没有。还有另一种方法来实现这种并行资源请求吗?
scala - Gatling 2.0:将 CSV 文件解析为 POST 方法
我已阅读以下有关 csv 解析的文档。 http://gatling.io/docs/2.0.1/session/feeder.html#feeder
我仍然无法捕获以下实现:
- 如何在 Scala 中创建变量,表示 csv 文件中的每一列?
- 如果我有 2 个用户依次运行,Gatling 如何为这两个用户解析 CSV 文件?它会在第一个值被解析后自动查找下一个值吗?
我想要达到的目标:
- Gatling 读取包含 SIM 序列号和原因详细信息的 CSV 文件,由变量“SimSerial”和“ReasonID”表示
CSV 文件的值被插入到下面代码所示的参数中
/li>
performance - 使用 Gatling 发送的请求数量不相等
我的意图是让 2000 个虚拟用户同时使用两个不同的 url 访问一个 API,结果是第一个 url 完成了所有请求,第二个 url 只完成了 168。我做错了什么导致第二个 url 只发布部分结果;
gatling - Gatling 2.0:报告中的结果在“组”方法中不准确
我注意到我的模拟结果似乎没有总结出来。我相应地使用“.group”方法对请求进行了分组,因此更容易分析虚拟用户执行的每个操作的结果。注意到响应时间 (ms) 应显示以下结果:
- 'Min' = 10ms 而不是 4112ms
- 'Max' = 666ms 而不是 4112ms
- '95th pct' = 95% 的请求所用时间不超过 75 毫秒。因此应该显示75ms?
请在此处找到图片:http: //s23.postimg.org/wc0kqhrmj/Reports.png
scala - 有 Gatling2 REPL 控制台吗?
我想为 Gatling 使用 scala REPL 控制台来调试一些代码并对其进行评估。有什么简单的方法可以做到这一点吗?有没有一种快速的方法来对 Gatling 脚本进行语法检查?
gatling - gatling 会实际执行操作还是仅检查 url 的响应时间?
我对将回答调查的应用程序进行了加特林测试,在回答此调查后,该应用程序将识别可能构成风险的可能答案并创建我们所谓的风险区域。这些风险区域通常在调查回答完成后立即在后台创建。我的问题是我有一个 gatling 测试,有十个用户将去回答调查并注销,我使用记录器记录测试;现在这十个用户完成后,我看不到应用程序中创建了任何风险区域。我是否遗漏了什么——是否应该由 gatling 用户(就像在 selenium 中所做的那样)真正回答调查,还是只是 gatling 测试将触及的网址?
我是加特林新手,请帮忙。
load-testing - websocket 的问题:在设置新的时候检查没有成功
我正在使用 gatling 运行性能测试。Gatling 对于 API 调用的扩展性非常好,但我在 websockets 上发现了一致的异常。我不确定这是服务器端问题还是客户端问题。Ia ms 结束 websocket 心跳并使用check()等待来自服务器的回复 。代码如下:
问题出现在检查阶段。我运行了一个小时左右的测试,但是在设置新的错误时,一些“用户”放弃了Check 并没有成功。
csv - gatling 和 csv(从 csv 获取数据)
我正在努力创建一个可以从 csv 获取数据的加特林测试。我的测试是一项包含一个问题的调查,用户选择一个选项作为答案。它说测试通过了,但我没有看到在调查中选择了该选项(没有 csv 它可以正常工作)。这是我的示例代码:
我的 csv 文件有
这些是请求正文的内容
请帮助我找出我错过了什么以及在哪里。谢谢!
firefox - ReferenceError: jQuery 没有使用 gatling 定义
您好尝试使用加特林录制一些场景,
当我正常运行我的网站时,它会正确加载 jquery 但不使用加特林录制。有没有人遇到过这样的问题?