19
iconnect360.com

Woman who code KL May 15 - Deep down to automation

Embed Size (px)

Citation preview

Page 1: Woman who code KL May 15  - Deep down to automation

iconnect360.com

Page 2: Woman who code KL May 15  - Deep down to automation

iconnect360.com

Topic: Or sub heading here...

Presented by: Celeste Kirby-Brown

Date: 15th February 2012

Presenters

Gan Boon Leong

M Rizwanur Rashid

Functional Test Automation

Page 3: Woman who code KL May 15  - Deep down to automation

iconnect360.com

Agenda

Test automation management

Test automation process

Test automation framework

Demonstration

Q & A

Page 4: Woman who code KL May 15  - Deep down to automation

iconnect360.com

Managing Automation Test

Clear objectives/goals for automation

Automation test scope

Integrate other tools

Avoid using record/playback

Review and Refactor

Page 5: Woman who code KL May 15  - Deep down to automation

iconnect360.com

Test Management Tools

Selenium- Develop the automation test scripts

TestLink- manage test cases, test suites, reports and statistics

SVN- Automated scripts repository, manage versioning.

Jenkins- Manage/control automation test execution

BugZilla- Defect management tool.

Page 6: Woman who code KL May 15  - Deep down to automation

iconnect360.com

Test Automation Process

Page 7: Woman who code KL May 15  - Deep down to automation

iconnect360.com

Custom Automation Framework - Reasons

More controlFreedom for end to end

process

Custom Logger

Less Maintenance

Effort

Less learning curve

Page 8: Woman who code KL May 15  - Deep down to automation

iconnect360.com

Test Automation Architecture

Custom Framework

Automation Framework(Selenium/Telerik Testing

Framework)

Browser (Web App)

Tests

Each Layer only interacts with the layer immediately below it

Page 9: Woman who code KL May 15  - Deep down to automation

iconnect360.com

Tip: React with UI changes

How we ensured it?

UI elements are independent

Referred from different layer

Only need to change the definition of the UI object

Page 10: Woman who code KL May 15  - Deep down to automation

iconnect360.com

Thinking About Layers

Page Tests

Data Layer

Logger

The framework itself should be divided up by layers of functionality

Page Repositori

es

Entities

UI Object Repositori

es

Testlink Updater

Helper Factory

Framework

Selenium

Browser (Web App)

Tests

Page 11: Woman who code KL May 15  - Deep down to automation

iconnect360.com

The Page Objects Model Pattern

Test

LoginPage:: Browser

LoginPage::Code- Login()- ResetPassword()- ToggleRememberMe()

Pages are good way to model the functionality of an application

Selenium - org.openqa.selenium.support.PageFactory

.NET – Custom design

Page 12: Woman who code KL May 15  - Deep down to automation

iconnect360.com

Fine tuning existing process

And because our developers are awesome !

Developers agreed to put ID wherever possible

Tip: Use ID to find element

How we ensured it?

Page 13: Woman who code KL May 15  - Deep down to automation

iconnect360.com

Running Tests

Consider up front how to run tests and get output from the tests

Test Runner (TestNG/Xunit)

Tests Framework

Output

Page 14: Woman who code KL May 15  - Deep down to automation

iconnect360.com

Page Objects Demo

Page 15: Woman who code KL May 15  - Deep down to automation

iconnect360.com

Execution Flow

Loop for configured countries

Begin test

CSV dataIsRun = true? Test initialization

Test execution (Page > UI repo)

HTML logger::Write detail log with screenshot

Update Testlink (pass/fail result)

HTML logger::Write summary log

End execution

Is last row?

Yes

Yes

No

No, proceed to next row

Page 16: Woman who code KL May 15  - Deep down to automation

iconnect360.com

In .NET, App.config with environment specific transformation.

For selenium, properties file for common configurations.

Bonus Tip: Rely on configurations

How we did it?

Page 17: Woman who code KL May 15  - Deep down to automation

iconnect360.com

End to End Demonstration

Silverlight Automation

Page 18: Woman who code KL May 15  - Deep down to automation

iconnect360.com

Questions & Answers

Page 19: Woman who code KL May 15  - Deep down to automation

iconnect360.com

LEND YOUR SKILLOR

JOIN TO CODE