01 automation using selenium or webdriver and …minisites.qaiglobalservices.com/stc2012/paper_...

14
Automation Using Selenium or Web Driver and Unit Testing October 20, 2012, Bangalore Author Ankita Patro

Upload: vannhu

Post on 29-Aug-2018

238 views

Category:

Documents


0 download

TRANSCRIPT

Automation Using Selenium or Web Driver and Unit Testing

October 20, 2012, BangaloreAuthorAnkita Patro

Company Brief•Capgemini has been working in the Automation Testing for over 6 years (~556000 hours)

•More than 100 projects are successfully using and implementing automation testing in different platforms.

•Believe in Build in repository which can be used across different project

•Due to very strong java resource availability, designed framework is robust and dynamic.

Introduction

| Testing Services

Business Need•At present scenario automation testing is important because of hectic regression and better stability while testing.

•It is observed that Project under Web driver automation are very stable and value for money.

•If properly implemented then it can reduce the manual effort more significantly in terms of regression

•With the help of Junit tester need not to wait for UI to be developed. Testing can be right away started when development is under progress and early testing avoids a lot of confusion and bugs also.

The information contained in this presentation is proprietary.

Copyright ©2011 Capgemini. All rights reserved.2

How Selenium/Webdriver works??

| Testing Services

How Selenium interacts with Web and Server

| Testing Services

The information contained in this presentation is proprietary.

Copyright ©2011 Capgemini. All rights reserved.4

How to identify an element using selenium/Webdriver

| Testing Services

12/11/2012 5

•Choice of using language of your choice

•Script once, Run on multiple browsers

•Inherent applicability to AJAX

•A community supported Selenium Software suite

•Support multiple test frameworks

•Integration with the ecosystem

Why Selenium

| Testing Services

•Integration with the ecosystem

•Supporting non-web applications

•Maintenance readiness is not inbuilt

© 2011 Capgemini. All rights reserved. 6

An automated unit test suite brings along a number of important, tangible advantages as compared to other testing strategies.

JUnit is a test framework. It provides a set of classes and tools that can be used to create and run tests for Java applications. The core of the JUnitframework is the TestCase class, which provides basic functionality to create and run tests. The normal usage scenario is to create a sub-class of TestCase, and then add methods to it that test something.

Junit

| Testing Services

TestCase, and then add methods to it that test something.

In order to run the tests, the new TestCase is added to a TestSuite, and the method TestSuite.run is called. The TestSuite then uses reflection to run the test methods of the TestCase. Any method in the TestCase that begins with “test” is treated as a test case and executed. So you use Java code to test Java code.

The information contained in this presentation is proprietary.

Copyright ©2011 Capgemini. All rights reserved.7

Junit Flow

| Testing Services

The information contained in this presentation is proprietary.

Copyright ©2011 Capgemini. All rights reserved.8

•Unit tests find problems early in the development cycle

•An automated unit test suite watches over the code in two dimensions: time and space.

•Developers will be less afraid to change existing code

•The development process becomes more flexible

Why Junit

| Testing Services

•Reduces the need for manual testing

The information contained in this presentation is proprietary.

Copyright ©2011 Capgemini. All rights reserved.9

Now question arises who should handle all these kind of automation testing. The broad scope of programming language in both type of automation testing leads to a confusion that whether code should be written by a developer or a tester. But for the end user and stake holder point of view answer is very simple. Whoever writes the code doesn’t matter. The aim is to get the ultimate and optimized code

Who should handle Automation

| Testing Services

doesn’t matter. The aim is to get the ultimate and optimized code which will be robust and ready to use and will give effective result for testing. The bugs should be verified and rectified and can be caught by using automation script.

The information contained in this presentation is proprietary.

Copyright ©2011 Capgemini. All rights reserved.10

The path to automation is never ending road. As selenium is very new to the market it will be tough for a QA to use it. It requires a mix aim of a developer and tester. While developing the framework for automation QA should act as a developer and while testing he should have a killer instinct. The path is never simple when a new tool is implemented in a new way. It is always difficult but it will end

Conclusion

| Testing Services

tool is implemented in a new way. It is always difficult but it will end up in a fruit full way for both the project and product.

The information contained in this presentation is proprietary.

Copyright ©2011 Capgemini. All rights reserved.11

Question????

| Testing Services

The information contained in this presentation is proprietary.

Copyright ©2011 Capgemini. All rights reserved.12

Ankita [email protected]

Capgemini Consulting India Private Limited | BangaloreTel.: +91 80 66567000 Extn.: 8065448 Mob.: +91 8880818766

Crescent 2, Prestige Shantiniketan,

Sadaramanagala Village , Whitefield Main Road,

Bangalore South Taluk, Bangalore – 560 048.

Contact Information

| Testing Services

The information contained in this presentation is proprietary.

Copyright ©2011 Capgemini. All rights reserved.13

The information contained in this presentation is proprietary.

© 2012 Capgemini. All rights reserved.

www.capgemini.com

About Capgemini

With more than 120,000 people in 40 countries, Capgemini is one

of the world's foremost providers of consulting, technology and

outsourcing services. The Group reported 2011 global revenues

of EUR 9.7 billion.

Together with its clients, Capgemini creates and delivers

business and technology solutions that fit their needs and drive

the results they want. A deeply multicultural organization,

Capgemini has developed its own way of working, the

Collaborative Business ExperienceTM, and draws on Rightshore ®,

its worldwide delivery model.

Rightshore® is a trademark belonging to Capgemini