Skip to content

Releases: giulong/spectrum

Version 1.15.x

22 Sep 20:51
Compare
Choose a tag to compare

Sort tests in Extent Report

You can now specify the order in which tests are shown in the produced html report, for example by their name:

extent:
  sort:
    name: { }

Be sure to check the Tests Order docs section for the details about available sorting methods.

Version 1.14.x

07 Sep 15:02
Compare
Choose a tag to compare

Extent Reports enhancements

  • JUnit's tags are now shown in the corresponding test reported in the html report.
  • Javascript support: you can now provide a custom script to be applied to the html report, using the extent.js key in your configuration.yaml. Mind its value is resolved as a path relative to the resources folder. By default it's js/report.js.
  • You can now provide a path for your custom css to be applied to the html report, using the extent.css key in your configuration.yaml. Mind its value is resolved as a path relative to the resources folder. By default it's css/report.css.

Be sure to always check the internal configuration.default.yaml for all the available keys. Leveraging the Json Schema comes in handy for this!

No profile active by default

The local profile is not loaded by default anymore. If you use it, which means you have a configuration-local.yaml and/or a data-local.yaml, you now have to provide the local profile explicitly. Check the Configuration docs for details on how to do it.

Version 1.13.x

12 Aug 12:04
Compare
Choose a tag to compare

Automatically open generated reports

You can now provide the openAtEnd flag in those reporters that produce a file at the end of the execution. By setting it to true, the corresponding report will be automatically opened once ready. Check these sections in the docs: Html Report, Summary Reporters, and TestBook Reporters.

Dropped data.fqdn key

The Data class you provide as a generic in your SpectrumTests and/or SpectrumPages is now loaded at runtime automatically. This means if you used data, you now have to delete the fqdn key from your configuration*.yaml files.

Added video.skipDuplicateFrames key

By default, Spectrum discards consecutive duplicate frames when generating the video of the execution. You can now disable this behaviour by explicitly setting video.skipDuplicateFrames to false. Check the Automatic Execution Video Generation section for details.

Version 1.12.x

28 Jul 18:24
Compare
Choose a tag to compare

Dynamic tests html report support

Though JUnit's dynamic tests execution was already supported, the html report generation wasn't. Dynamic tests are now shown as nested collapsible blocks, as you can see in the screenshot below. Please refer to the full docs for details.

dynamic-tests-extent-report

Version 1.11.x

30 May 19:15
1dba53f
Compare
Choose a tag to compare

Html reports with Google Charts

Beside the default html template, a new one that leverages Google's pie charts is available for both Summary and Testbook. Here's a preview of the latter:

html-testbook-pies

To pick this one, you just need to specify this template in your configuration.yaml:

testBook:
  enabled: true
  reporters:
    - html:
        template: templates/testbook-pies.html

Js

Thanks to @AndreaDotDev for working on the Add Javascript helper methods feature, Spectrum now injects the js object that you can use to programmatically execute Javascript actions without manually writing the scripts. As an example, instead of writing:

((JavascriptExecutor) driver).executeScript("arguments[0].value='Some text';", webElement);

you can directly do this:

js.sendKeys(webElement, "Some text");

Be sure to check the Javascript Executor docs for the details.

@JsWebElement

The Js implementation above lets you run Javascript programmatically in a clean way. If you need to always interact with a webElement using Javascript, you can also choose to annotate it with @JsWebElement like this:

@FindBy(tagName = "h1")
@JsWebElement
private WebElement title;

The result is that, without doing nothing else, you can call the regular webElement methods and the execution will actually be delegated to Js, resulting in Javascript-only interactions. This means, as an example, that methods like sendKeys or getText will actually be executed in Javascript.

Check the JsWebElement docs for the details.

Version 1.10.x

31 Mar 13:07
fb79d94
Compare
Choose a tag to compare

Inline HTML Report

You can now configure Spectrum to produce an inline html report, meaning a report that doesn't rely on external resources, like this:

extent:
  inline: true

This comes in handy when you need to share the report, either by sending it manually to someone else or by attaching it to an email via Spectrum. Check the details in the Inline Report docs paragraph.

Version 1.9.x

14 Mar 19:33
2cb6bab
Compare
Choose a tag to compare

Safari support

Spectrum now supports Safari. Check the Safari section in the docs for more details.

Adding .yml extension support

From now on, you can name all the yaml files with either .yaml or .yml extension.
This is valid for all yamls, such as configuration, data, and testbook.

Default mail template

The default mail template could already be used for either notifying about single tests or the whole suite. Now it also reports the result (success/failed) of the suite.

Check the Mail Consumer section in the docs for more details.

⚠️ Environments configuration

In order to have environments configured and activated in the same way we do for drivers, we now have two nodes in the configuration.yaml:

  • environments to configure all the environments you may need
  • runtime.environment to specify which one to pick

Check the Configuring the Environment section in the docs for more details.

⚠️ Changing configuration node name

To make it clear that the webDriver node in the configuration.yaml maps the configurations of the drivers that can be selected via the -Dspectrum.driver property, the name of this node has changed:

webDriverdrivers

Check the Configuring the Driver section in the docs for more details.


The two changes above, related to drivers and environments, are meant to provide a much clearer configuration. We now have these:

Configuration Node Selection Node Selection Property
drivers runtime.driver -Dspectrum.driver
environments runtime.environment -Dspectrum.environment

Where the columns are:

  • Configuration Node: name of the node in the configuration.yaml to map the configurations of all the possible drivers/environments
  • Selection Node: name of the node in the configuration.yaml to select the specific driver/environment to be used
  • Selection Property: name of the runtime property to select the specific driver/environment to be used

You can choose either to use the selection node or property.

Check the Drivers and Environments section in the docs for more details.

Version 1.8.x

24 Feb 18:45
3bbda5a
Compare
Choose a tag to compare

Appium Support

Spectrum now supports testing mobile and desktop applications via Appium. These drivers have been added:

  • uiAutomator2
  • espresso
  • xcuiTest
  • windows
  • mac2
  • appiumGeneric

Check the Appium environment section in the docs for more details.

⚠️ Changing property name

Due to the introduction of Appium, we now refer to drivers instead of browsers only. As a consequence, this property has changed:

spectrum.browserspectrum.driver

This means you now need to specify the driver needed to run your tests with -Dspectrum.driver=firefox or -Dspectrum.driver=uiAutomator2 for example.

Check the Available Drivers section in the docs for more details.

Version 1.7.x

20 Jan 22:13
bedcfae
Compare
Choose a tag to compare

⚠️ JDK 21

Spectrum is now built with a JDK 21. This means that projects using Spectrum need to use at least a jdk 21.

Disclaimer: such a change has been done for two reasons valid at the time of this writing:

  • Spectrum is not being publicly used
  • JDK 21 is the latest LTS

Default Waits on Specific Events

You can now provide a fixed wait time for each webDriver event in your configuration.yaml, as in the example below. Check the related docs for more details.

webDriver:
  events:
    beforeClick:
      wait: 1000

Minimal Banner

This is the new banner logged at the beginning of the execution:

  __________________________________________________
 /  ____                  _                         \
|  / ___| _ __   ___  ___| |_ _ __ _   _ _ __ ___    |
|  \___ \| '_ \ / _ \/ __| __| '__| | | | '_ ` _ \   |
|   ___) | |_) |  __/ (__| |_| |  | |_| | | | | | |  |
|  |____/| .__/ \___|\___|\__|_|   \__,_|_| |_| |_|  |
|  ******|_|***********************  Version: 1.7.0  |
|                                                    |
|        Please consider giving a GitHub star:       |
|        https://github.com/giulong/spectrum         |
 \__________________________________________________/

You can easily customise it by placing a file named src/test/resources/banner.txt in your project. That will be picked up and will effectively replace the internal one.

Version 1.6.x

14 Jan 15:39
b231979
Compare
Choose a tag to compare

Artifacts Retention Policies

You can configure the retention policies for the artifacts produced by each execution. Reports older than the number provided will be automatically deleted. You can have different retention policies for:

  • Extent reports
  • Summary reports (both txt and html)
  • TestBook reports (both txt and html)

This is an example snippet:

extent:
  retention:
    total: 10
    successful: 1

Full docs here

New default testbook template look and feel

Inspired by the Modernist theme

html-testbook

⚠️ TestBook Reporters

The default testBook reporters (log and html) have been removed from the internal configuration.default.yaml.
Since reporters are a list, and lists are merged by appending elements, having those in the default configuration meant they couldn't be deactivated. If you want to have those reporters active, you now need to declare them explicitly in your configuration*.yaml like this:

testBook:
  enabled: true
  reporters:
    - log: { } # the report will be logged
    - html:
        output: ${testBookReportOutput}/testbook.html # a html report will be produced at this path

Execution Summary

You can have Spectrum generate an execution summary by providing one or more summary reporters: log, txt, and html. Full docs here.

html-summary