Randoop with Kotlin

204 views Asked by At

Is there any way (other than migrating Kotlin code to Java with IntelliJ) to make Randoop work with Kotlin? If not is there any other "official" (well-known, tested, widely used) solution for unit test generating in Kotlin projects?

1

There are 1 answers

0
mernst On BEST ANSWER

Randoop's input is .class or .jar files. Randoop generates Java JUnit test cases. If you are willing to have Java tests for your Kotlin code, then it should be possible to use Randoop.

If you want Randoop to generate Kotlin code, you would need to change the way that Randoop outputs its internal data structures into test file.

The only automated Kotlin test generator that I know of is EvoMaster, which generates system-level tests (not unit tests) for RESTful APIs that provide a schema in OpenAPI/Swagger format. It detects 500 status codes and mismatches from the API schemas.