Java Web 服务客户端:一致的负载生成
我研究了soapUI/loadUI 和JMeter,但我决定使用我自己定制的Web 服务客户端来执行功能和性能测试。我集成了 Groovy,这样就可以编写测试用例,而无需重新编译任何内容,并且当我的客户端使用生成的代理类时,我能够操作 POJO 而不是 XML 来创建请求和验证响应。
我已经能够顺序和并行生成请求(使用固定数量的线程),但我想以与使用每秒事务数 (TPS) 工作的 loadUI 生成器类似的方法生成负载。
我不确定如何维持固定(或逐渐增加)的 TPS 负载,因此任何人都可以建议一种使用的技术或一些代码来查看,我可能会觉得有启发性吗?
I have investigated both soapUI/loadUI and JMeter but I have settled on using my own custom-written Web Service client to perform both functional and performance testing. I have integrated Groovy
so that test cases can be written without the need to recompile anything, and as my client uses generated proxy classes I am able to manipulate POJOs rather than XML to create requests and validate responses.
I'm already able to generate requests sequentially and in parallel (using a fixed number of threads) but I would like to generate load in a similar method to the loadUI generators which work using Transactions Per Second (TPS).
I am unsure how to maintain a fixed (or ramping) TPS load, so can anyone suggest a technique to use or some code to look at that I might find instructive?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我使用 ExecutorService(缓存线程池)和 CompletionService 的组合解决了这个问题,并简单地管理创建“任务”之间的时间。
I have solved this problem using a combination of
ExecutorService
(cached thread pool) andCompletionService
and simply managing the time between the creation of 'tasks'.