[Training Video - 7] [Database connection] Various databases which are supported, Drivers for database connection, SQL Groovy API

Various databases which are supported

Drivers for database connection

groovy.sql.Sql package

SoapUI怎样支持对数据库的操作

 

Various databases which are supported

Groovy可以支持各种不同的数据库:MySQL, SQLServer, Oracle

 

Drivers for database connection

不同的数据库需要下载不同的JAR包来支持,下载后将JAR包放到SoapUI的Lib目录,譬如

MySQL : mysql-connector-java-5.1.22.jar

Oracle : oracle-connector-java.jar

 

SQL Groovy API

Groovy 有支持数据库的类库:

在Bing中搜索sql groovy,可以找到 Sql (Groovy  2.4.3),点击即打开这个网址:

http://docs.groovy-lang.org/latest/html/api/groovy/sql/Sql.html

 

通过Groovy的Class Sql可以连接到数据库,并对数据进行增删改查的操作,简称为CRUD

CRUD means :Create , Retrieve , Update, Delete

 

在学习的过程中,如果需要连接数据库,可以安装一个MySQL, 也可以安装XAMPP,里面带有MySQL

什么是XAMPP?

XAMPP是最流行的PHP开发环境

XAMPP是完全免费且易于安装的Apache发行版,其中包含Apache、MySQL、PHP和Perl。XAMPP开放源码包的设置让安装和使用出奇容易。

可以从这里进行下载 : https://www.apachefriends.org/zh_cn/index.html

 

安装好XAMPP之后,启动MySQL:

 然后通过命令行窗口可以查看SQL

=============Retail Webservice=================
download xamp - PHP server
Download retail application - In your videos account
Copy retail application in htdocs
Create database with name retail

=============Retail Webservice=================

在SoapUI中如何使用数据库呢?

请看这里: http://www.soapui.org/JDBC/testing-jdbc-databases.html

posted on 2015-06-20 15:13  张缤分  阅读(312)  评论(0编辑  收藏  举报

导航