kute
is a library that collects unit tests from Java and Kotlin repositories.
It works with JUnit, TestNG, and kotlin.test libraries.
It automatically downloads projects from GitHub, parses source code to identify unit tests, searches for the
corresponding source methods, collects some metadata about the code, and stores the information in one of the following
formats: JSON
, CSV
, SQLite
.
-
First, clone the repository
git clone https://github.com/onewhl/kute
-
Next, run the application using gradle
./gradlew run --args="--projects=/path/to/projects/file --output-format=json --output-path=/path/to/result/file"
-
Alternatively, build jar file
./gradlew shadowJar
, it will appear in the directorykute/build/libs
. To start processing the projects, run the commandjava -jar ./build/libs/kute-1.0-all.jar --projects="path/to/projects/file" --output-format="json" --output-path="path/to/result/file"
kute
is a command-line application that could be run with the following options:
Name | Description |
---|---|
--projects |
Path to the file with links to projects on GitHub. |
--output-formats |
Comma-separated list of formats to store results in. Supported types: json , csv , sqlite . |
--output-path |
Path to put file with results to. |
--repo-storage |
Path to the directory to clone repositories to. |
--io-threads |
Number of threads used for downloading Git repos. Use 0 for common pool. Default: 1 |
--cpu-threads |
Number of threads used for processing projects. Use 0 for common pool. Default: 0 |
--cleanup |
Delete cloned Git repositories after processing. Default: disabled |