SoapUI |
SoapUI
SoapUI is a good (but too complicated) API test tool. You can use it for your usual integration test or regression test.
Install it by the following link:
http://sourceforge.net/projects/soapui/files/
Groovy
Sometimes you want to do something further. SoapUI allows you to write the Groovy script to do whatever you want. For instance, assert your responses (JSON format) from APIs.
import groovy.json.JsonSlurper def response = messageExchange.response.responseContent def slurper = new JsonSlurper() def json = slurper.parseText response assert json.status_code == 200
Installing and Using JDBC Drivers for MySQL on Mac
If you want to use a JDBC connection and do some DB operations. Please follow few steps below.
- Download the drivers you need.
http://www.soapui.org/Working-with-soapUI/jdbc-driver-list.html - Decompress the file into a temp directory.
- Copy the driver to SoapUI's ext directory.
cp ~/Downloads/mysql-connector-java-5.1.23-bin.jar /Applications/SmartBear/soapUI-4.5.1.app/Contents/Resources/app/bin/ext
- Add a new Test Step: JDBC Request into your Test Case.
- Fulfill the info:
Driver:com.mysql.jdbc.Driver
Connection String:jdbc:mysql://localhost:3306/mydb?user=iamroot&password=mypass
- Write your SQL queries.
- Done.
留言
張貼留言