移除project,testsuite,testcase级别所有的custom properties
// Remove all custom properties on Project level. If removed, custom properties cannnot be injected to Project in new environment except default env
def removeProjectProperties(){
def propertyNames = testRunner.testCase.testSuite.project.getPropertyNames()
for (int i=0; i<propertyNames.size();i++){
testRunner.testCase.testSuite.project.removeProperty(propertyNames[i])
}
} // Remove all custom properties on TestSuite level
def removeTestSuiteProperties(){
def testSuiteList = testRunner.testCase.testSuite.project.getTestSuites()
def testSuiteName
for (testSuite in testSuiteList){
testSuiteName = testSuite.toString().split('=')[0]
def ts = testRunner.testCase.testSuite.project.getTestSuiteByName(testSuiteName)
def propertyNames = ts.getPropertyNames()
for (int i=0; i<propertyNames.size();i++){
ts.removeProperty(propertyNames[i])
}
}
} // Remove all custom properties on TestCase level
def removeTestCaseProperties(){
def testSuiteList = testRunner.testCase.testSuite.project.getTestSuites()
def testSuiteName
for (testSuite in testSuiteList){
testSuiteName = testSuite.toString().split('=')[0]
def testCaseList = testRunner.testCase.testSuite.project.getTestSuiteByName(testSuiteName).getTestCases()
def testCaseName
for (testCase in testCaseList){
testCaseName = testCase.toString().split('=')[0]
def tc = testRunner.testCase.testSuite.project.getTestSuiteByName(testSuiteName).getTestCaseByName(testCaseName)
def propertyNames = tc.getPropertyNames()
for (int i=0; i<propertyNames.size();i++){
tc.removeProperty(propertyNames[i])
}
}
}
}
移除project,testsuite,testcase级别所有的custom properties的更多相关文章
- Groovy解析xml并且注入Project,TestSuite,TestCase级别的custom properties
import com.eviware.soapui.support.GroovyUtils import groovy.util.XmlParser def groovyUtils = new Gro ...
- 在当前TestSuite/TestCase run之前先run另一个TestSuite/TestCase
在当前的TestSuite/TestCase的Setup Script里面写上这段代码: import com.eviware.soapui.model.support.PropertiesMap l ...
- soapUI 使用Property
DRY 原则是一个比较普适的东西,在使用soapUI测试的时候,为了make life easy,我们必须要使用Property来集中化一些设置. 比如说从dev->test->uat 的 ...
- [SoapUI] 在执行某个TestSuite之前先执行login或者其他什么前置步骤
打开TestSuite有一个地方可以设置Setup Script import com.eviware.soapui.model.support.PropertiesMap log.info &quo ...
- soapui groovy脚本汇总
出处:https://www.jianshu.com/p/ce6f8a1f66f4 一.一些内部元件的访问 testRunner.testCase开头 1.向下访问 testRunner.testCa ...
- SoapUI对于Json数据进行属性值获取与传递
SoapUI的Property Transfer功能可以很好地对接口请求返回的数据进行参数属性获取与传递,但对于Json数据,SoapUI会把数据格式先转换成XML格式,但实际情况却是,转换后的XML ...
- 使用 soapUI 测试 REST 服务
REST 服务介绍 REST(Representational State Transfer)是 Roy Fielding 博士在 2000 年提出的一种新的软件架构风格,它以资源(resource) ...
- [SoapUI] SoapUI可以做到些什么?功能有多强大?
SoapUI. The Swiss-Army Knife of Testing. Whether you’re a tester, developer, business analyst, or ma ...
- Mybatis使用Dao代码方式CURD
Mybatis 使用Dao代码方式进行增.删.改.查. 1.Maven的pom.xml <project xmlns="http://maven.apache.org/POM/4.0. ...
随机推荐
- virsh创建和恢复快照
virsh创建快照: virsh snapshot-create-as image的名称 snapshot的名称 例如: virsh snapshot-create-as 172.16.1.1_cen ...
- windbg运行
运行起来会提示windbg is running. BUSY 这个是正常运行的状态,只有发生异常,或者被指定断点,才会中断.
- .net(C#)在vs2010版本下的MVC如何才能运行静态页面(html)
正如,我上篇写的那样,那是在测试下,我所实现的方法,但是作为WEB项目,终究要发布的,故我把发布和切换在这说一下. 据我实测,我在按照我上篇改了Views下的Webconfig文件后,在解决方案下建了 ...
- ios视图frame和bounds的对比
bounds坐标:自己定义的坐标系统,setbound指明了本视图左上角在该坐标系统中的坐标, 默认值(0,0) frame坐标: 子视图左上角在父视图坐标系统(bounds坐标系统)中的坐标, ...
- 项目公共js(vue.js)
var urlHead = "http://hm.runorout.com/";// var urlHead = "/";/*加入跑班相关*/var urlGe ...
- PHP加速处理插件 Zend Optimizer,Zend Guard Loader 和 Zend Opcache 区别
PHP 5.3.X 以前版本 为 Zend Optimizer PHP 5.3.X 之后 更名为 Zend Guard Loader 可以帮助php执行加密后的php代码 安装实例以Ubu ...
- T-SQL、JET SQL、PL-SQL
数据库分为网状.层状.关系.对象四种类型,目前的数据库一般都是属于关系数据库(包括MYSQL和SQL SERVER),网状.层状基本上已成历史,对象类型尚未普及. SQL 语言是有 ANSI 标准的. ...
- ubuntu 跟xshell的问题
有2个分析: 1:是windos的防火墙没有关闭 2:是虚拟机没有安装sshd服务器 ubuntu在CLI界面下输入:dpkg -l |grep ssh 因为是我安装过的sshd server 要 ...
- win10 开机黑屏只显示鼠标
最靓,win10开机黑屏,网上试了很多办法没有解决,花了3个小时终于解决了,现在介绍一下方法. 首先,在黑屏模式下进入任务管理器,文件=>运行新任务=>Explorer.exe 此时桌面已 ...
- 纯CSS tooltip 提示
一般的tooltip,使用超链接的title,或者是css+javascript生成. 如果页面布局合理,样式结构清晰,可以使用纯CSS的提示. demo如下: a.tooltip { positio ...