Skip to content

Ease your work on Spring Boot applications: quickly generate functional non-regression tests, diagnose performance and generate non-regression tests on performance-related properties.

License

Apache-2.0, Unknown licenses found

Licenses found

Apache-2.0
LICENSE.txt
Unknown
license-header.txt
Notifications You must be signed in to change notification settings

guiRagh/quickperf-live

 
 

QuickPerf live

A tool to ease your work as a developer, not only regarding performance.
It generates functional non-regression tests to help you to work on legacy applications, diagnoses performance, and generates non-regression tests on performance-related properties.


📺 QuickPerf live demo (in French)    @QuickPerf    License    Build Status


QuickPerf live works today for web applications developed with Spring Boot 2.

We do not recommend enabling the tool in a production environment today.

Why use QuickPerf live?

Diagnose performance-related properties

Examples:

  • Detect long database queries
  • Detect high heap allocation
  • Detect n+1 select
  • Detect a synchronous HTTP call while the application maintains the database connection
  • ...

💡 You can use this feature during development or for a performance diagnostic audit of the application.

Automatically generate QuickPerf and functional non-regression tests

Today, for GET HTTP calls done with a Spring RestTemplate, the project allows generating JUnit 4 and JUnit 5 tests:

  1. Reproducing N+1 select with a non-regression on N+1 select thanks to the QuickPerf testing library.

  2. Ensuring a non-regression on the functional behavior. It works for both HTML or JSON response. The project uses the JSONassert library to compare the current JSON response with the expected one.

The generated tests execute a SQL file produced with the help of Quick SQL test data library.

Configuration

Maven dependency

<dependency>
    <groupId>org.quickperf</groupId>
    <artifactId>quick-perf-live-springboot2</artifactId>
    <version>0.1-SNAPSHOT</version>
</dependency>

Maven central contains a snapshot version. To use it, your projects need to access to Maven central snapshots:

    <repositories>
        <repository>
            <id>maven-snapshots</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
            <layout>default</layout>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
    </repositories>

You can also build the library:

git clone https://github.com/quick-perf/quickperf-live.git
mvn clean install

Enable QuickPerf live

From a yaml file:

quickperf:
  enabled: true

From a .properties file:

quickperf.enabled=true

Export the diagnostic of performance-related properties

To have the results on application logs:

logging.level.org.quickperf.*=INFO

You also have the possibility to implement custom exports. To do this, create Spring beans implementing QuickPerfHttpCallInfoWriter and QuickPerfHttpCallWarningWriter interfaces.

Configure the diagnostic of performance-related properties and the test generation

The configuration can be done from properties.

👉 A yaml file example

👉 A .properties file example

💡 Test generation tip If you use the library in your local environment, configure the generation in src/test/java and src/test/resources. So that, you can execute the generated tests in your IDE just after the generation!

quickperf:
    test-generation:
        java-folder-path: ".\\src\\test\\java"
        resource-folder-path: ".\\src\\test\\resources"

The configuration can be updated after the application startup with MBeans:

💡 QuickPerf MBeans are unavailable? Read this.

About

Ease your work on Spring Boot applications: quickly generate functional non-regression tests, diagnose performance and generate non-regression tests on performance-related properties.

Resources

License

Apache-2.0, Unknown licenses found

Licenses found

Apache-2.0
LICENSE.txt
Unknown
license-header.txt

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 99.9%
  • HTML 0.1%