soapui

How to dynamically configure a REST mock in SoapUi?

Deadly 提交于 2019-12-10 23:30:11
问题 Using SoapUi I intend to make a call to a MockService and when the Response is configured to return a static message, everything seems to be fine. On the other side, if I add and send a parameter (Eg. ?PName=John), although I also changed the name in the response from "John" to ${PName}, i get nothing (an empty string). Where am I doing it wrong? Please see the attached screenshot Thank you, 回答1: Here is how I would get the request parameters: For example, user is passing a query parameter

Connecting to MySQL using Groovy

二次信任 提交于 2019-12-10 18:47:36
问题 I'm trying to connect to a MySQL database using the below Groovy code on MAC OS 10.10.5 Yosemite import groovy.sql.Sql try{ def dbURL = 'jdbc:mysql://localhost:3306/sakila' def dbUserName = 'root' def dbPassword = 'Orange@27' def dbDriver = 'com.mysql.jdbc.Driver' log.info('Good') def db = Sql.newInstance(dbURL,dbUserName,dbPassword,dbDriver) }catch(Exception e){ log.info('DB Error') log.info(e.getMessage()) }finally{ } But when I execute this code, I see the below message Sat Aug 13 15:09:14

comparing operands xpath assertion expression with expected result in soapUI

无人久伴 提交于 2019-12-10 18:05:54
问题 I'm using soapUI 5 (non pro) and all i need is to validate(assert) a number is greater than zero in the expected result section. So this means 1) in XPath expression(Xpath match) I am declaring the below (I need to remove all text and only have numbers then check that number is greater than zero) replace(//OUTBOUND_MESSAGE.MESSAGE_CONTENT, '[^0-9]','') 2) All i want to do in expected result is =!0 or number>0 so i attempted ${=!0} but doing that brings back a boolean T/F. I'm really lost :(

SoapUI - How to use Property Transfer with POST request

风格不统一 提交于 2019-12-10 15:25:44
问题 I am starting to evaluate SoapUI as my test suite, but the Property Transfer thing is really holding me back. I've read a lot of articles about it, but I could not find a way to make it work in my case. My source is a POST request. This POST request returns me a JSON. I need to pass one of the values of this JSON to the next test. My response is this: <Response xmlns="https://localhost/authorize"> <access_token>4a00c67e</access_token> <refresh_token></refresh_token> <scope>auth</scope> <token

How could I set value of json object as a Request in soapUI

送分小仙女□ 提交于 2019-12-10 14:23:22
问题 I have a json Request like this: { "scopeId":"", "scopeType":"", "userId":"", "fieldToBeEncryptedList":[ { "srNo":"", "fieldName":"", "value":"", "echoField":"" } ] } Now what I want is to set the value of each key dynamically which I got from response of other Test Step. How could I do this using groovy scripting. Thanks in Advance. 回答1: Some details are missing in your question, but I suppose that you have two REST TestSteps , supposing that the first is called REST Test Request and the

SoapUI vs Java Web Service Client

烂漫一生 提交于 2019-12-10 13:12:03
问题 If a SOAP web service is working well via SoapUI (producing the correct SOAP responses), while building a web service client in Java using different APIs/frameworks to call this web service is facing different issues, is it safe to consider this web service stable and the issues are from the consumer side? I'm asking a generic question in here, I have already asked a detailed one which is probably too long to read. I'm interested in the concept more than my actual implementation, so if you

SoapUI how to Update WSDL Definition and Recreate requests through Groovy Script

那年仲夏 提交于 2019-12-10 10:14:38
问题 I have a soap test Project in SoapUI. I have added all the requests as test steps in a test suite. I need that the WSDL definition gets updated and requests get recreated (while keeping existing values) every-time i start the test. I need help to do this process automatically with help of a groovy script that can be placed inside the project and runs every-time before execution starts. 回答1: Got it working now.. Here is the complete code.. import static com.eviware.soapui.impl.wsdl.actions

SoapUI+Groovy做接口自动化测试

一世执手 提交于 2019-12-10 02:11:59
重点看是如何操作Excel中的Properties,以及错误Result Report。 关键词:SoapUI接口测试,接口自动化测试,数据驱动测试,SoapUI进阶使用, Groovy in SoapUI, SoapUI中Groovy的使用,数据分离。 阅读这篇文章需要一定的SoapUI基础,至少入过门,另外还需要一些Groovy的知识,当然如果你会java 也可以,这里用到的Groovy知识和Java很类似。 另外,本文的思路和我上一篇文章 <零成本实现接口自动化测试 – Java+TestNG 测试Restful service> 很相似,只不过把Java+TestNG的组合换成了SoapUI+Groovy, 另外测试对象也换成了基于Soap的web service, 依旧用Excel来管理数据,做到数据分离。 由于我用到的SoapUI是免费版本,相比Pro版,少很多的功能,像DataLoop之类的,所以只能通过Groovy写一些脚本来做数据驱动的测试。 首先打开SoapUI, 新建一个Workspace 名为Demo 然后点击File->New soapUI Project 然后输入你的Project Name, WSDL 地址 点击OK 输入服务的用户名密码 点击OK 项目工程建好了 右击ServicePort 建立TestSuite 以其中一个接口为例 来生成用例

SoapUI简介和入门实例解析

China☆狼群 提交于 2019-12-10 01:45:15
SoapUI简介 SoapUI是一个开源测试工具,通过soap/http来检查、调用、实现Web Service的功能/负载/符合性测试。该工具既可作为一个单独的测试软件使用,也可利用插件集成到Eclipse,maven2.X,Netbeans 和intellij中使用。 SoapUI是一个自由和开放源码的跨平台功能测试解决方案。通过一个易于使用的图形界面和企业级功能,SoapUI让您轻松, 快速创建和执行自动化功能、回归、合规和负载测试。在一个测试环境,SoapUI提供完整的测试覆盖,并支持所有的标准协议和技术。 SoapUI 基于Java 开发,支持多个平台,安装非常简单。 SoapUI下载地址: https://www.soapui.org/ ,下载开源版SoapUI,SoapUI Pro 是 SoapUI 的商业非开源版本 入门实例解析 使用的接口实例是 中国电视节目表 WEB服务 WSDL 地址: http://www.webxml.com.cn/webservices/ChinaTVprogramWebService.asmx?wsdl Endpoint 地址: http://ws.webxml.com.cn/webservices/ChinaTVprogramWebService.asmx 通过案例讲解,能够掌握以下几个方面的操作: 1.构建项目 2.运行单个请求 3

soapUI changes (disables) proxy settings of Internet Explorer

浪尽此生 提交于 2019-12-10 01:23:20
问题 installed soapUI 4.5.1 . When i start soapUI it disabled all checkoxes in IE 8 Internet Options > Connection > LAN Settings . If i enter a proxy in soapUI > File Preferences > Proxy Settings , then soapUI overwrites the configuration in IE with this proxy The toggle button Apply proxy defined in global preferences in the iconbar has no effect on IE, only on soapUI connections. How can i disable this behaviour? 回答1: I found out, that when you uncheck File > Preferences > UI Settings Opens