Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Split tests into unit and integration groups #165 #201

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,17 @@ subprojects {
kotlinOptions.jvmTarget = "1.8"
}

val testIntegrationAlias = "testIntegration"

val sourceSets = the<SourceSetContainer>()

sourceSets {
create(testIntegrationAlias) {
compileClasspath += sourceSets["main"].output + configurations["testRuntimeClasspath"]
runtimeClasspath += output + compileClasspath + sourceSets["test"].runtimeClasspath
}
}

if (project.name !in notToPublish) {
apply(plugin = "org.jetbrains.dokka")
apply(plugin = "maven-publish")
Expand Down Expand Up @@ -105,6 +114,17 @@ subprojects {
}
}

tasks.register<Test>(testIntegrationAlias) {
description = "Runs the integration tests."
group = "verification"
testClassesDirs = sourceSets[testIntegrationAlias].output.classesDirs
classpath = sourceSets[testIntegrationAlias].runtimeClasspath
mustRunAfter(tasks["test"])
}

tasks.named("check") {
dependsOn(testIntegrationAlias)
}
}


Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package io.github.rybalkinsd.kohttp

import org.junit.Test

class IntegrationTest {

@Test
fun `stub test`() {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package io.github.rybalkinsd.kohttp

import org.junit.Test

class IntegrationTest {

@Test
fun `stub test`() {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package io.github.rybalkinsd.kohttp

import org.junit.Test

class IntegrationTest {

@Test
fun `stub test`() {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

}
}