opaluchlukasz / junit2spock

JUnit test to Spock test converter
MIT License
15 stars 7 forks source link
spock spock-test-converter

junit2spock

Build Status GitHub release

Overview

This project aims to ease transition from Junit to Spock by converting Junit based test suites to Spock specifications. Please note that conversion is done on best effort basis and it may happen that it will produce invalid Spock spec or even invalid Groovy code. Even if tool converts test without syntax errors it is advisable to go through generated test classes and compare them with the orginal Junit tests.

Supported Features

Run

Tool requires Java 8.

Download junit2spock-jar-with-dependencies.jar from latest release and run the following command to convert Junit test classes into Spock's specs:

java -jar junit2spock-jar-with-dependencies.jar path_to_junit_tests output_path

Build prerequisites

Contributions and bug reports

Contributions as well as the bug reports are very welcome.