Skip to content

Getting_started

Johan Haleby edited this page Oct 25, 2021 · 31 revisions

Installation

Java DSL

Maven:

<dependency>
      <groupId>org.awaitility</groupId>
      <artifactId>awaitility</artifactId>
      <version>4.1.1</version>
      <scope>test</scope>
</dependency>

Gradle:

testImplementation 'org.awaitility:awaitility:4.1.1'

Note that Android developers may wish to replace testImplementation with androidTestImplementation.

Kotlin DSL

The Kotlin DSL adds some useful extension functions (it's not required to use Awaitility from Kotlin).

Maven:

<dependency>
      <groupId>org.awaitility</groupId>
      <artifactId>awaitility-kotlin</artifactId>
      <version>4.1.1</version>
      <scope>test</scope>
</dependency>

Gradle:

testImplementation 'org.awaitility:awaitility-kotlin:4.1.1'

Scala DSL

Maven:

<dependency>
      <groupId>org.awaitility</groupId>
      <artifactId>awaitility-scala</artifactId>
      <version>4.1.1</version>
      <scope>test</scope>
</dependency>

SBT:

val awaitility-scala = "org.awaitility" % "awaitility-scala" % "4.1.1"

Gradle:

testImplementation 'org.awaitility:awaitility-scala:4.1.1'

Groovy DSL

Maven:

<dependency>
      <groupId>org.awaitility</groupId>
      <artifactId>awaitility-groovy</artifactId>
      <version>4.1.1</version>
      <scope>test</scope>
</dependency>

Grapes:

@Grapes(
    @Grab(group='org.awaitility', module='awaitility-groovy', version='4.1.1')
) 

Gradle:

testImplementation 'org.awaitility:awaitility-groovy:4.1.1'

Non-Maven / Gradle users

Download Awaitility and put it in your class-path. You may also need to download the Hamcrest 2.1 and put it in your classpath as well. Scala users must also download awaitility-scala and Groovy users must download awaitility-groovy. Kotlin users may download awaitility-kotlin for additional extension functions.

Documentation

When you've successfully downloaded and configured Awaitility in your classpath please refer to the usage guide for examples.