Posts tagged testing

Is the purpose of testing to verify that the software works or is it to try to break it?

This question is asked many often. However there is no one answer. Reading a lot of reactions – in one of the Linkedin community groups – I noticed that the answer is strongly related to the (test) experience of the responder. A number of the reactions endorse this question and of course other people have another opinion.
Read the rest of this entry »

Automatic testing Oracle Service Bus using Hudson, maven and SoapUI

A lot of current projects are implementing some sort of service based architecture. Testing in this architecture becomes more complex. When implementing an OSB project with Scrum you test-automation is imperative. Scrum will require more frequent testing of your system. This is only feasible (in time and money) when you automate as much as possible.
 
Using soapUI you are able to create visually SOAP tests on your OSB implementation and running them against the defined infrastructure (develop, test, acceptance).  SoapUI enables with easy tools to implements verification and validation of the responses of your OSB implementation. When running the test you are also able to set limits in SLA response times on all the calls. This way you are able to monitor depreciation of performance in older parts of your OSB implementation when adding new services.
 
You can record and edit your SOAP test easy with the soapUI interface and edit it later. When you maven-enable your project it is quite easy running your tests when you implement the “maven-soapui-plugin” (see my other posting http://technology.amis.nl/blog/3061/automated-soap-testing-with-maven).  In the meantime version 3.0 of this plugin is released.
When implementing this with Hudson you do not have to convert the results.xml into a Surefire report. Hudson will manage this for you. Hudson will also enable you with an historical overview of all your test results.

Improve your unit-tests with jMock2

Writing unit-tests
should be part of your development process whether you write them
before or after the actual coding I leave that up to you. On of the
pitfalls of writing unit tests is that the units become to big.

The unit your are
testing, a method in most cases probably uses some other beans or
services to do its job. In your unit test you don’t want to test
those other beans but just your method. Because you use decoupling Smiley you can easily override the interfaces of the services in your test
case and inject those services in your instance you are testing. This
is an example of a mock object.

This is maybe good for one or two mock objects but it gets tricky. Who test the mock objects? You will soon get a lot of logic in the mock objects. To reuse them they need to be extracted from the unit test. You don’t have checks if the mock objects are really called. There are several
frameworks that will do this mocking for you. You supply them the
interface and they will give you an implementation which can be
injected into the bean thats being tested..... Read the rest of this entry »

Automated SOAP testing with maven and the SoapUI plugin

Currently there are few tools that can support testing SOAP interfaces. Both Jmeter and SoapUI are suited for testing soap interfaces. SoapUI is explicitly created for testing SOAP interfaces and Jmeter has a SOAP support since version 2.3.x. I have worked with both tools and I prefer SoapUI. It has an intuitive user interface and is flexible. (Please also have a look at the blog of Jeroen)

You can run SoapUI stand alone but I prefer to integrate these kinds of tools with an automated process. Below you will find instructions for running SoapUI as a part of a maven build. This makes it possible to run your automated SOAP tests in Maven with a build process like Hudson. Combined with automatic deployment it is possible to support an agile software development process that supports frequent delivery of versions and continuous testing.

Maven supports SoapUI with the Maven SoapUI plugin. Read the rest of this entry »