This is an HTTP test suite which contains guide and all resources to execute performance tests for Ballerina in a local machine or VM.
First you have to create 3 instances (VMs/Physical Machines) for JMeter, Ballerina and Netty. Alternatively, you can run all in single instance.
- Download and install Apache JMeter.
- Start JMeter of GUI Mode. Refer Getting Started for more information.
- Import and use the JMX files for HTTP1.1 or HTTP2.0 as required.
-
Download and install Ballerina.
-
Run the particular gateway .bal files by executing following command.
$ bal run <file_name.bal>
-
Download and install Docker.
-
Run the Docker image of Netty Echo Backend as required.
- h1c -
$ docker run -d -p 8688:8688 ldclakmal/netty-echo-backend
- h1 -
$ docker run -d -p 8688:8688 -e "SSL=true" ldclakmal/netty-echo-backend
- h2c -
$ docker run -d -p 8688:8688 -e "HTTP2=true" ldclakmal/netty-echo-backend
- h2 -
$ docker run -d -p 8688:8688 -e "HTTP2=true" -e "SSL=true" ldclakmal/netty-echo-backend
- h1c -
-
Refer the Docker Hub Image for more information.
Now, you can start the JMeter with a single request to check whether the request-response path is properly configured.
If not, check the URLs and ports of JMeter, Ballerina Service and Netty Backend and figure out the issue.
If the response is received successfully, start the performance test with the required number of threads, ramp-up period and time.