Skip to content

Attempt to get integration tests using kotlin-test working, using a separate source set

Notifications You must be signed in to change notification settings

yonigibbs/kotlin-test-integration-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kotlin-test-integration-test

Old information

The purpose of this repository is to show how integration tests created using kotlin-test can be executed.

The integration tests are defined using a separate gradle source set so that they can be run separately from unit tests.

Unit tests are run automatically as part of a gradle build, but integration tests need to be explicity executed by running gradle integrationTest

The unit tests are in a file called UnitTest.kt. There are two classes in this file:

  • UnitTest: uses a standard JUnit @Test annotation to define a unit test method.
  • KotlinTestUnitTest: subclass of the kotlin-test StringSpec class.

The integration tests are in a file called IntegrationTest.kt. There are two classes in this file:

  • IntegrationTest: uses a standard JUnit @Test annotation to define a unit test method.
  • KotlinTestIntegrationTest: subclass of the kotlin-test StringSpec class.

These files all have code that can be uncommented to check that a broken test causes the build to fail.

Instructions

  1. Clone the repo
  2. Run ./gradlew build integrationTest

About

Attempt to get integration tests using kotlin-test working, using a separate source set

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages