concordion-exception-translator-extension

An extension to Concordion to modify exception message text.

License

License

GroupId

GroupId

org.concordion
ArtifactId

ArtifactId

concordion-exception-translator-extension
Last Version

Last Version

1.1.2
Release Date

Release Date

Type

Type

jar
Description

Description

concordion-exception-translator-extension
An extension to Concordion to modify exception message text.
Project URL

Project URL

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

Source Code Management

https://github.com/concordion/concordion-exception-translator-extension.git

Download concordion-exception-translator-extension

How to add to project

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

Dependencies

compile (1)

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

test (1)

Group / Artifact Type Version
org.concordion : concordion-extensions jar 1.1.1

Project Modules

There are no modules declared in this project.

Build Status Maven Central Apache License 2.0

This Concordion extension provides the capability to modify exception message text. While initially created to remove superfluous debug information from WebDriver exception messages, it could be used for translating exception messages to other languages.

The demo project demonstrates this extension using Concordion with Selenium WebDriver.

Installation

The extension is available from Maven Central.

Introduction

The easiest way to configure is to use the @Extension annotation on an instance field of type ExceptionTranslatorExtension within the fixture class.

For example, the following code configures the extension to remove text from the exception message starting from the string "Debug info:".

        @Extension
        public ConcordionExtension extension =
            new ExceptionTranslatorExtension(new ExampleMessageTranslator());

where ExampleMessageTranslator is:

        public class ExampleMessageTranslator() implements MessageTranslator {

            @Override
            public String translate(String originalMessage) {
                int debugInfoStart = originalMessage.indexOf("Build info:");
                if (debugInfoStart > 0) {
                    return originalMessage.substring(0, debugInfoStart);
                }
                return originalMessage;
            }
        }

Further info

org.concordion

Versions

Version
1.1.2