Skip to content

Repository files navigation

Gradle Integration Test Plugin

License Build Status Build Status Gradle Plugin Portal

Description

Gradle Integration Test Plugin provides an easy set up for integration tests

Requirements

Usage

plugins {
    id("com.scalified.plugins.gradle.it") version "$VERSION"
}

After applying the plugin, the following takes place:

  1. JavaPlugin applied if not yet applied
  2. IdeaPlugin applied if not yet applied
  3. New directories are created (if missing):
    • Source set directory for integration tests (src/it/java by default)
    • Resources directory for integration tests (src/it/resources by default)
  4. Gradle configurations added:
    • itImplementation - configuration for integration test compile scope (contains implementation classpath)
    • itRuntimeOnly - configuration for integration test runtime scope (contains testRuntimeOnly classpath)
    • it* - other configurations inherited from Test (e.g. itAnnotationProcessor)
  5. Gradle it task created, which runs integration tests located within the integration test source set
  6. Integration test sources directory marked as test sources in IntelliJ IDEA

Configuration

tasks.it {
    srcDir = "src/it/kotlin"
    resourcesDir = "src/it/resources"
    useJUnitPlatform()
    maxParallelForks = 4

    finalizedBy(tasks.cleanDb) // assuming there is some cleanDb task
}

Made with ❤️ by Scalified

About

A Gradle Plugin For Easy Integration Tests Setup

Resources

Stars

2 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages