Skip to content

Commit 862a315

Browse files
author
Artem Eroshenko
authored
junit5 annotations support (via #154)
1 parent dc4e86f commit 862a315

File tree

28 files changed

+493
-6
lines changed

28 files changed

+493
-6
lines changed

allure-assertj/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ dependencies {
1818
testCompile 'org.slf4j:slf4j-simple'
1919
testCompile('org.junit.jupiter:junit-jupiter-api')
2020
testRuntime('org.junit.jupiter:junit-jupiter-engine')
21-
testCompile project(':allure-junit5')
21+
testCompile project(':allure-junit-platform')
2222
testCompile project(':allure-java-commons-test')
2323
}
2424

allure-junit-platform/build.gradle

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
description = 'Allure JUnit Platform'
2+
3+
apply from: "${gradleScriptDir}/maven-publish.gradle"
4+
apply from: "${gradleScriptDir}/bintray.gradle"
5+
apply plugin: 'maven'
6+
apply plugin: 'org.junit.platform.gradle.plugin'
7+
8+
configurations {
9+
agent
10+
}
11+
12+
dependencies {
13+
agent 'org.aspectj:aspectjweaver'
14+
15+
compile project(':allure-java-commons')
16+
compile('org.junit.platform:junit-platform-launcher')
17+
18+
testCompile('org.slf4j:slf4j-simple')
19+
testCompile 'org.assertj:assertj-core'
20+
testCompile('org.junit.jupiter:junit-jupiter-api')
21+
testCompile('org.junit.jupiter:junit-jupiter-params')
22+
23+
testRuntime('org.junit.jupiter:junit-jupiter-engine')
24+
testCompile project(':allure-java-commons-test')
25+
}
26+
27+
jar {
28+
from('src/main/services') {
29+
into 'META-INF/services'
30+
}
31+
}
32+
33+
junitPlatform {
34+
filters {
35+
engines {
36+
include 'junit-jupiter'
37+
}
38+
includeClassNamePattern '.*Test'
39+
}
40+
enableStandardTestTask true
41+
}
42+
43+
tasks.withType(JavaExec) {
44+
if (it.name == 'junitPlatformTest') {
45+
systemProperty 'org.slf4j.simpleLogger.defaultLogLevel', 'debug'
46+
systemProperty 'allure.model.indentOutput', true
47+
systemProperty 'allure.results.directory', 'build/allure-results'
48+
doFirst {
49+
jvmArgs "-javaagent:${configurations.agent.singleFile}"
50+
}
51+
}
52+
}
53+
54+
task spiOffJar(type: Jar, dependsOn: classes) {
55+
classifier = 'spi-off'
56+
from sourceSets.main.output
57+
}
58+
59+
configurations {
60+
spiOff.extendsFrom(compile)
61+
}
62+
63+
artifacts {
64+
spiOff spiOffJar
65+
archives spiOffJar
66+
}

allure-junit5/src/main/java/io/qameta/allure/junit5/AllureJunit5.java renamed to allure-junit-platform/src/main/java/io/qameta/allure/junit5/AllureJunit5.java

File renamed without changes.

allure-junit5/src/main/resources/META-INF/aop-ajc.xml renamed to allure-junit-platform/src/main/resources/META-INF/aop-ajc.xml

File renamed without changes.

allure-junit5/src/main/services/org.junit.platform.launcher.TestExecutionListener renamed to allure-junit-platform/src/main/services/org.junit.platform.launcher.TestExecutionListener

File renamed without changes.

allure-junit5/src/test/java/io/qameta/allure/junit5/AllureJunit5Test.java renamed to allure-junit-platform/src/test/java/io/qameta/allure/junit5/AllureJunit5Test.java

File renamed without changes.

allure-junit5/src/test/java/io/qameta/allure/junit5/features/BrokenTests.java renamed to allure-junit-platform/src/test/java/io/qameta/allure/junit5/features/BrokenTests.java

File renamed without changes.

allure-junit5/src/test/java/io/qameta/allure/junit5/features/DynamicTests.java renamed to allure-junit-platform/src/test/java/io/qameta/allure/junit5/features/DynamicTests.java

File renamed without changes.

allure-junit5/src/test/java/io/qameta/allure/junit5/features/FailedTests.java renamed to allure-junit-platform/src/test/java/io/qameta/allure/junit5/features/FailedTests.java

File renamed without changes.

allure-junit5/src/test/java/io/qameta/allure/junit5/features/ParameterisedTests.java renamed to allure-junit-platform/src/test/java/io/qameta/allure/junit5/features/ParameterisedTests.java

File renamed without changes.

0 commit comments

Comments
 (0)