Thursday, December 3, 2009

Web Application UI Checklist

Testing user interface for web application is slightly different from testing user interface of traditional applications. Irrespective of the web application there are certain things which should be tested for every web application. Following checklist will give some information on items that should be tested to ensure quality of the user interface of your web application.


1.1 COLORS


1.1.1 Are hyperlink colors standard?
1.1.2 Are the field backgrounds the correct color? 
1.1.3 Are the field prompts the correct color? 
1.1.4 Are the screen and field colors adjusted correctly for non-editable mode?


1.1.5 Does the site use (approximately) standard link colors?
1.1.6 Are all the buttons are in standard format and size?
1.1.7 Is the general screen background the correct color? 
1.1.8 Is the page background (color) distraction free?


1.2 CONTENT


1.2.1 All fonts to be the same 
1.2.2 Are all the screen prompts specified in the correct screen font? 
1.2.3 Does content remain if you need to go back to a previous page, or if you move forward to another new page?
1.2.4 Is all text properly aligned?
1.2.5 Is the text in all fields specified in the correct screen font? 
1.2.6 Is all the heading are left aligned
1.2.7 Does the first letter of the second word appears in lowercase? Eg: 


1.3 IMAGES


1.3.1 Are all graphics properly aligned?
1.3.2 Are graphics being used the most efficient use of file size?
1.3.3 Are graphics optimized for quick downloads?
1.3.4 Assure that command buttons are all of similar size and shape, and same font & font size. 
1.3.5 Banner style & size & display exact same as existing windows 
1.3.6 Does text wrap properly around pictures/graphics?
1.3.7 Is it visually consistent even without graphics?


1.4 INSTRUCTIONS


1.4.1 Is all the error message text spelt correctly on this screen? 
1.4.2 Is all the micro-help text(i.e tool tip) spelt correctly on this screen? 
1.4.3 Microhelp text(i.e tool tip) for every enabled field & button 
1.4.4 Progress messages on load of tabbed(active screens) screens 


1.5 NAVIGATION


1.5.1 Are all disabled fields avoided in the TAB sequence? 
1.5.2 Are all read-only fields avoided in the TAB sequence? 
1.5.3 Can all screens accessible via buttons on this screen be accessed correctly? 
1.5.4 Does a scrollbar appear if required?
1.5.5 Does the Tab Order specified on the screen go in sequence from Top Left to bottom right? This is the default unless otherwise specified. 
1.5.6 Is there a link to home on every single page?
1.5.7 On open of tab focus will be on first editable field 
1.5.8 When an error message occurs does the focus return to the field in error when the user cancels it? 


1.6 USABILITY


1.6.1 Are all the field prompts spelt correctly? 
1.6.2 Are fonts too large or too small to read?
1.6.3 Are names in command button & option box names are not abbreviations. 
1.6.4 Assure that option boxes, option buttons, and command buttons are logically grouped together in clearly demarcated areas "Group Box" 
1.6.5 Can the typical user run the system without frustration?
1.6.6 Do pages print legibly without cutting off text?
1.6.7 Does the site convey a clear sense of its intended audience?
1.6.8 Does the site have a consistent, clearly recognizable "look-&-feel"?
1.6.9 Does User cab Login Member Area with both UserName/Email ID ?
1.6.9 Does the site look good on 640 x 480, 600x800 etc.?
1.6.10 Does the system provide or facilitate customer service? i.e. responsive, helpful, accurate?
1.6.11 Is all terminology understandable for all of the site’s intended users?

Web Application - Interface and Compatibility Checklist

Testing web application is certainly different than testing desktop or any other application. With in web applications, there are certain standards which are followed in almost all the applications. Having these standards makes life easier for use, because these standards can be converted into checklist and application can be tested easily against the checklist.


3. INTERFACE AND ERROR HANDLING


3.1 SERVER INTERFACE


3.1.1 Verify that communication is done correctly, web server-application server, application server-database server and vice versa. 
3.1.2 Compatibility of server software, hardware, network connections
3.2 EXTERNAL INTERFACE


3.2.1 Have all supported browsers been tested?
3.2.2 Have all error conditions related to external interfaces been tested when external application is unavailable or server inaccessible?


3.3 INTERNAL INTERFACE


3.3.1 If the site uses plug-ins, can the site still be used without them?
3.3.2 Can all linked documents be supported/opened on all platforms (i.e. can Microsoft Word be opened on Solaris)?
3.3.3 Are failures handled if there are errors in download?
3.3.4 Can users use copy/paste functionality?Does it allows in password/CVV/credit card no field?
3.3.5 Are you able to submit unencrypted form data?
3.4 INTERNAL INTERFACE


3.4.1 If the system does crash, are the re-start and recovery mechanisms efficient and reliable?
3.4.2 If we leave the site in the middle of a task does it cancel?
3.4.3 If we lose our Internet connection does the transaction cancel?
3.4.4 Does our solution handle browser crashes?
3.4.5 Does our solution handle network failures between Web site and application servers?
3.4.6 Have you implemented intelligent error handling (from disabling cookies, etc.)?


4. COMPATIBILITY


4.1 BROWSERS


4.1.1 Is the HTML version being used compatible with appropriate browser versions?
4.1.2 Do images display correctly with browsers under test?
4.1.3 Verify the fonts are usable on any of the browsers
4.1.4 Is Java Code/Scripts usable by the browsers under test?
4.1.5 Have you tested Animated GIFs across browsers?


4.2 VIDEO SETTINGS


4.2.1 Screen resolution (check that text and graphic alignment still work, font are readable etc.) like 1024 by 768, 600x800, 640 x 480 pixels etc
4.2.2 Colour depth (256, 16-bit, 32-bit)


4.3 CONNECTION SPEED


4.3.1 Does the site load quickly enough in the viewer's browser within 8 Seconds? 


4.4 PRINTERS


4.4.1 Text and image alignment
4.4.2 Colours of text, foreground and background
4.4.3 Scalability to fit paper size
4.4.4 Tables and borders
4.4.5 Do pages print legibly without cutting off text?

Testing Checklists: Web Application - Functional Testing Checklist

Testing web application is certainly different than testing desktop or any other application. With in web applications, there are certain standards which are followed in almost all the applications. Having these standards makes life easier for use, because these standards can be converted into checklist and application can be tested easily against the checklist. 

1. FUNCTIONALITY


1.1 LINKS


1.1.1 Check that the link takes you to the page it said it would.
1.1.2 Ensure to have no orphan pages (a page that has no links to it)
1.1.3 Check all of your links to other websites
1.1.4 Are all referenced web sites or email addresses hyperlinked?


1.1.5 If we have removed some of the pages from our own site, set up a custom 404 page that redirects your visitors to your home page (or a search page) when the user try to access a page that no longer exists. 
1.1.6 Check all mailto links and whether it reaches properly


1.2 FORMS


1.2.1 Acceptance of invalid input
1.2.2 Optional versus mandatory fields
1.2.3 Input longer than field allows
1.2.4 Radio buttons 
1.2.5 Default values on page load/reload(Also terms and conditions should be disabled)
1.2.6 Is Command Button can be used for HyperLinks and Continue Links ?
1.2.6 Is all the datas inside combo/list box are arranged in chronolgical order?
1.2.7 Are all of the parts of a table or form present? Correctly laid out? Can you confirm that selected texts are in the "right place?
1.2.8 Does a scrollbar appear if required?


1.3 DATA VERIFICATION AND VALIDATION


1.3.1 Is the Privacy Policy clearly defined and available for user access?
1.3.2 At no point of time the system should behave awkwardly when an invalid data is fed
1.3.3 Check to see what happens if a user deletes cookies while in site
1.3.4 Check to see what happens if a user deletes cookies after visiting a site


2. APPLICATION SPECIFIC FUNCTIONAL REQUIREMENTS


2.1 DATA INTEGRATION


2.1.1 Check the maximum field lengths to ensure that there are no truncated characters? 
2.1.2 If numeric fields accept negative values can these be stored correctly on the database and does it make sense for the field to accept negative numbers? 
2.1.3 If a particular set of data is saved to the database check that each value gets saved fully to the database. (i.e.) Beware of truncation (of strings) and rounding of numeric values. 


2.2 DATE FIELD CHECKS


2.2.1 Assure that leap years are validated correctly & do not cause errors/miscalculations. 
2.2.2 Assure that Feb. 28, 29, 30 are validated correctly & do not cause errors/ miscalculations. 
2.2.3 Is copyright for all the sites includes Yahoo co-branded sites are updated


2.3 NUMERIC FIELDS


2.3.1 Assure that lowest and highest values are handled correctly. 
2.3.2 Assure that numeric fields with a blank in position 1 are processed or reported as an error. 
2.3.3 Assure that fields with a blank in the last position are processed or reported as an error an error. 
2.3.4 Assure that both + and - values are correctly processed. 
2.3.5 Assure that division by zero does not occur. 
2.3.6 Include value zero in all calculations. 
2.3.7 Assure that upper and lower values in ranges are handled correctly. (Using BVA)


2.4 ALPHANUMERIC FIELD CHECKS


2.4.1 Use blank and non-blank data. 
2.4.2 Include lowest and highest values. 
2.4.3 Include invalid characters & symbols. 
2.4.4 Include valid characters. 
2.4.5 Include data items with first position blank. 
2.4.6 Include data items with last position blank.

Testing Checklists: Performance & Security Testing Checklist

Crating checklists for performance & security is extremely important. This checklist helps in better definition of performance and security requirement. In the absence of properly defined performance & security testing requirements, teams can spend great deal time in things which probably does not matter much.


1.1 LOAD


1.1.1 Many users requesting a certain page at the same time or using the site simultaneously
1.1.2 Increase the number of users and keep the data constant
1.1.3 Does the home page load quickly? within 8 seconds
1.1.4 Is load time appropriate to content, even on a slow dial-in connection?
1.1.5 Can the site sustain long periods of usage by multiple users?


1.1.6 Can the site sustain long periods of continuous usage by 1 user?
1.1.7 Is page loading performance acceptable over modems of different speeds?
1.1.8 Does the system meet its goals for response time, throughput, and availability?
1.1.9 Have you defined standards for response time (i.e. all screens should paint within 10 seconds)?
1.1.10 Does the system operate in the same way across different computer and network configurations, platforms and environments, with different mixes of other applications?
1.2 VOLUME


1.2.1 Increase the data by having constant users
1.2.2 Will the site allow for large orders without locking out inventory if the transaction is invalid?
1.2.3 Can the site sustain large transactions without crashing?


1.3 STRESS


1.3.1 Increase both number of users and the data
1.3.2 Performance of memory, CPU, file handling etc.
1.3.3 Error in software, hardware, memory errors (leakage, overwrite or pointers)
1.3.4 Is the application or certain features going to be used only during certain periods of time or will it be used continuously 24 hours a day 7 days a week? Test that the application is able to perform during those conditions. Will downtime be allowed or is that out of the question?
1.3.5 Verify that the application is able to meet the requirements and does not run out of memory or disk space.


1.4 SECURITY


1.4.1 Is confidentiality/user privacy protected?
1.4.2 Does the site prompt for user name and password?
1.4.3 Are there Digital Certificates, both at server and client?
1.4.4 Have you verified where encryption begins and ends?
1.4.5 Are concurrent log-ons permitted?
1.4.6 Does the application include time-outs due to inactivity?
1.4.7 Is bookmarking disabled on secure pages?
1.4.8 Does the key/lock display on status bar for insecure/secure pages?
1.4.9 Is Right Click, View, Source disabled?
1.4.10 Are you prevented from doing direct searches by editing content in the URL?
1.4.11 If using Digital Certificates, test the browser Cache by enrolling for the Certificate and completing all of the required security information. After completing the application and installation of the certificate, try using the <-- BackSpace key to see if that security information is still residing in Cache. If it is, then any user could walk up to the PC and access highly sensitive Digital Certificate security information.
1.4.12 Is there an alternative way to access secure pages for browsers under version 3.0, since SSL is not compatible with those browsers?
1.4.13 Do your users know when they are entering or leaving secure portions of your site?
1.4.14 Does your server lock out an individual who has tried to access your site multiple times with invalid login/password information?
1.4.15 Test both valid and invalid login names and passwords. Are they case sensitive? Is there a limit to how many tries that are allowed? Can it be bypassed by typing the URL to a page inside directly in the browser?
1.4.16 What happens whentime out is exceeded? Are users still able to navigate through the site?
1.4.17 Relevant information is written to the logfiles and that the information is traceable.
1.4.18 In SSL verify that the encryption is done correctly and check the integrity of the information.
1.4.19 Scripting on the server is not possible to plan or edit scripts without authorisation.
1.4.20 Have you tested the impact of Secure Proxy Server?
1.4.21 Test should be done to ensure that the Load Balancing Server is taking the session information of Server A and pooling it to Server B when A goes down.
1.4.22 Have you verified the use of 128-bit Encryption?

Friday, November 27, 2009

Website Cookie Testing: Test cases for testing web application cookies

What is Cookie?
Cookie is small information stored in text file on user’s hard drive by web server. This information is later used by web browser to retrieve information from that machine. Generally cookie contains personalized user data or information that is used to communicate between different web pages.


Why Cookies are used?
Cookies are nothing but the user’s identity and used to track where the user navigated throughout the web site pages. The communication between web browser and web server is stateless.
For example if you are accessing domain http://www.example.com/


1.html then web browser will simply query to example.com web server for the page 1.html. Next time if you type page as http://www.example.com/2.html then new request is send to example.com web server for sending 


2.html page and web server don’t know anything about to whom the previous page 1.html served.
What if you want the previous history of this user communication with the web server? You need to maintain the user state and interaction between web browser and web server somewhere. This is where cookie comes into picture. Cookies serve the purpose of maintaining the user interactions with web server.


How cookies work?
The HTTP protocol used to exchange information files on the web is used to maintain the cookies. There are two types of HTTP protocol. Stateless HTTP and Stateful HTTP protocol. Stateless HTTP protocol does not keep any record of previously accessed web page history. While Stateful HTTP protocol do keep some history of previous web browser and web server interactions and this protocol is used by cookies to maintain the user interactions.
Whenever user visits the site or page that is using cookie, small code inside that HTML page (Generally a call to some language script to write the cookie like cookies in JAVAScript, PHP, Perl) writes a text file on users machine called cookie.
Here is one example of the code that is used to write cookie and can be placed inside any HTML page:


Set-Cookie: NAME=VALUE; expires=DATE; path=PATH; domain=DOMAIN_NAME;
When user visits the same page or domain later time this cookie is read from disk and used to identify the second visit of the same user on that domain. Expiration time is set while writing the cookie. This time is decided by the application that is going to use the cookie.
Generally two types of cookies are written on user machine.
1) Session cookies: This cookie is active till the browser that invoked the cookie is open. When we close the browser this session cookie gets deleted. Some time session of say 20 minutes can be set to expire the cookie.
2) Persistent cookies: The cookies that are written permanently on user machine and lasts for months or years.


Where cookies are stored?
When any web page application writes cookie it get saved in a text file on user hard disk drive. The path where the cookies get stored depends on the browser. Different browsers store cookie in different paths. E.g. Internet explorer store cookies on path “C:\Documents and Settings\Default User\Cookies”
Here the “Default User” can be replaced by the current user you logged in as. Like “Administrator”, or user name like “Vijay” etc.
The cookie path can be easily found by navigating through the browser options. In Mozilla Firefox browser you can even see the cookies in browser options itself. Open the Mozila browser, click on Tools->Options->Privacy and then “Show cookies” button.


How cookies are stored?
Lets take example of cookie written by rediff.com on Mozilla Firefox browser:
On Mozilla Firefox browser when you open the page rediff.com or login to your rediffmail account, a cookie will get written on your Hard disk. To view this cookie simply click on “Show cookies” button mentioned on above path. Click on Rediff.com site under this cookie list. You can see different cookies written by rediff domain with different names.


Site: Rediff.com Cookie name: RMID
Name: RMID (Name of the cookie)
Content: 1d11c8ec44bf49e0… (Encrypted content)
Domain: .rediff.com
Path: / (Any path after the domain name)
Send For: Any type of connection
Expires: Thursday, December 31, 2020 11:59:59 PM


Applications where cookies can be used:
1) To implement shopping cart:
Cookies are used for maintaining online ordering system. Cookies remember what user wants to buy. What if user adds some products in their shopping cart and if due to some reason user don’t want to buy those products this time and closes the browser window? When next time same user visits the purchase page he can see all the products he added in shopping cart in his last visit.


2) Personalized sites:
When user visits certain pages they are asked which pages they don’t want to visit or display. User options are get stored in cookie and till the user is online, those pages are not shown to him.


3) User tracking: 
To track number of unique visitors online at particular time.


4) Marketing:
Some companies use cookies to display advertisements on user machines. Cookies control these advertisements. When and which advertisement should be shown? What is the interest of the user? Which keywords he searches on the site? All these things can be maintained using cookies.


5) User sessions:
Cookies can track user sessions to particular domain using user ID and password.
Drawbacks of cookies:
1) Even writing Cookie is a great way to maintain user interaction, if user has set browser options to warn before writing any cookie or disabled the cookies completely then site containing cookie will be completely disabled and can not perform any operation resulting in loss of site traffic.
2) Too many Cookies:
If you are writing too many cookies on every page navigation and if user has turned on option to warn before writing cookie, this could turn away user from your site.
3) Security issues:
Some times users personal information is stored in cookies and if someone hack the cookie then hacker can get access to your personal information. Even corrupted cookies can be read by different domains and lead to security issues.
4) Sensitive information:
Some sites may write and store your sensitive information in cookies, which should not be allowed due to privacy concerns.
This should be enough to know what cookies are. If you want more cookie info see Cookie Central page. 
Some Major Test cases for web application cookie testing: 
The first obvious test case is to test if your application is writing cookies properly on disk. You can use the Cookie Tester application also if you don’t have any web application to test but you want to understand the cookie concept for testing.


Test cases: 
1) As a Cookie privacy policy make sure from your design documents that no personal or sensitive data is stored in the cookie.
2) If you have no option than saving sensitive data in cookie make sure data stored in cookie is stored in encrypted format.
3) Make sure that there is no overuse of cookies on your site under test. Overuse of cookies will annoy users if browser is prompting for cookies more often and this could result in loss of site traffic and eventually loss of business.
4) Disable the cookies from your browser settings: If you are using cookies on your site, your sites major functionality will not work by disabling the cookies. Then try to access the web site under test. Navigate through the site. See if appropriate messages are displayed to user like “For smooth functioning of this site make sure that cookies are enabled on your browser”. There should not be any page crash due to disabling the cookies. (Please make sure that you close all browsers, delete all previously written cookies before performing this test)
5) Accepts/Reject some cookies: The best way to check web site functionality is, not to accept all cookies. If you are writing 10 cookies in your web application then randomly accept some cookies say accept 5 and reject 5 cookies. For executing this test case you can set browser options to prompt whenever cookie is being written to disk. On this prompt window you can either accept or reject cookie. Try to access major functionality of web site. See if pages are getting crashed or data is getting corrupted.
6) Delete cookie: Allow site to write the cookies and then close all browsers and manually delete all cookies for web site under test. Access the web pages and check the behavior of the pages.
7) Corrupt the cookies: Corrupting cookie is easy. You know where cookies are stored. Manually edit the cookie in notepad and change the parameters to some vague values. Like alter the cookie content, Name of the cookie or expiry date of the cookie and see the site functionality. In some cases corrupted cookies allow to read the data inside it for any other domain. This should not happen in case of your web site cookies. Note that the cookies written by one domain say rediff.com can’t be accessed by other domain say yahoo.com unless and until the cookies are corrupted and someone trying to hack the cookie data.
8 ) Checking the deletion of cookies from your web application page: Some times cookie written by domain say rediff.com may be deleted by same domain but by different page under that domain. This is the general case if you are testing some ‘action tracking’ web portal. Action tracking or purchase tracking pixel is placed on the action web page and when any action or purchase occurs by user the cookie written on disk get deleted to avoid multiple action logging from same cookie. Check if reaching to your action or purchase page deletes the cookie properly and no more invalid actions or purchase get logged from same user.
9) Cookie Testing on Multiple browsers: This is the important case to check if your web application page is writing the cookies properly on different browsers as intended and site works properly using these cookies. You can test your web application on Major used browsers like Internet explorer (Various versions), Mozilla Firefox, Netscape, Opera etc.
10) If your web application is using cookies to maintain the logging state of any user then log in to your web application using some username and password. In many cases you can see the logged in user ID parameter directly in browser address bar. Change this parameter to different value say if previous user ID is 100 then make it 101 and press enter. The proper access message should be displayed to user and user should not be able to see other users account.
These are some Major test cases to be considered while testing website cookies. You can write multiple test cases from these test cases by performing various combinations. If you have some different application scenario, you can mention your test cases in comments below.

Testing for Internationalization

Objective
In today’s world, most of the companies are aiming to go global in order to tap the vast opportunities that exist in various global territories. To achieve this aim, there is a growing need of their applications (web and desktop) and websites to support multiple languages. Apart from developing such applications, there is a huge demand for testing these applications.
During my career, we did a lot of research for performing effective language specific testing for various applications. In this paper I am summarizing the findings which can help any novice to understand and achieve effective internationalization testing.
What is Internationalization


Internationalization (abbreviated as “i18n”) entails to design and development of an application or product that removes the barriers to localization.
It can be termed as a process or a practice that allows easy migration of a product from one language to another. The main aim of internationalization is that it helps in product localization.


What is Localization
Localization (abbreviated as “l10n”) entails to adaptation of an application or a product to support the language, culture and other requirements of a particular Locale. 
The first thing that comes to anyone’s mind when asked to perform localization is translation to a particular language. But localization is not just translation. During the course of this document you will come to know about the various things that will help you to perform effective localization testing.


Environment Compatibility
Though Unicode is becoming an increasingly adapted standard for coding, still different Operating Systems show different behaviors for this support. Windows 2000 and Windows XP provide a support for i18n, but Windows Millennium shows a bit of issues with Unicode. Other kind of issues can be seen with Mac and Unix platforms.


Know the Languages and Locales
Various different languages in the world have different characteristics. To build an application that is compatible with Western Europe languages is simpler to the one that needs to support Far eastern languages like Arabic. 


For Left-to-Right (L2R) languages, some of these languages require more screen area as compared to English. E.g. German language UI typically require almost 30% more area than that required by English. Some text translations can also raise issues like in Spanish, OK is translated to ‘Aceptar’, which will raise the issue of button size.


For Right-toLeft (R2L) languages, to perform tests for these languages, an input Method Editor (IME) is mostly preferred as they require a combination of keys for the 101 key keyboards. Among other far east languages, Japanese language uses the combination of two syllabaries with ideographs and also makes use of Latin characters as well, which further complicates the testing process.


Before starting testing identify and decide on the locales that are to be certified initially.
Identify Areas to Test and create Test Plan
It is very important to define the environments before starting the testing for internationalization. The hardware and software requirements for an application that needs to be internationalized should be narrowed down, in the starting, for getting quick results.
Apart from locale language, some of the things that should be kept in mind while testing for localization are


Date and time formats – Some regions put date in dd/mm/yyyy while some put the same in mm/dd/yyyy. The clock is preferred in some regions as in 24 hour format, while some prefer AM/PM. 


Numeric – These can be denoted differently in different countries. Like in US, 100000 is written as 100,000 while the same in India is written as 1,00,000. 
Use of currency – Currency is different for different locales. Even in English locale, currency is different for different countries like US and Canada. 


Symbols, icons and colors – Color schemas can be different for different regions. Like in the traffic lights in US, “Green” symbolizes the “Go” while in Japan the color for same is “Blue”. Same holds true for symbols and icons for regions. 


Names – Most of the English speaking countries use First Name + Middle Name + Last Name, but in some countries like China, Family Name is considered as the First Name. Similar kind of differences can be seen for different countries. 


Keyboard Usage – Apart from the 101 Key Keyboards, different countries have different key caps. Like English-language keyboard starts with “qwerty”, while a German-language keyboard starts with “qwertz”. 


Text and graphics can contain references to objects, actions or ideas which make different sense in different regions.


Varying legal requirements including the appropriate contact information for various locales 
Based on the above information, create a Test Matrix that includes platforms and versions for all the components eligible for certification. Create test cases based on the following guidelines:


Specify tests for English and non-English configurations. 


Develop non-ASCII data for any text that is used in testing. This can either be real non-English data or it can be pseudo-localized data. 


Develop tests that use non-ASCII values in path names, file names, URIs, account preferences, etc., not just in “regular” data. 


Develop tests for time or date values that specify different time zones and include cross-time zone and daylight savings. 


Create some testcases for some mixed configurations (such as Indian client to Japanese server). 


Develop tests for localizability 


Test the Life-cycle (install, uninstall, configure, etc.) 

Internationalization Testing

Definition


Internationalization is the process of designing and coding a product so it can perform properly when it is modified for use in different languages and locales. Localization (also known as L10N) refers to the process, on a properly internationalized base product, of translating messages and documentation as well as modifying other locale specific files. Assuming that there is not a separate base product for the locale, the localized files are installed at their proper location in the base product. This product is then released as a localized version of the product. 
Localizing a properly internationalized product in most cases should require no changes to the source code. 


Internationalization testing is the process, which ensures that product’s functionality is not broken and all the messages are properly externalized when used in different languages and locale. Internationalization testing is also called I18N testing, because there are 18 characters between I and N in Internationalization.


Internationalization 


In I18N testing, first step is to identify all the textual information in the system. This includes all the text present on the application’s GUI, any text/messages that application is producing including error message/warning and help/documentation etc. 


Main focus of the I18N testing is not to find functional defects, but to make sure that product is ready for the global market. As in other non functional testing it is assumed that functional testing has been completed and all the functionality related defects are identified and removed. 


I18N testing can be divided in to two parts. First, to make sure that application’s GUI or functionality will not be broken with the translated text. Second to make sure that translation of all the strings have happened properly. This activity is called Translation Verification Testing and is normally conducted by person who knows the language very well. 


To make sure that application’s functionality or GUI will not be broken after the translation a popular technique known as pseudo-translation is used. In pseudo-translation instead of translating it completely, it is translated in a pseudo manner. For example an externalized string “Bad Command” can be translated in Japanese as [JA XXXXX Bad Command XXXXXX JA]. Now if the product is launched with locale as Japanese it should show the externalized string as given above instead of “Bad Command”. There are utilities to do this job for you, to do pseudo-translation of all the externalized strings of your application. During pseudo-translation you need to make sure that you are doing it roughly according to the rule. For example, width is normally expanded up to forty percent for the pseudo-translated strings as compare to the English. 


As stated above, In I18N testing focus is not on the functionality but on the translation and locale related issues. Once all the externalized strings are pseudo-translated, you need to make sure that you have test case for every message or text element present in the system. Once it is done, same set of test cases can be executed on the properly translated build to make sure that translation is proper.


Pseudo Localisation


A convenient approach to internationalization testing is to use the technique of pseudo-localization. This technique simulates the process of localizing products, involving many things a localization center does when localizing a product. To pseudo-localize a product: 
Pseudo-translate message files by inserting a specific prefix and suffix into every message. You can also modify localizable non-message resources, such as font names and colors. Localizable non-message resources should not be translated. 
Also, other files that may be localized should be modified in some way, such as help, text, html and graphics files. Install the pseudo-translated message files, as well as all other pseudo translated or modified files, in the locale of your choice, at the proper location in the product. In certain cases, such as for Java resource bundles, you must name the files with a locale-specific suffix and install them in the same location as other locale-specific message files. 
Run the product from this locale. The messages and GUI labels should display the prefixes and suffixes you added, and not the English default messages. You should also see the behavior of the modified, localizable non-messages, and other files that were modified, like help, text, html and graphics files, will show the modified versions of these files, when run in this locale. 
This approach allows you to use the product, including its menus and other GUI objects, without needing to know another language or fully translate the message files. Many of the sections that follow take this approach. 

Software Testing Common Terms

Ad hoc Testing:
Ad hoc testing is a commonly used term for software testing performed without planning and documentation. Software Testing portal

The tests are intended to be run only once, unless a defect is discovered. Ad hoc testing is a part of exploratory testing, being the least formal of test methods. In this view, ad hoc testing has been criticized because it isn't structured, but this can also be a strength: important things can be found quickly. It is performed with improvisation, the tester seeks to find bugs with any means that seem appropriate. It contrasts to regression testing that looks for a specific issue with detailed reproduction steps, and a clear expected result. Ad hoc testing is most often used as a complement to other types of testing.

Exploratory Testing:
Exploratory testing is the tactical pursuit of software faults and defects driven by challenging assumptions. It is an approach in software testing with simultaneous learning, test design and test execution. While the software is being tested, the tester learns things that together with experience and creativity generates new good tests to run. In general, exploratory testing is a black box testing technique.

Thursday, November 26, 2009

Test Cases: A brief overview

What is a Test Case?
A test case is a set of conditions or variables and inputs that are developed for a particular goal or objective to be achieved on a certain application to judge its capabilities or features.
It might take more than one test case to determine the true functionality of the application being tested. Every requirement or objective to be achieved needs at least one test case. Some software development methodologies like Rational Unified Process (RUP) recommend creating at least two test cases for each requirement or objective; one for performing testing through positive perspective and the other through negative perspective.




Test Case Structure
A formal written test case comprises of three parts -


Information
Information consists of general information about the test case. Information has following things:
Test Case ID
Test Case Author/Creator
Test Case Version
Name of the Test Case
Purpose or brief description
Test Case Dependencies


Activity
In this area, we can include the test case pre-conditions if any. Means to executed some test cases first we need to create a condition. So we can include that in this part. Then comes environment means in which environment will the test case be able to be executed. Then in last we can include the detailed steps in order to perform the test.


Results
In this section, we can include the result related data for the test case. Means after performing the test what result did we get and what is the expected result for the test.


Designing Test Cases
Designing test cases is a time consuming job, but ultimately that helps to reduce the overall time taken to test any application. It also cuts off the time which is taken in unnecessary re-testing or debugging.


Test cases should be designed and written by someone who understands the function or technology being tested. A test case should include the following information: 


Purpose of the test
Software requirements and Hardware requirements (if any)
Specific setup or configuration requirements
Description on how to perform the test(s)
Detailed steps for performing the test
Expected results or success criteria for the test
vital for your software testing plans as a lot of bugs, ambiguities, inconsistencies and slip ups can be recovered in time as also it helps in saving your time on continuous debugging and re-testing test cases.


I hope this will give a brief idea about Test Cases.

Web Site Testing: Basic Introduction

Performance and Scalability


If you are managing Web site testing for an application that will be used by a large number of people, your number one concern will be performance testing. When several people start using the Web site at the same time, performance may degrade, database transactions might overlap, etc. Your job is to make sure that that doesn't happen.


The first thing you should ask in an interview for Web testing is "will it scale?" Now what does that mean? You want to work on a Web site that is "n-tier." That means that it has at least three layers (tiers). The layer that the user of the site sees is the GUI (Graphical User Interface) layer (also referred to as the front-end or presentation layer). Behind that, in the middle is the middle tier. This is where all the business logic happens. It's also referred to as the application layer. This is where the application servers go. Behind that is the database tier also referred to as the back-end.


In an n-tier architecture, the GUI layer should be concerned with nothing but rendering the Web page and passing transaction requests to the middle tier. No heavy duty calculations should be performed in the user's browser. It should happen on the Web site in the application layer.


The GUI layer must never, ever, ever talk to the database directly. (Side bar: I'd like to point out that I violate these rules everyday - but I'm not developing large commercial n-tier sites).


The middle tier is the heart of the application and the key to scalability. When a user makes a transaction, like filling out a form on the GUI layer, the middle tier is where the transaction is handled. The middle tier will talk to the database and do some of the transaction processing. In J2EE architecture, this layer is written using Enterprise JavaBeans. In .NET systems, this layer may be written in a language like Visual C#.


The database (back-end) can also play an important role in transaction processing. The first step in improving a Web site's performance can be to move as much of the middle tier logic as possible to stored procedures in the database.


For a Web site to scale, it must be determined how many users a middle tier server can handle. This is done through performance testing. If the middle tier is designed properly, adding another server will double the amount of users that the system can handle. If you can serve up 1 transaction per second for 500 users using 1 middle tier server, then 3 servers should be able to maintain that rate for 1500 users (500 x 3). Though realistically there will always be an acceptable amount of degradation as you add a new server.


No Web site can handle an infinite amount of users. Performance requirements have to be realistic. You may have heard in the news about Denial of Service (DoS) attacks. This is basically performance testing run amok. Hackers hijack a bunch of servers to act as agents and flood a server with transactions until they overwhelm the system. Instead of breaking the system, your job is to determine how many users it can handle before it breaks.


To test site scalability and performance, you need a testing product that can emulate x number of users hitting your site. Tools to do this range from being free, to $100,000 depending on how many "virtual users" you want to emulate. I could go on about how ridiculous it is to charge an extra $20,000 just to up an internal counter, but I'll refrain. Just be careful when shopping for tools.


Here is a list of some performance tools:


> Segue Silk Performer
> Mercury Interactive LoadRunner
> Apache JMeter


Be forewarned that some of the more expensive tools have very restrictive licensing software. I was amazed to find out that after spending a fortune on one product that only one of my employees at a time could run the editor to write tests! They expected me to spend another $10,000 to get a special meter to allow multiple editors (I declined).


You will also need to invest in at least one machine that will act as an agent, emulating hits against your test servers. I've used as many as three. Your vendor can tell you what you will need.


Staging Servers


Before you launch into a testing effort, you should find out if there is enough money in the budget to emulate the production environment. You don't want to do tests against the live site.


You need to setup a "staging" environment which emulates your production environment on a smaller scale. You will need a router, just like the one in production (or if money is really tight, something as close to it as possible), at least two Web servers and two middle tier servers and one database server. And don't forget the firewalls. If the hardware doesn't match the production environment, then testing on the staging servers won't help you find problems in the production environment. You need to work closely with the production team to make sure that your test environment emulates every bit of hardware and software in the production environment.


Your staging servers need to exist with your performance testing environment in an isolated network. Usually a patch panel is setup so you can pull one plug and isolate a rack full of servers at will. When doing performance testing, all numbers will be useless if your environment is suffering from noise not only from the corporate net, but the Internet as well.
And lock them down! Make sure developers don't have ftp, write, or PC Anywhere access to your servers. Otherwise unseen changes to your staging environment could wreak havoc on your test results.


Routers, Firewalls and SSL


Large Web sites don't have just one Web server. When you visit the site, a router will redirect you to one of many servers. The job of the router is to balance the load by trying to evenly distribute users amongst the many servers. In order for the system to work properly, all Web servers need to be exact copies of one another. So that users can get to the GUI layer servers, they need to be outside the company firewall.
Even if you are just working on a Web application destined for internal use, users may still want to use it from outside the firewall. For example, your sales force may need access from a client site to give a demo or access the application. Regardless, you must test using a firewall. Firewalls go between the GUI layer and middle tier and it's not uncommon to have a firewall between the middle tier and the back-end. You will find that an application that worked fine in an open environment collapses once a firewall is introduced. Firewalls act as choke points which could cut off or interfere with the communication between tiers.
Secure Socket Layer (SSL) is another issue that you need to deal with. If you've ever entered your credit card number online and noticed a little lock symbol in your browser, that's SSL working. Another sign is when the Web address changes from "http" to "https." Private SSL servers require a complex procedure to install a special certificate for access. Users of a commercial site should not have to go through such a procedure to create a secure connection. You need to verify that external users can access the secure layer without a problem.


Cookies and Session Management


The Web is a stateless environment. This means that a lot of data isn't stored on the client side. When you visit a site and "talk" to a Web server, it doesn't remember who you are. Though you can help it remember if you let it set a "cookie" in your browser. This is how sites remember your name, etc. When you visit the site again it asks your browser for the cookie, which may contain something like your login ID.


Cookies are good for long term memory, but for short term memory, Web applications use session management. Session management is sort of like a cookie, but it will expire after a certain amount of inactivity (like 30 minutes). Think of it like a Session ID.


As you surf a site, you may end up talking to several servers at once. Each transaction may be dished out to a different server. As you move from server to server, your session information needs to stay with you or the next server will have no idea what you are talking about. For example, when you get to the checkout server, session information will help it remember what items you ordered. For testing, you need to make sure that as a user moves through the system that session information is carried with them and hasn't expired in a reasonable amount of time.


Components and Configuration Management


When trying to setup bug tracking you may come to a horrifying conclusion. The concept of a "build number" for the overall product may not work. Web site development can be very fluid. People will update script, image, and source files through FTP or file copying without even thinking about. The concept of "builds" may even be foreign to some Web developers. You need to work with development to determine what defines a build when entering bugs. Ideally your Web site will be broken up into components that can be tested in isolation and combined and rolled out as sets.


When testing, you want to be able to certify components and component sets. For example, you may certify that Contact Form 1.1 works well with Order App 1.3, but not 1.2. Because of the fluid nature of the Web, the site probably won't be updated all at once. Developers will usually want to "drop in" a component to the live site or a client's site. That's why configuration management and certification are so important. Before Component X 2.3 is dropped in with Component Y 2.4, you need to certify that everything will still work.


If your site uses ActiveX or some other technology to install components on the browser side, you need to deal with that as well. If your application uses browser side objects, find out from your development team if you can test them directly using a language like JavaScript.


Testing Under the Hood


The GUI layer often talks to the middle tier by tossing back and forth XML files. The trend is moving towards hiding the XML files as Web Service calls. You should ask your development team if the Web Services are published in the form of an internal or external document .
If you have a programming background, you could emulate the GUI layers communication with the middle tier by automating Web Service calls. If you are comfortable with SQL, you could talk to development about unit testing stored procedures in the database layer.
Conclusion
Testing an enterprise level Web site can be an overwhelming and expensive task. Before embarking on such an effort, it's important to make sure that upper management will commit the time, money, and resources required. Given the proper budget, schedule, knowledge, and commitment from Development, you should be able to handle the task