Skip to content

jetbrains-academy/kotlin-test-framework

Repository files navigation

official project Gradle Build License: MIT

Kotlin test framework

This repository contains a framework for creating tests in Kotlin. Currently, this framework is used in the Kotlin Onboarding courses (see the Marketplace) to test student solutions. It contains functionality to test student solutions by using the Java Reflection API under the hood. The proposed wrappers allow us to check the necessary Kotlin properties, such as val and var modifiers or whether the class is a data class for any Java objects.

You can find several usage examples in the test folder.

Getting started

The project uses Java 11.

Include as a library

Add the following dependency into the Gradle.kts file:

repositories {
   maven("https://packages.jetbrains.team/maven/p/kotlin-test-framework/kotlin-test-framework")
}

dependencies {
    implementation("org.jetbrains.academy.test.system:<module-name>:$latest_version")
}

Build from sources

  1. Clone this repository:
git clone https://github.com/jetbrains-academy/kotlin-test-framework.git
  1. Build the project:
./gradlew build

Run tests

To run tests locally, you just need to build the project and run the following command:

./gradlew test

Want to know more?

If you have questions about the framework or if you find some errors, you can ask questions and participate in discussions in repository issues.

Contribution

Please be sure to review the project's contributing guidelines to learn how to help the project.

About

A test framework for gradle/Kotlin learning materials

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •