// 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])
}
}
}
}

最新文章

  1. ASP.NET CORE dotnet run 命令使用debug方式运行
  2. map 取值
  3. JavaScript常用函数之Eval()使用
  4. 大素数测试 求因子 poj 1811
  5. SSH协议及其应用
  6. ExtJs4 SpringMvc3 实现Grid 分页
  7. 【BZOJ】【2157】旅游
  8. HDU 5266 pog loves szh III (线段树+在线LCA转RMQ)
  9. Verilog HDL中阻塞语句和非阻塞语句的区别
  10. Palindrome(Manacher)
  11. evnetlet hub
  12. Android接收wifi路由器发送过来的一组字节数据
  13. 每天一道Java题[6]
  14. Struts框架2
  15. openstack安装在虚拟机上重启之后无法启动问题
  16. python_13 面向对象
  17. Git和Gitlab
  18. [转]uboot中SPI Flash Booting配置
  19. smarty学习——基本概念
  20. 基于jquery的插件turn.js学习笔记

热门文章

  1. iOS app 企业内部发布及HTTPS服务器配置
  2. web前端图片极限优化策略
  3. HTML5 十大新特性(六)——地理定位
  4. this的指向(慢慢添加)
  5. angular中动态添加的元素绑定事件问题
  6. 多线程环境的UI控件属性更新
  7. 贪婪 vs 不贪婪
  8. linux命令格式及基础命令(一)
  9. Hadoop集群配置过程中需要注意的问题
  10. (48) odoo的button用法