ZK Testing with Sahi"

From Documentation
(Created page with "ZK_Testing_with_Sahi {{Template:Smalltalk_Author| |author=Enrico Tedeschini |date=October 04, 2013 |version=ZK 6.5 (or latest) }} ==== Draft Mark ==== ==Introduction== Th...")
 
Line 6: Line 6:
 
|version=ZK 6.5 (or latest)
 
|version=ZK 6.5 (or latest)
 
}}
 
}}
 +
 +
__TOC__
  
 
==== Draft Mark ====
 
==== Draft Mark ====
  
==Introduction==
+
=Introduction=
 
This article describes how it’s easy to test your ZK web application with [http://sahi.co.in/ Sahi].  
 
This article describes how it’s easy to test your ZK web application with [http://sahi.co.in/ Sahi].  
 
Sahi offers a completely different solution from [http://www.zkoss.org/product/zats ZATS].  ZATS is a powerful solution to test a pure web application functionality and incredible product for Automate Unit Tests without server and browser. If you have to test your ZK web application in a real environment with different browsers, different servers and different network traffic/latency you have to use a tool like Sahi.  I tried different tools like Selenium, JMeter and others but all of them require a change of code.  They require to create a Custom ID Generator as described in this article [http://books.zkoss.org/wiki/Small_Talks/2012/May/Perform_stress_test_on_ZK_using_JMeter-take_Shopping_Cart_as_an_example#Generate_new_desktop_ID_for_redirecting_to_a_new_page Perform stress test on ZK using JMeter-take Shopping Cart as an example].
 
Sahi offers a completely different solution from [http://www.zkoss.org/product/zats ZATS].  ZATS is a powerful solution to test a pure web application functionality and incredible product for Automate Unit Tests without server and browser. If you have to test your ZK web application in a real environment with different browsers, different servers and different network traffic/latency you have to use a tool like Sahi.  I tried different tools like Selenium, JMeter and others but all of them require a change of code.  They require to create a Custom ID Generator as described in this article [http://books.zkoss.org/wiki/Small_Talks/2012/May/Perform_stress_test_on_ZK_using_JMeter-take_Shopping_Cart_as_an_example#Generate_new_desktop_ID_for_redirecting_to_a_new_page Perform stress test on ZK using JMeter-take Shopping Cart as an example].
Line 17: Line 19:
 
For example Sahi can help you in the troubleshooting process.  When you see a problem you only have to, through Sahi Dashboard, recording all steps and playback them later. All of this without writing any code or having any particular skill.  
 
For example Sahi can help you in the troubleshooting process.  When you see a problem you only have to, through Sahi Dashboard, recording all steps and playback them later. All of this without writing any code or having any particular skill.  
 
Sahi works on Windows and Linux platform as well. In this article is described how to test a ZK web application on Windows platform.
 
Sahi works on Windows and Linux platform as well. In this article is described how to test a ZK web application on Windows platform.
 +
 +
=Environment=
 +
Microsoft Windows 7 platform with
 +
*Firefox Version 22.x
 +
*Chrome Version 29.x
 +
*Internet Explorer Version 8.x
 +
*Safari Version 5.1.x
 +
*JRE 6 or later
 +
 +
=Steps=
 +
==Download and Install Sahi==
 +
<ol>
 +
<li>Download Sahi Pro Trial Version.  Go to [http://sahi.co.in/sahi-pro/ http://sahi.co.in/sahi-pro/], press “Free Trial” button and fill the form to download a fully functional version of Sahi Pro V5.0.9, valid for 1 month. The license key and a download link will be emailed to you.
 +
</li>
 +
<br/>
 +
<li>Install Sahi Pro wherever you want. In this example Sahi Pro was installed on '''C:/workspace/sahi_pro''' directory.  It is recommended to install Sahi in a folder without spaces in the path. You don’t need to change any other setting. Press always '''Next''' button until the end where you have to press, '''Done''' to complete the installation.
 +
<br/>
 +
[[Image:Image1.png‎]]
 +
</li>
 +
<br/>
 +
<li>Copy the license.data file received by email on '''C:/workspace/sahi_pro/userdata/config''' directory
 +
<br/>
 +
</li>
 +
</ol>
 +
<br/>
 +
==Configure Sahi==
 +
Start Sahi Dashboard by double click on the desktop shortcut. <br/>[[Image:Image2.png‎]]
 +
 +
Then press the '''Configure''' hyperlink to make visible on the Dashboard all browsers installed on your computer.  Browsers’ path should match the browser location on your computer. When all browsers location match you can see a Sahi Dashboard like this. <br/>
 +
[[Image:Image3.png|center|800×429px‎]]
 +
 +
[[Category:Small Talk]]

Revision as of 15:51, 4 October 2013

ZK_Testing_with_Sahi


ZK Testing with Sahi

Author
Enrico Tedeschini
Date
October 04, 2013
Version
ZK 6.5 (or latest)

Draft Mark

Introduction

This article describes how it’s easy to test your ZK web application with Sahi. Sahi offers a completely different solution from ZATS. ZATS is a powerful solution to test a pure web application functionality and incredible product for Automate Unit Tests without server and browser. If you have to test your ZK web application in a real environment with different browsers, different servers and different network traffic/latency you have to use a tool like Sahi. I tried different tools like Selenium, JMeter and others but all of them require a change of code. They require to create a Custom ID Generator as described in this article Perform stress test on ZK using JMeter-take Shopping Cart as an example.

All tests described here are performed with a Sahi Pro Version. But all of them work as well with Sahi Open Source Version. From my point of view Sahi is a powerful tool for regression, stress, reliable and performing tests for any ZK web applications. For example Sahi can help you in the troubleshooting process. When you see a problem you only have to, through Sahi Dashboard, recording all steps and playback them later. All of this without writing any code or having any particular skill. Sahi works on Windows and Linux platform as well. In this article is described how to test a ZK web application on Windows platform.

Environment

Microsoft Windows 7 platform with

  • Firefox Version 22.x
  • Chrome Version 29.x
  • Internet Explorer Version 8.x
  • Safari Version 5.1.x
  • JRE 6 or later

Steps

Download and Install Sahi

  1. Download Sahi Pro Trial Version. Go to http://sahi.co.in/sahi-pro/, press “Free Trial” button and fill the form to download a fully functional version of Sahi Pro V5.0.9, valid for 1 month. The license key and a download link will be emailed to you.

  2. Install Sahi Pro wherever you want. In this example Sahi Pro was installed on C:/workspace/sahi_pro directory. It is recommended to install Sahi in a folder without spaces in the path. You don’t need to change any other setting. Press always Next button until the end where you have to press, Done to complete the installation.
    Image1.png

  3. Copy the license.data file received by email on C:/workspace/sahi_pro/userdata/config directory


Configure Sahi

Start Sahi Dashboard by double click on the desktop shortcut.
Image2.png

Then press the Configure hyperlink to make visible on the Dashboard all browsers installed on your computer. Browsers’ path should match the browser location on your computer. When all browsers location match you can see a Sahi Dashboard like this.

800×429px‎