SoapUI Groovy : Check if test step is of specific type, such as : Wsdl, Rest, Jdbc, HTTP, Groovy etc

import com.eviware.soapui.impl.wsdl.teststeps.WsdlTestRequestStep
import com.eviware.soapui.impl.wsdl.teststeps.RestTestRequestStep
import com.eviware.soapui.impl.wsdl.teststeps.JdbcRequestTestStep
import com.eviware.soapui.impl.wsdl.teststeps.HttpTestRequestStep if (step instanceof WsdlTestRequestStep) {
log.info "Found a request step of Wsdl/Soap type"
} else if (step instanceof RestTestRequestStep) {
log.info "Found a request step of Rest type"
} else if (step instanceof JdbcRequestTestStep) {
log.info "Found a request step of jdbc type "
} else if (step instanceof HttpTestRequestStep) {
log.info "Found a request step of http type "
}

SoapUI Groovy: Get all test steps of specific type

import com.eviware.soapui.impl.wsdl.teststeps.RestTestRequestStep

def testSuiteList = testRunner.testCase.testSuite.project.getTestSuiteList()
for(testSuite in testSuiteList){
testCaseList = testSuite.getTestCaseList()
for(testCase in testCaseList){
testStepList = testCase.getTestStepsOfType(RestTestRequestStep)
for (testStep in testStepList){
testStepName = testStep.name
}
}
}

Get teststep of specific type的更多相关文章

  1. Beginning Scala study note(8) Scala Type System

    1. Unified Type System Scala has a unified type system, enclosed by the type Any at the top of the h ...

  2. C#/.NET Little Wonders: Use Cast() and OfType() to Change Sequence Type(zz)

    Once again, in this series of posts I look at the parts of the .NET Framework that may seem trivial, ...

  3. [GraphQL] Use GraphQL's Object Type for Basic Types

    We can create the most basic components of our GraphQL Schema using GraphQL's Object Types. These ty ...

  4. c++ RTTI(runtime type info)

    RTTI(Run-Time Type Information,通过运行时类型信息)程序能够使用基类的指针或引用来检查这些指针或引用所指的对象的实际派生类型. RTTI提供了以下两个非常有用的操作符: ...

  5. elasticSearch indices VS type

    elasticSearch 的中文文档 http://es.xiaoleilu.com/010_Intro/05_What_is_it.html https://www.elastic.co/blog ...

  6. Type Systems

    This section deals with more theoretical aspects of types. A type system is a set of rules used by a ...

  7. [TypeScript] Use the TypeScript "unknown" type to avoid runtime errors

    The "any" type can be very useful, especially when adding types to an existing JavaScript ...

  8. Welcome-to-Swift-18类型转换(Type Casting)

    类型转换是一种检查类实例的方式,并且哦或者也是让实例作为它的父类或者子类的一种方式. Type casting is a way to check the type of an instance, a ...

  9. Thinking in Java,Fourth Edition(Java 编程思想,第四版)学习笔记(十四)之Type Information

    Runtime type information (RTTI) allow you to discover and use type information while a program is ru ...

随机推荐

  1. SAP ERP SD模块中维护销售人员

    SAP ERP SD模块中维护销售人员信息并分配销售组织   分类: SAPHCM用户指南   在SAP ERP系统,销售和分销(SD)模块中需要创建销售人员(Sales Personnels)消息, ...

  2. Unity 根据手机陀螺仪,实现流动UI效果

    Unity 根据手机陀螺仪,实现流动UI效果 设置Canvas 模式设置为 Screen Space - Camera 指定Camera 挂载脚本 挂载Target using System; usi ...

  3. video 自动循环播放

    video 只加autoplay并不能自动播放,需要再加上muted   <video controls="controls" autoplay loop muted> ...

  4. Reids 持久化AOF 重写实现原理

    AOF重写 AOF重写并不需要对原有AOF文件进行任何的读取,写入,分析等操作,这个功能是通过读取服务器当前的数据库状态来实现的.(auto-aof-rewrite-percentage和auto-a ...

  5. vim 复制粘贴

    首先进入块模式 Ctrl+ v 使用按键j/k/h/l进行选中多列 使用按键y进行复制 在insert模式下:使用按键p进行粘贴

  6. 雷林鹏分享:CodeIgniter常用的数据库操作类

    在 CodeIgniter 中,使用数据库是非常频繁的事情.你可以使用框架自带的数据库类,就能便捷地进行数据库操作. 初始化数据库类 依据你的数据库配置载入并初始化数据库类: $this->lo ...

  7. UML与软件建模:第一次作业(用例图绘制)

    一.小结 用例图是UML用于描述软件功能的图形.用例图包括用例.参与者及其关系,用例图也可以包括注释和结束. 用例图的要素: (1)参与者,即与用例存在交互关系的系统外部实体; (2)用例,用来描述个 ...

  8. Oracle中用户的创建和权限设置

    权限: CREATE SESSION --允许用户登录数据库权限 CREATE TABLE --允许用户创建表权限 UNLIMITED TABLESPACE --允许用户在其他表空间随意建表 角色: ...

  9. CF923E Perpetual Subtraction

    生成函数好题! 搬一手铃悬的题解(侵删) 现在只需要考虑怎么求出g和逆变换即可,其实也就是对函数F(x)求F(x+1)和F(x-1). 直接二项式定理展开发现是个卷积的形式,大力NTT即可. #inc ...

  10. 判断PDF文件是否相同(通过二进制流判断)

    一.Java代码 1.将PDF转为字节流    /*     * @step     *  1.使用BufferedInputStream和FileInputStream从File指定的文件中读取内容 ...