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
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,3 @@ replay_pid*

# Properties file which can have sensitive information
*.properties

12 changes: 11 additions & 1 deletion README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ xray-test-env | No | Yes | @xray-test-env=DEV,TST

The associations can be done either with a normal gherkin tag, a tabular parameter, or both:

By default a new execution will be created for however many groups of tests
By default, a new execution will be created for however many groups of tests
are extracted from the feature file. This is elaborated in more detail in the below feature
file example, but the short answer is you will have a number of executions equal to `[Distinct Test Plans] x
[Distinct Test Environment Combinations]`
Expand Down Expand Up @@ -148,6 +148,16 @@ xray.api.url=https://xray.cloud.getxray.app/api/v2/authenticate

`XrayAuth.fromPropertiesFile("src/test/resources/xray.properties")`

[IMPORTANT]
====
To avoid accidentally publishing secrets to Git, run the following command:

[source,bash]
----
git update-index --assume-unchanged src/test/resources/xray.properties
----
====

==== Xray Updater

This is the thing that actually monitors your test execution and can
Expand Down
25 changes: 16 additions & 9 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ limitations under the License.
<modelVersion>4.0.0</modelVersion>
<groupId>com.google.pdsl</groupId>
<artifactId>pdsl-xray</artifactId>
<version>5.1.2</version>
<version>5.2.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>xray_pdsl</name>
<url>http://maven.apache.org</url>
<url>https://maven.apache.org</url>
<description> Plugin to integrate the XRAY test management system with the Polymorphic DSL test framework. </description>
<licenses>
<license>
Expand Down Expand Up @@ -52,13 +52,14 @@ limitations under the License.
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
<mvn.jar.version>3.2.2</mvn.jar.version>
<antlr.version>4.9.1</antlr.version>
<maven.source.plugin.version>3.3.1</maven.source.plugin.version>
<maven.javadoc.plugin.version>3.7.0</maven.javadoc.plugin.version>
<maven.install.plugin.version>3.1.2</maven.install.plugin.version>
<antlr.version>4.13.2</antlr.version>
<pdsl.version>1.13.0</pdsl.version>
<maven.deploy.plugin.version>3.1.2</maven.deploy.plugin.version>
<maven.gpg.plugin.version>3.2.4</maven.gpg.plugin.version>
<maven.install.plugin.version>3.1.2</maven.install.plugin.version>
<maven.javadoc.plugin.version>3.7.0</maven.javadoc.plugin.version>
<maven.source.plugin.version>3.3.1</maven.source.plugin.version>
<mvn.jar.version>3.2.2</mvn.jar.version>
</properties>
<distributionManagement>
<snapshotRepository>
Expand Down Expand Up @@ -100,7 +101,7 @@ limitations under the License.
<dependency>
<groupId>com.google.pdsl</groupId>
<artifactId>pdsl</artifactId>
<version>1.11.1</version>
<version>${pdsl.version}</version>
</dependency>
<dependency>
<groupId>org.antlr</groupId>
Expand All @@ -123,6 +124,11 @@ limitations under the License.
<artifactId>plexus-cipher</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>33.2.1-jre</version>
</dependency>
</dependencies>
<repositories>
<repository>
Expand All @@ -136,7 +142,7 @@ limitations under the License.
</repository>
<repository>
<id>artifact-registry</id>
<url> artifactregistry://us-central1-maven.pkg.dev/gfp-p-artifacts-hub-01/ar-maven-experimental </url>
<url>artifactregistry://us-central1-maven.pkg.dev/gfp-p-artifacts-hub-01/ar-maven-experimental</url>
<releases>
<enabled>true</enabled>
</releases>
Expand Down Expand Up @@ -224,6 +230,7 @@ limitations under the License.
<artifactId>antlr4-maven-plugin</artifactId>
<version>${antlr.version}</version>
<configuration>
<sourceDirectory>src/test/antlr4</sourceDirectory>
<arguments>
<argumenent>-visitor</argumenent>
</arguments>
Expand Down
5 changes: 0 additions & 5 deletions src/main/antlr4/com/pdsl/grammars/AllGrammarsLexer.g4

This file was deleted.

5 changes: 0 additions & 5 deletions src/main/antlr4/com/pdsl/grammars/AllGrammarsParser.g4

This file was deleted.

16 changes: 16 additions & 0 deletions src/main/java/com/google/pdsl/xray/constants/StepStatus.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package com.google.pdsl.xray.constants;

import java.util.Arrays;
import java.util.List;

public enum StepStatus {
EXECUTING,
FAILED,
BLOCKED,
PASSED,
TODO;

public static List<String> getStringStatuses() {
return Arrays.stream(values()).map(Enum::toString).toList();
}
}
45 changes: 45 additions & 0 deletions src/main/java/com/google/pdsl/xray/constants/XrayTestTag.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
package com.google.pdsl.xray.constants;

/**
* XrayTags enum representing the supported Xray tags with their prefix values.
*/
public enum XrayTestTag {

CASE("xray-test-case"),
ENV("xray-test-env"),
EXECUTION("xray-test-execution"),
PLAN("xray-test-plan");

// Defined locally within the enum
private static final String GHERKIN_TAG_PREFIX = "@";
private static final String GHERKIN_EQUAL = "=";

private final String value;

XrayTestTag(String value) {
this.value = value;
}

/**
* Gets the full Gherkin tag string including the prefix symbol.
*
* @return the complete tag string (e.g. "@xray-test-env=")
*/
public String getTagValue() {
return GHERKIN_TAG_PREFIX + value + GHERKIN_EQUAL;
}

/**
* Wraps the tag value in angle brackets as an HTML or XML tag.
*
* @return the tag value wrapped in angle brackets (e.g., "&lt;xray-test-case&gt;")
*/
public String toHtmlTag() {
return "<" + value + ">";
}

@Override
public String toString() {
return value;
}
}
Loading