From b0e38c0a9b886fa172a3876ca485a68b9367f824 Mon Sep 17 00:00:00 2001 From: Ronak Lakhotia Date: Mon, 15 Apr 2019 18:37:56 +0800 Subject: [PATCH] Update --- technical-reports/Performance-Testing.md | 34 ++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/technical-reports/Performance-Testing.md b/technical-reports/Performance-Testing.md index 56dfb23..64425dc 100644 --- a/technical-reports/Performance-Testing.md +++ b/technical-reports/Performance-Testing.md @@ -27,12 +27,46 @@ boost the performance as the product evolves over time. ## Overview of Solution +The idea behind L&P tests is to simplify the process of understanding production performance and enable the developers to address bottlenecks before they become genuine production issues. +Implementing these tests involves a few key points:- + +* A tool/software to help perform these tests +* A database to store the data of the profiler +* A way of generating reports to help developers understand the metrics + +After carefully considering various tools, we decided to use [Apache JMeter](https://jmeter.apache.org/) to help run the performance tests. +In this report we will discuss the reasons behind why we chose JMeter and a more detailed description of our implementation. + + ## Tools considered for Performance Testing ## Reasons for using JMeter + + ## Current implementation of the solution +JMeter offers us a couple of ways to perform the tests. We had the choice of performing these tests with automating tools like [jmeter-gradle plugin](https://github.com/jmeter-gradle-plugin/jmeter-gradle-plugin) +and the [JMeter Java API](https://jmeter.apache.org/api/index.html). We explored both possibilities but ended up using the JMeter Java API. + +The JMeter-gradle-plugin along with the JMX files had a few issues. Firstly, it is not well maintained and does not have easy-to-find documentation. The existing resources are outdated and are not in sync with +the latest version of JMeter. On the other hand, we found the JMeter Java API to fit well with TEAMMATES' backend testing framework. +It is also easier to integrate into the CI pipeline with a TestNG gradle task. The entire process is more coherent while allowing the same level of configuration. + +A brief description of the process:- + +* Create a test json and csv file for the test. + * Since the data files are large (at least 5 times the size of `*UiTest.json` files with at least 100s of entities), they are deleted and not committed to the repo. This way, we can easily change the scale of the test without having to rewrite the code for generating the data. + +* Create the JMeter test and run. + * Each test configures the test plan, similar to how it is done in the GUI. We also considered using a Builder pattern, but it didn’t make complete sense to do so (since we can’t say for sure what the components of the class are, and what order they should be in). Instead, we have created abstractions and default configurations which make it easier to create new tests. + +* We then display summarised results for that endpoint and also determine the failure threshold criteria. + +A more detailed overview of the tasks performed can be seen in the [Continuous Profiling Project page](https://github.com/teammates/teammates/projects/7). + ## Findings and Recommendations ## Future Work + +We need to fine-tune the L&P test parameters and set suitable thresholds for failure. These should align with the goals of the application.