Please note that this project is not currently being maintained! It is kept for reference, but it is likely to have issues with current versions of JMeter and other libraries
This project is a plugin for Apache JMeter that implements samplers and config elements for the LightweightM2m protocol. It allows JMeter threads to act as virtual LWM2M clients that can register, derregister and push observations to a LWM2M server.
This plugin can be used with JMeter to test non-functional and functional aspects of LWM2M servers. It uses lightweight mock LWM2M clients based on Californium to interact with the server. It has been tested with up to 2000 simultaneous clients generating load in a single commodity machine (a laptop with 8 GB RAM and an Intel Core i7-4710HQ CPU @ 2.50GHz processor), and more than 10,000 using JMeter's distributed mode in Amazon Web Services.
If you want to generate load without using JMeter or test simple use cases, you can use the mock client that is used in this plugin and write a scenario yourself. If you need a full-fledged LWM2M implementation, take a look at Eclipse Leshan.
As with all JMeter plugins, you should copy the jar file to the "lib/ext" directory in JMeter's installation.
- Clone this project with
git clone https://github.com/vears91/lwm2m-jmeter.git
- Go the project directory and build it or install it with maven
mvn install
. - After a successful build, go to the "target" directory and copy the generated jar-with-dependencies to JMeter's lib/ext directory
cp ./target/lwm2m-jmeter-version-jar-with-dependencies.jar /path/jmeter/installation/lib/ext
When you open JMeter, you should be able to add the test elements of the plugin, like LWM2mConfig elements and NotifyObserverSampler.
You can check out some simple test plans in the doc/examples/ directory of this repository. The basic steps to get started are the following:
- Open JMeter
- Add a thread group
- Right click the thread group and choose Add/Config Element/LwM2mConfig
- Define the configuration of LWM2M clients in the LwM2mConfig element you added in the previous step. Here you will define the URI of the server to target, the available resources in each virtual client and registration options.
- Add samplers from the samplers submenu when right clicking a thread group and going to the Add/Sampler submenu.