- 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?
Thursday, December 30, 2010
Are you doing software testing or quality assurance?
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.
Sunday, November 28, 2010
QA testing in agile world - Attitude matters most!
- Understand your development team first. Study each engineer and adjust your way of acting (communication, management etc..) according to the team you are working on
- Do not act as a quality police. Everyone is responsible for quality. It is your task to guide the others NOT finding faults and complain
- Be as flexible as you can in all situations
- Be quick on everything - learn, design, implement, configure, deploy quickly and test fast
- Be innovative
- Identify highly risked features first and start hunting bugs
Finally;
- CREATE A VALUE as a tester for your organization and BUILD the CONFIDENCE among the team!
Thursday, November 25, 2010
Invoking secure web services using SOAPUI - part1

Click on Security link and Select "Enable Security" option. Then select, UserNameToken security scenario.

In the next screen, select admin user group and click on finish to apply the security policy for HelloService.
Step 2
We have configured server side security policy. If you look at the WSDL of HelloService (http://localhost:9763/services/HelloService?wsdl), you will notice that UserNameToken security policy is added to the service.
Now, we need to configure SOAPUI project to talk to HelloService with the required user credentials.
First, start SOAPUI and create a new project. Specify https://localhost:9443/services/HelloService?wsdl as the initial WSDL. Keep the other default settings.
You will see the following project structure.

Replace ? with an input value in the request editor and run the test. You will encounter a SOAPFault, Missing wsse:Security header in request, since we did not send security headers with the request.
Lets configure client side security now. In the Request Properties pane of SOAPUI project, you will find the following properties.
Username
Password
WSS-Password Type
WSS TimeToLive
Specify the following values for the above properties.
Username = admin
Password = admin
WSS-Password Type = PasswordText
WSS TimeToLive = 2000
Run the test. Have a look at the raw request view. You will see security header is added to the request.
Thats all! We will look at more advanced scenarios such as signing and encrypting messages with SOAPUI in future posts.

Saturday, November 13, 2010
Java bench - Simple and lightweight service load testing tool
Friday, September 24, 2010
How to call Oracle Stored Procedures from data services
In Data Sources screen, click on Add new data source link and specify a data source ID and select RDBMS as the data source type. Then select Oracle as the Database engine and enter the db info as follows.
Driver Class = oracle.jdbc.driver.OracleDriver
JDBC URL = jdbc:oracle:thin:sample/sample@10.100.1.10:1521/orcl
User Name = sample
Password = sample

Click on "Test Connection" to see whether you can connect to oracle server correctly. Then click on save. Now we have created a data source hence we can proceed through the wizard.
Click on Next to move to query definition page. Select Add New Query to create a new query for our data service.
Enter a query ID (ex:- employees) and select the data source we just created from the Data Source drop down.
We can specify our SQL statement in the SQL text area. We need to call the oracle stored procedure which has been created earlier. You can enter "call addEmployeeSP(?,?,?)" as the query to call oracle stored procedure. ? denotes the input parameters which should be passed to the stored procedure.

Next, click on Add new input mapping and add three new input parameters since our query accepts 3 different parameters.

After adding all 3 input parameters, the query will be looked as follows.

We can save the query now. Our stored procedure inserts employee records in to the table therefore it does not return anything.
Because of that, the output mappings are not required for the query.
In order to check whether the records are correctly added to the database, lets create another query, selectEmployees as shown in the following screen.

Now, we have created both queries. Lets add operations which are necessary to run these queries.
Click Next in the Queries screen to proceed through the wizard which will bring up Operations page. Click on Add New Operation link. Specify operation name, addEmployee and select Query ID, employees.

Similarly, add an operation for selectEmployee query and name it as selectAllEmployees.
Click on Finish to deploy the data service. Once it is deployed, the service will be shown in the service list. Click on Try this service link to test the service.
In there, you will find two operations, addEmployee and selectAllEmployees. First invoke addEmployee operation by specifying id, name and address.
id=6
name=bloguser
address=notown
Now, if you invoke selectAllEmployees operation, you will see that the employee table has been updated with a new record.

Thats all! Drop me a mail or post your question at wso2.org forum if you have any questions about WSO2 Data Services Server.
Wednesday, September 22, 2010
Input validation of data services
import org.wso2.carbon.dataservices.core.validation.Validator;
Monday, September 13, 2010
Creating value with testing
Sunday, September 12, 2010
How to start multiple WSO2 Carbon server instances as windows services
- Find wrapper.conf file inside CARBON_HOME/repository/conf
- Locate "Wrapper Windows NT/2000/XP Service Properties" section
- Update the Name of the service and Display name of the service in each instance as follows
Wednesday, August 18, 2010
Process vs Tools and Technologies - What should Sri lankan QA community be concerned with?
Saturday, August 14, 2010
How to deploy WSO2 ESB-3.X on Apache Tomcat
Wednesday, July 28, 2010
Message format transformations with WSO2 ESB
Monday, July 19, 2010
How to use POST_TO_URI property in WSO2 ESB
According to WSO2 ESB parameters catelog, POST_TO_URI property makes the outgoing URL of the ESB a complete URL and it is important when sending the messages through a proxy server.
Lets see how this property can be used in message mediation when a HTTP proxy server is used.
Step 1
As I explained in a previous post, you are supposed to configure WSO2 ESB to forward messages through a HTTP proxy server.
Step 2
Now, add the following sequence (or any message pass through sequence). (I used a service called "Axis2Sesrvice" which is deployed on WSO2 WSAS as the endpoint and I used Apache server as the proxy)
<sequence xmlns="http://ws.apache.org/ns/synapse" name="main">
<in>
<send>
<endpoint name="endpoint_urn_uuid_1286CEB97BC8A170468445150995919829308689">
<address uri="http://localhost:9764/services/Axis2Service/" />
</endpoint>
</send>
</in>
<out>
<send />
</out>
</sequence>
Step 3
Send a message to ESB using a client. You will notice that the message transmission is failed. If you look at the apache server log, you will notice something similar to the below.
127.0.0.1 - - [19/Jul/2010:14:19:30 +0530] "POST /services/Axis2Service/ HTTP/1.1" 404 220
Here, you can see that, POST message does not contain the full service URL hence the proxy server is unable to forward the message to the endpoint.
Step 4
Now update the above sequence with including POST_TO_URI property as follows.
<sequence xmlns="http://ws.apache.org/ns/synapse" name="main">
<in>
<property name="POST_TO_URI" value="true" scope="axis2" type="STRING" />
<send>
<endpoint name="endpoint_urn_uuid_1286CEB97BC8A170468445150995919829308689">
<address uri="http://localhost:9764/services/Axis2Service/" />
</endpoint>
</send>
</in>
<out>
<send />
</out>
</sequence>
Send a message again. This time, the message transmission will be successful. You will find the following entry in apache log. This proves that the message is correctly forwarded to the endpoint through the proxy server.
127.0.0.1 - - [19/Jul/2010:14:57:25 +0530] "POST http://localhost:9764/services/Axis2Service/ HTTP/1.1" 200 278
Sunday, July 11, 2010
How to configure WSO2 ESB to route messages through a proxy server
In order to do so, you just need to add the following two parameters as child elements of <transportSender name="http" class="org.apache.synapse.transport.nhttp.HttpCoreNIOSender">
<parameter name="http.proxyHost" locked="false">localhost</parameter>
<parameter name="http.proxyPort" locked="false">8090</parameter>
Note:- Change the proxy port and host according to your environment
Tuesday, June 1, 2010
WSO2 Stratos - Introducing WSO2 middleware Platform as a Service (PaaS)
For the past few years, WSO2 has been doing many releases based on revolutionary Carbon platform, which helped to consistently improve the platform with introducing latest state-of-art technologies. The initial releases of Carbon product platform intended to improve the features of the individual products. For example, a lot of core features were introduced to WSO2 ESB, WSAS, Governance Registry etc.. Then we focused on ease of integration and more component based model. We introduced Equinox based provisioning model to build your SOA platform by picking and choosing the components as and when you need.
Then, the core product platform has been enhanced to support multi-tenancy. With the multi-tenant supported architecture at hand, our brilliant development team was able to introduce the first ever comprehensive middleware PaaS. Why is this so important?
Now, WSO2 Carbon middleware platform is available on Cloud. Anybody can try out it online by accessing http://cloud.wso2.com
Not only that, the code is 100% opensource! As far as I know, this is the first ever opensource cloud PaaS offering.
Without digging in to more details, lets try WSO2 Stratos out.
Step 1
As most of you are familiar with Google Apps, without any guidance you will be able to start using WSO2 Stratos. However, I will start from the scratch. Access http://cloud.wso2.com. This will bring up WSO2 Stratos Manager, which is the is the point of entry for all WSO2 Cloud Services such as Application Server, Business Activity Monitor, Gadget Server, Governance, Identity and Mashup Server. Click on "Register" in order to create an account for you (your organization).

This will direct you to "Select a domain for your organization" page. Specify the domain for your organization and check its availability by clicking on "Check Availability". Select "Next" to sign up your organization.

Enter the required information in "sign up your organization" page. If your registration is successful, you will see a confirmation message. With this, you just created the administration account for your organization. You will receive an email to validate Email instructions specified by you. Click on the link given in the email to access the Stratos Manager login page.
Now, you can log in to the Stratos Manager, by giving the admin credentials you have just specified during the registration process.
Step 2
After log in to Stratos Manager, you will see the cloud services list offered by WSO2 Cloud service platform.

In addition to the cloud services, you can configure a new theme for your account or you can manage new user accounts (add new users, grant necessary permissions to them etc..) through the Stratos Manager.
Suppose, you need to use cloud application server out of the seven cloud services enabled by default. Click on "Cloud Application Server" link. This will bring up "WSO2 Stratos Application Server" login page as follows.

Log in to app server by providing the same admin credentials given above. (You may question why a separate login is required. We have not provided Single Sign On support between Stratos Manager and Cloud services in the alpha1 version. This will be available soon)
The Cloud application server Home page will be shown as follows after you log in to the application server.

If you are already familiar with WSO2 WSAS, this will not make you feel strange. You could either deploy services, secure them, monitor and do a lot of tasks. In addition to that, WSO2 Cloud Application Server, is now provides with web application deployment support. You could use this as your servlet container!
Similarly, you can try out the rest of the cloud services.
Saturday, May 8, 2010
How to specify a custom scope for WS-Discovery target service
WSO2 WSAS can be considered as a target service hosting provider. A default scope is assigned to all the target services discovered by a Discovery Proxy.
If a discovery client looks for a service based on the service type, or some scopes, the client sends probe message to the DiscoveryProxy. Then the proxy responds back to the client with the appropriate service metadata.
Suppose we need to specify a scope for the services deployed on WSAS (target services). How can we do that?
You can specify the service scope(s), by adding a parameter in the services.xml of the Axis2 Service archive (*.aar) as follows.
<parameter name="wsDiscoveryParams">
<Scopes>http://wso2.org/engineering</Scopes>
</parameter>
Then, you can probe the services either through WS-Discovery Control Panel in WSO2 ESB management console as shown here or using WS-Discovery Client API as follows.
DiscoveryClient client = new DiscoveryClient(cfgCtx, discoveryProxyURL);
TargetService[] services = client.probe(types, scopes, matchingCriteria);
Hierarchical service deployment support in WSO2 WSAS-3.2.0
Hierarchical service deployment model allows you to deploy two (or more) different versions of the same service in a very easy manner.
Lets see how multiple versions of the same services can be deployed on WSAS-3.2.0
Pre-requisites:
Download WSO2 WSAS-3.2.0 from here
Step 1
Start WSO2 WSAS by running wso2server.sh{bat} from WSAS_HOME/bin
Access management console using https://localhost:9443/carbon and log in with the default credentials(admin/admin)
Select Axis2 Service from the left navigation menu.

You will notice there is an input text box, Service Hierarchy. Here you can specify a service path. eg:- /marketing/test
Browse a service archive (eg:- Axis2Service.aar) in your local file system and click on Upload.
The service will be deployed successfully, go to the service list page and you will the service is listed there as follows. The service name is prefixed with the hierarchy path you have given when deploying the service (marketing/test/Axis2Service)

Step 2
Now, we are going to deploy a different version of the same Axis2Service. Access the Manage --> Services --> Add --> Axis2 Service page and specify a new service hierarchy (eg:- /sales/test)
Browse the same service archive which have deployed in the previous step (Axis2Service.aar) and click on upload.
Now, you will notice a different version of the same service, sales/test/Axis2Service listed in the service management page.
Likewise, you can deploy many versions of the same service and make use them in your SOA infrastructure. Hierarchical service deployment facility can be used in Spring, Jax-WS and Jar services as well.
Wednesday, April 28, 2010
WS-Discovery with WSO2 Carbon

Image:- Discovered services in G-reg
Now, log in to WSAS management console and deploy a new service. If you refresh the above service list page, you will see a new service is discovered by G-reg and it is assigned a unique service name.
Step 3
The third member participates in our scenario is WSO2 ESB, which acts as a discovery client. WSO2 ESB provides you with a user interface to mange the client aspects of WS-Discovery. Using that, you can connect to remote WS-Discovery proxies and probe them for any services and service endpoints which have been already discovered.
Log in to ESB management console and select Configure > WS-Discovery from the left navigation menu to access WS-Discovery Control panel.

Image:- WS-Discovery Control Panel in ESB
In order to connect to the remote DiscoveryProxy (in G-reg) and make use of the discovered services, we should configure a discovery proxy in ESB. Click on "Add Discovery Proxy" link to add a new proxy. You will be directed to discovery proxy settings screen in which you can give a name for the proxy and the remote DiscoveryProxy URL (In our case https://localhost:9443/services/DiscoveryProxy). You will be redirected to the home page of WS-Discovey Control Panel once the proxy is created. The created proxy will be listed in the control panel home page. Click on "View" to find the target services and endpoints discovered by the proxy. You will be directed to a page as shown below.

Here, you will see that 4 service are discovered and shown with a UUID and associated endpoints of each discovered service.
Click on a discovered service UUID. You will be directed to a new page with more information about the service. Using this page, either you can create an ESB endpoint or directly create an ESB proxy service referring to the discovered service.
We have seen the basic workflow of WS-Discovey implementation of WSO2 Carbon platform. If you have any issues with the above steps, drop me a mail or contact WSO2 ESB forum at www.wso2.org
Sunday, April 25, 2010
How to setup binary relay in WSO2 ESB-3.0.0
Binary relay allow users to send messages to a different party efficiently at byte level while making decisions using transport headers. It enables ESB to pass through SOAP messages without performing heavy XML parsing. You can find more information about the architectural details of binary relay in this article written by Dr. Srinath Perera.
I'm going to demonstrate the steps to configure binary relay in WSO2 ESB-3.0

