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 ...
随机推荐
- 集合List和ArrayList的示例
package chapter09; import java.util.ArrayList;import java.util.List; /* * List * ArrayList底层是数组 * 特点 ...
- Promise in Chakra
http://www.ecma-international.org/ecma-262/#sec-fulfillpromise 25.4.1.3.1 and 25.4.1.3.2 Promise Rej ...
- DDD领域模型数据访问权限之用户权限(十)
BAS_PRService岗位和角色服务: public class BAS_PRService { //岗位 private IRepository<BAS_Post> ireposit ...
- asp.net core 2.0 cookie的使用
本文假设读者已经了解cookie的概念和作用,并且在传统的.net framework平台上使用过. cookie的使用方法和之前的相比也有所变化.之前是通过cookie的add.set.clear. ...
- Codeforces 247D Mike and Fish
Mike and Fish 我们可以把这个模型转换一下就变成有两类点,一类是X轴, 一类是Y轴, 每个点相当于对应的点之间建一条边, 如果这条边变红两点同时+1, 变蓝两点同时-1. 我们能发现这个图 ...
- 文档工具GitBook使用
一.登陆注册 地址:https://www.gitbook.com/ 1.gitbook可使用github账号登录,如果已经注册github可以直接使用github账号登录 2.如果是github账号 ...
- Python3 图片水平镜像实现
# -*- coding: utf-8 -*- """ Created on Sun Feb 4 12:15:38 2018 @author: markli " ...
- 不一样的go语言-athens私仓安装
前言 本系列文章曾多次提及go的依赖管理,提到了私仓,构件系统等概念,也曾提及当前流行的go构件系统,如athens,jfrog artifactory.鉴于jfrog的收费特性,本文只选择ath ...
- MySQL数据库crash的问题分析
[问题] 生产环境有多台slave服务器,不定期的会crash,下面是error log中的堆栈信息 Thread pointer: 0x7f1e54b26410 Attempting backtra ...
- C# 重启程序本身
private static void Restart() { Thread thtmp = new Thread(new ParameterizedThreadStart(run)); object ...