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
}
}
}

More test step types please see from SoapUI API documentation:
https://support.smartbear.com/readyapi/apidocs/soapui/com/eviware/soapui/impl/wsdl/teststeps/package-summary.html

[SoapUI] 检查测试步骤的类型或者或者某种特定类型的步骤列表的更多相关文章

  1. Lambda语句中创建自定义类型时,也可指定某种特定类型,方法是在new与{}之间写上类型名称

    如: var fc =...ChildFath = fc.Select(c => new Child_Father { child = c.child, father = c.father }) ...

  2. python获取某路径下,某种特定类型的文件名称,os.walk(路径)生成器;os.listdir(路径),os.path.splitext(名称),os.path.join(路径,名称),os.path.isdir(路径\名称)

    #获取某文件夹下制定类型文件# import os# def filep(fp):# l=[]# a=os.walk(fp) #生成器# for nowp,sonp,oth in a: #当前目录,子 ...

  3. [SoapUI] 从测试套件,测试用例,测试步骤,测试数据各个级别控制是否执行

    自动保存 # -*- coding: utf-8 -*- import java.awt.Color import org.apache.poi.ss.usermodel.Cell import or ...

  4. SoapUI登录测试(2)-- 断言

    SoapUI登录测试(1)的结果为: 可以看到只有第2步是成功的,1.3的结果是unKnown,这里并没有对1.3两步添加断言,判断testCase中的这2步是否通过. 一.添加断言 1. /logi ...

  5. [转载]SOAPUI压力测试的参数配置

    原文地址:SOAPUI压力测试的参数配置作者:goooooodlife The different Load Strategies available in soapUI and soapUI Pro ...

  6. 《CLR via C#》读书笔记--基元类型、引用类型和值类型

    编程语言的基元类型 编译器直接支持的数据类型称为基元类型.基元类型直接映射到Framework类库中存在的类型.例如:C#中的int直接映射到System.Int32类型.下表给出了C#基元类型与对应 ...

  7. CLR via C#深解笔记三 - 基元类型、引用类型和值类型 | 类型和成员基础 | 常量和字段

    编程语言的基元类型   某些数据类型如此常用,以至于许多编译器允许代码以简化的语法来操纵它们. System.Int32 a = new System.Int32();  // a = 0 a = 1 ...

  8. 【C#进阶系列】05 基元类型、引用类型和值类型

     基元类型和FCL类型 FCL类型就是指Int32这种类型,这是CLR支持的类型. 而基元类型就是指int这种类型,这是C#编译器支持的,实际上在编译后,还是会被转为Int32类型. 而且学过C的朋友 ...

  9. Effective Java 第三版——61. 基本类型优于装箱的基本类型

    Tips 书中的源代码地址:https://github.com/jbloch/effective-java-3e-source-code 注意,书中的有些代码里方法是基于Java 9 API中的,所 ...

随机推荐

  1. TSP-UK49687

    Copied From:http://www.math.uwaterloo.ca/tsp/uk/index.html Shortest possible tour to nearly every pu ...

  2. 使用 tag 文件定义自定义标签

    ----------------------------------------------------------------------- 在jsp文件中,可以引用tag和tld文件. 1.对于t ...

  3. 简单分析下mybatis中mapper文件中小知识

    <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE mapper PUBLIC "-// ...

  4. spring梳理

  5. Android倒计时实现

    Android为我们封装好了一个抽象类CountDownTimer,可以实现计时器功能: /** * 倒数计时器 */ private CountDownTimer timer = new Count ...

  6. sql server driver ODBC驱动超时

  7. 收藏 —— KVM网络虚拟化

    http://www.cnblogs.com/CloudMan6/p/5240770.html http://www.cnblogs.com/CloudMan6/p/5289590.html

  8. Django之Auth模块 实现登录,退出,自带session 与认证功能的一个重要的模块

    Auth模板 1. 什么是Auth模块,有什么用? django的auth的模块的使用: auth 是集合注册,登录,注销,session 多个功能集合在一起的模块 2. 使用Auth组件的默认aut ...

  9. vue 全局组件【原】

    1.目录 2.内容 -Loading.vue <template> <div class="loading"> loading... </div> ...

  10. 恢复mysql 中root 用户的所有权限

    今天在研究数据库的时候不小心吧root用户的权限全给关了.这就尴尬了. 找了半天的解决方案. 如果你的用grant all 无法设定某个用户的权限可以试试这个方法. 1停止mysql服务器.使用ski ...