Skip to content

Commit

Permalink
Merge pull request #235 from giulong/release/v1.14.0
Browse files Browse the repository at this point in the history
Release/v1.14.0
  • Loading branch information
giulong authored Sep 7, 2024
2 parents cd54adb + 43f45d3 commit 82d900f
Show file tree
Hide file tree
Showing 63 changed files with 850 additions and 312 deletions.
61 changes: 20 additions & 41 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ on:
branches: [ "develop" ]
types: [ opened, reopened, edited ]

env:
EDGE_BINARY: /usr/bin/microsoft-edge

jobs:
build:
name: Build
Expand Down Expand Up @@ -56,11 +53,29 @@ jobs:
browsers:
name: Browsers IT
needs: build
runs-on: ubuntu-latest
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
include:
- os: ubuntu-latest
profiles: browsers
directives: -DbrowsersTests
env:
EDGE_BINARY: /usr/bin/microsoft-edge
- os: macos-latest
profiles: macos
directives: -DmacosTests
env:
EDGE_BINARY: /usr/bin/microsoft-edge
- os: windows-latest
profiles: browsers
directives: -DbrowsersTests
runs-on: ${{ matrix.os }}
env:
VERSION: ${{ needs.build.outputs.version }}
steps:
- name: Free Disk Space
if: ${{ matrix.os != 'windows-latest' }}
shell: bash
run: |
sudo rm -rf /usr/share/dotnet
Expand All @@ -87,43 +102,7 @@ jobs:
shell: bash
run: |
./mvnw install:install-file -ntp -Dfile=$GITHUB_WORKSPACE/spectrum-${{ env.VERSION }}.jar -DgroupId=io.github.giulong -DartifactId=spectrum -Dversion=${{ env.VERSION }} -Dpackaging=jar
./mvnw install -DskipSign -Dmaven.plugin.validation=NONE -DbrowsersTests -ntp -P browsers
macos:
name: MacOS IT
needs: build
runs-on: macos-latest
env:
VERSION: ${{ needs.build.outputs.version }}
steps:
- name: Free Disk Space
shell: bash
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up JDK 21
uses: actions/setup-java@v4.0.0
with:
java-version: 21
distribution: temurin
cache: maven

- name: Get Spectrum jar
uses: actions/download-artifact@v4
with:
name: spectrum-jar

- name: Run macos ITs
shell: bash
run: |
./mvnw install:install-file -ntp -Dfile=$GITHUB_WORKSPACE/spectrum-${{ env.VERSION }}.jar -DgroupId=io.github.giulong -DartifactId=spectrum -Dversion=${{ env.VERSION }} -Dpackaging=jar
./mvnw install -DskipSign -Dmaven.plugin.validation=NONE -DmacosTests -ntp -P macos
./mvnw install -DskipSign -Dmaven.plugin.validation=NONE ${{ matrix.directives }} -ntp -P ${{ matrix.profiles }}
appium:
name: Appium IT
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ jobs:
run: ./mvnw package -DskipTests -DskipSign -Dmaven.plugin.validation=NONE -ntp

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<div align="center">

[![Build](https://github.com/giulong/spectrum/actions/workflows/build.yml/badge.svg?branch=develop)](https://github.com/giulong/spectrum/actions?query=branch%3Adevelop)
[![javadoc](https://javadoc.io/badge2/io.github.giulong/spectrum/javadoc.svg)](https://javadoc.io/doc/io.github.giulong/spectrum)
[![CodeQL](https://github.com/giulong/spectrum/actions/workflows/codeql.yml/badge.svg)](https://github.com/giulong/spectrum/actions/workflows/codeql.yml)
[![coverage](https://giulong.github.io/spectrum/badges/jacoco.svg)](https://giulong.github.io/spectrum/jacoco/)
[![javadoc](https://javadoc.io/badge2/io.github.giulong/spectrum/javadoc.svg)](https://javadoc.io/doc/io.github.giulong/spectrum)
[![badge-jdk](https://img.shields.io/badge/jdk-21-blue.svg)](https://jdk.java.net/21/)
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![Maven Central](https://img.shields.io/maven-central/v/io.github.giulong/spectrum.svg)](https://search.maven.org/search?q=g:io.github.giulong%20a:spectrum)
Expand Down
2 changes: 1 addition & 1 deletion docs/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ GEM
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
rexml (3.3.3)
rexml (3.3.6)
strscan
rouge (3.26.0)
ruby2_keywords (0.0.5)
Expand Down
1 change: 1 addition & 0 deletions docs/assets/miscellanea/summary-pies.html
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@

.chart-container {
width: 400px;
border-left: 1px solid #ccc;
}

@media print, screen and (max-width: 800px) {
Expand Down
1 change: 1 addition & 0 deletions docs/assets/miscellanea/testbook-pies.html
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@

.chart-container {
width: 400px;
border-left: 1px solid #ccc;
}

@media print, screen and (max-width: 800px) {
Expand Down
2 changes: 1 addition & 1 deletion it-appium/src/test/resources/logback-test.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<conversionRule conversionWord="colored" converterClass="io.github.giulong.spectrum.internals.ColoredConverter" />
<conversionRule conversionWord="colored" class="io.github.giulong.spectrum.internals.ColoredConverter" />
<property name="PATTERN" value="%d{HH:mm:ss.SSS} %.-1level %-30.30logger{0} | %msg%nopex%n"/>
<property name="COLOR_PATTERN" value="%d{HH:mm:ss.SSS} %colored(%.-1level %-30.30logger{0} | %msg%nopex%n)"/>
<property name="FILE_PATH" value="${spectrum.log.path:-target/spectrum/logs}"/>
Expand Down
2 changes: 1 addition & 1 deletion it-grid/src/test/resources/logback-test.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<conversionRule conversionWord="colored" converterClass="io.github.giulong.spectrum.internals.ColoredConverter" />
<conversionRule conversionWord="colored" class="io.github.giulong.spectrum.internals.ColoredConverter" />
<property name="PATTERN" value="%d{HH:mm:ss.SSS} %.-1level %-30.30logger{0} | %msg%nopex%n"/>
<property name="COLOR_PATTERN" value="%d{HH:mm:ss.SSS} %colored(%.-1level %-30.30logger{0} | %msg%nopex%n)"/>
<property name="FILE_PATH" value="${spectrum.log.path:-target/spectrum/logs}"/>
Expand Down
2 changes: 1 addition & 1 deletion it-macos/src/test/resources/logback-test.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<conversionRule conversionWord="colored" converterClass="io.github.giulong.spectrum.internals.ColoredConverter" />
<conversionRule conversionWord="colored" class="io.github.giulong.spectrum.internals.ColoredConverter" />
<property name="PATTERN" value="%d{HH:mm:ss.SSS} %.-1level %-30.30logger{0} | %msg%nopex%n"/>
<property name="COLOR_PATTERN" value="%d{HH:mm:ss.SSS} %colored(%.-1level %-30.30logger{0} | %msg%nopex%n)"/>
<property name="FILE_PATH" value="${spectrum.log.path:-target/spectrum/logs}"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ public void failing() {
@DisplayName("Skipped Test")
@Disabled("for demonstration purposes")
public void skipped() {
// this one will be skipped
throw new RuntimeException("This should not be thrown!!!");
}
}
2 changes: 1 addition & 1 deletion it-testbook/src/test/resources/logback-test.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<conversionRule conversionWord="colored" converterClass="io.github.giulong.spectrum.internals.ColoredConverter" />
<conversionRule conversionWord="colored" class="io.github.giulong.spectrum.internals.ColoredConverter" />
<property name="PATTERN" value="%d{HH:mm:ss.SSS} %.-1level %-30.30logger{0} | %msg%nopex%n"/>
<property name="COLOR_PATTERN" value="%d{HH:mm:ss.SSS} %colored(%.-1level %-30.30logger{0} | %msg%nopex%n)"/>
<property name="FILE_PATH" value="${spectrum.log.path:-target/spectrum/logs}"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ public void failing() {
@DisplayName("Skipped Test")
@Disabled("for demonstration purposes")
public void skipped() {
// this one will be skipped
throw new RuntimeException("This should not be thrown!!!");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import io.github.giulong.spectrum.it.pages.DownloadPage;
import io.github.giulong.spectrum.it.pages.UploadPage;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Tags;
import org.junit.jupiter.api.Test;
import org.openqa.selenium.TimeoutException;

Expand All @@ -24,6 +26,10 @@ public class FilesIT extends SpectrumTest<Void> {

@Test
@DisplayName("download")
@Tags({
@Tag("tag1"),
@Tag("tag2"),
})
public void download() {
// We call the inherited helper method to ensure a fresh download
deleteDownloadsFolder();
Expand All @@ -38,6 +44,7 @@ public void download() {

@Test
@DisplayName("upload")
@Tag("tag2")
public void upload() {
uploadPage
.open()
Expand Down
3 changes: 3 additions & 0 deletions it/src/test/resources/js/report.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
document
.querySelectorAll("video")
.forEach(video => video.classList.add("class-added-from-js"));
2 changes: 1 addition & 1 deletion it/src/test/resources/logback-test.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<conversionRule conversionWord="colored" converterClass="io.github.giulong.spectrum.internals.ColoredConverter" />
<conversionRule conversionWord="colored" class="io.github.giulong.spectrum.internals.ColoredConverter" />
<property name="PATTERN" value="%d{HH:mm:ss.SSS} %.-1level %-30.30logger{0} | %msg%nopex%n"/>
<property name="COLOR_PATTERN" value="%d{HH:mm:ss.SSS} %colored(%.-1level %-30.30logger{0} | %msg%nopex%n)"/>

Expand Down
24 changes: 12 additions & 12 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@
<jar.skipIfEmpty>true</jar.skipIfEmpty>
<maven.install.skip>true</maven.install.skip>

<junit.version>5.10.3</junit.version>
<junit.version>5.11.0</junit.version>
<jackson.version>2.17.2</jackson.version>
<simplejavamail.version>8.11.2</simplejavamail.version>
<jsonschemagenerator.version>4.36.0</jsonschemagenerator.version>
<slf4j.version>2.0.13</slf4j.version>
<selenium.version>4.23.0</selenium.version>
<slf4j.version>2.0.16</slf4j.version>
<selenium.version>4.24.0</selenium.version>
</properties>

<profiles>
Expand Down Expand Up @@ -142,7 +142,7 @@
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-launcher</artifactId>
<version>1.10.3</version>
<version>1.11.0</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -192,7 +192,7 @@
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.5.6</version>
<version>1.5.7</version>
</dependency>
<dependency>
<groupId>org.codehaus.janino</groupId>
Expand All @@ -219,7 +219,7 @@
<dependency>
<groupId>com.slack.api</groupId>
<artifactId>slack-api-client</artifactId>
<version>1.40.3</version>
<version>1.42.0</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -255,7 +255,7 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<version>5.12.0</version>
<version>5.13.0</version>
<scope>test</scope>
</dependency>

Expand Down Expand Up @@ -299,7 +299,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.7.1</version>
<version>3.8.0</version>
<executions>
<execution>
<goals>
Expand All @@ -316,12 +316,12 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.4.0</version>
<version>3.5.0</version>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>10.17.0</version>
<version>10.18.1</version>
</dependency>
<dependency>
<groupId>com.github.sevntu-checkstyle</groupId>
Expand Down Expand Up @@ -368,7 +368,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.3.1</version>
<version>3.5.0</version>
<configuration>
<argLine>@{argLine} -Dfile.encoding=UTF-8 -javaagent:${net.bytebuddy:byte-buddy-agent:jar}</argLine>
<reportsDirectory>${reportsDirectory}</reportsDirectory>
Expand All @@ -381,7 +381,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.3.1</version>
<version>3.5.0</version>
<configuration>
<argLine>-Dfile.encoding=UTF-8</argLine>
<failIfNoTests>true</failIfNoTests>
Expand Down
6 changes: 3 additions & 3 deletions spectrum/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-model</artifactId>
<version>3.9.8</version>
<version>3.9.9</version>
<scope>provided</scope>
</dependency>

Expand Down Expand Up @@ -326,7 +326,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.8.0</version>
<version>3.10.0</version>
<configuration>
<additionalJOption>-Xdoclint:none</additionalJOption>
</configuration>
Expand All @@ -342,7 +342,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.2.4</version>
<version>3.2.5</version>
<executions>
<execution>
<id>sign-artifacts</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public T open() {
*/
@SuppressWarnings("unchecked")
public T waitForPageLoading() {
log.warn("Default no-op waitForPageLoading: override this method in your SpectrumPage!");
log.debug("Default no-op waitForPageLoading: override this method in your SpectrumPage!");

return (T) this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,9 @@ public class SpectrumSessionListener implements LauncherSessionListener {
private final MetadataManager metadataManager = MetadataManager.getInstance();

@Override
@SuppressWarnings("unchecked")
public void launcherSessionOpened(final LauncherSession session) {
final Map<String, Object> bannerYaml = yamlUtils.readInternal("banner.yaml", Map.class);
log.info(freeMarkerWrapper.interpolate(fileUtils.read("/banner.txt"), bannerYaml));
@SuppressWarnings("unchecked") final Map<String, Object> bannerYaml = yamlUtils.readInternal("banner.yaml", Map.class);
log.info(freeMarkerWrapper.interpolate(fileUtils.read("banner.txt"), bannerYaml));

parseConfiguration();
session.getLauncher().registerTestExecutionListeners(configuration.getSummary().getSummaryGeneratingListener());
Expand Down Expand Up @@ -63,6 +62,7 @@ protected void parseConfiguration() {
.map(profile -> String.format("configuration-%s", profile))
.toList();

parseVars(CONFIGURATION);
profileConfigurations.forEach(this::parseVars);
yamlUtils.updateWithInternalFile(configuration, DEFAULT_CONFIGURATION_YAML);

Expand All @@ -81,6 +81,7 @@ protected List<String> parseProfiles() {
.ofNullable(yamlUtils.readNode(PROFILE_NODE, CONFIGURATION, String.class))
.orElse(yamlUtils.readInternalNode(PROFILE_NODE, DEFAULT_CONFIGURATION_YAML, String.class))
.split(","))
.filter(profile -> !profile.isBlank())
.toList();
}

Expand Down
Loading

0 comments on commit 82d900f

Please sign in to comment.