feat(ldd): property-based, mutation и браузерный E2E

This commit is contained in:
2026-10-28 00:01:56 +03:00
parent 80ccf26b61
commit 905feb440b
18 changed files with 1432 additions and 2 deletions

View File

@@ -2,6 +2,58 @@ plugins {
id("lms.spring-boot")
}
/** PIT запускается отдельной задачей: Gradle-плагин 1.15 несовместим с Gradle 9.6. */
val pitest by configurations.creating
dependencies {
add("pitest", libs.pitestCommandLine)
}
tasks.register<JavaExec>("pitestCourseAccess") {
group = "verification"
description = "Mutation testing CourseAccessService (P0 access matrix)"
dependsOn(tasks.testClasses)
classpath = pitest + sourceSets.getByName("test").runtimeClasspath
mainClass.set("org.pitest.mutationtest.commandline.MutationCoverageReport")
val reportDir =
layout.buildDirectory
.dir("reports/pitest-course-access")
.get()
.asFile
.absolutePath
val sourceDirs =
sourceSets.main
.get()
.kotlin.srcDirs
.joinToString(",") { it.absolutePath }
val testClasspath = sourceSets.getByName("test").runtimeClasspath.asPath
args(
"--reportDir",
reportDir,
"--targetClasses",
"ru.ysu.lms.academic.course.CourseAccessService",
"--targetTests",
"ru.ysu.lms.academic.course.CourseAccessServiceMutationTest",
"--sourceDirs",
sourceDirs,
"--classPath",
testClasspath,
"--mutators",
"STRONGER",
"--threads",
"1",
"--verbose",
"--outputFormats",
"XML,HTML",
"--timestampedReports",
"false",
"--timeoutConst",
"15000",
"--failWhenNoMutations",
"true",
)
}
dependencies {
implementation(platform(libs.springBootBom))
@@ -16,6 +68,7 @@ dependencies {
runtimeOnly(libs.postgresql)
implementation(libs.jacksonYaml)
implementation(libs.jacksonModuleKotlin)
implementation(libs.jackson3ModuleKotlin)
implementation(libs.springdocStarterWebmvcUi)
implementation(project(":libs:common-http"))
@@ -24,6 +77,9 @@ dependencies {
testImplementation(project(":libs:test-support"))
testImplementation(libs.springSecurityTest)
// PIT 1.15/1.20 JUnit5-плагин несовместим с JUnit Platform 6 (Spring Boot 4):
// mutation harness запускается через встроенный JUnit 4 plugin.
testImplementation("junit:junit:4.13.2")
}
springBoot {