July 21, 2011

Selenium Introduction



Selenium IDE 
IDE Integrated development Environment; Selenium IDE is a add on plugin which can only used in FireFox. User can record the actions and can edit and debug the tests. It can be used to identify IDs, name and XPath of objects. Only one test at a time.

Selenium Core (CORE) 
Selenium Core is the original Javascript-based testing system. This technique should work with any JavaScript enabled browser. It is the engine of both, Selenium IDE and Selenium RC (driven mode), but it also can be deployed on the desired application server. It is used specifically for the acceptance testing.
User can record the tests using Selenium IDE and can use the same tests to run in other browsers with minimal modifications. It provides support to run the tests in HTA (HTML Applications) Mode. This mode works only in IE.

Selenium Remote Control (RC) 
Selenium Remote Control is a test tool that allows user to write automated web application UI tests in few programming languages against any HTTP website using any mainstream JavaScript-enabled browser. User can write the tests (More expressive programming language than the Selenese HTML table format) in Java, DotNet, Perl, Ruby and PHP. Also it supports few testing frameworks.

Selenium Grid 
Selenium Grid allows easily to run multiple tests in parallel, on multiple machines, in an
heterogeneous environment by cutting down the time required for test execution. Using this, user can run multiple instances of Selenium Remote Control in parallel.

Supported browsers 
Selenium tools can run in following browsers.
  • Internet Explorer
  • FireFox
  • Opera
  • Safari
  • Seamonkey
Supported Operating Systems 
Users can execute the selenium tests in following OS.
  • Windows
  • Linux
  • Solaris
  • OS X
Supported Programming languages 
Below languages are supported by Selenium RC.
  • C# (DotNet)
  • Java
  • Perl
  • Ruby
  • Python
  • PHP

July 12, 2011

Computer Commands in Tamil

Save - vechika 
Save as - aiye apdiye vechika
Find - thedika
Find again - inoru thaba thediko
Move - jaga vangu
Zoom - persa kaatu
Open - thora naina
Replace - itha thooki apdika podu
Cut - vetti kadasu
Paste - ottu
Paste spl. – nala yechi thottu ottu
Drag&hold - nalla isthu puchika
New - putshu
Old - payatsu
Do u want to delete selected item? - maiyalume thookidava?
Home – uudu
Window – sanna kathavu
Web – ottadai
Search – kandupudi mae
Cookies – biskoothu
Read only - Kai vecha keeseduvae
Escape – kaindiko
Help – lite.a kai.a kudthu kaapaathu kannu
Print – adichi thool kelapu
Monitor – sarakku mamae
Recycle bin – kuppa kuda
Compress - Adaki vaasi
Force quit – aaniyae pudunga venaam.
Copy – aattaya podrathu
Crash – Maamu nee puuta kesu

June 29, 2011

How to run Selenium RC with Eclipse




I am a new user to use selenium with eclipse.
Had lots of doubt and lots of stuff to run a single program at last I found the way to run the application.

1- Download Selenium-RC from the Selenium HQ download file option and save this some directory (E:/seleniumrc) where you want.
2- Launch eclipse
3- Create a new java project which you can get by configuring selenium with Eclipse.

I follow the following scenario to configure Rc and with eclipse with the help of link http://seleniumhq.org/docs/appendix_installing_java_driver_client.html#configuring-selenium-rc-eclipse-reference
Steps:
a)   Select File>> New>>Java Project
b)   Enter the “Project Name”.
c)   Select “jdk 1.5.0._05” under JRE. Issue I faced in this step is “jdk” is not configured properly hence it’s not displayed. So I select “Configure path link.
Select “Search” option under installed JREs. And I select the location where the JDK is installed in my system.
I select “JDK” checkbox and select “OK” option and then its make easier for me to configure “JDK” and select “Next” button in “New Java Project” window.
d)   Select “Libraries” tab and select “External Jar” button.
e)   Browse and upload the jar files which are available in “selenium server” downloaded file. [Add external jar files. (from the location where you have already saved downloaded selenium rc)]
f)    Select “Finish” option.

4- Right click on “src” folder and select “new folder” option and enter folder name as core. Core is displayed like a package.
Similarly select “new folder” and add “core” and “testscripts”. Both were folder names.
5- Right click on “src” and add a new “class”
6- Add your saved java file in the new “class” and save the file.(which you have saved after recording in IDE) to this project.
7- Now run this code as Junit test

This is the java code which i have recorded using IDE to test the Login in Word press demo tool.

import com.thoughtworks.selenium.SeleneseTestCase;

public class se extends SeleneseTestCase {
      public void setUp() throws Exception {
            setUp("http://demo.opensourcecms.com/", "*chrome");
      }
      public void testJunit() throws Exception {
            selenium.open("/wordpress/wp-login.php");
            selenium.type("user_login", "admin");
            selenium.type("user_pass", "demo123");
            selenium.click("wp-submit");
            selenium.waitForPageToLoad("30000");
            verifyTrue(selenium.isTextPresent("Howdy, admin"));
            selenium.click("link=Posts");
            selenium.waitForPageToLoad("30000");

                  }
}
Running the same in various browsers:
You can now run this test in different browse by initializing the desired browser info like firefox, iexplorer, chrome..
setUp("http://www.google.co.in/", "*firefox") ;

I hope this will help you to get started with you very first test using selenium RC.





http://knorrium.info/2010/05/19/a-java-approach-to-selenium/ this blog is really more helpful for me to run selenium RC thanks too... 

June 27, 2011

Start up for Selenium Grid


Selenium Grid:
My first step for running grid
i)                     installed the java JDK process:1.6.0_24 version
ii)                   After JDK installation select command prompt and enter the command of  java –version
This will be displayed as

iii)                 And I struck in installation process of ANT  
ANT Installation:
a)First I download the ANT version 1.8.2
b)And copied it in path: C:/Program files
c) Select Command prompt and enter ant –version
I got an issue in tools.jar while running it [Unable to locate tools.jar. Expected to find it in C:\Programfiles\java\bin\tools.jar
Apache Ant(TM) version 1.8.2 compiled on December 20 2010]
Reason: This error is caused because system properties path is not defined properly.
c) Then I tried many times got the same issue in command prompt.
d) After a long time I got the Executable file for ANT installation
I get the executable file for ANT installation with the help of this link http://code.google.com/p/winant/
e) Next I select “Control Panel” and “System” icon, and select “Advanced” tab.

Select “Environment Variables” which displays like the below window.


Here I had another issue while setting path:

Please confirm or add these stuffs under “Environment Variables”

Under System Variables:
Variable name: ANT_HOME
Variable Value: C:\apache-ant-1.8.2(Exact path of the ant builder)
Under User Variables: This is for Java JDK process
Variable Name: JAVA_HOME
Variable value: C:\Program Files\Java\jdk1.6.0_24
For ANT installation:
Variable Name: ANT_HOME
Variable value: C:\Program Files\WinAnt


Next select new command prompt:
a)Got the selenium grid path
b)enter “ant sanity-check”

Build successful is displayed.
Now the selenium grid is installed successfully.

These are link which helps for me to run:

After successful run of ant builder, going to start testing a sample application which I got from a website

June 9, 2011

Traceability Matrix


Traceability Matrix – A document
showing the relationship between Test Requirements and Test Cases. From
Traceability Matrix, we can check that which requirements are covered in which
test cases and "particular test case covers which requirements".

In this matrix, we can also cover that a particular requirement is covered in
 which section of code etc.

In this matrix, the rows will have the requirements. For every document {HLD,
LLD etc}, there will be a separate column. So, in every cell, we need to state,
what section in HLD addresses a particular requirement. Ideally, if every
requirement is addressed in every single document, all the individual cells must
have valid section ids or names filled in. Then we know that every requirement
is addressed. In case of any missing of requirement, we need to go back to the
document and correct it, so that it addressed the requirement.

In a nutshell, requirements traceability is the process of ensuring that one or
more test cases address each requirement.
 


Example of a Traceability Matrix document:
 Req ID Req Description TC001 TC002 TC003
 R1.1 ………YesYes
 R1.2 ……….Yes
 R2.1 …….Yes
Example of a Traceability Matrix document:
 Req ID Req Description TC001 TC002 TC003
 R1.1 ………YesYes
 R1.2 ……….Yes
 R2.1 …….Yes

Above table shows –
Requirement R1.1 is covered in TC001 and TC003.
R1.2 is covered in TC001.
R2.1 is covered in TC002

Above table also provides the test coverage. Fron Traceability Matrix document,
we can ensure that all the requirements are addressed in the test cases. More
science behind traceability matrix can be found at Software Testing Times (See
below links).
 
SourceDescriptionTutorial Link
WikiPedia 
Here wikipedia gives a
complete theoretical information about traceability Matrix. – A Must
Read for beginners 
Software Testing Times 
Traceability Matrix from
Software Testing perspective. This is a very helpful topic for test
leads and managers (also for junior testers if they want to grow). It is
a step by step guide to prepare Traceability Matrix with attached sample
template. 
Crosstalk – A Journal of
Defence Software Engineering 
Andrew Kannenberg, Garmin
International Dr. Hossein Saiedian, The University of Kansas