GitHunt

Table of Contents
  1. About
  2. Getting Started
  3. Usage
  4. Contributing
  5. Acknowledgments

About

Spectrum is an e2e test automation framework that leverages JUnit 6 and Selenium 4 to provide these features automatically:

Spectrum manages all the boilerplate code, allowing you to focus on test logic:
write a JUnit test using the vanilla Selenium API, and Spectrum will enrich your suite transparently.

Getting Started

⚠️ Spectrum requires Java 21 or newer.

The easiest way is to take the three steps listed below, as shown in this video:

https://github.com/giulong/spectrum/assets/27963644/fecee8f5-f6dc-4b47-81a3-514e66b3907d

  1. Generate a new project leveraging the Spectrum Archetype:

    mvn archetype:generate -DarchetypeGroupId=io.github.giulong -DarchetypeArtifactId=spectrum-archetype
    
  2. Run the LoginFormIT demo test.

  3. Check the generated report, which opens automatically in your browser.

⚠️ Tests run on Chrome by default. As shown in the video above, you can change this with:

-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:


login-form
 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:


summary
 html testbook

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

Usage

Starting without the archetype is as simple as following these steps:

  1. Add the Spectrum dependency to your project, you can find the snippet for every build tool here.

    <dependency>
        <groupId>io.github.giulong</groupId>
        <artifactId>spectrum</artifactId>
        <version>1.29.6</version>
        <scope>test</scope>
    </dependency>
  2. Create the HelloWorldIT test class extending SpectrumTest:

    import io.github.giulong.spectrum.SpectrumTest;
    import org.junit.jupiter.api.Test;
    
    public class HelloWorldIT extends SpectrumTest<Void> {
    
        @Test
        public void dummyTest() {
            driver.get(configuration.getApplication().getBaseUrl());
        }
    }
  3. create a basic src/test/resources/configuration.yaml:

    application:
      baseUrl: https://the-internet.herokuapp.com/ # Change it with your app's landing page
    
    # video of the execution attached to the html report
    # (will be empty since the test is doing nothing)
    video:
      frames:
        - autoBefore
    
    # the html report will open automatically in your browser after the execution
    extent:
      openAtEnd: true
  4. Run the test!

Contributing

Contributions to Spectrum are welcome! Please check out the CONTRIBUTING.md
and the open issues.

Acknowledgments

Spectrum leverages these projects you should definitely check out!

Languages

Java69.6%HTML30.1%JavaScript0.2%CSS0.0%

Contributors

Apache License 2.0
Created April 17, 2023
Updated March 19, 2026