Saturday, January 29, 2011
Test Reviews - An efficient way to validate test coverage
Tuesday, January 25, 2011
How to enable child-first class loading in WSO2 Application Server or Axis2
- CARBON_HOME/lib (CARBON_HOME is the location where you installed WSO2 Application Server)
- CARBON_HOME/repository/deployment/server/axis2services/lib
- AAR service/lib (lib directory under your service archive)
Wednesday, January 19, 2011
WS-Addressing with SOAPUI
In this blog post, we will;
- Talk to a WS-Addressing enabled service which is hosted in WSO2 Application Server using SOAPUI
- Assert response SOAP message to validate WS-A headers
1. Download and install the free version of SOAPUI 3.0.1 or later
2. Download and install WSO2 Application Server 4.0
Step 1
We are going to invoke the default HelloService which is shipped with WSO2 Application Server. Go to WSO2_APPSERVER/home/bin and start the server by running wso2server.sh{bat}
Access management console with https://localhost:9443/carbon and log in using the default administrator credentials (username=admin, password=admin)
Navigate to Manage --> Services --> List in the left menu and select "HelloService"
You will be directed to the dashboard of HelloService. Click on Modules link.

You will notice that "addressing-3.1.0" is listed under "Globel Level". By default WS-Addressing is enabled for all the services hosted in WSO2 Application Server. Therefore, you do not have to configure anything at the server side to enable WS-Addressing.
Step 2
Now, we will create a new SOAPUI project referring to http://localhost:9763/services/HelloService?wsdl as follows. Make sure to select "Create Test Suite" check box as well.

After creating the project, select greet request under HelloServiceSoap11Binding TestSuite

If you click on run just by providing input string, you will notice that WS-A headers will not be included in the request SOAP message which can be observed if you toggle "Raw" option.
Step 3
Lets add WS-A headers in to the request SOAP message. Select greet request and click on WS-A option and select the following properties.
Enable WS-A addressing
Add default wsa:Action
Add default wsa:To
Randomly generated message ID

Keep the rest of the default values and click on run. You will notice the following WS-A headers in the request message if you look at the raw message in SOAPUI.
<soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsa:Action>urn:greet</wsa:Action>
<wsa:MessageID>uuid:1fa996ca-755b-486c-a2ed-aa14bbf663a3</wsa:MessageID>
<wsa:To>http://localhost:9763/services/HelloService.HelloServiceHttpSoap11Endpoint/</wsa:To>
</soapenv:Header>
Also, the response headers will be similar to the following.
<soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsa:Action>urn:greetResponse</wsa:Action>
<wsa:RelatesTo>uuid:1fa996ca-755b-486c-a2ed-aa14bbf663a3</wsa:RelatesTo>
</soapenv:Header>
Simple.. isn't it? we just invoked a service with WS-Addressing headers using SOAPUI.
Here, we manually verified that the response message includes the correct WS-A headers. We looked at the response message and verified each header. If you maintain an automated test suite to verify your web service interactions, the above procedure cannot not be considered as over until you add an assertion so that the test automatically reports the correctness or failures of response/request messages.
Step 4
Now, we will add an assertion to validate response headers. In this example, we are going to add an XPath match assertion to check whether the wsa:Action header of the response equals to urn:greetResponse
Click on Assertions option and select "Add an assertion to this item" icon. Then select, XPAth Match as the assertion.

Next, you should specify the XPath expression and expected result as follows. First, click on Declare button which will automatically define the namespaces. Specify //wsa:Action as the xpath. Also, specify urn:greetResponse as the expected result.

Run the test again. You will notice that the test will be marked in green denoting that the test is successful.
Saturday, January 15, 2011
We are honored - Hats off to WSO2 QA team!!
When I joined WSO2 back in 2006 October, I always had a doubt whether I could survive in a world full of various technologies. Before joining WSO2, I used to work under well defined processes, managed by various policies, tests were driven by comprehensive requirements specs, Spent time with the QA teams writing detailed test cases etc.. But I was challenged to test Apache Axis2 at WSO2 as my first duty without having any of those materials. Apache Axis2 is a web service engine, middleware used by developers. So, ideally, I had to look at it through middleware user's in other words web service developer's perspective. It was a great challenge for a person who was new to web services and it was indeed a different experience for a QA engineer.
Thursday, December 30, 2010
Are you doing software testing or quality assurance?
- design the product?
- hire programmers?
- decide which bugs to fix?
- allocate staff?
- set the schedule?
- fix problems in code?
- decide on raises?
- allocate training budgets?
- produce manuals?
- choose the development model?
- fire some programmers?
- control the budget?
- set the company's strategic direction?
Monday, December 27, 2010
Are you testing or checking?
Checking Is Confirmation
Checking is something that we do with the motivation of confirming existing beliefs. Checking is a process ofconfirmation, verification, and validation. When we already believe something to be true, we verify our belief bychecking. We check when we’ve made a change to the code and we want to make sure that everything that worked before still works. When we have an assumption that’s important, we check to make sure the assumption holds. Excellent programmers do a lot of checking as they write and modify their code, creating automated routines that they run frequently to check to make sure that the code hasn’t broken. Checking is focused on making sure that the program doesn’t fail.
Testing Is Exploration and Learning
Testing is something that we do with the motivation of finding new information. Testing is a process of exploration, discovery, investigation, and learning. When we configure, operate, and observe a product with the intention of evaluating it, or with the intention of recognizing a problem that we hadn’t anticipated, we’re testing. We’re testing when we’re trying to find out about the extents and limitations of the product and its design, and when we’re largely driven by questions that haven’t been answered or even asked before. As James Bach and I say in our Rapid Software Testing classes, testing is focused on “learning sufficiently everything that matters about how the program works and about how it might not work.”
Tuesday, December 14, 2010
WSO2 Application Server - Run web applications and web services on the same server
At the main menu, you will find, Manage --> Web Application option. You can upload new web apps or view the existing web applications in there.
Click on Manage --> Web Applications --> Add
You will be directed to web app uploading screen where you can upload any war file.

Browse for a web application archive (war) in your file system and click on upload. You will be prompted with the confirmation message if the deployment is successful.
Step 4
Once the web app deployment is done, it will be listed in Running Web Applications page as shown below.

If you click on web application context in the web app list, you will be directed to web app dashboard as follows. You can carry out multiple operations on the deployed web app within this dashboard. For example, you can reload web app, expire all sessions etc..

Step 5
As I described at the beginning, you can deploy various kind of web services together with web applications using WSO2 Application Server. You will find Manage --> Services menu option at the left navigation pane in management console, there you will see Axis2 Servces, Jar Services, Spring Services and JAX-WS service deployment options as shown below.

Download WSO2 Application Server-4.0.0 today and try this out your self.
