All Projects → willis7 → Soapui Gradle Plugin

willis7 / Soapui Gradle Plugin

Licence: mit
SoapUI Gradle Plugin

Programming Languages

groovy
2714 projects

Projects that are alternatives of or similar to Soapui Gradle Plugin

Gradle Git
Git plugin for Gradle
Stars: ✭ 559 (+3892.86%)
Mutual labels:  gradle-plugin
Gogradle
A Gradle Plugin Providing Full Support for Go
Stars: ✭ 712 (+4985.71%)
Mutual labels:  gradle-plugin
Ktargeter
Kotlin compiler plugin that allows overriding annotation use-site targets for properties
Stars: ✭ 24 (+71.43%)
Mutual labels:  gradle-plugin
Android Junit5
Testing with JUnit 5 for Android.
Stars: ✭ 580 (+4042.86%)
Mutual labels:  gradle-plugin
Thinrplugin
去除android中的R.class
Stars: ✭ 632 (+4414.29%)
Mutual labels:  gradle-plugin
Img Optimizer Gradle Plugin
一款用于优化png图片的gradle插件,有效减少APK体积,支持极限压缩和无损压缩。
Stars: ✭ 718 (+5028.57%)
Mutual labels:  gradle-plugin
Multi Os Engine
Multi-OS Engine: Create iOS Apps in Java (or Kotlin ... etc.)
Stars: ✭ 529 (+3678.57%)
Mutual labels:  gradle-plugin
Rust Android Gradle
Stars: ✭ 14 (+0%)
Mutual labels:  gradle-plugin
Shot
Gradle plugin developed to facilitate screenshot testing for Android
Stars: ✭ 668 (+4671.43%)
Mutual labels:  gradle-plugin
Gradle Release
gradle-release is a plugin for providing a Maven-like release process for projects using Gradle
Stars: ✭ 731 (+5121.43%)
Mutual labels:  gradle-plugin
Sdkhotfix
在用户规模千万级别的app中验证过,稳定无兼容问题,5分钟让你的SDK拥有热修复能力。A SDK hotfix library with stable verified in tens of millions of users can be accessed in only five minutes.
Stars: ✭ 585 (+4078.57%)
Mutual labels:  gradle-plugin
Jsonschema2pojo
Generate Java types from JSON or JSON Schema and annotate those types for data-binding with Jackson, Gson, etc
Stars: ✭ 5,633 (+40135.71%)
Mutual labels:  gradle-plugin
Kotless
Kotlin Serverless Framework
Stars: ✭ 721 (+5050%)
Mutual labels:  gradle-plugin
Gradle Task Tree
Gradle plugin that adds a 'taskTree' task that prints task dependency tree
Stars: ✭ 573 (+3992.86%)
Mutual labels:  gradle-plugin
Plantuml Gradle Plugin
Gradle plugin to build PlantUML diagrams from code (for living and up-to-date documentation)
Stars: ✭ 27 (+92.86%)
Mutual labels:  gradle-plugin
Let
Annotation based simple API flavored with AOP to handle new Android runtime permission model
Stars: ✭ 532 (+3700%)
Mutual labels:  gradle-plugin
Ktlint Gradle
A ktlint gradle plugin
Stars: ✭ 713 (+4992.86%)
Mutual labels:  gradle-plugin
Gradle Kotlin Aspectj Weaver
A Gradle plugin that allows you to weave your compiled Java and Kotlin files with AspectJ
Stars: ✭ 14 (+0%)
Mutual labels:  gradle-plugin
Gradle Defaults
Plugin providing opinionated defaults for Gradle projects.
Stars: ✭ 7 (-50%)
Mutual labels:  gradle-plugin
Typescript Generator
Generates TypeScript from Java - JSON declarations, REST service client
Stars: ✭ 729 (+5107.14%)
Mutual labels:  gradle-plugin

Gradle SoapUI plugin

SoapUI Logo

The plugin provides tasks for running SoapUI tests and mocks during a Gradle build.

Unfortunately, I don't have much time to contribute anymore. In practice this means far less activity, responsiveness on issues and new releases from my end.
I am ctively looking for contributors willing to take on maintenance and implementation of the project. If you are interested and would love to see this plugin continue to thrive, shoot me a mail.

Build Status

Build Status Coverage Status

Usage

This plugin has a fairly complex dependency tree. To use this plugin successfully we need to override some dependencies through forcing versions or completely substituting modules. See approach SmartBear uses solve jar-hell problem in their maven plugin. As a result your build file can look like this:

buildscript {
    ext {
        soapUIVersion = '5.3.0.RELEASE' // open source version
        // soapUIVersion = '5.1.2.PRO-RELEASE' // pro version
    }
    repositories {
        maven { url 'https://plugins.gradle.org/m2/' }
        maven { url 'http://www.soapui.org/repository/maven2/' }
        mavenCentral()
    }
    dependencies {
        compile("com.smartbear.soapui:soapui:$soapUIVersion") {
            exclude group: 'com.jgoodies', module: 'forms'
            exclude group: 'com.jgoodies', module: 'looks'
            exclude group: 'com.jgoodies', module: 'binding'
        }
    }
    configurations.all {
        resolutionStrategy {
            force 'com.jgoodies:binding:2.0.1',
                  'com.jgoodies:forms:1.0.7',
                  'com.jgoodies:looks:2.2.0'
        }
    }
}

apply plugin: 'io.byteshifter.soapui'

But for most common and trivial use-cases, buildscript configuration could be much simpler:

buildscript {
    repositories {
        jcenter()
        maven { url 'https://plugins.gradle.org/m2/' }
        maven { url 'http://smartbearsoftware.com/repository/maven2/' }
    }
    dependencies {
        classpath('gradle.plugin.io.byteshifter:soapui-gradle-plugin:5.3.0.RELEASE')
    }
}

apply plugin: io.byteshifter.plugins.soapui.SoapUIPlugin

Gradle Plugin Portal

Tasks

The soapui plugin pre-defines the following tasks out-of-the-box:

Task Name Type Description
soaptest TestTask Runs the SoapUI tests as specified by the plugin properties. Internally invokes the SoapUITestCaseRunner class as described there.
soapload LoadTestTask Runs the SoapUI loadtests as specified by the plugin properties. Internally invokes the SoapUILoadTestRunner class as described there.
soaptool ToolTask Runs the specified and configured code-generation tool. Internally invokes the SoapUIToolRunner class as described there.
soapmock MockServiceTask Runs the specified and configured code-generation tool. Internally invokes the SoapUIMockServiceRunner class as described there.

Task properties

soaptest properties

To configure the SoapUI test task you can choose to set the following properties within the test closure of the soapui extension:

  • projectFile : Specified the name of the SoapUI project file to use
  • testSuite : Specifies the name of the TestSuite to run
  • testCase : Specifies the name of the TestCase to run
  • endpoint : Overrides the service endpoint to be invoked by any TestRequests
  • host : Overrides the target host:port to be invoked by any TestRequests
  • username : Overrides the username used by any TestRequests run
  • password : Overrides the password used by any TestRequests run
  • domain : Overrides the domain used by any TestRequests run
  • printReport : Controls if a small test report should be printed to the console (true/false)
  • outputFolder : Set which folder results/reports are saved to
  • junitReport : Turns on creation of JUnit-reports, (true/false)
  • exportAll : Controls if all test requests should be exported (default only exports errors), (true/false)
  • settingsFile : Specifies SoapUI settings file to use
  • wssPasswordType : Specifies WSS password type
  • projectPassword : Specifies password for encrypted project
  • settingsFilePassword : Specifies password for encrypted settings file
  • globalProperties : Sets global properties
  • projectProperties : Sets project properties
  • saveAfterRun : Saves project file after run
  • testFailIgnore : Ignore failed tests.

loadtest properties

To configure the SoapUI load test task you can choose to set the following properties within the load closure of the soapui extension:

  • projectFile : Specified the name of the SoapUI project file to use
  • testSuite : Specifies the name of the TestSuite to run
  • testCase : Specifies the name of the TestCase to run
  • loadTest : Specifies the name of the LoadTest to run
  • limit : Overrides the limit of executed LoadTests
  • endpoint : Overrides the service endpoint to be invoked by any TestRequests
  • host : Overrides the target host:port to be invoked by any TestRequests
  • username : Overrides the username used by any TestRequests run
  • password : Overrides the password used by any TestRequests run
  • domain : Overrides the domain used by any TestRequests run
  • printReport : Controls if a small test report should be printed to the console (true/false)
  • outputFolder : Set which folder results/reports are saved to
  • settingsFile : Specifies SoapUI settings file to use
  • wssPasswordType : Specifies WSS password type
  • projectPassword : Specifies password for encrypted project
  • settingsFilePassword : Specifies password for encrypted settings file
  • saveAfterRun : Saves project file after run
  • threadcount : Number of threads in loadtest.

tool properties

  • projectFile : Specified the name of the SoapUI project file to use
  • iface : Specifies the interface to generate for
  • tool : Specifies the tool(s) to run, a comma-separated list of axis1, axis2, dotnet, gsoap, jaxb, wstools, wsconsume, ora, wscompile, wsi, wsimport, xfire or xmlbeans
  • settingsFile : Specifies SoapUI settings file to use
  • projectPassword : Specifies password for encrypted project
  • settingsFilePassword : Specifies password for encrypted settings file
  • outputFolder : Set which folder results/reports are saved to

mock properties

  • projectFile : Specified the name of the SoapUI project file to use
  • mockService : Specified the MockService to run
  • port : The local port to listen on, overrides the port configured for the MockService
  • path : The local path to listen on, overrides the path configured for the MockService
  • noBlock : Turns off blocking when MockRunner has started
  • settingsFile : Specifies SoapUI settings file to use
  • projectPassword : Specifies password for encrypted project
  • settingsFilePassword : Specifies password for encrypted settings file
  • saveAfterRun : Saves project file after run

Full Example

soapui {
    test {
        projectFile = 'sample-soapui-project.xml'
        testSuite = 'OleTest'
        printReport = true
        junitReport = true
    }
    load {
        projectFile = 'sample-soapui-load-project.xml'
        printReport = true
    }
    tool {
        projectFile = 'sample-soapui-tool-project.xml'
        iface = 'IOrderService'
        tool = 'wsi,axis1,axis2'
    }
}

Complex Example

There may be times when you have multiple test suites inside the same SoapUI project. You wouldn't want to maintain several Gradle projects, so the plugin uses convention mapping. This means you can have many tasks, but override the properties at runtime. Here's an example:

soapui {
    test {
        projectFile = 'sample-soapui-project.xml'
        printReport = true
        junitReport = true
    }
}

import io.byteshifter.plugins.soapui.tasks.TestTask

task testSuiteA(type: TestTask) {
    testSuite = 'SuiteA'
}

task testSuiteB(type: TestTask) {
    testSuite = 'SuiteB'
}

What you should notice in the example above is that we still use the soapui convention block with the nested test section. You may also have noticed that we have defined 2 new tasks of type TestTask. The TestTask is what runs the SoapUITestCaseRunner. The only difference between the 2 tasks is that they set their own value for testSuite. Through the magic of convention mapping the rest of the values are inherited.

Tons of TestSuites for enterprise-grade SoapUI test projects

In case of many TestSuites you might want use such approach to reduce a lot of duplications in your build script code:

[
    'SuiteA',
    'SuiteB',
    // ...
    'SuiteZ',

].each { suite ->
    tasks.create(name: suite, type: io.byteshifter.plugins.soapui.tasks.TestTask) {
        testSuite = suite
    }
}

Please, note: to run all of the TestSuites in this case, you can use only gradle soaptest command.

SoapUI test runner and plugin versions mapping

Previously, versions between soapui-gradle-plugin and SoapUI test runner was't synchronized. But after version 5.0.1 we will try to keep them synchronized as soon as newer SoapUI will be released.

soapui-gradle-plugin SoapUI test runner
0.2 5.0.1
5.1.0 5.1.0
... ...
5.3.1-RC 5.3.1-RC
5.3.0.RELEASE 5.3.0

Using Open Source Version: We do recommend use SoapUI runner version 5.3.0 - it's last fully featured and quite stable version of SoapUI. Version 5.3.1-RC1 was not released. Version 5.4.0 is very limited: LoadUI integration has been removed. To create and run advanced load tests, use LoadUI Pro, which is part of the ReadyAPI application suite.

Contribute

License

The project is licensed under the MIT license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].