Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
59c4e64
chore: spotless plugin configuration and editorconfig aligned
giulong Nov 2, 2025
8ba50c6
chore: aligning .editorconfig and spotless.xml
giulong Nov 7, 2025
6f8c873
build: spotless check bound to maven validate phase
giulong Nov 7, 2025
c6d2b64
chore: versioning spotless apply run configuration
giulong Nov 7, 2025
5015ec0
build: deleting stale-issues gh workflow
giulong Nov 8, 2025
1c360b7
build: filtering gh build action to not run on certain paths such as …
giulong Nov 9, 2025
9a0d297
chore: deleting src folder that contained just a bunch of images. Mov…
giulong Nov 9, 2025
f4ecfdd
build: introducing it-windows and verify-windows modules to run less …
giulong Nov 9, 2025
7af8ed6
chore: minor spotless configuration change
giulong Nov 9, 2025
92d7224
build: removing unused maven plugins in cleanup module
giulong Nov 9, 2025
6ff70af
fix: running ItWindowsVerifierTest on Windows only
giulong Nov 9, 2025
d3ecfe4
build: switching paths to paths-ignore in gh build action
giulong Nov 9, 2025
3f6c7be
fix: applying splotless
giulong Nov 9, 2025
1c221e9
fix(build): activating windows profile in build gh action on windows …
giulong Nov 9, 2025
62f55ce
build(deps): bump com.puppycrawl.tools:checkstyle from 12.1.1 to 12.1.2
dependabot[bot] Nov 17, 2025
19045f5
build(deps): bump ch.qos.logback:logback-classic from 1.5.20 to 1.5.21
dependabot[bot] Nov 17, 2025
a1ff392
build(deps): bump org.apache.maven.plugins:maven-jar-plugin
dependabot[bot] Nov 17, 2025
3239ba6
Merge pull request #496 from giulong/dependabot/maven/develop/org.apa…
giulong Nov 17, 2025
72c5b45
Merge pull request #494 from giulong/dependabot/maven/develop/com.pup…
giulong Nov 17, 2025
530c795
Merge pull request #495 from giulong/dependabot/maven/develop/ch.qos.…
giulong Nov 17, 2025
12ba1e1
test: better checking that vars are parsed before the rest, and injec…
giulong Nov 23, 2025
5587ab8
build(deps): bump com.diffplug.spotless:spotless-maven-plugin
dependabot[bot] Nov 24, 2025
b333208
Merge pull request #497 from giulong/dependabot/maven/develop/com.dif…
giulong Nov 24, 2025
3eaf82d
chore: aligning editorconfig and spotless
giulong Nov 26, 2025
3239e15
fix: reading vars only once
giulong Nov 26, 2025
24e2991
build(deps): bump org.apache.maven.plugins:maven-source-plugin
dependabot[bot] Dec 1, 2025
59d5fbe
build(deps): bump org.apache.maven.plugins:maven-resources-plugin
dependabot[bot] Dec 1, 2025
eaf564a
build(deps): bump com.puppycrawl.tools:checkstyle from 12.1.2 to 12.2.0
dependabot[bot] Dec 1, 2025
cefdc34
Merge pull request #498 from giulong/dependabot/maven/develop/org.apa…
giulong Dec 1, 2025
f03b0f5
Merge pull request #499 from giulong/dependabot/maven/develop/org.apa…
giulong Dec 1, 2025
0d76dac
Merge pull request #500 from giulong/dependabot/maven/develop/com.pup…
giulong Dec 1, 2025
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
700 changes: 676 additions & 24 deletions .editorconfig

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ name: Build
on:
push:
branches: [ "develop", "feature/**", "bugfix/**" ]
paths-ignore: [ '.mvn/**', 'mvnw', 'mvnw.cmd', '.run/**', 'docs/**', '.editorconfig', '.gitignore', '**.md' ]
pull_request:
branches: [ "develop" ]
types: [ opened, reopened, edited ]
paths-ignore: [ '.mvn/**', 'mvnw', 'mvnw.cmd', '.run/**', 'docs/**', '.editorconfig', '.gitignore', '**.md' ]

jobs:
build:
Expand Down Expand Up @@ -66,8 +68,8 @@ jobs:
directives: -DmacosTests
moduleName: it-macos
- os: windows-latest
profiles: browsers
directives: -DbrowsersTests
profiles: windows
directives: -DwindowsTests
moduleName: it
runs-on: ${{ matrix.os }}
env:
Expand Down
24 changes: 0 additions & 24 deletions .github/workflows/stale-issues.yml

This file was deleted.

32 changes: 32 additions & 0 deletions .run/spotless_apply.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="spotless:apply" type="MavenRunConfiguration" factoryName="Maven">
<MavenSettings>
<option name="myGeneralSettings" />
<option name="myRunnerSettings" />
<option name="myRunnerParameters">
<MavenRunnerParameters>
<option name="cmdOptions" />
<option name="profiles">
<set />
</option>
<option name="goals">
<list>
<option value="spotless:apply" />
</list>
</option>
<option name="multimoduleDir" />
<option name="pomFileName" />
<option name="profilesMap">
<map />
</option>
<option name="projectsCmdOptionValues">
<list />
</option>
<option name="resolveToWorkspace" value="false" />
<option name="workingDirPath" value="$PROJECT_DIR$" />
</MavenRunnerParameters>
</option>
</MavenSettings>
<method v="2" />
</configuration>
</component>
6 changes: 5 additions & 1 deletion DEV.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ client would. So, we build the framework in a dedicated module, and then we incl
| [it-bidi](it-bidi) | Runs a bunch of tests with the `webSocketUrl` capability |
| [it-testbook](it-testbook) | Runs a bunch of tests with a testbook |
| [it-macos](it-macos) | Runs a bunch of tests specific to macOS (Safari) |
| [it-windows](it-windows) | Runs a bunch of tests on Windows (useful for GH actions to reduce flakiness) |
| [it-appium](it-appium) | Runs a bunch of tests with Appium |
| [verify-commons](verify-commons) | Contains common classes used in other verify modules |
| [verify-browsers](verify-browsers) | Verifies results of the `it`, `it-testbook`, `it-grid`, and `it-bidi` modules |
| [verify-macos](verify-macos) | Verifies results of the `it-macos` module |
| [verify-windows](verify-windows) | Verifies results of the `it-windows` module |
| [verify-appium](verify-appium) | Verifies results of the `it-appium` module |
| [cleanup](cleanup) | Cleans each module after the execution |

Expand Down Expand Up @@ -79,8 +81,10 @@ Where:
on [Maven Central](https://central.sonatype.com/artifact/io.github.giulong/spectrum).
* the `-DbrowsersTests` property is a shorthand to activate all the profiles needed to run tests on all the browsers. It's equivalent to
running with these active profiles: `-P chrome,firefox,edge`.
* the `-DmacosTests` property is a shorthand to activate all the profiles needed to run tests on macOS. It's equivalent to
* the `-DmacosTests` property is a shorthand to activate all the profiles needed to run tests specific to Safari. It's equivalent to
running with these active profiles: `-P safari`.
* the `-DwindowsTests` property is a shorthand to activate all the profiles needed to run tests on Windows in GitHub build action. It's equivalent to
running with these active profiles: `-P windows`. NOTE: this is not needed in local: it's meant to just run fewer tests on windows workers in CI builds.
* the `-DappiumTests` property is a shorthand to activate all the profiles needed to run tests on Appium. It's equivalent to
running with these active profiles: `-P uiAutomator2`.
* the `-fae` option is [Maven's](https://maven.apache.org/ref/3.6.3/maven-embedder/cli.html) shorthand for `--fail-at-end`, needed to always run the `cleanup` module.
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
[![GitHub Discussions](https://img.shields.io/github/discussions/giulong/spectrum)](https://github.com/giulong/spectrum/discussions)

<br />
<img src="src/main/resources/images/spectrum-logo.png" alt="Spectrum logo">
<img src="docs/assets/images/spectrum-logo.png" alt="Spectrum logo">

<br/>
<br/>
Expand Down Expand Up @@ -74,14 +74,14 @@ https://github.com/giulong/spectrum/assets/27963644/fecee8f5-f6dc-4b47-81a3-514e
> `-Dspectrum.driver=firefox`, `-Dspectrum.driver=edge` or `-Dspectrum.driver=safari`

Here's an overview of the project created by the archetype, along with the generated report and video:<br/><br/>
<img style="width: 49%; vertical-align: top;" src="src/main/resources/images/login-form-it.png" alt="login-form"/>
&nbsp;<img style="width: 49%; vertical-align: top;" src="src/main/resources/images/login-form-it-extent-report.png" alt="report"/>
<img style="width: 49%; vertical-align: top;" src="docs/assets/images/login-form-it.png" alt="login-form"/>
&nbsp;<img style="width: 49%; vertical-align: top;" src="docs/assets/images/login-form-it-extent-report.png" alt="report"/>

https://github.com/giulong/spectrum/assets/27963644/df6b801e-91ca-415b-b510-a45b7392de20

You can also configure Spectrum to produce additional reports, such as summary and coverage:<br/><br/>
<img style="width: 49%; vertical-align: top;" src="src/main/resources/images/html-summary.png" alt="summary"/>
&nbsp;<img style="width: 49%; vertical-align: top;" src="src/main/resources/images/html-testbook.png" alt="html testbook"/>
<img style="width: 49%; vertical-align: top;" src="docs/assets/images/readme-html-summary.png" alt="summary"/>
&nbsp;<img style="width: 49%; vertical-align: top;" src="docs/assets/images/readme-html-testbook.png" alt="html testbook"/>

If you like Spectrum, please consider giving it a GitHub Star ⭐

Expand Down
44 changes: 36 additions & 8 deletions cleanup/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,6 @@

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
Expand Down Expand Up @@ -138,6 +130,42 @@
</resources>
</configuration>
</execution>
<execution>
<id>Copy LauncherSessionListener to "it-windows" module's classes</id>
<phase>clean</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>../it-windows/target/classes/META-INF/services</outputDirectory>
<resources>
<resource>
<directory>${spectrumMetaInfServicesFolder}</directory>
<includes>
<include>${launcherSessionListener}</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
<execution>
<id>Copy LauncherSessionListener to "verify-windows" module's classes</id>
<phase>clean</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>../verify-windows/target/classes/META-INF/services</outputDirectory>
<resources>
<resource>
<directory>${spectrumMetaInfServicesFolder}</directory>
<includes>
<include>${launcherSessionListener}</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
<execution>
<id>Copy LauncherSessionListener to "it-appium" module's classes</id>
<phase>clean</phase>
Expand Down
6 changes: 5 additions & 1 deletion it-appium/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
</plugin>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
Expand Down Expand Up @@ -86,4 +90,4 @@
</build>
</profile>
</profiles>
</project>
</project>
4 changes: 4 additions & 0 deletions it-bidi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
</plugin>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
Expand Down
4 changes: 4 additions & 0 deletions it-grid/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
</plugin>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,21 @@

import static java.nio.charset.StandardCharsets.UTF_8;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.openqa.selenium.support.ui.ExpectedConditions.visibilityOf;

import java.io.IOException;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URI;
import java.net.URL;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Scanner;

import com.fasterxml.jackson.databind.ObjectMapper;
Expand Down Expand Up @@ -50,6 +55,10 @@ void download() {
downloadPage.getDownloadLinks().getFirst().click();

assertThrows(TimeoutException.class, () -> checkDownloadedFile(FILE_TO_DOWNLOAD));

final Path downloadsFolder = Path.of(String.valueOf(configuration.getVars().get("downloadsFolder")));
assertTrue(Files.exists(downloadsFolder));
assertNotEquals(0, Objects.requireNonNull(downloadsFolder.toFile().listFiles()).length);
}

@Test
Expand Down
4 changes: 4 additions & 0 deletions it-macos/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
</plugin>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
Expand Down
4 changes: 4 additions & 0 deletions it-testbook/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
</plugin>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,23 +176,23 @@ public void launcherSessionClosed(LauncherSession session) {
private void createExtentFiles(final List<String> fileNames, final Path directory) {
for (String fileName : fileNames) {
assertTrue(Files.createFile(directory.resolve(fileUtils.removeExtensionFrom(fileName)).resolve(fileName)).toFile().exists());
Thread.sleep(1000); // just to be sure files have different creation dates
Thread.sleep(1000); // just to be sure files have different creation dates
}
}

@SneakyThrows
private void createFiles(final List<String> fileNames, final Path directory) {
for (String fileName : fileNames) {
assertTrue(Files.createFile(directory.resolve(fileName)).toFile().exists());
Thread.sleep(1000); // just to be sure files have different creation dates
Thread.sleep(1000); // just to be sure files have different creation dates
}
}

@SneakyThrows
private void createDirectories(final List<String> directoryNames, final Path parentDirectory) {
for (String fileName : directoryNames) {
assertTrue(Files.createDirectories(parentDirectory.resolve(fileName)).toFile().exists());
Thread.sleep(1000); // just to be sure files have different creation dates
Thread.sleep(1000); // just to be sure files have different creation dates
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
package io.github.giulong.spectrum.it_testbook.tests;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.openqa.selenium.support.ui.ExpectedConditions.visibilityOf;

import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Objects;

import io.github.giulong.spectrum.SpectrumTest;
import io.github.giulong.spectrum.it_testbook.pages.DownloadPage;
import io.github.giulong.spectrum.it_testbook.pages.UploadPage;
Expand Down Expand Up @@ -33,6 +39,10 @@ void download() {
downloadPage.getDownloadLinks().getFirst().click();

assertThrows(TimeoutException.class, () -> checkDownloadedFile(FILE_TO_DOWNLOAD));

final Path downloadsFolder = Path.of(String.valueOf(configuration.getVars().get("downloadsFolder")));
assertTrue(Files.exists(downloadsFolder));
assertNotEquals(0, Objects.requireNonNull(downloadsFolder.toFile().listFiles()).length);
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ void shouldRunSuccessfully(final String userName, final boolean expected, final
static Stream<Arguments> valuesProvider() {
return Stream.of(
arguments("tom", true, "/secure"),
arguments("giulio", false, "/login")
);
arguments("giulio", false, "/login"));
}
}
Loading
Loading