SoapUI Pro Project Solution Collection-change the JDBC Request behavior
change the jdbc request :
1.change the driver name,connection string,query string or assert.
- the object we will use here is : JdbcRequestTestStep
TestCase newcase=testRunner.getTestCase();
JdbcRequestTestStep step1=(JdbcRequestTestStep) newcase.getTestStepByName(""); String driver=step1.getDriver();
String constr=step1.getConnectionString();
String password=step1.getPassword(); step1.setDriver(""); //if there's no driver should set as step1.setDriver(null)
step1.setConnectionString("");
step1.setPassword("");
- change the jdbc sql statement:
step1.setQuery("");
step1.setQueryTimeout("");
- change the assertion behavior(like xpath string,jquery string):
http://www.soapui.org/apidocs/com/eviware/soapui/model/testsuite/TestAssertion.html
int totalassert=step1.getAssertionCount();
for(int k=0;k<totalassert;k++){
TestAssertion asserts=step1.getAssertionAt(k);
if(asserts instanceof XPathContainsAssertion ){
if(asserts.getName().contains("Check count")){
String originalxpath=((XPathContainsAssertion) asserts).getPath();
String newxpath=originalxpath.replaceAll("Row", "Row2");
((XPathContainsAssertion) asserts).setPath(newxpath);
}
}
}
SoapUI Pro Project Solution Collection-change the JDBC Request behavior的更多相关文章
- SoapUI Pro Project Solution Collection –Easy develop Groovy Script to improve SoapUI ability
As you know the groovy script and java script language is the soapui supported .but unfortunately So ...
- SoapUI Pro Project Solution Collection-Test Step Object
Package com.eviware.soapui.model.testsuite used for access the current testsuite object, like test c ...
- SoapUI Pro Project Solution Collection-Custom project and setup
import java.util.List; import java.util.Map; import org.apache.log4j.Logger; import com.eviware.soap ...
- SoapUI Pro Project Solution Collection-access the soapui object
Technorati 标签: Soapui pro,web service,apI Testing
- SoapUI Pro Project Solution Collection-DataSource(jdbc,excel)
here give a solution for excel file change the excel configuration these: Set Excel file path in cur ...
- SoapUI Pro Project Solution Collection-XML assert
in soapui the XML object used here is from org.w3c.dom package so you need to read this article car ...
- SoapUI Pro 最新版本和最新功能
专为整个后端的端到端测试而构建 创建全面的端到端测试,以从API定义或实时端点验证API的整个工作流程.只需单击几下即可传递响应数据并添加断言-无需编码. 综合生成或配置数据 通过简单的数据驱动测试来 ...
- .net core EFCore CodeFirst 迁移出现错误【No project was found. Change the current working directory or use the --project option. 】
PM> dotnet ef Migrations add Init No project was found. Change the current working directory or u ...
- soapUI pro :INFO:Error getting response for []; javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
need to configure two for the https address: Step 1 export the certificate from the IE settings opti ...
随机推荐
- git代码提交步骤,教程
代码提交 代码提交一般有五个步骤: 1.查看目前代码的修改状态 2.查看代码修改内容 3.暂存需要提交的文件 4.提交已暂存的文件 5.同步到服务器 1. 查看目前代码的修改状态 提交代码之前 ...
- 《剑指offer》-青蛙跳台阶II
一只青蛙一次可以跳上1级台阶,也可以跳上2级--它也可以跳上n级.求该青蛙跳上一个n级的台阶总共有多少种跳法. 其实题目很水...就是一个等比数列通项公式嘛 f(0)=1 f(1)=1 f(n)=f( ...
- Vijos1906 联合权值 NOIP2014Day1T2 树形动态规划
欢迎访问~原文出处——博客园-zhouzhendong 去博客园看该题解 题目传送门 - Vijos1906 题意概括 有一棵树,每一个节点都有一个权值w[i].下面说的x,y都是该树中的节点. 对于 ...
- 开发一个支持多用户同时在线的FTP程序
FTP 要求: .用户加密认证 .允许同时多用户登录 .每个用户有自己的家目录,且只能访问自己的家目录 .对用户进行磁盘配额,每个用户的可用空间不同 .允许用户在ftp server上随意切换目录 . ...
- KAFKA的安装使用
一:介绍 1.官网 kafka.apache.org 2.产生 Kafka由 linked-in 开源 kafka-即是解决上述这类问题的一个框架,它实现了生产者和消费者之间的无缝连接. kafk ...
- Codeblocks 常用快捷键
编辑部分: Ctrl + A:全选Ctrl + C:复制Ctrl + X: 剪切Ctrl + V:粘贴Ctrl + Z:撤销Ctrl + S:保存Ctrl + Y / Ctrl + Shift + Z ...
- HDU 2795 Billboard【点修改】
<题目链接> 题目大意: 有一块h*w的矩形广告板,要往上面贴广告,然后给n个1*wi的广告,要求把广告贴上去,而且要求广告要尽量往上贴并且尽量靠左, 求第n个广告的所在的位置,不能贴则为 ...
- python的常用模块之collections模块
python的常用模块之collections模块 python全栈开发,模块,collections 认识模块 什么是模块? 常见的场景:一个模块就是一个包含了python定义和声明的文件,文 ...
- C# 创建多级文件夹示例
string str = ""; ; i < j; i++) { str = str + "\\新建文件夹" ; } System.IO.Director ...
- XHR对象
一.XMLHttpRequest对象 var xhr = new XMLHttpRequest(), i = 0; for(var key in xhr){ if(xhr.hasOwnProperty ...