diff --git a/java-reporter-core/pom.xml b/java-reporter-core/pom.xml
index 72ea250..3faaccc 100644
--- a/java-reporter-core/pom.xml
+++ b/java-reporter-core/pom.xml
@@ -7,7 +7,7 @@
io.testomat
java-reporter-core
- 0.11.0
+ 0.11.4
jar
Testomat.io Reporter Core
diff --git a/java-reporter-core/src/main/java/io/testomat/core/facade/methods/artifact/TempArtifactDirectoriesStorage.java b/java-reporter-core/src/main/java/io/testomat/core/facade/methods/artifact/TempArtifactDirectoriesStorage.java
index c4cf5fd..2182d18 100644
--- a/java-reporter-core/src/main/java/io/testomat/core/facade/methods/artifact/TempArtifactDirectoriesStorage.java
+++ b/java-reporter-core/src/main/java/io/testomat/core/facade/methods/artifact/TempArtifactDirectoriesStorage.java
@@ -3,6 +3,7 @@
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
+import java.util.Map;
import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;
@@ -12,7 +13,7 @@
*/
public class TempArtifactDirectoriesStorage {
public static final ThreadLocal> DIRECTORIES = ThreadLocal.withInitial(ArrayList::new);
- public static final ConcurrentHashMap> STEP_DIRECTORIES = new ConcurrentHashMap<>();
+ public static final Map> STEP_DIRECTORIES = new ConcurrentHashMap<>();
public static void store(String dir) {
DIRECTORIES.get().add(dir);
diff --git a/java-reporter-core/src/main/java/io/testomat/core/facade/methods/artifact/client/AwsService.java b/java-reporter-core/src/main/java/io/testomat/core/facade/methods/artifact/client/AwsService.java
index b10d4aa..aa367d9 100644
--- a/java-reporter-core/src/main/java/io/testomat/core/facade/methods/artifact/client/AwsService.java
+++ b/java-reporter-core/src/main/java/io/testomat/core/facade/methods/artifact/client/AwsService.java
@@ -16,6 +16,7 @@
import java.util.List;
import java.util.Map;
import java.util.Objects;
+import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -66,7 +67,9 @@ public AwsService(ArtifactKeyGenerator keyGenerator, AwsClient awsClient,
public void uploadAllArtifactsForTest(String testName, String rid, String testId) {
List artifactDirectories = TempArtifactDirectoriesStorage.DIRECTORIES.get();
- if (artifactDirectories.isEmpty()) {
+ Map> stepArtifactDirectories = TempArtifactDirectoriesStorage.STEP_DIRECTORIES;
+
+ if (artifactDirectories.isEmpty() && stepArtifactDirectories.isEmpty()) {
log.debug("Artifact list is empty for test: {}", testName);
return;
}
diff --git a/java-reporter-core/src/test/java/io/testomat/core/artifact/ReportedTestStorageTest.java b/java-reporter-core/src/test/java/io/testomat/core/artifact/ReportedTestStorageTest.java
index 9f8526c..8509b2c 100644
--- a/java-reporter-core/src/test/java/io/testomat/core/artifact/ReportedTestStorageTest.java
+++ b/java-reporter-core/src/test/java/io/testomat/core/artifact/ReportedTestStorageTest.java
@@ -13,12 +13,18 @@
import io.testomat.core.facade.methods.artifact.ArtifactLinkData;
import io.testomat.core.facade.methods.artifact.ReportedTestStorage;
import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
@DisplayName("ReportedTestStorage Tests")
class ReportedTestStorageTest {
+ @BeforeEach
+ void setup() {
+ ReportedTestStorage.getStorage().clear();
+ }
+
@AfterEach
void cleanup() {
// Clear the storage after each test
diff --git a/java-reporter-cucumber/pom.xml b/java-reporter-cucumber/pom.xml
index a05b92b..2af9d6c 100644
--- a/java-reporter-cucumber/pom.xml
+++ b/java-reporter-cucumber/pom.xml
@@ -6,7 +6,7 @@
io.testomat
java-reporter-cucumber
- 0.7.12
+ 0.7.13
jar
Testomat.io Java Reporter Cucumber
@@ -51,7 +51,7 @@
io.testomat
java-reporter-core
- 0.11.0
+ 0.11.4
org.slf4j
diff --git a/java-reporter-junit/pom.xml b/java-reporter-junit/pom.xml
index 3a448b6..b1c23fe 100644
--- a/java-reporter-junit/pom.xml
+++ b/java-reporter-junit/pom.xml
@@ -6,7 +6,7 @@
io.testomat
java-reporter-junit
- 0.8.4
+ 0.8.5
jar
Testomat.io Java Reporter JUnit
@@ -51,7 +51,7 @@
io.testomat
java-reporter-core
- 0.11.0
+ 0.11.4
org.slf4j
diff --git a/java-reporter-karate/pom.xml b/java-reporter-karate/pom.xml
index 0bb4cee..25439c6 100644
--- a/java-reporter-karate/pom.xml
+++ b/java-reporter-karate/pom.xml
@@ -6,7 +6,7 @@
io.testomat
java-reporter-karate
- 0.2.6
+ 0.2.7
jar
Testomat.io Java Reporter Karate
@@ -52,7 +52,7 @@
io.testomat
java-reporter-core
- 0.11.0
+ 0.11.4
io.karatelabs
diff --git a/java-reporter-testng/pom.xml b/java-reporter-testng/pom.xml
index 2ce3b4f..964c42b 100644
--- a/java-reporter-testng/pom.xml
+++ b/java-reporter-testng/pom.xml
@@ -6,7 +6,7 @@
io.testomat
java-reporter-testng
- 0.7.11
+ 0.7.12
jar
Testomat.io Java Reporter TestNG
@@ -47,7 +47,7 @@
io.testomat
java-reporter-core
- 0.11.0
+ 0.11.4
org.slf4j
diff --git a/pom.xml b/pom.xml
index 0ecfab4..7eb97f0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
io.testomat
java-reporter
- 0.3.0
+ 0.3.1
pom
Testomat.io Java Reporter
diff --git a/testomat-allure-adapter/pom.xml b/testomat-allure-adapter/pom.xml
index 1673edf..087e9a2 100644
--- a/testomat-allure-adapter/pom.xml
+++ b/testomat-allure-adapter/pom.xml
@@ -6,7 +6,7 @@
io.testomat
testomat-allure-adapter
- 0.0.1
+ 0.0.2
jar
Testomat.io Testomat Allure adapter
@@ -66,7 +66,7 @@
io.testomat
java-reporter-core
- 0.11.0
+ 0.11.4
io.qameta.allure
diff --git a/testomat-allure-adapter/src/main/java/io/testomat/allure/AllureClientImpl.java b/testomat-allure-adapter/src/main/java/io/testomat/allure/AllureClientImpl.java
index ce1de3f..2dc5816 100644
--- a/testomat-allure-adapter/src/main/java/io/testomat/allure/AllureClientImpl.java
+++ b/testomat-allure-adapter/src/main/java/io/testomat/allure/AllureClientImpl.java
@@ -1,5 +1,6 @@
package io.testomat.allure;
+import io.qameta.allure.Allure;
import io.qameta.allure.AllureLifecycle;
import java.util.Optional;
@@ -10,6 +11,10 @@ public class AllureClientImpl implements AllureClient {
private final AllureLifecycle lifecycle;
+ public AllureClientImpl() {
+ this.lifecycle = Allure.getLifecycle();
+ }
+
/**
* @param lifecycle Allure lifecycle instance
*/
diff --git a/testomat-allure-adapter/src/main/java/io/testomat/aspect/AllureAttachmentAspect.java b/testomat-allure-adapter/src/main/java/io/testomat/aspect/AllureAttachmentAspect.java
index f1c2d37..ce83c45 100644
--- a/testomat-allure-adapter/src/main/java/io/testomat/aspect/AllureAttachmentAspect.java
+++ b/testomat-allure-adapter/src/main/java/io/testomat/aspect/AllureAttachmentAspect.java
@@ -1,8 +1,11 @@
package io.testomat.aspect;
import io.testomat.allure.AllureClient;
+import io.testomat.allure.AllureClientImpl;
import io.testomat.resolver.AttachmentFileResolver;
+import io.testomat.resolver.AttachmentFileResolverImpl;
import io.testomat.testomat.TestomatClient;
+import io.testomat.testomat.TestomatClientImpl;
import java.io.InputStream;
import java.util.Map;
import java.util.Optional;
@@ -28,6 +31,12 @@ public class AllureAttachmentAspect {
private final TestomatClient testomatio;
private final AttachmentFileResolver resolver;
+ public AllureAttachmentAspect() {
+ this(new AllureClientImpl(),
+ new TestomatClientImpl(),
+ new AttachmentFileResolverImpl());
+ }
+
public AllureAttachmentAspect(AllureClient allure,
TestomatClient testomatio, AttachmentFileResolver resolver) {
this.allure = allure;
diff --git a/testomat-allure-adapter/src/main/java/io/testomat/resolver/AttachmentFileResolverImpl.java b/testomat-allure-adapter/src/main/java/io/testomat/resolver/AttachmentFileResolverImpl.java
index 6b6ff4e..62bbd09 100644
--- a/testomat-allure-adapter/src/main/java/io/testomat/resolver/AttachmentFileResolverImpl.java
+++ b/testomat-allure-adapter/src/main/java/io/testomat/resolver/AttachmentFileResolverImpl.java
@@ -13,6 +13,13 @@ public class AttachmentFileResolverImpl implements AttachmentFileResolver {
private final String resultsDir;
+ public AttachmentFileResolverImpl() {
+ this.resultsDir = System.getProperty(
+ "allure.results.directory",
+ "allure-results"
+ );
+ }
+
public AttachmentFileResolverImpl(String resultsDir) {
this.resultsDir = resultsDir;
}
diff --git a/testomat-allure-adapter/src/main/resources/META-INF/aop.xml b/testomat-allure-adapter/src/main/resources/META-INF/aop.xml
index cdfa91a..941936f 100644
--- a/testomat-allure-adapter/src/main/resources/META-INF/aop.xml
+++ b/testomat-allure-adapter/src/main/resources/META-INF/aop.xml
@@ -5,7 +5,7 @@
-
+