A CASE STUDY OF USING SELENIUM IDE AND WEBDRIVER

12
A CASE STUDY OF USING SELENIUM IDE AND WEBDRIVER Group Number : Team 02 Team Members: 1. Jabeen Shazia Iqbal < [email protected] > 2. Nithin Reddy Gajjala <[email protected] > 3. Ram Anudeep Kuchibhotla < [email protected] > 4. Swathy Jayaseelan< [email protected] > 5. Sai Sushma Devraj < [email protected] > Course: Software Verification and Validation Instructor: Dr. Ning Chen

Transcript of A CASE STUDY OF USING SELENIUM IDE AND WEBDRIVER

Page 1: A CASE STUDY OF USING SELENIUM IDE AND WEBDRIVER

A CASE STUDY OF USING SELENIUM IDE AND WEBDRIVER

Group Number : Team 02

Team Members:

1. Jabeen Shazia Iqbal < [email protected]>2. Nithin Reddy Gajjala <[email protected] >3. Ram Anudeep Kuchibhotla < [email protected]>4. Swathy Jayaseelan< [email protected]>5. Sai Sushma Devraj < [email protected]>

Course: Software Verification and Validation

Instructor: Dr. Ning Chen

Page 2: A CASE STUDY OF USING SELENIUM IDE AND WEBDRIVER

A CASE STUDY OF USING SELENIUM IDE AND WEBDRIVER

A. Introduction to Selenium: Selenium is a collection of numerous software tools each with an alternative strategy for promoting test automation. Most Selenium QA designers look closely at a couple of tools at first that a lot of them agree to satisfy the specifications of their activity, in spite of this mastering everything about the tools provide you a number of different choices for leading up to various test automation issues. The general set of tools contributes to an excellent range of assessing activities particularly designed to the requirements of tests of web applications of all kinds. All of these functions are extremely flexible, offering several ways for identifying UI components together with evaluating estimated test outcomes against exact software patterns. Certainly one of Selenium’s factors is the framework for executing one’s analyses on a few applications.

B. Tools in Selenium:Selenium is a wide resource tool for automation testing of web applications. Selenium has a set of

tools which are:

1. Selenium IDE2. Selenium Core3. Selenium RC (Remote Control), Also known as Selenium 14. Selenium WebDriver or Selenium 2.5. Selenium Grid

Selenium IDE: Selenium IDE is a Firefox add-on which reports the activities performed by an individual including both delivery and development of test cases depending on it. It may also execute the test cases and even store those tests like a program in many various languages.

Selenium Core: Selenium Core is a collection of JavaScript which deals with the browser, following the particular individual task. Many scripts are placed into the web page and practiced as per the steps mentioned in the check-list composed in a HTML page. HTML-table-based command language called as Selense, in turn helps in refreshes user activity.

Selense: Selense is a unique language which is described by specific Selenium commands that maintains the tests. A series of these commands is termed as a test script.

Selenium RC (Remote Control): Selenium RC (aka Selenium Remote Control or Selenium obtains Selenium Core commands via HTTP and then implements each of them on a remote device, it also substitutes the web page to be able to prevent the “same host origin” limitation. It possibly permits to work on the tests in languages like C#, Python, Perl, Java and Ruby.

Page 3: A CASE STUDY OF USING SELENIUM IDE AND WEBDRIVER

A CASE STUDY OF USING SELENIUM IDE AND WEBDRIVER

Selenium WebDriver: Selenium WebDriver (aka WebDriver or Selenium 2) is a successor of Selenium RC. It functions same as the Selenium RC, but has some different responsibility like it employs the original assistance of browser for automation, in place of placing the JavaScript code into the web browser to duplicate the actions of the users. Additionally, rather than a dictionary-based API which is used in Selenium RC, this provides easier object-oriented API.

Selenium Grid: Selenium Grid enables to operate the tests on a multiple machine against several web browsers, to make it simple it allows distributed test execution.

C. Nature of the Target System Generally, the word “vote” means an official choice which people take in an election or meeting by casting a ballot, raising their hand or by speaking their choice. The ultimate goal of voting is to elect a leader. Some of the problems involved in voting include rigging votes during election, inaccessible polling stations, and inadequate polling materials. Online voting will address the above mentioned issues.

“Online Voting System” is an online voting portal through which people of age 18 or above have the right to cast their vote. Firstly, the person who has the right to vote is requested to register himself through the portal. The person has to add his username and password. Besides this, information such as age, address and pin code is to be updated and these details are stored in a database. After successful registration, the user is allotted a unique voter id using which his login is validated along with his username and password. If invalid/wrong details are Submitted, then the citizen is not registered to vote. User’s registration is authenticated by the system administrator and he will store the details of the users in a separate database.

The Online voting system will have a candidate list i.e. it is the list of those people who are contesting in election. The user after login will be directed to the ballot paper page which has the list of candidates. The user will choose a candidate and cast his vote by selecting the radio button. After the user is done with the voting process, he will need to confirm his selection. There is counter value which is allotted for every candidate. For each vote the counter value is incremented. The counter value is initially zero.

D. Goal of the target system

The primary purpose of conducting the test on Online Voting System is to ensure that the website works as expected i.e. we check for the availability of bugs or errors. The Online Voting System should be efficient in allowing a user to successfully login into his account. If the user needs to register in order to cast his vote, the portal should allow the user to register himself for voting. Lastly, the website should be highly responsive and must be available with no downtime.

Page 4: A CASE STUDY OF USING SELENIUM IDE AND WEBDRIVER

A CASE STUDY OF USING SELENIUM IDE AND WEBDRIVER

We have the following test cases:

Test Case #: 1 Test Case Name: Voter age

System: Online Voting System Design Date: 06/15/2016

Designed by: Team 2 Execution Date: 06/15/2016

Executed by: Team 2

Short Description: To find bug while entering the voter age.

Pre-condition:

1. The form page must be displayed.

STEP ACTION EXPECTED SYSTEM RESPONSE PASS/FAIL

1Enter the user age

If the age is greater than 18 the details are submitted.

fail

Post-condition:

1. The user gets registered.

Page 5: A CASE STUDY OF USING SELENIUM IDE AND WEBDRIVER

A CASE STUDY OF USING SELENIUM IDE AND WEBDRIVER

Test Case #: 2 Test Case Name: login

System: Online Voting system Design Date: 06/15/2016

Designed by: TEAM 2 Execution Date: 06/15/2016

Executed by: TEAM 2

Short Description: To find the bugs while Login.

Pre-condition:

1. The user must be registered by providing credentials.

2. The username and the password should be valid

Page 6: A CASE STUDY OF USING SELENIUM IDE AND WEBDRIVER

A CASE STUDY OF USING SELENIUM IDE AND WEBDRIVER

STEP ACTION EXPECTED SYSTEM RESPONSE PASS/FAIL

1 Enter the User name

Displays the username pass

2 Enter the Password

Displays the password in the dotted format pass

3. Click on Login

The details are validated with the database. fail

Post- condition:

1. User logins into the system.

Page 7: A CASE STUDY OF USING SELENIUM IDE AND WEBDRIVER

A CASE STUDY OF USING SELENIUM IDE AND WEBDRIVER

Test Case #: 3Test Case Name: Resource not found

System: Online Voting System Design Date:06/15/2016

Designed by: Team 2 Execution Date: 06/15/2016

Executed by: Team 2

Short Description: To find the missing files.

Pre-condition:

1. The user must be registered by providing credentials.2. The username and the password should be valid

Page 8: A CASE STUDY OF USING SELENIUM IDE AND WEBDRIVER

A CASE STUDY OF USING SELENIUM IDE AND WEBDRIVER

STEP ACTION EXPECTED SYSTEM RESPONSE PASS/FAIL

1. Enter the credentials

User is registered. pass

2. Enter the username and password

User is authorized. pass

3. Perform the voting

Ballot paper is displayed. fail

Post-Condition:

The user performs voting.

Page 9: A CASE STUDY OF USING SELENIUM IDE AND WEBDRIVER

A CASE STUDY OF USING SELENIUM IDE AND WEBDRIVER

E. Pros and Cons of using Selenium IDE and Selenium WebDriver Both web driver and Selenium IDE assist in testing web applications. The Functionality of WebDriver is to generate browser based regressions testing and the functionality of selenium IDE is to make unit tests, exploratory tests and one-off bug reproduction scripts.

Advantages of selenium IDE and web driver:

1. Selenium is an open source and a portable tool and it even supports various operating systems like windows, Linux, UNIX etc.

2. Selenium supports various programming languages like Java, Perl, python, C# etc.[1] 3. Selenium provides functionalities like record, playback and web testing.4. Selenium IDE provides user with features like debugging and setting up breakpoints.5. As Selenium supports multiple testing frameworks, it can be integrated with other open source

tools, Jenkins or Hudson for supporting continuous integration, selenium integrates with ANT or Maven framework for compiling code and with TestNG for testing applications and generating reports [3].

6.  Selenium is easy to use and flexible for users [2]. 7. Provides support for web applications written in JavaScript and AJAX technologies within

browsers for implementing their functionality [1]. 8. Selenium has added feature of running its tests on multiple browsers and its supports various

browsers like Internet explorer, Google Chrome, Mozilla Firefox etc. [3]9. Selenium is used by various companies for testing their web interfaces. 10. Selenium is efficient in generating various test scripts, checking their functionality, and

reusing. Hence making it a pioneer for web-based automation.

Due to these advantages, selenium is widely used for various testing like regression testing, unit testing and acceptance testing. It is popularly used in Agile or extreme programming because of its prompt test development.

Disadvantages of selenium IDE and WebDriver:

1. Selenium needs help of third party frameworks for testing web applications to be effective.2. It requires Exceptional technical skills i.e. programming languages.3. It has compatibility issues with various browsers except Mozilla Firefox [2].4. It does not support error handling and clustering of tests script.5. It does not include built in IDE for scripting. It relies on third party IDE’s like Eclipse for scripting

[3].6. Selenium IDE does not support Database testing [2].

Selenium is definitely an advantage for increasing efficiency of web application testing. In order to overcome technical and test management issues selenium is an excellent tool.

Page 10: A CASE STUDY OF USING SELENIUM IDE AND WEBDRIVER

A CASE STUDY OF USING SELENIUM IDE AND WEBDRIVER

References:

[1] http://www.optimusinfo.com/selenium-testing-advantages-and-disadvantages/ [2] http://www.zyxware.com/articles/4986/the-advantages-and-disadvantages-of-selenium-

ide[3] http://www.testinginterviewquestion.com/2014/04/what-are-advantages-and-

disadvantages_17.html