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. js 空语句

    不写就行了 ){}

  2. JS 自由变量---JS 学习笔记(三) 补充

    自由变量:在 A 中作用域要用到的变量  x,并没有在 A 中声明,要到别的作用域中找到他,这个变量 x 就是自由变量.代码示例如下: var x = 20; function A (b) { ret ...

  3. Descriptio Resource Path LocationType Archive for required library: 'D:/apache-maven/apache-maven-3.6.0/mavenrepository/org/springframework/spring-aspects/4.3.7.RELEASE/spring-aspects-4.3.7.RELEASE.

    eclipse创建了一个maven项目后,在导入依赖包后返现项目有个红色刺眼的感叹号,再看控制台有个Problem提示 Descriptio Resource Path LocationType Ar ...

  4. [Linux]安装pyenv

    python多版本管理pyenv 网址:https://blog.csdn.net/yingfeng_yang/article/details/82527321 Ubuntu16.04安装pyenv1 ...

  5. erlang的热更新

    erlang作为一个为电信级别而出现的语言,热更新是其最重要的特性之一  热代码升级-Erlang允许程序代码在运行系统中被修改.旧代码能被逐步淘汰而后被新代码替换.在此过渡期间,新旧代码是共存的. ...

  6. python实现汉诺塔问题

    汉诺塔问题可以简单描述成为将a柱子上的圆盘按一定规则借助b柱子完美地复制到c柱子上.现假设有a,b,c三根柱子,a柱子上的圆盘从上到下依次标号为1,2,3,……,n,且为递增状态.规则:每次移动一个盘 ...

  7. Shovel Sale CodeForces - 899D (数位dp)

    大意: n把铲子, 价格1,2,3,...n, 求有多少个二元组(x,y), 满足x+y末尾数字9的个数最多. 枚举最高位, 转化为从[1,n]中选出多少个二元组和为$x$, 枚举较小的数 若$n\g ...

  8. 解决:SSM框架中普通类调用Service的问题 (转)

    http://blog.csdn.net/gwd1154978352/article/details/73480959

  9. .NET+MySql 踩坑1

    换成MySql数据库后,遇到的问题: 已解决,但不理解的问题: var test = db.test; 报如下图错误: 加上DefaultIfEmpty()则解决. var test = db.Tes ...

  10. Vagrant 入门指南

    https://blog.csdn.net/qianghaohao/article/details/80038096 https://blog.csdn.net/happyhorizion/artic ...