Skip to content

Instantly share code, notes, and snippets.

@arifsuhan
Last active September 2, 2021 17:38
Show Gist options
  • Save arifsuhan/08e5931e018ca59382358a4caa926510 to your computer and use it in GitHub Desktop.
Save arifsuhan/08e5931e018ca59382358a4caa926510 to your computer and use it in GitHub Desktop.
Dependency for RestAssured ( build gradle )

Steps to setup gradle project

  1. Create Gradle project:
   gradle init
  1. Add Dependency in build.gradle
  2. Build gradle project
   gradle build
  1. Finally run test
   gradle test --tests [class name]
   gradle test 

build.gradle

plugins {
    id 'java'
}

group 'org.example'
version '1.0-SNAPSHOT'

repositories {
    mavenCentral()
}

dependencies {
    implementation 'com.googlecode.json-simple:json-simple:1.1'
    implementation 'org.junit.jupiter:junit-jupiter:5.4.2'
    implementation 'org.junit.jupiter:junit-jupiter:5.4.2'
    testImplementation 'io.rest-assured:rest-assured:4.3.1'
    testImplementation 'junit:junit:4.12'
    testImplementation 'com.opencsv:opencsv:5.4'
    testImplementation 'com.google.code.gson:gson:2.8.6'
}

test {
    testLogging {
        events "passed", "skipped", "failed", "standardOut", "standardError"
    }
    test.outputs.upToDateWhen {false}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment