Doorgaan naar hoofdcontent

Posts

Posts uit april, 2010 tonen

soapUI: Re-use of a Property with random value

In a test suite I wanted to use a Random value for a soap request, so I defined a Property that is initialized with a random value (see also my previous post on soapui). The next thing that I wanted to do is to use that same Property to check whether an item was correctly inserted into a database. So for example: Property Name: empid  Value: ${=(int)(Math.random()*100000000)} step1: soap request      ${#TestCase#empid} step2: JDBC request  select * from Employees where    empid = '${#TestCase#empid}' To my surprise this construction did not work! In fact in the second step the empid property was given a new random number !! I tried several other options, like: Define properties on other level (TestSuite, TestCase, Project) Use a second Property and transfer the first random Property to the second. In this case the transfer is just a transfer of the Groovy script !!?? In the end I got the following solution: Double click on the TestCase Define a Property empi

soapUI: Use of dynamic enpoints in OTAP street

When you have an OTAP (Development, Test, Acceptance, Production) street you want to sent your soap requests, jdbc requests and JMS requests to be sent to different endpoints depending on the environment you are running the test. This small blog shows how you can do this. First you define the properties you need for your endpoints. You do this on project level. Select project Select Custom Properties tab Add the needed properties Save the properties to a file, i.e. properties_dev.txt (this is the icon on the far right) Copy the file and also make properties_tst.txt , properties_acc.txt and properties_prod.txt Now that you defined the properties we are ready to use them within test steps. SOAP Request step Note:You can change the endpoint by select [edit current..] Note: For a JMS endpoints holds the same, just add a property with jms://<host> <port> JDBC Request step

soapUI: Use of JMS

For the use of JMS steps within soapUI it integrates with HermesJMS. So first you have to install HermesJMS (version 1.14 or greater). Configure HermesJMS To be able to use HermesJMS with OSB 10gR3 you have to configure the hermes-config.xml file. ... Configure soapUI (3.5.1) Select File > Preferences Select Tools At Hermes JMS fill in the directory where you installed Hermes Click OK Use JMS Queues/Topics within a TestSuite Select a Binding of a project Right-click Add JMS endpoint Browse to the folder where you have placed the hermes-config.xml file (usually document and settings/.hermes ) Select Session Select a Publish destination (Optionally) select a Subscribe destin

soapUI: The usage of dynamic properties

In my test case I wanted to use a Random number for a particular soap request and use that number in subsequent test steps. I used the following Groovy script within my soap request: <PersNumber>${=(int)(Math.random()*10000)}</PersNumber> Then I wanted to use this generated number within a JDBC Step to check whether the customer was correctly inserted within a database. So I used a JDBC step with a persnumber property: Then the next thing I did was to create a Transfer step to transfer the <PersNumber> content within the request to the persnumber property of the JDBC step. This did not work because in the end the persnumber property contained: ${=(int)(Math.random()*10000)} The trick here is to use a test Property for this and to use this property within the soap step and within the JDBC SQL Query. So first define a property: Use this property within the soap request: <PersNumber>${Properties#persnumber}</tns1:PersNumber> And use t

Automatic SOA black box testing with soapUI

With the introduction of soapUI 3.5.1 it is possible to check database and JMS sources. This can also be very useful for automatic blackbox testing of your OSB services. I used it wihin my projects to check if correct soap responses were returned, the correct data was written to a database and with the use of HermesJMS I was able to inject JMS messages. This blog describes how i used soapUI for this. Install required software Install soapUI 3.5.1 (see also http://www.eviware.com/nightly-builds ) Install required JDBC drivers For the use of JDBC steps you have to install the correct driver: see here You need to close soapUI and put the driver jar file within the SOAPUI/bin/ext directory and start soapUI again. Note that within the logging you can see that soapUI picks up the jar file. Install HermesJMS 1.13 Setup Test Suite Right-click a project and select New TestSuite and enter name for the suite Right-clik the TestSuite and select new TestCase A testcase contains

File Connector for Cordys BOP4

When I wanted to use files to read from a directory I had to install the file connector of Cordys. Unfortunately I could not find much documentation of it on the Cordys wiki, so I started to find it out myself. This blog guides you through the installation, configuration and use of the File Connector package. I use the latest BOP4 VM environment and the file connector isv package can be found here . Install ISV Package Goto Application Registry (Note: This is only available within organization "system") Select Install New Applications Click “Upload New Application” Select the .isvp file (in our example the CoE_File Connector_1.2.14.isvp) Check “Cordys CoE File Connector 1.2” and click “Start Installation” Click Next Check the connector and click next Click Install The package should be installed and the next window is shown Click Finish Configuration Goto System Resource Manager Show All Service Groups New Service Group Select File Connector and