header
header
Main Menu
Home
Eviware Store
Downloads
Products
News
Forum
Eviware Blog
Search
FAQs
Customer Area
Support
Documentation
Tutorials
CookBook
Downloads
Forum
Login Form
Welcome, Guest. Please login or register.
December 01, 2008, 06:38:36 pm
Username: Password:
Login with username, password and session length

Forgot your password?
 
Getting paramaters for your tests from a database: Preparation PDF Print E-mail

One of the major time consumers when testing applications is going through lots of different data sets in order to test the functionality of a Web Service.

This is easily solved in soapUI Pro with the DataSource TestStep where you can connect to a data source and feed the Web Service with data.

Here is a tutorial that describes how to use Microsoft SQL Server as a source these tests. We will even thrown MySQL in for free.

Let us show you how to!

Using the DataSource TestStep is not that hard in general, but what can be difficult is using the right connection string and how to use the driver itself. Both issues will be explained here. But, let’s start from the beginning.

Prereqs

In our example we have the following;

  1. A Microsoft SQL Server database (db_author) instance with one table, tb_author. we'll also see in the end how to do this with MySQL.
  2. The Amazon.com Web Service
  3. A settings file containing login data

All these can be gotten by downloading the Tutorial .zip.

Preparation

Step 1, The MS SQL Server

If you don’t have an installation of MS SQL, use the download links here or read on, this tutorial is useful for MySQL as well.

Step 2, The Driver

First we need a JDBC driver, you can get that here .

Then unzip the file and put the driver, named sqljdbc.jar, either in your JAVA HOME/lib/ext or in soapUI/jre/ lib/ (for example C:\Program Files\eviware\soapUI-Pro-1.7.1\jre\lib\ext).

If you have soapUI running, restart it so that it can reload all drivers.

Step 3, The database.

OK, we need a database, so let’s make something simple to illustrate the functionality.

As usual we’ll use the Amazon Web Services to illustrate the functionality.Image of tb_author

We’ll make a database called db_author containing one table called tb_author.

This table contains two fields, one called index and one called author. Like seen here.

That is all we need, let's start soapUI and get testing!

Let's get coding! >>>

 

 
header header
header
header