弹簧载荷测试 [英] Spring load testing

查看:83
本文介绍了弹簧载荷测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用spring(模拟mvc)实现了一个测试单元,并且我正在寻找一种工具来在许多线程/进程中运行该单元(因此它将充当我的服务器的负载测试).我看过诸如grinder和jmeter之类的应用程序,但我不想重写整个单元,而只是使用现有的单元.有任何想法吗?

I've implemented a testing unit using spring (mock mvc), and I'm looking for a tool to run this unit in many threads/processes (so it will act as load testing for my server). I've seen applications like the grinder and jmeter but I don't want to re-write the entire unit, but just to use the existing one. Any ideas?

推荐答案

JMeter能够通过 JUnit请求采样器,您需要做的就是删除测试中的jar以及JMeter类路径中的依赖项,然后重新启动JMeter.完成后,您将能够在JUnit Request采样器下拉列表中查看您的类和方法,并以多线程方式执行它们.

JMeter is able to execute existing JUnit tests via JUnit Request sampler, all you need to do is to drop jar(s) with your test along with dependencies somewhere in JMeter classpath and restart JMeter. Once done you'll be able to see your classes and methods in JUnit Request sampler dropdown and execute them in multithreaded manner.

有关更多详细的说明和解释,请参见如何将JUnit与JMeter一起使用指南

See How to Use JUnit With JMeter guide for more detailed instructions and explanations.

这篇关于弹簧载荷测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆