concordion-timing-extension

An extension to Concordion that adds timings

License

License

GroupId

GroupId

org.concordion
ArtifactId

ArtifactId

concordion-timing-extension
Last Version

Last Version

1.1.0
Release Date

Release Date

Type

Type

jar
Description

Description

concordion-timing-extension
An extension to Concordion that adds timings
Project URL

Project URL

https://github.com/concordion/concordion-timing-extension
Source Code Management

Source Code Management

https://github.com/concordion/concordion-timing-extension.git

Download concordion-timing-extension

How to add to project

<!-- https://jarcasting.com/artifacts/org.concordion/concordion-timing-extension/ -->
<dependency>
    <groupId>org.concordion</groupId>
    <artifactId>concordion-timing-extension</artifactId>
    <version>1.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.concordion/concordion-timing-extension/
implementation 'org.concordion:concordion-timing-extension:1.1.0'
// https://jarcasting.com/artifacts/org.concordion/concordion-timing-extension/
implementation ("org.concordion:concordion-timing-extension:1.1.0")
'org.concordion:concordion-timing-extension:jar:1.1.0'
<dependency org="org.concordion" name="concordion-timing-extension" rev="1.1.0">
  <artifact name="concordion-timing-extension" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.concordion', module='concordion-timing-extension', version='1.1.0')
)
libraryDependencies += "org.concordion" % "concordion-timing-extension" % "1.1.0"
[org.concordion/concordion-timing-extension "1.1.0"]

Dependencies

compile (1)

Group / Artifact Type Version
org.concordion : concordion jar 2.1.0

Project Modules

There are no modules declared in this project.

Build Status Apache License 2.0

This Concordion extension provides the capability to embed the processing time of each specification example at runtime.

The demo project demonstrates this extension.

Introduction

Often it is useful to know how long a given example or specification takes to run. This extension provides this by printing the timing to screen for each example and specification that is run. The functionality can be toggled on or off via a toggle button located at the top right of the output specification.

How to install

Add to dependencies

 testCompile 'org.concordion:concordion-timing-extension:1.1.0'

This requires Concordion 2.1.0 or later.

How to use

For the timings to show on examples, you must be using the example command in your specification (Markdown format, HTML format).

For the timings to show on examples on a table, you must be running each row as an example (Markdown format, HTML format).

Add to your test fixture one of these options:

With no configuration

@Extensions(value = TimerExtension.class)

With comprehensive configuration

@Extension
ConcordionExtension TimingExtension = new TimerExtension()
    .withShowByDefault(true)
    .withOnIcon("/path/to/icon-on.png")
    .withOffIcon("/path/to/icon-off.png")
    .withTimeFormat(new SimpleTimeFormatter(" hours", " minutes", " seconds", " milliseconds"));

Features

Timings per example

Example timing

Timings per example on table

Table timing

Timings on run command

Run timing

Customisable timing format and toggle icon

Customised Example

Toggle display of timings

Customised Example

Other Extension Compatibility

Compatible Extensions

Incompatible Extensions

Further info

org.concordion

Versions

Version
1.1.0
1.0.0
0.3.0
0.2.0
0.1.0