Giter VIP home page Giter VIP logo

gauge-gradle-plugin's Introduction

Maven Central Download Build Status Codacy Badge License

Gauge Gradle Plugin

Use the gauge-gradle-plugin to execute specifications in your Gauge java project and manage dependencies using Gradle.

Using plugin in project

Apply plugin gauge and add classpath to your build.gradle. Here is a sample gradle file,

apply plugin: 'java'
apply plugin: 'gauge'
apply plugin: 'application'

group = "my-gauge-tests"
version = "1.1.0"

description = "My Gauge Tests"

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.thoughtworks.gauge.gradle:gauge-gradle-plugin:+'
    }
}

repositories {
    mavenCentral()
}

dependencies {
    'com.thoughtworks.gauge:gauge-java:+',
}

// configure gauge task here (optional)
gauge {
    specsDir = 'specs'
    inParallel = true
    nodes = 2
    env = 'dev'
    tags = 'tag1'
    additionalFlags = '--verbose'
    gaugeRoot = '/opt/gauge'
}

The plugin is also available at Gradle Plugin Portal. Find more details here..

Executing specs using gradle

To execute gauge specs,

gradle gauge

Execute specs in parallel

gradle gauge -PinParallel=true -PspecsDir=specs

Execute specs by tags

gradle gauge -Ptags="!in-progress" -PspecsDir=specs

Specifying execution environment

gradle gauge -Penv="dev" -PspecsDir=specs

Note : Pass specsDir parameter as the last one.

All additional Properties

The following plugin properties can be additionally set:

Property name Usage Description
specsDir -PspecsDir=specs Gauge specs directory path. Required for executing specs
tags -Ptags="tag1 & tag2" Filter specs by specified tags expression
inParallel -PinParallel=true Execute specs in parallel
nodes -Pnodes=3 Number of parallel execution streams. Use with parallel
env -Penv=qa gauge env to run against
additionalFlags -PadditionalFlags="--verbose" Add additional gauge flags to execution
gaugeRoot -PgaugeRoot="/opt/gauge" Path to gauge installation root

See gauge's command line interface for list of all flags that be used with -PadditionalFlags option.

Adding/configuring custom Gauge tasks

It is possible to define new custom Gauge tasks by extending GaugePlugin class. It can be used to create/configure tasks specific for different environments. For example,

task gaugeDev(type: GaugeTask) {
    doFirst {
        gauge {
            specsDir = 'specs'
            inParallel = true
            nodes = 2
            env = 'dev'
            additionalFlags = '--verbose'
        }
    }
}

task gaugeTest(type: GaugeTask) {
    doFirst {
        gauge {
            specsDir = 'specs'
            inParallel = true
            nodes = 4
            env = 'test'
            additionalFlags = '--verbose'
        }
    }
}

License

GNU Public License version 3.0

Gauge Gradle Plugin is released under GNU Public License Version 3.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.