Mainflux.mainflux/load-test
Aleksandar Novaković ef3627f4ee NOISSUE - Add test suite for WebSocket adapter (#299)
* Add load test for WebSocket adapter

Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>

* Add new test suite to README file

Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
2018-05-25 11:53:45 +02:00
..
project MF-134 - Evaluate system's performance (#225) 2018-04-23 15:13:43 +02:00
src/test NOISSUE - Add test suite for WebSocket adapter (#299) 2018-05-25 11:53:45 +02:00
.gitignore NOISSUE - Update load tests (#287) 2018-05-17 14:21:08 +02:00
README.md NOISSUE - Add test suite for WebSocket adapter (#299) 2018-05-25 11:53:45 +02:00
build.sbt NOISSUE - Raise code coverage in ws adapter (#242) 2018-04-24 13:56:13 +02:00

README.md

Load Test

This project contains platform's load tests.

Prerequisites

To run the tests you must have OpenJDK8 and SBT installed on your machine.

Configuration

Tests are configured to use variables from JAVA_OPTS presented in the following table. Note that any unset variables will be replaced with their default values.

Variable Description Default
users Users service URL http://localhost:8180
things Things service URL http://localhost:8182
http HTTP adapter service URL http://localhost:8185
ws WebSocket adapter service URL localhost:8186
requests Number of requests to be sent per second 100

Usage

This project contains three simulations:

  • CreateAndRetrieveThings
  • PublishHttpMessages
  • PublishWsMessages

To run all tests you will have to run following commands:

cd <path_to_mainflux_project>/load-test
sbt gatling:test

Things creation and retrieval

CreateAndRetrieveThings contains load tests for creating and retrieving things. Execute the following command to run the suite:

sbt "gatling:testOnly com.mainflux.loadtest.CreateAndRetrieveThings"

Message publishing over HTTP adapter

PublishHttpMessages contains load tests for publishing messages over HTTP. Execute the following command to run the suite:

sbt "gatling:testOnly com.mainflux.loadtest.PublishHttpMessages"

Message publishing over WebSocket adapter

PublishWsMessages contains load tests for publishing messages over WebSocket. Execute the following command to run the suite:

sbt "gatling:testOnly com.mainflux.loadtest.PublishWsMessages"