EvoService is a test suite generator for Java applications, utilizing the powerful EvoSuite tool to automatically generate JUnit test cases. This project streamlines the process of setting up and using EvoSuite, allowing for easy test case generation and management within a Maven-based Java project.
Before you begin, ensure you have the following installed on your system:
- java 8
- maven
To get started, please follow these steps:
-
Open GitBash and clone the repository:
git clone https://github.com/isaacmaffeis/evoservice.git
-
Navigate into the project directory:
cd ./evoservice
-
Place a Java File in the Input Directory
-
Run the application with:
./scripts/main.sh
The script is already designed to integrate with an Abstract State Machine (ASM).
- retrieve_input.sh : Inject the Java Class into the Application.
- mvn_setup.sh : Setup Maven and Evosuite.
- gen_evosuite.sh : Generate Test Cases.
- tests.sh : Test the application.
- clean.sh : Clean the folders.
EvoService uses the EvoSuite services, see https://github.com/EvoSuite/evosuite for further information.
If you want to read this message run the help.sh script with:
./scripts/help.sh
EvoService also provides a Docker image, making it easy to integrate into containerized environments.
To use EvoService within a Docker container, add the following configuration to your docker-compose.yml file:
services:
evoservice:
build:
context: .
dockerfile: Dockerfile
image: isaacmaffeis/evoservice:latest
volumes:
- ./evoservice/evosuite-files:/app/evosuite-files
- ./evoservice/evosuite-report:/app/evosuite-report
- ./evoservice/evosuite-tests:/app/evosuite-tests
- ./evoservice/target:/app/target
- ./evoservice/src:/app/src
- ./evoservice/m2:/root/.m2
- ./evoservice/input:/app/input
- ./evoservice/output:/app/output
You can execute the following commands to run the various scripts within the container:
- Run the application:
docker compose run --rm evoservice ./scripts/main.sh