Monday, 19 October 2020

Configure Gradle dependencies in Eclipse for API Automation with Rest Assured?

 




To perform API Automation with Rest Assured we need add multiple Jars to the Gradle project.

Below is the list of all dependencies required:

  • TestNG
  • Json
  • Extent Report
  • Log4j

Just copy the below part and paste it in build.gradle and all your required dependencies will be added t the project.

Gradle dependencies for Rest Assured Framework Setup:
/*

 * This file was generated by the Gradle 'init' task.

 *

 * This generated file contains a sample Java Library project to get you started.

 * For more details take a look at the Java Libraries chapter in the Gradle

 * User Manual available at https://docs.gradle.org/5.6.1/userguide/java_library_plugin.html

 */

 

plugins {

    // Apply the java-library plugin to add support for Java Library

    id 'java-library'

}

apply plugin: 'maven'

repositories {

    // Use jcenter for resolving dependencies.

    // You can declare any Maven/Ivy/file repository here.

    jcenter()

}

 

dependencies {

    // This dependency is exported to consumers, that is to say found on their compile classpath.

    api 'org.apache.commons:commons-math3:3.6.1'

 

    // This dependency is used internally, and not exposed to consumers on their own compile classpath.

    implementation 'com.google.guava:guava:28.0-jre'

 

    // Use JUnit test framework

    testImplementation 'junit:junit:4.12'

   

    compile 'io.rest-assured:rest-assured:3.0.7'

    compile 'com.google.code.gson:gson:2.2.+'

    compile 'org.testng:testng:6.13.+'

    compile 'commons-io:commons-io:2.4'

    compile group: 'com.googlecode.json-simple', name: 'json-simple', version: '1.1.1'

    compile 'com.relevantcodes:extentreports:2.41.2'

    compile 'log4j:log4j:1.2.17'

       compile 'org.slf4j:slf4j-api:1.7.5'

       compile 'org.slf4j:slf4j-log4j12:1.7.5'

       compile 'commons-logging:commons-logging:1.1.1'

      

}


Check below link for question SET-01:
Top API Interview Question 1-10
 
Check below link for question SET-02:
Top API Interview Question 11-20  
 

For Online Training on SDET contact 9619094122, starting new batch from November First week.  

*************************************************

API Testing Interview Question Set:
https://automationreinvented.blogspot.com/search/label/Rest-API

 
Kubernetes Interview Question Set
https://automationreinvented.blogspot.com/search/label/Kubernetes

 
Docker Interview Question Set
https://automationreinvented.blogspot.com/2020/02/top-18-docker-commands-for-aytomation.html

 
Linux Interview question Set
https://automationreinvented.blogspot.com/search/label/Linux

 
Automation Testing/SDET Framework Design
https://automationreinvented.blogspot.com/search/label/FrameworkDesign


Java Related Interview Question Set

https://automationreinvented.blogspot.com/search/label/Java


GIT Interview Question Set:
https://automationreinvented.blogspot.com/search/label/GIT


Coding Interview Question Set:
https://automationreinvented.blogspot.com/search/label/Coding%20Questions

 

Want to learn more? ...Check below link for more java interview question:

 

No comments:

Post a Comment

All Time Popular Posts

Most Featured Post

Introduction to Web Testing with Playwright

  Introduction to Web Testing with Playwright 📌  Telegram Group:  https://t.me/+FTf_NPb--GQ2ODhl 📌  YouTube channel:  https://lnkd.in/gGUG...