Popular Posts

Thursday, January 31, 2008

Badboy is not bad!!!

I was having a difficult time last couple of days to find out a reliable open source load testing tool. WebLoad, OpenSTA, Badboy a few among a set of load test tools which were used for evaluation. As a result of the evaluation, I noticed that Badboy seems reliable and easy to use in capturing and replaying browser activities. We wanted to do a load test on WSO2 mashup user portal, mooshup.com and Badboy was successful in our scenario.

Badboy can easily be used to capture user navigation of a web site and the scenario can be converted to a set of threads. The test scenario captured by the tool can be exported to JMeter and run the load test through JMeter. So that, the effective reporting capabilities of JMeter can be utilized.

After all, I would recommend Badboy for any basic level load test scenario since it is free and very user friendly.

To find out more about Badboy, Visit http://www.badboy.com.au


Wednesday, January 30, 2008

Exploratory Testing: Finding the Music of Software Investigation

Jonathan Kohl discusses about improving exploratory testing skills in this article.

"Through experience and a lot of trial and error, testers and musicians have developed skills they can’t easily explain. Unfortunately, with software testing, there aren’t as many obvious avenues for skill development as there are for musicians. Many software testers don’t realize that there are learnable exploratory testing skills they can develop to help them become even more valuable to software development teams."

Dr. Sanjiva on Web Services, REST and Open Source SOA

Dr. Sanjiva Weerawarna explains his strategy on SOA and web services in an interview at QCon San Francisco.

Wednesday, January 23, 2008

WSO2 WSAS 2.2 released

The WSO2 WSAS team is pleased to announce the release of the WSO2 WSAS 2.2. WSO2 WSAS is an enterprise ready Web services engine powered by Apache Axis2 release under the Apache Software License 2.0.

This release can be downloaded from http://wso2.org/projects/wsas/java

Maven2 binary distribution download
- Group Id : org.wso2.wsas
- Artifact Id : wso2wsas
- Version : 2.2
- Type : zip
- WSO2 Maven2 Repository URL : http://dist.wso2.org/maven2/

Maven2 source distribution download
- Group Id : org.wso2.wsas
- Artifact Id : wso2wsas
- Version : 2.2
- Type : zip
- Classifier : src
- WSO2 Maven2 Repository URL : http://dist.wso2.org/maven2/

From the WSO2 WSAS 2.2 - Release Note - 22nd Jan 2008
=====================================================

WSO2 WSAS is an enterprise ready Web services engine powered by Apache Axis2 and which offers a complete middleware solution. It is a lightweight, high performing platform for Service Oriented Architectures, enabling business logic and applications.
Bringing together a number of Apache Web services projects, WSO2 WSAS provides a secure, transactional and reliable runtime for deploying and managing Web services.

Key Features
------------
* Data services support - Expose you enterprise data as a services in a jiffy
* WSAS IDE - Eclipse IDE integration
* Clustering support for High Availability & High Scalability
* Full support for WS-Security, WS-Trust, WS-Policy and WS-Secure Conversation and XKMS
* EJB service provider support - Expose your EJBs as services
* Axis1 backward compatibility - Deploy Axis1 services on WSAS & Engage advanced WS-* protocols in front of legacy services
* JMX & Web interface based monitoring and management
* WS-* & REST support
* GUI, command line & IDE based tools for Web service development


New Features In This Release
----------------------------
* Improved Data Services support including New & improved UI, and database connection pooling
* WS-Security 1.1 support
* Improved clustering support
* Improved JSR-181 & JAXWS support
* JMX based monitoring
* Graceful shutdown & restart of the server
Serve all pending requests before shutting down or restarting the server
* Improvements to the Management Console
* Various bug fixes to Apache Axis2, Apache Rampart & WSAS

Data Services - Bringing Enterprise Data to Web
-----------------------------------------------
* Service enable data locked in relational databases, CSV & Excel files in no time
* Zero code. Simple descriptor file describes the data to service mapping
* Controlled access to your data
* Customizable XML output
* Benefit from REST & WS-* support
* Built-in Connection pooling support
* Supports exposing Stored procedures & functions
* Built-in caching
* Throttling - to ensure your database is never overloaded.
* Easy configuration via graphical console
* Test your services via Try-it tool

Training
--------

WSO2 Inc. offers a variety of professional Training Programs, including
training on general Web services as well as WSO2 WSAS, Apache Axis2, Data Services
and a number of other products.

For additional support information please refer to
http://wso2.com/training/course-catalog/


Support
-------

WSO2 Inc. offers a variety of development and production support
programs, ranging from Web-based support up through normal business
hours, to premium 24x7 phone support.

For additional support information please refer to http://wso2.com/support/

For more information on WSO2 WSAS, visit the WSO2 Oxygen Tank (http://wso2.org)

How to do various things with WSAS - WSAS HOWTO Series(http://wso2.org/library/2707)

For further information see the full release note http://wso2.org/project/wsas/java/2.2/docs/release_notes.html

Tuesday, January 15, 2008

Engage your emotions in testing

I found this nice article at stickyminds.com, which discusses about identifying bugs in an application if you don't have any specs, reference programs, docs etc..

Excerpt from the article;

" A bug is something that bugs somebody who matters. Testers can't be sure that something will bug someone, and so we must apply heuristics--useful but fallible ways of solving a problem or making a decision. Oracles--heuristic principles or mechanisms by which we might recognize a bug--include comparable programs, documents, mathematical principles, personal experience, and people--"live oracles."

Emotional reactions are associated with a psychological and physiological phenomenon called "arousal," which is the state of becoming alert or awake. For good testers, emotional reactions are oracles--trigger heuristics that wake us up to the possibility of a problem. Although emotional reactions don't come with a guarantee, they can often aid our decisions about the existence or the significance of a problem.

We sometimes depend on logical and objective assessments of software at the expense of other ways of thinking--ways that include feeling. Most of the results that this system is returning are functionally correct, but that correctness doesn't matter when there are problems that interfere with the customers' goals. If we engaged emotions and empathy more often and more consciously, they would point us rapidly to things that are important to people. Try testing a program while simply pretending that we have some skin in the game.

Our customers constantly find bugs in our systems without any preparation, documentation, reference programs, or live oracles. Customers test the product by using it, and they recognize bugs and assess their significance and the associated value of our products. They can do that. So can we."

Have a look!!!!

Monday, January 14, 2008

Performance benchmarking of data services

This is a follow up post of my previous blog entry Call MySQL stored procedures using WSAS data services.
Hence, I'd recommend the steps given there should be exercised before going through this post.

I'm going to explain how I analyzed the performance of WSAS data service using ApacheBench, which is an embedded benchmarking utility comes with Apache httpd server. The procedure is very simple and can be enhanced with more scenarios as you wish.

Step 1

Assuming the Apache web server is installed in your system, go to Apache_home/bin and run AB.exe
You will see a set of options in the command prompt.

Step 2
Invoke the data service which has been created in the previous post using Tryit utility. Make sure to switch on the 'Soap Tracer' so that we can capture the request soap envelope. Copy the soap message and save in xml (Say it is request.xml) format. You may have a look at How to monitor messages sent/received through WSAS in order to see how WSAS Soap Tracer is used.

Also , make sure to switch off the soap tracer after capturing the message since it degrades the server performance significantly.


<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<p:operation1 xmlns:p="http://ws.wso2.org/dataservice">
<empid>1</empid>
</p:operation1>
</s:Body>
</soapenv:Envelope>

request SOAP envelope

Step 3

Now run the ApacheBench with the following parameters. Change the service url and request file location according to your system.
C:\Program Files\Apache Software Foundation\Apache2.2\bin>ab -p D:\testing-resources\ds-blog-request.xml -n 100 -c 20 -k -H "SOAPAction: urn:operation1" -T "text/xml; charset=UTF-8" "http://localhost:9762/services/blogds"

Lets look at the usage of the the above parameters. -p specifies the location of the request message. -n is used to specify the number of requests transmitted to the service. -c is the number of concurrent requests is being sent to the server. -k is used to switch on http keep alive settings. -H specifies the attribute headers. In our case it is Soap action of the opeartion.
-T denotes content-type header of the HTTP POST message. Finally, the service endpoint is specified.

When Apache Bench completes the transmission of the total number of requests, a comprehensive test results report will be displayed .







Friday, January 4, 2008

Call MySQL stored procedures using WSAS data services

WSO2 Web services application server (WSAS) is shipped with a lot of useful features which can be used effectively in a production system. One of these cool functionalities is exposing relational data using WSAS data services.

Lets see how we can call an existing stored procedure using an WSAS data service. Here I'm going to use a MySQL DB instance for the demonstration purposes. You may use any DBMS as your preference.

Step 1

Create a data base
mysql>create database employeedb;

Step 2
Create a table and inseert values.
mysql>create table employee (id INTEGER, name varchar(20), address varchar(30));

mysql>insert into employee values (1, 'Charitha', 'Colombo');

Repeat the insert statement with more data.

Step 3

Create a stored procedure.

CREATE PROCEDURE getEmployee(empid INTEGER) select id, name, address from employee where id=empid;

Step 4
We haven't used WSO2 WSAS data service configuration yet. All of the above are basic MySQL database setting up steps. Now, we can create a data service configuration using WSAS management console. Lets start our WSAS instance by running WSAS_HOME/bin/wso2wsas.bat {sh}

Then log in to the management console using default administrator credentials (admin/admin). Next, select 'Services' from the left navigation and click on 'Define data service'

Step 5
Now you are in the first step of the data service configuration wizard. Provide a unique name for your data service. Then, select 'RDBMS' as the data source. You will get a pop-up window as given in the following screen.



Step 6

In the above pop-up window, select 'MySQL' as the database type. Then enter the following values for the remaining fields.
Driver class = com.mysql.jdbc.Driver
JDBC URL = jdbc:mysql://localhost:3306/employeedb
user = root
password = root

Next, click on 'Test Connection' to verify the communication between WSAS and our database.
If the connection is successful, click 'OK' in the pop-up window.

Step 7

Now we are done with the first step of the data service configuration. Click 'Next' to proceed to the step 2.

Click on 'New Query' button to add a query to our data service. You will get 'Add new Query' pop-up window. Fill the values as given in the screen shot.



Note that, the SQL statement field contains the stored procedure call (call getEmployee(?)).

Click 'OK' in the pop-up window. Then select 'Next' to continue through the wizard. You will be directed to the step 3 of the data service configuration.

Step 8

Click on 'Add new operation' button. 'Add new operation' pop-up window will be displayed. Enter a unique name for the operation. Select 'query1' from the 'Query' drop down menu.

Click 'Finish' to save our data service.

If everything is successful, you will see the deployed data service in the 'Services and service group management' page. Now, we need to verify whether the stored procedure call generate correct results. In order to do that, we may use 'Tryit', one of the very helpful tools in WSAS which can be used to verify simple service invocations.

Step 9

Select the newly created data service from the 'Services and service group management' page.
Select 'Tryit'.
Click on the operation button after entering empid.



As you can see above, our MySQL stored procedure has been invoked by data service. We can enhance the data service configuration to handle more complex stored procedures.