• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

manupsunny/gauge-gradle-plugin: Gradle plugin for Gauge. For support, please vis ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

manupsunny/gauge-gradle-plugin

开源软件地址(OpenSource Url):

https://github.com/manupsunny/gauge-gradle-plugin

开源编程语言(OpenSource Language):

Java 98.8%

开源软件介绍(OpenSource Introduction):

Maven Central Download Codacy Badge License

Gauge Gradle Plugin

For support, please visit https://github.com/getgauge/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'
}

Older Versions of the Plugin are also available at Gradle Plugin Portal. For an uptodate version of the Plugin please use buildscript and mavenCentral() in your build.gradle as shown in the example above.

Executing specs using gradle

To execute gauge specs,

gradle gauge

Execute list of specs

gradle gauge -PspecsDir="specs/first.spec specs/second.spec"

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




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap