Showing posts with label gradle. Show all posts
Showing posts with label gradle. Show all posts

Wednesday, March 16, 2016

Gradle : Debugging Gradle Project

Gradle : Debugging Gradle Project



Since my last Analysis I found fairly less information on Debugging Gradle in my line of work which is specifically on Automation .

So the most convenient way was Debug using TestNG rather than Gradle .As I prefer using TestNg as my Automation Framework over Junit so there will be Testng.xml in the project folder (or similar xml file ).


One can directly Start debugging  by :Rt ck on testng.xml > Debug As >TestNg


If you are getting any error make sure you do these.Assuming you are using Eclispe
  1. Make sure you have plugin TestNg installed to eclipse .If not then goto Help>Market Place>Enter "testng" and search.
  2. Select testNG for Eclipse and click on Install >Select all options > restart Eclipse after installing
  3. goto  Project (title bar) > Clean
  4. Rt ck on Project > Properties >Java Build Path>Add Library > Select TestNG >Ck on OK

Now user should be able to Debug for Gradle projects using Testng as well using Rt ck on testng.xml > Debug As >TestNg .



Wednesday, March 9, 2016

Gradle : Using gradle in Command prompt

Using gradle in Command prompt

Make sure Gradle is setup in your system environment variables


Downloading with Git using Windows CMD from a GitHub project
You can get download the link from GitHub <b>HTTPS clone URL</b>
Download with Window Command Prompt cmd for above picture HTTPS clone URL


  1.  Copy the HTTPS clone URL shown in picture 1
  2. Open CMD
  3. git clone //paste the URL show in picture 2
  4. or you can just click on button "Clone in desktop" or "Download ZIP"

Running Gradle tests
  1. In cmd prompt > Goto the downloaded directory
  2. gradle clean
  3. gradle builddependents
  4. gradle  

Sunday, March 6, 2016

Gradle : How to Setup Gradle

How to Set Gradle

  1. Download the latest gradle from https://services.gradle.org/distributions
  2. Extract to C drive >Program files
  3. Note down the path for the folder 
  4. Open Environment variables >System Variables
  5. Click on new button
  6. Enter variable  name: GRADLE_HOME
  7. Variable path : C:\Program Files\gradle-2.10
     
  8. Open Environment variables >System Variables
  9.  select "path"under system variables
  10. Click on Edit button
  11. Add following at the end of the string ";%GRADLE_HOME%\bin"
  12.  
  13. Open Cmd
  14. type "gradle -v"