Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion java-reporter-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<groupId>io.testomat</groupId>
<artifactId>java-reporter-core</artifactId>
<version>0.11.0</version>
<version>0.11.4</version>
<packaging>jar</packaging>

<name>Testomat.io Reporter Core</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -12,7 +13,7 @@
*/
public class TempArtifactDirectoriesStorage {
public static final ThreadLocal<List<String>> DIRECTORIES = ThreadLocal.withInitial(ArrayList::new);
public static final ConcurrentHashMap<UUID, List<String>> STEP_DIRECTORIES = new ConcurrentHashMap<>();
public static final Map<UUID, List<String>> STEP_DIRECTORIES = new ConcurrentHashMap<>();

public static void store(String dir) {
DIRECTORIES.get().add(dir);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -66,7 +67,9 @@ public AwsService(ArtifactKeyGenerator keyGenerator, AwsClient awsClient,
public void uploadAllArtifactsForTest(String testName, String rid, String testId) {

List<String> artifactDirectories = TempArtifactDirectoriesStorage.DIRECTORIES.get();
if (artifactDirectories.isEmpty()) {
Map<UUID, List<String>> stepArtifactDirectories = TempArtifactDirectoriesStorage.STEP_DIRECTORIES;

if (artifactDirectories.isEmpty() && stepArtifactDirectories.isEmpty()) {
log.debug("Artifact list is empty for test: {}", testName);
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions java-reporter-cucumber/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>io.testomat</groupId>
<artifactId>java-reporter-cucumber</artifactId>
<version>0.7.12</version>
<version>0.7.13</version>
<packaging>jar</packaging>

<name>Testomat.io Java Reporter Cucumber</name>
Expand Down Expand Up @@ -51,7 +51,7 @@
<dependency>
<groupId>io.testomat</groupId>
<artifactId>java-reporter-core</artifactId>
<version>0.11.0</version>
<version>0.11.4</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
Expand Down
4 changes: 2 additions & 2 deletions java-reporter-junit/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>io.testomat</groupId>
<artifactId>java-reporter-junit</artifactId>
<version>0.8.4</version>
<version>0.8.5</version>
<packaging>jar</packaging>

<name>Testomat.io Java Reporter JUnit</name>
Expand Down Expand Up @@ -51,7 +51,7 @@
<dependency>
<groupId>io.testomat</groupId>
<artifactId>java-reporter-core</artifactId>
<version>0.11.0</version>
<version>0.11.4</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
Expand Down
4 changes: 2 additions & 2 deletions java-reporter-karate/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>io.testomat</groupId>
<artifactId>java-reporter-karate</artifactId>
<version>0.2.6</version>
<version>0.2.7</version>
<packaging>jar</packaging>

<name>Testomat.io Java Reporter Karate</name>
Expand Down Expand Up @@ -52,7 +52,7 @@
<dependency>
<groupId>io.testomat</groupId>
<artifactId>java-reporter-core</artifactId>
<version>0.11.0</version>
<version>0.11.4</version>
</dependency>
<dependency>
<groupId>io.karatelabs</groupId>
Expand Down
4 changes: 2 additions & 2 deletions java-reporter-testng/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>io.testomat</groupId>
<artifactId>java-reporter-testng</artifactId>
<version>0.7.11</version>
<version>0.7.12</version>
<packaging>jar</packaging>

<name>Testomat.io Java Reporter TestNG</name>
Expand Down Expand Up @@ -47,7 +47,7 @@
<dependency>
<groupId>io.testomat</groupId>
<artifactId>java-reporter-core</artifactId>
<version>0.11.0</version>
<version>0.11.4</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>io.testomat</groupId>
<artifactId>java-reporter</artifactId>
<version>0.3.0</version>
<version>0.3.1</version>
<packaging>pom</packaging>

<name>Testomat.io Java Reporter</name>
Expand Down
4 changes: 2 additions & 2 deletions testomat-allure-adapter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>io.testomat</groupId>
<artifactId>testomat-allure-adapter</artifactId>
<version>0.0.1</version>
<version>0.0.2</version>
<packaging>jar</packaging>

<name>Testomat.io Testomat Allure adapter</name>
Expand Down Expand Up @@ -66,7 +66,7 @@
<dependency>
<groupId>io.testomat</groupId>
<artifactId>java-reporter-core</artifactId>
<version>0.11.0</version>
<version>0.11.4</version>
</dependency>
<dependency>
<groupId>io.qameta.allure</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package io.testomat.allure;

import io.qameta.allure.Allure;
import io.qameta.allure.AllureLifecycle;
import java.util.Optional;

Expand All @@ -10,6 +11,10 @@ public class AllureClientImpl implements AllureClient {

private final AllureLifecycle lifecycle;

public AllureClientImpl() {
this.lifecycle = Allure.getLifecycle();
}

/**
* @param lifecycle Allure lifecycle instance
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<aspect name="io.testomat.aspect.AllureAttachmentAspect"/>
</aspects>

<weaver options="-verbose -showWeaveInfo">
<weaver>

<include within="io.testomat..*"/>
<include within="io.qameta..*"/>
Expand Down
Loading