Jmeter plugin for testing API Endpoints using CoAP Protocol
1
Reference :
CoAP (Constrained Application protocol) is an application layer protocol intended for use in resource constrained environments like in low power electronic devices and other electrical appliances which need to be able to send and receive instructions remotely.
CoAP is a good candidate to build a IoT (Internet of Things) framework to help devices talk to remote application or servers.
Californium is a Java Library which can be used to setup API endpoints in your application which operate using the Constrained Application Protocol.
Jmeter-coap-Sampler is a Jmeter plugin which can be used for Automation testing or Load testing your API endpoints implemented in CoAP.
There are separate samplers to test DTLS endpoints and non DTLS endpoints.
Pre-requisite
- Java 7
- Maven 2.x+
- Jmeter 2.10+
Installation Instructions:
- Get the code.
- Execute the following maven code
-
Copy the following jars from target/dependency to /jmeter_install_path/lib
- californium-core-1.0.0-SNAPSHOT.jar
- scandium-1.0.0-SNAPSHOT.jar
-
element-connector-1.0.0-SNAPSHOT.jar
- Execute the following maven code
-
Copy the following jar from target/ to /jmeter_install_path/lib/ext
-
jmeter-coap-sampler-1.0.0.jar
Using the Sampler
- Open JMeter.
- Add a new Thread Group.
- Right click on the Thread Group -> Add -> Sampler -> Java Request
- Choose the Java Request from the navigation panel.
-
Click on the ‘classname’ drop down and choose between
1 2
org.jmeter.plugin.CoapDtlsConnectionSampler org.jmeter.plugin.CoapConnectionSampler