在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):willis7/soapui-gradle-plugin开源软件地址(OpenSource Url):https://github.com/willis7/soapui-gradle-plugin开源编程语言(OpenSource Language):Groovy 100.0%开源软件介绍(OpenSource Introduction):Gradle SoapUI pluginThe plugin provides tasks for running SoapUI tests and mocks during a Gradle build.
Build StatusUsageThis 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 TasksThe
Task propertiessoaptest propertiesTo configure the SoapUI test task you can choose to set the following properties within the
loadtest propertiesTo configure the SoapUI load test task you can choose to set the following properties within the
tool properties
mock properties
Full Examplesoapui {
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 ExampleThere 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 Tons of TestSuites for enterprise-grade SoapUI test projectsIn 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 SoapUI test runner and plugin versions mappingPreviously, 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.
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
LicenseThe project is licensed under the MIT license. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论