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

http://www.soapui.org/apidocs/com/eviware/soapui/impl/wsdl/teststeps/assertions/basic/XPathContainsAssertion.html

http://www.soapui.org/apidocs/com/eviware/soapui/impl/wsdl/teststeps/assertions/basic/GroovyScriptAssertion.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的更多相关文章

  1. 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 ...

  2. SoapUI Pro Project Solution Collection-Test Step Object

    Package com.eviware.soapui.model.testsuite used for access the current testsuite object, like test c ...

  3. 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 ...

  4. SoapUI Pro Project Solution Collection-access the soapui object

    Technorati 标签: Soapui pro,web service,apI Testing

  5. 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 ...

  6. 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 ...

  7. SoapUI Pro 最新版本和最新功能

    专为整个后端的端到端测试而构建 创建全面的端到端测试,以从API定义或实时端点验证API的整个工作流程.只需单击几下即可传递响应数据并添加断言-无需编码. 综合生成或配置数据 通过简单的数据驱动测试来 ...

  8. .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 ...

  9. 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 ...

随机推荐

  1. 步步为营-59-svn简介

    说明:版本控制器Svn的使用,安装教程不再多说 VisualSVN-Server--项目经理 TortoiseSVN--右击的时候显示 VisualSVN-- visual studio中使用 1 搭 ...

  2. POJ 3126 Prime Path (素数+BFS)

    题意:给两个四位素数a和b,求从a变换到b的最少次数,每次变换只能变换一个数字并且变换的过程必须也是素数. 思路:先打表求出四位长度的所有素数,然后利用BFS求解.从a状态入队,然后从个位往千位的顺序 ...

  3. Python作业-选课系统

    目录 Python作业-选课系统 days6作业-选课系统: 1. 程序说明 2. 思路和程序限制 3. 选课系统程序目录结构 4. 测试帐户说明 5. 程序测试过程 title: Python作业- ...

  4. 用HTML+CSS画出一个同心圆

    参加web前端校招的同学们经常会遇到这样的面试题:用HTML+CSS画出一个同心圆. 例如: 这道题主要考验的是基础盒模型布局能力和倒圆角属性的巧用. 1.html代码 <body> &l ...

  5. 一个基于C++11的定时器队列(timerfd,poll实现)

    目录 前言 优点 test 源代码 @ 前言 最近小程序要用到定时器,找了一圈也没找到合适的,最后还是绕回来选择了muduo里面的TimerQueue,整理了下它的代码,独立了出来,因为实在懒得从头写 ...

  6. 基于python语言的经典排序法(冒泡法和选择排序法)

    前 每逢周末就遇雨期,闲暇之余,捣鼓了下python,心心念想学习,今天就在电脑上装了个2.7,学习了下经典算法,冒泡与选择排序法 第一次写关于python的文章,说的不当之处,多多指正,我积极改正 ...

  7. 虚拟机克隆后导致两台机器的IP都不显示的解决方法

    centos7中输入ifconfig出现ens33,没有eth0,也没有ip,不能上网,输入ifconfig后如下图 之前在网上也找了很多的方法,比如删除文件70-persistent-ipoib.r ...

  8. APM的3DR无线数传的安装和调试

    APM飞控修改数传模块方法 http://www.cnblogs.com/wsine/p/4909903.html APM的3DR无线数传的安装和调试 http://tieba.baidu.com/p ...

  9. 【翻译】TCP backlog在Linux中的工作原理

    原文How TCP backlog works in Linux水平有限,难免有错,欢迎指出!以下为翻译: 当应用程序通过系统调用listen将一个套接字(socket)置为LISTEN状态时,需要为 ...

  10. oracle io 等待图解