diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 2c98acf..6f8d7cd 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -12,10 +12,10 @@ jobs:
steps:
- uses: actions/checkout@v4
- - name: Set up JDK 11
+ - name: Set up JDK 17
uses: actions/setup-java@v4
with:
- java-version: '11'
+ java-version: '17'
distribution: 'temurin'
- name: Cache Maven dependencies
@@ -31,7 +31,7 @@ jobs:
echo "This ensures all internal dependencies are available locally before testing"
# Module build order (based on dependencies)
- MODULES=("java-reporter-core" "java-reporter-junit" "java-reporter-testng" "java-reporter-cucumber")
+ MODULES=("java-reporter-core" "java-reporter-junit" "java-reporter-testng" "java-reporter-cucumber" "java-reporter-karate" "testomat-allure-adapter")
for module in "${MODULES[@]}"; do
if [ -d "$module" ]; then
@@ -64,7 +64,7 @@ jobs:
run: |
echo "🧪 Running tests for all modules..."
- MODULES=("java-reporter-core" "java-reporter-junit" "java-reporter-testng" "java-reporter-cucumber")
+ MODULES=("java-reporter-core" "java-reporter-junit" "java-reporter-testng" "java-reporter-cucumber" "java-reporter-karate" "testomat-allure-adapter")
for module in "${MODULES[@]}"; do
if [ -d "$module" ]; then
diff --git a/README.md b/README.md
index fd12acd..3748aef 100644
--- a/README.md
+++ b/README.md
@@ -386,6 +386,7 @@ Artifacts are stored in external S3 buckets. S3 Access can be configured in **tw
|-------------------------------------|-----------------------------------------------------|-------------------------------------------|
| `testomatio.artifact.disable` | Completely disable artifact uploading | `false` |
| `testomatio.artifact.private` | Keep artifacts private (no public URLs) | `false` |
+| `testomatio.artifact.sending.delay` | Wait time before uploading test artifacts | `10000 msec` |
| `testomatio.step.artifacts.enabled` | Enables uploading artifacts for test steps | `false` |
| `s3.force-path-style` | Use path-style URLs for S3-compatible storage | `false` |
| `s3.endpoint` | Custom endpoint to be used with force-path-style | `false` |
@@ -528,23 +529,64 @@ Steps provide granular visibility into test logic and help identify exactly wher
### Setup
-Add AspectJ weaver to your test execution via maven-surefire-plugin:
+Configure Compile-Time Weaving (CTW) with the AspectJ Maven Plugin:
+maven
```xml
-
-
-
- org.apache.maven.plugins
- maven-surefire-plugin
- 3.2.2
-
-
- -javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/1.9.24/aspectjweaver-1.9.24.jar"
-
-
-
-
-
+
+
+ org.aspectj
+ aspectjrt
+ ${aspectj.version}
+
+
+
+dev.aspectj
+aspectj-maven-plugin
+${aspectj.maven.version}
+
+
+ ${java.version}
+ ${java.version}
+ ${java.version}
+
+
+
+ io.testomat
+ java-reporter-core
+
+
+
+
+
+
+
+ compile
+ test-compile
+
+
+
+
+
+
+ org.aspectj
+ aspectjtools
+ ${aspectj.version}
+
+
+
+```
+
+gradle
+
+```groovy
+plugins {
+ id "io.freefair.aspectj" version "9.5.0"
+}
+
+dependencies {
+ implementation "org.aspectj:aspectjrt:1.9.24"
+}
```
### Basic Usage
diff --git a/java-reporter-core/pom.xml b/java-reporter-core/pom.xml
index 5b71993..b21553b 100644
--- a/java-reporter-core/pom.xml
+++ b/java-reporter-core/pom.xml
@@ -7,7 +7,7 @@
io.testomatjava-reporter-core
- 0.16.1
+ 0.17.0jarTestomat.io Reporter Core
@@ -33,8 +33,8 @@
- 11
- 11
+ 17
+ 17UTF-8UTF-8
@@ -72,9 +72,9 @@
org.aspectj
- aspectjweaver
- ${aspectj.version}
- compile
+ aspectjrt
+ 1.9.24
+ truesoftware.amazon.awssdk
@@ -144,14 +144,32 @@
- org.apache.maven.plugins
- maven-compiler-plugin
- ${maven.compiler.plugin.version}
+ dev.aspectj
+ aspectj-maven-plugin
+ 1.14.1
+
- ${maven.compiler.source}
- ${maven.compiler.target}
- ${project.build.sourceEncoding}
+ 17
+ 17
+ 17
+
+
+
+
+ compile
+ test-compile
+
+
+
+
+
+
+ org.aspectj
+ aspectjtools
+ 1.9.24
+
+
@@ -163,10 +181,6 @@
**/*Test.java**/*Tests.java
-
-
- -javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"
-
@@ -227,10 +241,6 @@
-
-
- META-INF/aop.xml
-
diff --git a/java-reporter-core/src/main/java/io/testomat/core/constants/CommonConstants.java b/java-reporter-core/src/main/java/io/testomat/core/constants/CommonConstants.java
index 947565e..ea32a7a 100644
--- a/java-reporter-core/src/main/java/io/testomat/core/constants/CommonConstants.java
+++ b/java-reporter-core/src/main/java/io/testomat/core/constants/CommonConstants.java
@@ -1,7 +1,7 @@
package io.testomat.core.constants;
public class CommonConstants {
- public static final String REPORTER_VERSION = "0.16.1";
+ public static final String REPORTER_VERSION = "0.17.0";
public static final String TESTS_STRING = "tests";
public static final String API_KEY_STRING = "api_key";
diff --git a/java-reporter-core/src/main/java/io/testomat/core/facade/methods/artifact/ArtifactAspect.java b/java-reporter-core/src/main/java/io/testomat/core/facade/methods/artifact/ArtifactAspect.java
index 3c23f81..847d1b0 100644
--- a/java-reporter-core/src/main/java/io/testomat/core/facade/methods/artifact/ArtifactAspect.java
+++ b/java-reporter-core/src/main/java/io/testomat/core/facade/methods/artifact/ArtifactAspect.java
@@ -1,6 +1,7 @@
package io.testomat.core.facade.methods.artifact;
-import io.testomat.core.facade.Testomatio;
+import io.testomat.core.facade.ServiceRegistryUtil;
+import io.testomat.core.facade.methods.artifact.manager.ArtifactManager;
import io.testomat.core.step.StepLifecycle;
import io.testomat.core.step.TestStep;
import java.io.File;
@@ -15,7 +16,7 @@ public class ArtifactAspect {
private static final Logger log = LoggerFactory.getLogger(ArtifactAspect.class);
@AfterReturning(
- pointcut = "@annotation(io.testomat.core.annotation.Artifact)",
+ pointcut = "execution(* *(..)) && @annotation(io.testomat.core.annotation.Artifact)",
returning = "result"
)
public void afterArtifact(Object result) {
@@ -28,10 +29,11 @@ public void afterArtifact(Object result) {
if (testStep == null) {
testStep = StepLifecycle.lastFinished();
}
+ ArtifactManager artifactManager = ServiceRegistryUtil.getService(ArtifactManager.class);
if (testStep == null || testStep.getId() == null) {
- Testomatio.artifact(fileName);
+ artifactManager.storeDirectories(fileName);
} else {
- Testomatio.stepArtifact(fileName);
+ artifactManager.storeStepDirectories(testStep.getId(), fileName);
}
}
diff --git a/java-reporter-core/src/main/java/io/testomat/core/runmanager/GlobalRunManager.java b/java-reporter-core/src/main/java/io/testomat/core/runmanager/GlobalRunManager.java
index 689f0b2..f58c262 100644
--- a/java-reporter-core/src/main/java/io/testomat/core/runmanager/GlobalRunManager.java
+++ b/java-reporter-core/src/main/java/io/testomat/core/runmanager/GlobalRunManager.java
@@ -360,12 +360,12 @@ private boolean isReportingDisabled() {
/**
* Returns the delay before sending artifacts in milliseconds.
*
- *
Reads the value from the {@code artifacts.sending.delay} system property.
+ *
Reads the value from the {@code testomatio.artifact.sending.delay} system property.
* If the property is missing, non-numeric, or not positive, a default value is used.