EvoMaster: A Tool For Automatically Generating System-Level Test Cases

Maven Central javadoc CI codecov DOI License: LGPL v3 Github All Releases

Summary

EvoMaster (www.evomaster.org) is the first (2016) open-source AI-driven tool that automatically generates system-level test cases for web/enterprise applications. This is related to Fuzzing. In particular, EvoMaster can fuzz APIs such as REST, GraphQL and RPC. Not only EvoMaster can generate inputs that find program crashes, but also it generates small effective test suites (e.g., in Python, JavaScript and Java/Kotlin JUnit format) that can be used for regression testing.

EvoMaster is an AI driven tool. In particular, internally it uses an Evolutionary Algorithm and Dynamic Program Analysis to be able to generate effective test cases. The approach is to evolve test cases from an initial population of random ones, trying to maximize measures like code coverage and fault detection. EvoMaster uses several kinds of AI heuristics to improve performance even further, building on decades of research in the field of Search-Based Software Testing.

1-Minute Example

On a console, copy&paste the following (requires Docker installed). It will fuzz the PetClinic example API from Swagger, for 30 seconds.

docker run -v "$(pwd)/generated_tests":/generated_tests webfuzzing/evomaster  --blackBox true --maxTime 30s  --ratePerMinute 60 --bbSwaggerUrl  https://petstore.swagger.io/v2/swagger.json

Note, if run in a MSYS shell on Windows like Git Bash, there is the need of an extra / before the $ (as in the following video).

Once the command is executed, you can inspect the generated files under generated_tests folder.

Key features

Known Limitations

Use in Industry

Several enterprises use EvoMaster to fuzz their Web APIs. We do few academia-industry collaborations (see more info here), where we help test engineers to apply EvoMaster on their systems, as long as we can then report on such experience. Example of Fortune 500 companies using EvoMaster are:

Videos

Alternatives

In the last few years, several few tools have been proposed in the academic literature and in the open-source community. You can read more details in this 2023 survey on REST API testing.

Existing open-source tools for REST API fuzzing are for example (in alphabetic order): CATS, Dredd, Fuzz-lightyear, ResTest, RestCT, Restler, RestTestGen, and Schemathesis.

All these tools are black-box, i.e., they do not analyze the source-code of the tested APIs to generate more effective test data. As we are the authors of EvoMaster, we are too biased to compare it properly with those other black-box tools. However, different independent studies (e.g., in 2022 and 2024) shows that EvoMaster is among the best performant. Furthermore, if your APIs are running on the JVM (e.g., written in Java or Kotlin), then EvoMaster has clearly an advantage, as it supports white-box testing.

Documentation

If you are trying to use EvoMaster, but the instructions in this documentation are not enough to get you started, or they are too unclear, then it means it is a bug in the documentation, which then would need to be clarified and updated. In such cases, please create a new issue.

Also, feel free to start new discussion topics in the Discussions forum. If you have time, please consider answering the polls there.

If you are working on an open-source API, you can drop us a message if you have problems using EvoMaster on it. Otherwise, if you are working in industry on closed-source APIs, we have options for academia-industry collaborations (see more info here).

Funding

EvoMaster has been funded by:

This project has received funding from the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme (grant agreement No 864972).

License

EvoMaster's source code is released under the LGPL (v3) license. For a list of the used third-party libraries, you can directly see the root pom.xml file. For a list of code directly imported (and then possibly modified/updated) from other open-source projects, see here.