对 Java 客户端服务器应用程序进行负载测试
我们使用 spring-remoting 作为客户端-服务器-应用程序。现在我们不确定如何使用序列化对象实现真正的负载测试。
问题是许多负载测试工具包都基于纯文本 HTTP 通信,因此参数化 http 请求非常容易。因为 spring-remoting 基于序列化对象,所以我们无法轻松参数化与服务器的 http 通信。
我的第一个想法是封装 spring-remoting 的端点并通过客户端服务类调用服务。但是如何实现从多个客户端调用远程服务以获得真实的负载测试场景呢? 是否有任何解决方案可以轻松地包装客户端服务?
有人有一些如何实现它的经验吗?
谢谢你的建议。
we use spring-remoting for a Client-Server-Application. Now we are in doubt how to realize a real load test with serialized objects.
The problem is that many load testing toolkits are based on plain text HTTP communication, so it's very easy to parameterize the http-requests. Because spring-remoting is based on serialized objects we can't easily parameterize the http-communication to the server.
My first idea was to encapsulate the endpoint of spring-remoting and to call the service over client-side service classes. But how can I realize calling the remote-service from multiply clients to gain a real load test scenario?
Are there any solution for wrapping the client-side service in an easy manner?
Has anybody some experiences how to realize it?
Thanks for advice.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Spring 论坛上有一个关于如何使用 JMeter 进行测试的讨论。要使用 JMeter,您需要编写一个自定义采样器。他们在 JMeter 站点上有示例。
或者,您可以尝试 Grinder。测试脚本是使用 jython 编写的,但为非标准协议创建测试可以说更容易。
There is a discussion on the Spring forums about how to use JMeter to do testing. To use JMeter you'll need to write a custom Sampler. They have examples on the JMeter site.
Alternatively, you could try Grinder. Testing scripts are written using jython but it is arguably easier to create tests for non-standard protocols.
有一个 商业 JMeter 插件可以实现此操作,请参阅:
为了使你的测试更真实,你需要改变
序列化的对象。
此 Java 序列化插件将允许执行以下操作:
使用 JMeter 代理服务器轻松记录流量,这是一个使用
将创建自定义采样器
通过 as 轻松更改请求(将显示为 XML)
简单的语法,例如 ${searchedWord} 其中 searchedWord 可以来自
CSV 或任何用户定义的变量。
使用 JMeter 标准帖子从响应中轻松提取数据
处理器
通过标准 JMeter 查看结果轻松调试请求/响应
树元素
免责声明:我是分发此解决方案的公司的成员
There is a commercial JMeter plugin which allows this, see:
To make your tests realistic, you will need to variabilize content in the
serialized objects.
This Java Serialization plugin will allow the following:
Easy recording of traffic with JMeter Proxy Server, a Test Plan using
custom Sampler will be created
Easy variabilization of requests (which will appear as XML) through as
easy syntax as for example ${searchedWord} where searchedWord can come from
a CSV or any user defined variable.
Easy extraction of data from responses using JMeter standard Post
Processors
Easy debugging of Request/Responses through standard JMeter View Results
Tree element
Disclaimer : I am member of the company that distributes this solution