eviware i turn

olebloggin’

Using Script Assertion in soapUI

Another nice post from Groovy in soapUI, check it out: http://groovyinsoapui.wordpress.com/2008/11/27/using-script-assertion-in-soap-ui/

Another post on soapUI REST Support

Check it out: http://sleeplessinslc.blogspot.com/2008/10/soapui-rest-support.html

Thanks

/Ole

This one is a real treat; a great walkthrough on how to use soapUI for complex functional testing with properties, database-access, etc - the works! Check it out at http://dimosthenes.blogspot.com/2008/10/testing-web-services.html

/Ole

Keyboard shortcuts in soapUI

Here comes a nice tip from danielmeyer, check it out: http://ourcraft.wordpress.com/2008/10/15/keyboard-shortcuts-in-soapui/

Thanks a mill!

/Ole

When running a TestCase, the testRunner collects a TestStepResult object for each executed step which contains data and messages related to what was executed. A WsdlTestRequest (a SOAP Request) step for example creates a WsdlTestRequestStepResult result object (which gives access to the entire message exchange for its execution) and a Property-Transfer step creates a PropertTransferResult which contains a log of all transferred values and their corresponding PropertyTransfer configurations.

Read the rest of this entry »

It is a quite common requirement to control the flow of a TestCase based on some external input or results. The ConditionalGoto TestStep gives a rather coarse possibility to do this with XPath-related functionality, but if you want to do more advanced flow-logic (for example looping, branching, etc) you will have to resort to a groovy script.

Read the rest of this entry »

Let's dig into the wonderful world of Apache XMLBeans and find out how you can use it to make complex message processing and validation a breeze in your groovy scripts. In this first tutorial we'll do this in the context of a MockService that will use XMLBeans to validate the incoming request and return a fault if the request does not comply with the schema.

Here we go!

Read the rest of this entry »

We are seeing more and more users doing rather advanced scripting in their soapUI Projects, for example

  • controller scripts that run TestCases, LoadTests, etc
  • dynamically generating testrequests and assertions based on database content
  • creating custom reports after execution of tests
  • integrating with external tools (test management, etc)
  • creating complex simulations of asynchronous services using Mocks and TestCases

Since groovy scripts in soapUI have full access to the soapUI object model, anything is possible. Unfortunately though the API documentation is only available in javadoc format and can be hard for new users to grasp, especially if they lack prior knowledge of java or groovy. I'll walk you through the basics of the soapUI API, hopefully giving you a foundation for further exploration.

Read the rest of this entry »

How to disable test items via Groovy

If you want to disable a TestCase, TestStep or TestSuite maybe based on the outcome of some previous tests you could use

testRunner.testCase.disabled = true|false
testRunner.testCase.testSteps["name of teststep"].disabled = true|false
testRunner.testCase.testSuite.disabled = true|false

and for assertions this would be:

testRunner.testCase.testSteps["name of teststep"].assertions["name of assertion"].disabled = ...

/Ole

How to stop a TestCase via groovy

If you want to stop a TestCase from withing a groovy script, use

testRunner.cancel( "I'm getting tired" )

if you want to fail the TestCase use

testRunner.fail( "It didn't work" )

(the string is a reason displayed in the log)

/Ole

« Previous Entries