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 ...
随机推荐
- VEMap.DeleteAllShapeLayers 方法
来源:https://msdn.microsoft.com/zh-cn/library/bb412514.aspx <!DOCTYPE html PUBLIC "-//W3C//DTD ...
- Hibernate的四种查询方式(主键查询,HQL查询,Criteria查询,本地sql查询)和修改和添加
Hibernate的添加,修改,查询(三种查询方式)的方法: 案例演示: 1:第一步,导包,老生常谈了都是,省略: 2:第二步,创建数据库和数据表,表结构如下所示: 3:第三步创建实体类User.ja ...
- 【BZOJ2839】集合计数&&【BZOJ3622】已经没有什么好害怕的了
再谈容斥原理来两道套路几乎一致的题目[BZOJ2839]集合计数Description一个有N个元素的集合有2^N个不同子集(包含空集),现在要在这2^N个集合中取出若干集合(至少一个),使得它们的交 ...
- 空指针null
Java中,null是一个关键字,用来标识一个不确定的对象.因此可以将null赋给引用类型变量,但不可以将null赋给基本类型变量 Java默认给变量赋值:在定义变量的时候,如果定义后没有给变量赋值, ...
- vi命令修改文件及保存的使用方法
简单点:vi文件名,按"I"进入insert模式,可以正常文本编辑,编辑好之后按“esc”退出到“命令模式”,再按“shift+:”进入“底行模式”, 按“:wq”保存退出! 还一 ...
- P3147 [USACO16OPEN]262144
P3147 [USACO16OPEN]262144一道非常有趣的游戏,不,题目.当数据水时,可以这样表示状态.f[i][j]表示合并[i,j]区间所能得到的最大值,有点floyed的小味道.if(f[ ...
- 目标检测——IoU 计算
Iou 的计算 我们先考虑一维的情况:令 \(A = [x_1,x_2], B = [y_1, y_2]\),若想要 \(A\) 与 \(B\) 有交集,需要满足如下情况: 简言之,要保证 \(A\) ...
- js算法初窥06(算法模式03-函数式编程)
在解释什么是函数式编程之前,我们先要说下什么是命令式编程,它们都属于编程范式的一种.命令式编程其实就是一块一块的代码,其中包括了我们要执行的逻辑或者判断或者一些运算.也就是按部就班的一步一步完成我们所 ...
- go语言学习-函数
函数声明 函数声明包括函数名,形参列表,返回值列表(可选),函数体组成 func test(parameters) (returns) { // ... } 其中 parameters 就是函数的形参 ...
- AGC 019F.Yes or No(思路 组合)
题目链接 \(Description\) 一共有\(n+m\)道判断题,其中有\(n\)个答案为"YES",\(m\)个为"NO".现在以随机顺序给你这\(n+ ...