Axon 4.1.1 Tests with Gradle JUnit5 not running

Hello,

Simple axon tests are not running. I am using gradle 5.4 and here is the gradle file with kotlin dsl.

import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
  java
  idea
  kotlin("jvm") version "1.3.30"
  id("org.jetbrains.kotlin.plugin.spring") version "1.3.30"
  id("org.springframework.boot") version "2.1.4.RELEASE"
}

apply(plugin = "io.spring.dependency-management")

group = "com.demo"
version = "1.0-SNAPSHOT"

repositories {
  mavenCentral()
  maven(url = "https://mps-artifactory.aexp.com/artifactory/maven-repo1/")
  maven(url = "https://dl.bintray.com/konform-kt/konform")
  maven(url = "https://dl.bintray.com/spekframework/spek-dev")
}

dependencies {

  //
  // Kotlin

  implementation(kotlin("stdlib-jdk8"))
  implementation(kotlin("reflect"))
  implementation("com.fasterxml.jackson.module:jackson-module-kotlin")

  //
  // Spring boot

  implementation("org.springframework.boot:spring-boot-starter-webflux")
  implementation("org.springframework.boot:spring-boot-starter-actuator")
  implementation("org.springframework.boot:spring-boot-starter-data-jpa")

  //
  // Axon

  implementation("org.axonframework:axon-spring-boot-starter:4.1.1")

  //
  // Konform

  implementation("io.konform:konform:0.1.0")

  //
  // Database

  runtime("org.postgresql:postgresql:42.2.5")

  //
  // Tests - Spring Boot

  testImplementation("org.springframework.boot:spring-boot-starter-test")
  testImplementation("io.projectreactor:reactor-test")

  //
  // Tests - JUnit5

  testImplementation("org.junit.jupiter:junit-jupiter:5.4.2")
  testRuntimeOnly("org.junit.jupiter:junit-jupiter-api:5.4.2")

  //
  // Tests - Spek2

  testImplementation("org.spekframework.spek2:spek-dsl-jvm:2.0.0-alpha.2")
  testRuntimeOnly("org.spekframework.spek2:spek-runner-junit5:2.0.0-alpha.2")

  //
  // Tests - Axon
  testRuntimeOnly("org.axonframework:axon-test:4.1.1")
}

configurations {
  compile.get().exclude(module = "junit", group = "junit")
}

configure<JavaPluginConvention> {
  sourceCompatibility = JavaVersion.VERSION_1_8
}

tasks.withType<KotlinCompile> {
  kotlinOptions.jvmTarget = "1.8"
  kotlinOptions.freeCompilerArgs = listOf("-Xjsr305=strict")
}

tasks.withType<Test> {
  useJUnitPlatform {
    includeEngines = setOf("spek2", "junit-jupiter")
  }
  testLogging {
    events("passed", "skipped", "failed")
  }
}

Here is the test aggregate:

Found the solution :slight_smile:

Changed axon test line from testRuntime to:

testImplementation("org.axonframework:axon-test:4.1.1")