Friday, July 4, 2008

WSO2 Mashup Server - Service Life Cycle support

The life cycle support in WSO2 Mashup Server uses the following annotations;
  1. . init - To be called in deployment
  2. .destroy -To be called in un-deployment
  3. .undispatched -To get set by the dispatch logic when the operation to deliver the message to cannot be figured out.

The above were designed to support different implementations. Given below are the test cases I used for testing them.

Scenario 1: Checking the constructor\destructor implementation 1
Check if constructor and destructor are called at deployment/un-deployment times using the code below;














Expected Result :
- At the deployment time the function foo is called and the log should print "init".
- If you re-deploy, since the service is first undeployed and then deployed, the function foo1 is called following function foo. Therefore the log should print 'destroy' first and 'init' following it.
- If u check the WSDL2 of the service both constructor & de-structor operations should appear there.


Scenario 2: Checking the constructor\destructor implementation 2
Check if constructor and destructor are called at deployment/un-deployment times when following format is used.












Expected Result :
- At the deployment time the function foo is called and the log should print "init".
- If you re-deploy, since the service is first undeployed and then deployed, the function foo1 is called following function foo. Therefore the log should print 'destroy' first and 'init' following it.
- If u check the WSDL2 of the service both constructor & de-structor operations should appear there.


Scenario 3: Checking the constructor\destructor implementation 3
Check if constructor and destructor are called at deployment /un-deployment times when following format is used.












Expected Result :
- At the deployment time the function foo is called and the log should print "init".
- If you re-deploy, since the service is first undeployed and then deployed, the function foo1 is called following function foo. Therefore the log should print 'destroy' first and 'init' following it.
- If u check the WSDL2 of the service both constructor & de-structor operations should appear there.


Scenario 4: Checking the 'undispatcher' implementation 1
Check if 'undispatched' operation is invoked when a non-existing operation is called when 'undispatched' is given in following manner.










Expected Result :
Access an invalid operation like, https://localhost:7443/services/admin/addNamespace/fooklklllklklklk the 'undispatched should be called.


Scenario 5: Checking the 'undispatcher' implementation 2
Check if 'undispatched' operation is invoked when a non-existing operation is called when 'undispatched' is given in following manner.









Expected Result :
Access an invalid operation like, https://localhost:7443/services/admin/addNamespace/fooklklllklklklk the 'undispatched should be called.

Thursday, May 22, 2008

Performance Testing - Mashup Server

Mashup Server, being a downstream product of the WSO2 product suite needed to be performance tested after its integration with some other parent products.

Here's how the performance environment was setup:

Main requirement:
Test the performance of the server when performing a resource search while there's a large number of resources in the database.

Tools used:
Apache JMeter 2.2, Badboy 2.0, Selenium IDE.

Loading resources:
1. Loaded the server with 15 users.
The initial script for this was created using Badboy and exported to JMeter. In JMeter the script was executed with a 15 user data file attached to it.

2. Added 10 Mashups for each user.
This was a manual task where I copied the sample and system mashups that are shipped with the server installation, to each user folder.
(NOTE: when creating users Mashup Server creates a user folder for each user in the local file system. All resource related to the user are store in here)
*** Yes I need to automate this part...

3. Added tags and comments to each mashup of each user.
Used a Selenium script in doing this. This was quite straight forward because I simple added all resources under one login in a sequence. (I am yet to enhance this script by researching a bit on looping abilities of Selenium).

Now the test environment is ready. I have 8 scenarios identified around search functionality which exercise the database in various ways. These scripts were also initially created from BB and exported as jmx files.

Scripts and Readme files of above work can be found in:
"https://wso2.org/repos/wso2/trunk/commons/qa/mashup/Test Framework/PerformanceTest"

Thursday, February 28, 2008

To test 'sharing' in Mashup Server

Configurations

1. Copy the .cert file into \Java\jdk1.5.0_06\jre\lib\security
2. keytool -import -keystore cacerts -storepass changeit -alias myCert -file ca.cert
3. Change port in commandeListner & JMX in server.xml
4. In axis2.xml change the http & https ports:


Test Scenarios
1. Admin to share with a user in the same server.
2. A user sharing with the admin of the same server.
3. Admin sharing with the admin of another server.
4. Admin sharing with a user of another server.
5. User sharing with a user of another server.
6. User sharing with the admin of another server.
7. Admin sharing to a user1 of the same server and user sharing with a user2 of another server.
8. Admin sharing to a user1 of the same server and user1 sharing with admin of another server.
9. Admin sharing with user1 a service that was already shared.
10. User sharing with the admin a service that was already shared.
11. User1 sharing with a user2 in the same machine a service that is already shared.
12. User1 sharing with a user2 in another machine a service that is already shared.
13. Share and edit.
14. Share, tag\comment and share again
15. Share with a user of a same name in a different server

Tuesday, February 26, 2008

Open ID

WSO2 Identity Solution is going to do a release. I'll be helping them with QA. So these days I'm learning the technologies\concepts behind their new features.

Open ID is one that came first in the list. Here are some interesting links on OpenID. They were very helpful for me in gathering knowledge.

http://www.youtube.com/watch?v=DslTkwON1Bk&eurl=http://blog.facilelogin.com/search?updated-max=2007-12-17T14%3A04%3A00%2B05%3A30&max-results=10
http://www.identityblog.com/wp-content/images/2008/02/OpenID/Normal/OpenIDPhish.html
http://www.youtube.com/watch?v=xcmY8Pk-qEk

Saturday, December 29, 2007

WSO2 Mashup Server 1.0 Beta Release

WSO2 Mashup Server 1.0 Beta was released on last 20th.
The project's src, bin distributions and all related information are available at; http://wso2.org/projects/mashup

Here are few simple scenarios that you can try with Mashups.

REGISTER YOURSELF:
Register as normal:

- Sign-up with your information
- Accept the Email Verification
- Sign-In

Register for Infor card :
- Register
- Sign-in
- Create Infor card (from profiles' page)

SWITCH USERS:
Change user:
- Sign in.
- Select the option to "Change User"
- Sign-in using a different user credentials

WORK WITH SERVICES:
Create a new service:
- Sign-In and Go to user profile page
- Select the option to "Create a new service"
- Go to service home page & select to edit service
- From the Mashups editor, update the service as you wish.
NOTE: There's a UI issue in the editor from IE7. Alternates - Works fine in FireFox

Edit a service from UI:
- Sign-In and go to the service's home page.
- Select to "edit the service"

Edit Mashups from file system:
- Go to the Mashups server directory from the file system
- Then move to the Scripts\User Folder
- Open the script from an editor
- Edit
- Save and Close
The hot update feature will re-deploy the updated the service without having the server restarted.
If your change is semantically incorrect, the server will not deploy it. The error can be viewed from server console.
You can find HELP in writing a service from Mashup Server documentation at (http://wso2.org/project/mashup/0.2/docs/index.html)

Sharing a service:
- Sign-In and Go to user profile page.
- Select the option to "Share a service"
- Give the URL for sharing server.

NOTE: If the server you are sharing to is not active, the sharing will fail)
You can also share services with the mashups.org site as well (https://mashups.wso2.org)

Start\Stop service:
- Services can be started\stopped from service's home page.

Tagging:
- Sign-in and go to a service home page
- Add a tag
The tag you added will appear under the 'tags' section of the service. If the tag you added is duplicating the Mashups server will quit intelligently will not add it. You can also add coma separated tags.

Commenting:
- Sign-in and go to a service home page
- Add a comment
The comment that you added will appear in the comments section with your user name.
Currently we allow sentences with 500 chars. However the UI wrapping go out of order if your try a WORD with 500 chars, which will be fixed for 1.0.

Scraping Assistance:
- Sign-In and Go to user profile page.
- Select to use the "scraping assistant"
Scraping assistance will help you to create a scraper configuration of your wish. You may then copy paste your configuration to the service source code.
Currently there's a small usability problem here. The option to edit a service appears in the service's home page and the scraping assistant appears only in the user home page. So currently there are too many clicks for the user to use both tools together. We will address this issue soon.

In addition to these you can also re-deploy, delete services, list falty services.

SAMPLES:
Mashups Server has some fabulous set of samples that are finely describing the technologies embedded within the server. Currently we have these appearing in the home page. You access WSDL, XSD, Source, API documentation, Tryit page, Custom UI of these sample services from the service home page which you get when clicked on the service.

SEARCHING:
You can search for Mashups, comments, Recent Activities and also search by saved queries.

Featured

Selenium - Page Object Model and Action Methods

  How we change this code to PageObjectModel and action classes. 1 2 3 driver . findElement ( By . id ( "userEmail" )). sendKeys (...

Popular Posts