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 ...
随机推荐
- LeetCode | Reverse Words in a String(C#)
题目: Given an input string, reverse the string word by word. For example,Given s = "the sky is b ...
- Windows 7下载安装 Visual C++ 6.0(VC6) 全程图解
说实话我也一直没有试过,所以也想当然的认为Win7下就不能安装VC6,压根就100%不兼容?一直使用高版本的VS(如VS2008和现在用的VS2010)的我今天亲身在Win7下安装一次试试. 注:文中 ...
- 第三章XML简介
概念:XML:提供数据交换.系统配置.内容管理等的功能,可跨平台.跨网络.跨程序的数据描述方式.XSL:依靠XPath定位,提供显示模板,且专门为了显示XML文件信息的语言.CSS(层叠样式表):在网 ...
- 094实战 关于js SDK的程序,java SDK的程序
一:JS SDK 1.修改配置workspace 2.导入 3.Demo.html <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Trans ...
- Java Swing提供的文件选择对话框 - JFileChooser
JFileChooser() 构造一个指向用户默认目录的 JFileChooser. JFileChooser(File currentDirectory) 使 ...
- springmvc传参问题
@RequestMapping(value = "/addHit", method = { RequestMethod.POST, RequestMethod.GET }) pub ...
- 2n皇后问题【dfs】
<题目链接> 题目描述 给定一个n*n的棋盘,棋盘中有一些位置不能放皇后.现在要向棋盘中放入n个黑皇后和n个白皇后,使任意的两个黑皇后都不在同一行.同一列或同一条对角线上,任意的两个白皇后 ...
- 深入剖析ConcurrentHashMap
原文是09年时写的,在公司的邮件列表发过,同事一粟 和清英 创建的并发编程网 对这方面概念和实战有更好的文章,贴出来仅供参考.pdf格式在:http://www.slideshare.net/hong ...
- 各种梯度下降 bgd sgd mbgd adam
转载 https://blog.csdn.net/itchosen/article/details/77200322 各种神经网络优化算法:从梯度下降到Adam方法 在调整模型更新权重和偏差 ...
- Android Firebase Android google-cloud-tools
Firebase 让不懂服务端的开发者也可以快速写出实时性的Web端和移动端应用. firebase的功能包括推送通知,云存储,活动监视,远程部署 针对国内三方推送,只能在国内使用,到了国外就不支持了 ...