... | ... | @@ -80,7 +80,37 @@ Import the WildFly projects as Maven projects and launch the server. |
|
|
![jmeter-01](https://gitlab.inf.unibz.it/julian-sanin1/jmeter-example/uploads/ac7cf55651d5dd4e90f8178b93f18cd2/jmeter-01.png)
|
|
|
|
|
|
Launch the `jmeter` script in your console from within your jemeter install directory and add a new **Thread Group**.
|
|
|
* Set **Number of Threads** to some high number in your case for example `40`.
|
|
|
* Set **Ramp-Up Period** to a specified interval for example `10` seconds.
|
|
|
* Both **Number of Threads** and **Ramp-Up Period** setup how many request we make in a given period of time. In this example we will use 40 "users" per 10 seconds. In other words we make 4 requests per second.
|
|
|
* Set **Loop Count** to some number for example `10`. It sets how often a test is repeated.
|
|
|
|
|
|
![jmeter-02](https://gitlab.inf.unibz.it/julian-sanin1/jmeter-example/uploads/60ddd1a5d9eab0d6c8486223b76a6ec5/jmeter-02.png)
|
|
|
![jmeter-02](https://gitlab.inf.unibz.it/julian-sanin1/jmeter-example/uploads/294c723e876e7d8cc9534398ed12160b/jmeter-02.png)
|
|
|
|
|
|
Then add a HTTP Request to simulate a user request. |
|
|
\ No newline at end of file |
|
|
Use a **Simple Controller** to group multiple requests together.
|
|
|
|
|
|
![jmeter-03](https://gitlab.inf.unibz.it/julian-sanin1/jmeter-example/uploads/b35207cf2e598a4cf47e8fa05d5a8591/jmeter-03.png)
|
|
|
|
|
|
Then add a HTTP Request to simulate a user request. In our example we use one for the REST response in JSON and XML format. Fill in the **Server Name or IP** address, **Port Number** and the **Path** of your request.
|
|
|
|
|
|
![jmeter-04](https://gitlab.inf.unibz.it/julian-sanin1/jmeter-example/uploads/9f8e0a62214ee29ed954fbba99d58200/jmeter-04.png)
|
|
|
|
|
|
Add assertions to your requests. In this case we are using a **Response Assertion** to compare the response with a substring.
|
|
|
|
|
|
![jmeter-05](https://gitlab.inf.unibz.it/julian-sanin1/jmeter-example/uploads/2df1463c705b4cd8d991d886a39a047b/jmeter-05.png)
|
|
|
|
|
|
## JMeter Output
|
|
|
|
|
|
Add various **Listerners** to observe the output of the **Testplan**. You can get informed for example about **Response Time**, **Troughput** and **Assertions**.
|
|
|
|
|
|
![jmeter-06](https://gitlab.inf.unibz.it/julian-sanin1/jmeter-example/uploads/b3ef576da042e895817af70a4a5f68c6/jmeter-06.png)
|
|
|
|
|
|
![jmeter-07](https://gitlab.inf.unibz.it/julian-sanin1/jmeter-example/uploads/3bd09c834c281a85576719e29ba8efdf/jmeter-07.png)
|
|
|
|
|
|
![jmeter-08](https://gitlab.inf.unibz.it/julian-sanin1/jmeter-example/uploads/06e9a524e8009c04434ddeb1cdc50b54/jmeter-08.png)
|
|
|
|
|
|
Once you have setup the listeners you can run the testplan by clicking on the green play button on the menu ribbon.
|
|
|
|
|
|
![jmeter-09](https://gitlab.inf.unibz.it/julian-sanin1/jmeter-example/uploads/cc7873e2c5bd50553f821860e61300ce/jmeter-09.png)
|
|
|
|
|
|
On the upper right corner you will see a number counting up with a green square lighting up. That means that the testplan is currently running and it will turn gray once the tesplan has finished. |
|
|
\ No newline at end of file |