Thursday, January 2, 2020

Gradle_Set_Up

Installation:

1. Eclipse
2. Help
3. Eclipse Marketplace
4. search for gradle 
5. Note: Select "Buildship Gradle Integration 3.0"
6. click install




7. Download Gradle

https://drive.google.com/open?id=13X7tM0-hjcI5C3IK4_0JLdHqEE9bj-wV

8.Extract and save in any of the drive.

9. Copy and Add path as below


10.Add the dependencies under build.gradle. open and add the below dependencies




--------------------------------------------------------------------------------------------
/*
 * 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
 */
apply plugin: 'java'
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
version = '1.2.1'




repositories {
    // Use jcenter for resolving dependencies.
    // You can declare any Maven/Ivy/file repository here.
    jcenter()
      mavenCentral()
      maven {url  "http://nexus01.cloud.operative.com:8081/nexus/content/groups/public" }
      mavenLocal()
}


dependencies {
    // This dependency is exported to consumers, that is to say found on their compile classpath.
    compile 'org.seleniumhq.selenium:selenium-java:3.14.0'
    compile 'net.sourceforge.jexcelapi:jxl:2.6.12'
    compile 'org.apache.poi:poi-ooxml:3.10-FINAL'
    compile 'org.apache.poi:poi-ooxml-schemas:3.10-FINAL'
    compile 'com.squareup.okhttp:okhttp:2.7.5'
    compile 'com.squareup.okhttp3:okhttp:3.9.1'
    compile 'org.mongodb:mongodb-driver:3.4.3'
    compile 'com.fasterxml.jackson.core:jackson-databind:2.9.8'
    compile 'com.fasterxml.jackson.core:jackson-annotations:2.9.8'
    compile 'com.fasterxml.jackson.core:jackson-core:2.9.8'
    compile 'org.codehaus.jackson:jackson-core-asl:1.9.13'
    compile 'org.codehaus.jackson:jackson-mapper-asl:1.9.13'
    compile 'javax.json:javax.json-api:1.1'
    compile 'org.glassfish:javax.json:1.0.4'
    compile 'com.googlecode.json-simple:json-simple:1.1.1'
    compile 'org.json:json:20171018'
    compile 'org.elasticsearch:elasticsearch:5.6.2'
    compile 'org.elasticsearch.client:transport:5.6.2'
    compile 'com.amazonaws:aws-java-sdk:1.11.163'
    compile 'redis.clients:jedis:2.6.2'
    compile 'mysql:mysql-connector-java:5.1.6'
     // https://mvnrepository.com/artifact/io.github.bonigarcia/webdrivermanager
    compile group: 'io.github.bonigarcia', name: 'webdrivermanager', version: '3.7.1'
    testCompile 'org.testng:testng:6.14.3'
    testCompile 'io.rest-assured:rest-assured:3.0.0'
    // This dependency is used internally, and not exposed to consumers on their own compile classpath.
    implementation 'com.google.guava:guava:28.0-jre'
    compile fileTree(dir: 'lib', include: '*.jar')
    compile 'com.opencsv:opencsv:5.0'
    // https://mvnrepository.com/artifact/com.aventstack/extentreports
    compile group: 'com.aventstack', name: 'extentreports', version: '3.0.0'
    // https://mvnrepository.com/artifact/com.relevantcodes/extentreports
    compile group: 'com.relevantcodes', name: 'extentreports', version: '2.40.2'
    // https://mvnrepository.com/artifact/io.rest-assured/xml-path
   compile group: 'io.rest-assured', name: 'xml-path', version: '3.1.0'
   // https://mvnrepository.com/artifact/io.rest-assured/json-schema-validator
   compile group: 'io.rest-assured', name: 'json-schema-validator', version: '3.0.0'

     
     
    
}

ext.testFile = System.getProperty('Test_Plan') ?: 'testng.xml'

test {
    useTestNG {
        suites "/$testFile"
         useDefaultListeners = true
    }
    test.ignoreFailures = true
    reports.html.enabled = false
   }
  
  test {
   systemProperty "Env",System.getProperty("Env")
  }
   


 task testJar(type: Jar) {
  classifier = 'tests'
from sourceSets.test.output
}

 task testSourcesJar(type: Jar, dependsOn: classes) {
    classifier = 'testSources'
    from sourceSets.test.allSource
}


artifacts {
  archives testJar
}


---------------------------------------------------------------------------------------------------------------------------------

No comments:

Post a Comment

Selenium_Grid_With_Docker_Compose(yml file)

 docker-compose.yml version: "3" services:   hub:     image: selenium/hub:3.141.59     ports:       - "4444:4444"   chro...