Page Object Model using Selenium WebDriver

Page Object Model using Selenium WebDriver Author: Shiffy Jose A Test Automation Framework is a collection of re-usable methods which helps in automating test process. The three most common automation frameworks for Selenium WebDriver available in the market are data-driven framework, hybrid framework and page object model. Page Object Model (POM) is one of the robust design patterns in automating test cases using Selenium WebDriver when compared to other frameworks. POM framework reduces or even eliminates duplicate test code, supports code re-use and we can create tests with less keystroke. In this design pattern, each web page in an application has a corresponding page class. This confirms the better maintainability of such automation codes. An implementation of the Page Object Model can be achieved by separating the test object, the test scripts and externalization of data. The process of the framework can be divided into the following steps. First step will be separating data from the test code. Data should be kept in separate file like Excel, Property Files or any type of file which can be varied from project to project. Once the data separation is completed, test automation can proceed further on creating the base page class where all the initializations are to be performed. This is flowed by creating page class corresponding to each web page. All the functions/methods relating to each page is written in the corresponding page class (this avoids duplication of code). So now is the time for test execution. Test Execution is performed with the help of JUnit or TestNG. Each test case is taken into consideration then methods from the dependant...

Agile Estimation and Planning – Planning Poker

Agile is not a process, it’s a philosophy or set of values to move quickly and easily. In this article I am going to discuss one of the effective agile planning and estimation method. Planning Poker: It is an Agile estimating technique which has become very popular in the last few years. Agile teams have taken advantage in using Planning poker cards as it is extremely simple to play and also powerful technique to extricate the collective wisdom of the team. How to Play?? The basic rules are: Each participant gets a deck of cards as shown in the fig 1.2 which represents a sequence of numbers or the Fibonacci sequence (1, 2, 3, 5, 8, 13, 21, etc.), which is more popular. Product owner explains one User story from the Product Backlog to the team Product owner answers all the relevant questions that the team have got about the User story. Every participant selects a card which represents an estimate of the time, risk involved, complexity, and other relevant factors involved. When everybody are ready with an estimate, all the cards are presented on a board for finalizing. If there is a harmony /agreement on one particular number then the estimation is recorded and move to another User story. Repeat the same process for all the User stories in the product Backlog as shown in the fig 1.3 Reasons behind the success of using Planning poker: Estimates are done in groups, logic behind is simple – Each person in the team have different experience and different ideas, there by benefit of teams collective intelligence. Strengthen collaboration by engaging...

Accessibility Testing

Web accessibility is a practice of making Web sites accessible to all, particularly those with disabilities. As the Internet becomes a central part of Technology, it is imperative that Technology must be designed and developed in such a way that it provides equal access and usability to every member of target audience. It is becoming increasingly important for government and educational institutions as they try to meet their obligations under the Disability Discrimination Act and various policies and guidelines for online web publishing/hosting. Accessibility testing seeks to cater to different disabilities affecting: Vision e.g. visual blindness Auditory e.g. deafness Mobility e.g. spinal cord injuries Cognition e.g. autism and dementia “Web Content Accessibility Guidelines (WCAG) 1.0 and 2.0” is part of a series of accessibility guidelines published by the Web Accessibility Initiative .It has 3 levels along with a list of checkpoints like Level A Level AA Level AAA In summation, these guidelines were developed to promote equal accessibility and how to use multimedia content more accessible to a wider audience. Within accessibility testing, the areas that need to be tested are: Text alternatives Keyboard operability Document structure/heading levels CSS contrast/element styles Forms and tables There are various tools that can be used to aid accessibility testing: WAVE Achecker JAWS – a screen reader The Colour Contrast Analyser EvalAccess FAE (Functionality Accessibility Evaluator) PDF Accessibility Checker (PAC)   Despite the availability of testing tools, it does not provide a definitive assessment. As a result, manual testing does need to be conducted. Although accessibility testing is primarily applied to educational and governmental sectors, it should be employed in the private sector...

Agile Projects: How should Test Teams Adapt ?

When quality assurance teams and management who have adopted Agile practices first put the ideas to work, they face a significant impediment in unlearning the traditional mind-set and practices that experience in traditional practices has instilled in them. The following adaptation practice was documented after our experience in couple of key projects that moved to Agile methodology. These practices are a real life saver for project teams that are new to Agile. The following are some of the key aspects that need to be unlearned before attempting to deploy Agile practices, from a QA perspective:   The testing team needs to be independent and independently empowered in order to be effective. Without a separate test strategy and test plan, it’s tough to manage testing. The V-model for verification and validation cannot be applied in an Agile sprint. Independent testing teams don’t do white-box testing. The value of testing is realized only when defects are logged. Automation is optional and is required only when regression testing is needed. Testing nonfunctional aspects, such as performance of the system, is not possible in a sprint. Testing must follow planning, specification, execution, and completion sequentially. We don’t have to write new test cases for detected defects. Poorly written code is not the testing team’s focus, as long as the code addresses the required functionality. Test-process improvement models do not address aspects of Agile...
Selenium RC vs Selenium WebDriver

Selenium RC vs Selenium WebDriver

Introduction   The term “Selenium” is often used interchangeably with “WebDriver”, but they are not the same thing; Selenium is powered by WebDriver. Selenium provides a more robust feature set, and while you can accomplish the same things with WebDriver, Selenium takes care of the details for some of the more complex operations.   RemoteWebDriver interacts with the Grid to run tests across multiple machines or VMs. In other words, you write your tests with the RemoteWebDriver (or with Selenium 2), and then you can plug them into the grid   Grid 2 is the new version of Grid, which works with the new WebDriver-Backed Selenium (Selenium 2).   This setup works great for a few tests, but as your test suite starts getting bigger, its limitations become clearer:   The Selenium remote control is quite slow at driving the browser. Therefore, unless your application or your network is especially slow, the remote control/browser pair will end up being the bottleneck of your test suite.   You can only run a limited number of concurrent tests on the same remote control before seriously impacting its stability. Practically speaking, launching more than 6 browsers on the same Selenium Remote Control is not advisable. The limitations are even more drastic for Internet Explorer.   Your tests can target multiple Selenium Remote Controls to work around the limitation on the number of parallel tests that you can run on a single remote control. Nevertheless that does not scale very well. It can easily be done at the continuous integration build level (one for Internet Explorer, one for Firefox, one for Safari). However,...
How to Export TestCases along with Design steps from HP QC/ALM

How to Export TestCases along with Design steps from HP QC/ALM

How to Export TestCases along with Design steps from HP QC/ALM You can use ALM Excel reports (Analysis view –> Create new Excel Report)  to export test and design step data from QC/ALM to Excel sheet.  Use below query in Excel Report query builder.   **********************************************************************************************************************************************   SELECT TEST.TS_TEST_ID as “Test ID”, /*Test.Test ID*/ TEST.TS_NAME as “Test Name”, /*Test.Test Name*/ TEST.TS_DESCRIPTION as “Test Desc.”, /*Test.Description*/ DESSTEPS.DS_STEP_NAME as “Step Name”, /*Design Step.Step Name*/ DESSTEPS.DS_DESCRIPTION as “Step Desc.”, /*Design Step.Description*/ DESSTEPS.DS_EXPECTED as “Expected Result”, /*Design Step.Expected Result*/ TEST.TS_STATUS as “Test Status”, /*Test.Status*/ TEST.TS_TYPE “Test Type”, /*Test.Type*/ TEST.TS_RESPONSIBLE as “Test Designer”, /*T ALL_LISTS.AL_ABSOLUTE_PATH /*Test Plan Folder.Absolute Path*/est.Designer*/ TEST.TS_USER_03 as “Test Priority”, /*Test.Priority*/ TEST.TS_USER_04 as “Test Reviewer”, ALL_LISTS.AL_ITEM_ID as “SUBJECTID”, ALL_LISTS.AL_DESCRIPTION as “SUBJECTPATH”     FROM TEST, DESSTEPS, ALL_LISTS WHERE DS_TEST_ID = TS_TEST_ID and TEST.TS_SUBJECT = ALL_LISTS.AL_ITEM_ID and ALL_LISTS.AL_DESCRIPTION =’<< Replace Test Folder Name >>’   **********************************************************************************************************************************************     For the above query, it would be preference copy all the testcases to be exported in single temp folder in TestPlan module and replace Folder name in above query.   regards Navneesh Garg...