移除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. ...
随机推荐
- Asp.NET Visible属性与HTML display:none
作为Asp.NET 程序猿,我们经常会遇到客户端HTML 元素与 WebPage Server端控件互操作的情景.如果没有很好的掌握两种技术的细节就很容易发生一些“莫名其妙的错误”. 我最近犯的一个错 ...
- eclipse绘制activiti无法生成图形
今天使用eclipse绘制acitiviti,发现无法绘制图形,设置里面勾选也勾选了,同时activiti插件也是最新的,最后发现同时打开了两个eclipse窗口就不支持生成图形,看来只能开一个窗口了 ...
- mysql 正则篇
一.SQL模式 SQL的模式匹配允许你使用“_”匹配任何单个字符,而“%”匹配任意数目字符(包括零个字符).在 MySQL中,SQL的模式缺省是忽略大小写的.下面显示一些例子.注意在你使用SQL模式时 ...
- 对HTML5校验 自定义验证信息
在HTML5中,表单可以定义一个属性required来触发默认的校验机制,比如: <input type="text" required /> 弹出的错误提示默认为英文 ...
- 不刷新页面获取HTML进行显示
$.ajax({ url: "请求地址", dataType: "text", type: "GET" ...
- js动态替换数据的点击事件
做项目时遇到的,具体是界面如下图:当点击X号时,出现删除.取消按钮,当点击删除时,这一行删除,当点击取消时又恢复到初始状态. 需要关注的问题是,js动态添加的删除.取消按钮的点击事件.当点击取消时恢复 ...
- SAP验证
需求:财务录费用凭证,检查科目6601001-6601999 & 成本中心为1000R001 - 1000R999,工单不能为空 GGB0 1.选择财务凭证->行项目->新建确认' ...
- js字符串和正则表达式中的match、replace、exec等的配合使用
正则并不是经常使用,而正则和字符串之间的函数关系又错综复杂,谁是谁的函数,又是怎么样的一种结果,往往我们是看一遍忘一遍,对此我是头疼不已,感觉自己是个笨蛋^_^. 为了以后不再查文档,特此把常用的函数 ...
- jquery 格式化日期
function setMaxEndDate(){ var beginDate=$("#beginDate").val(); var time = new Date(beginDa ...
- C# 中的 Static
今天测试了一下C#中 static 的初始化顺序: 1.调用时才初始化, 2.按照调用顺序初始化 3.先执行类的静态方法,然后初始化静态变量及方法 4.继承时,先执行子类的静态方法,然后执行父类的静态 ...