Image assertion library

Image assertion library brings image comparison into automated testing.

Лицензия

Лицензия

Категории

Категории

Wire Данные Data Structures
Группа

Группа

com.hotwire.image-assert
Идентификатор

Идентификатор

image-assert
Последняя версия

Последняя версия

1.0.5
Дата

Дата

Тип

Тип

jar
Описание

Описание

Image assertion library
Image assertion library brings image comparison into automated testing.

Скачать image-assert

Как подключить последнюю версию

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

Зависимости

compile (2)

Идентификатор библиотеки Тип Версия
org.jetbrains.kotlin : kotlin-stdlib jar 1.2.31
com.google.code.gson : gson jar 2.8.2

Модули Проекта

Данный проект не имеет модулей.

Build Status Download

System requirements

ImageMagick 6.9.0+ must be installed and added to PATH variable

Dependencies

Maven
<dependency>
	<groupId>com.hotwire.image-assert</groupId>
	<artifactId>image-assert</artifactId>
	<version>1.0.5</version>
</dependency>
Gradle
'com.hotwire.image-assert:image-assert:1.0.5'

Usage

Approach and syntax are similar to FEST-Assert library. Use static method assertThat() to create ImageAssert instance. By default, ImageAssert instance does not report comparison results neither throws an exception, so you will need to provide one or multiple listeners using reportingTo() method.

Examples

You can create an ImageAssert instance and use chained calls to compare two images:

    ImageAssert.assertThat(screenshot)
            .reportingTo(ThrowExceptionResultListener())
            .isEqualTo(resource);

Alternatively, you can create a method to return a pre-configured instance of ImageAssert:

    ImageAssert assertThat(Image image) {
        return ImageAssert.assertThat(image)
                .reportingTo(PrintStreamResultListener())
                .reportingTo(ThrowExceptionResultListener())
    }

and then use it instead of static method (static methods are awful, right?):

    assertThat(screenshot())
        .isEqualTo(resource());
com.hotwire.image-assert

Hotwire

Find 4-star hotels at 2-star prices

Версии библиотеки

Версия
1.0.5
1.0.4
1.0.3
1.0.2