[SoapUI] 循环遍历某个Test Case下的所有Test Step,将Cookie传递给这些Test Step
2015-06-26 12:31
591 查看
import com.eviware.soapui.support.types.StringToStringMap //Get cookie's value from the project level properties String cookie = context.expand( '${#Project#cookie}' ) log.info "cookie : "+cookie //Put cookie to StringMap def cookieMap = new StringToStringMap() cookieMap.put("Cookie",cookie) //Just add other test steps here if they also need cookie def testStepList = testRunner.testCase.getTestStepsOfType(com.eviware.soapui.impl.wsdl.teststeps.RestTestRequestStep.class) log.info "Test step number : "+testStepList.size() for (testStep in testStepList){ log.info "Pass cookie to test step : "+testStep.name testStep.testRequest.setRequestHeaders(cookieMap) }
相关文章推荐
- CCUI.ListView创建以及用法
- [SoapUI] 按照 Test Step Type 获取所有满足条件的 Test Step
- arduino rgb 3色灯
- UIButton 如何设置字体颜色
- 图解MBR分区无损转换GPT分区+UEFI引导安装WIN8.1
- 图解MBR分区无损转换GPT分区+UEFI引导安装WIN8.1
- 图解MBR分区无损转换GPT分区+UEFI引导安装WIN8.1
- 图解MBR分区无损转换GPT分区+UEFI引导安装WIN8.1 分类: Windows-嵌入式 生活百科 2015-06-26 11:57 475人阅读 评论(2) 收藏
- UIView及其子类围绕任意点旋转的方法
- UIKit:UITextField属性解析
- 【Android UI设计与开发】第13期:顶部标题栏(四)自定义ActionBar风格和样式
- Build生成者模型
- 【Android UI设计与开发】第12期:顶部标题栏(三)ActionBar实现层级导航的返回效果
- ios学习笔记:tableviewcell中ui设置frame问题
- SPOJ - DQUERY 【主席树】
- S5PV210开发系列四_uCGUI的移植
- [XCode] XCode 中设置 UI 部件的 z-order
- Windows 10 build 10149手机版上手多图欣赏
- [Android基础知识] 之二十二 UI设计之 LayoutInflater详解
- 问题解决——开启Guest后仍无法共享打印机