29
Agile Testing, Test Automation & BDD, Singapore www.testingmind.com October 25, 2016 Agile Testing, Test Automation & BDD OCTOBER 25, 2016 SINGAPORE ORGANIZED BY TESTINGMIND 1

Test Automation Frameworks: Assumptions, Concepts & Tools

Embed Size (px)

Citation preview

Page 1: Test Automation Frameworks: Assumptions, Concepts & Tools

Agile Testing, Test Automation & BDD, Singapore www.testingmind.com October 25, 2016

Agile Testing, Test Automation & BDD

OCTOBER 25, 2016

SINGAPORE

ORGANIZED BY TESTINGMIND

1

Page 2: Test Automation Frameworks: Assumptions, Concepts & Tools

Agile Testing, Test Automation & BDD, Singapore www.testingmind.com October 25, 2016

About Myself

Quick Bio: “Test Automation Consultant having more than 11 years of experience in Software Automated Testing space.”

Twitter: @sahajamait

Github: https://github.com/sahajamit

P.S. : All the opinions given in this talk are completely personal and has nothing to do with my employer.

2

Page 3: Test Automation Frameworks: Assumptions, Concepts & Tools

Agile Testing, Test Automation & BDD, Singapore www.testingmind.com October 25, 2016

Talk Abstract:

“What goes into the selection of right Test Automation Framework for your application? the Application type (Mobile, Desktop, Web), the scripting language(Java, Ruby, Python) or the tools (Selenium, Appium, UFT). No, there are many more factors to consider before finalising your “ideal” automation framework and if you get this decision wrong then it can have a cascading effect to your entire test strategy. In this rapidly changing Agile environment, the automation framework should be extremely flexible and agnostic of external factors like tools and languages. In this talk we will be covering this subject more deeply with some real life examples.”

3

Page 4: Test Automation Frameworks: Assumptions, Concepts & Tools

Agile Testing, Test Automation & BDD, Singapore www.testingmind.com October 25, 2016

Test Automation Frameworks – Assumptions, Concepts and Tools

4

By : Amit Rawat

Page 5: Test Automation Frameworks: Assumptions, Concepts & Tools

Agile Testing, Test Automation & BDD, Singapore www.testingmind.com October 25, 2016

Who can help you to build your Test Automation Framework ??

Some Assumptions:● Why to build (already so many open-source frameworks available)● I will hire a Selenium/Automation Architect● I will buy a Licensed tool

5

Page 6: Test Automation Frameworks: Assumptions, Concepts & Tools

Agile Testing, Test Automation & BDD, Singapore www.testingmind.com October 25, 2016

Who can help you to build your Test Automation Framework ??

Reality:

6

Page 7: Test Automation Frameworks: Assumptions, Concepts & Tools

Agile Testing, Test Automation & BDD, Singapore www.testingmind.com October 25, 2016

How easy is to design your Automation Framework

Google yield more than million results for the query “Test Automation Framework”

7

Page 8: Test Automation Frameworks: Assumptions, Concepts & Tools

Agile Testing, Test Automation & BDD, Singapore www.testingmind.com October 25, 2016

Test Automation Frameworks – Assumptions, Concepts and Tools

What is a Test Automation Framework? It is a supporting structure or a harness that provides a conducive

environment to execute and maintain the automation scripts effectively. It defines a single standard of doing things which can result in highly-reusable automation scripts and that can lead to very low cost of maintenance.

8

Page 9: Test Automation Frameworks: Assumptions, Concepts & Tools

Agile Testing, Test Automation & BDD, Singapore www.testingmind.com October 25, 2016

Some common types of Automation Frameworks

▶ Linear▶ Test Script Modularity▶ Keyword-driven▶ Behavior-driven(BDD)▶ Hybrid▶ Agile Automation Framework

9

Page 10: Test Automation Frameworks: Assumptions, Concepts & Tools

Agile Testing, Test Automation & BDD, Singapore www.testingmind.com October 25, 2016

Keyword Driven Approach (Script Less Automation)

10

Page 11: Test Automation Frameworks: Assumptions, Concepts & Tools

Agile Testing, Test Automation & BDD, Singapore www.testingmind.com October 25, 2016

Data Driven Approach

11

Page 12: Test Automation Frameworks: Assumptions, Concepts & Tools

Agile Testing, Test Automation & BDD, Singapore www.testingmind.com October 25, 2016

Behavior Driven Approach (BDD) : Functionality Driven

12

Page 13: Test Automation Frameworks: Assumptions, Concepts & Tools

Agile Testing, Test Automation & BDD, Singapore www.testingmind.com October 25, 2016

Behavior Driven Approach (BDD) : Data Driven

13

Page 14: Test Automation Frameworks: Assumptions, Concepts & Tools

Agile Testing, Test Automation & BDD, Singapore www.testingmind.com October 25, 2016

Automating the UI or Automating the FUnctionality ??

UI/UX Functionality/Workflow

14

Page 15: Test Automation Frameworks: Assumptions, Concepts & Tools

Agile Testing, Test Automation & BDD, Singapore www.testingmind.com October 25, 2016

Same Test Across Platforms

15

Page 16: Test Automation Frameworks: Assumptions, Concepts & Tools

Agile Testing, Test Automation & BDD, Singapore www.testingmind.com October 25, 2016

Test Automation Pyramid - Current State

16

Manual Tests

Page 17: Test Automation Frameworks: Assumptions, Concepts & Tools

Agile Testing, Test Automation & BDD, Singapore www.testingmind.com October 25, 2016

Test Automation Pyramid : Ideal State

Image Credit: http://martinfowler.com/bliki/TestPyramid.html

17

Manual Tests

X-UNIT Tests

API/Service

UI

Page 18: Test Automation Frameworks: Assumptions, Concepts & Tools

Agile Testing, Test Automation & BDD, Singapore www.testingmind.com October 25, 2016

Test Automation Pyramid : Achievable State

18

UI Tests

API/Service Tests

Manual Tests

Page 19: Test Automation Frameworks: Assumptions, Concepts & Tools

Agile Testing, Test Automation & BDD, Singapore www.testingmind.com October 25, 2016

Automation Paradigm: UI Interaction

19

Page 20: Test Automation Frameworks: Assumptions, Concepts & Tools

Agile Testing, Test Automation & BDD, Singapore www.testingmind.com October 25, 2016

New Paradigm: Automation Robots (Tapster)

20

Page 21: Test Automation Frameworks: Assumptions, Concepts & Tools

Agile Testing, Test Automation & BDD, Singapore www.testingmind.com October 25, 2016

Things to consider before designing your Framework

▶Progressive Test Automation / Agile Test Automation▶Types of testing to be supported: Functional and Non-Functional▶Parallel execution▶Application Interfaces to be supported: Mobile, Web, Desktop, APIs.▶Operating System▶Reporting : Screenshots, Videos, Data, Logs▶Framework Interface: Web, Excel, Feature Files▶Tool / Language Independence▶Run via CI▶Design Patterns▶Automation Environment

21

Page 22: Test Automation Frameworks: Assumptions, Concepts & Tools

Agile Testing, Test Automation & BDD, Singapore www.testingmind.com October 25, 2016

Parallel Execution & Automation Environment

▶Headless Execution▶Third party Automation Cloud (SauceLabs,

BrowserStack, AWS)▶Virtualization (VMs, Vagrant, Docker)▶Creating Test Environment on the fly (Docker,

Kubernetes)

22

Page 23: Test Automation Frameworks: Assumptions, Concepts & Tools

Agile Testing, Test Automation & BDD, Singapore www.testingmind.com October 25, 2016

Tool Agnostic Framework

▶Abstraction on the tool specific commands▶Leveraging multiple tools beneath the framework layer for different

types of testing▶Web UI Testing - Selenium,AutoIT▶API Testing - RestAssured, SoapUI, Postman▶Data Reconciliation - google-diff-match,PDFBox,BeyondCompare▶Mobile App Testing - Appium, Calabash▶Network Testing - BMP▶Responsive Design Testing - Galen Framework▶Analytics Testing - Fiddler, CharlesProxy▶Security Testing - Burp▶Mainframe Testing - Jagacy, IBM PCOM

▶Expose Domain Specific Language(DSL)

23

Page 24: Test Automation Frameworks: Assumptions, Concepts & Tools

Agile Testing, Test Automation & BDD, Singapore www.testingmind.com October 25, 2016

Locator Strategy

▶Multiple Locators▶Statistical Technique▶Artificial Intelligence

24

Page 25: Test Automation Frameworks: Assumptions, Concepts & Tools

Agile Testing, Test Automation & BDD, Singapore www.testingmind.com October 25, 2016

Test Automation Design Patterns

▶ Page Object Model▶Page Factory Pattern▶Loadable component▶Builder▶Singleton

25

Page 26: Test Automation Frameworks: Assumptions, Concepts & Tools

Agile Testing, Test Automation & BDD, Singapore www.testingmind.com October 25, 2016

Test Reporting

▶ Allure▶Masterthought▶Serenity

26

Page 27: Test Automation Frameworks: Assumptions, Concepts & Tools

Agile Testing, Test Automation & BDD, Singapore www.testingmind.com October 25, 2016

Test Reporting

27

Page 28: Test Automation Frameworks: Assumptions, Concepts & Tools

Agile Testing, Test Automation & BDD, Singapore www.testingmind.com October 25, 2016

Test Automation Framework Layers

28

Page 29: Test Automation Frameworks: Assumptions, Concepts & Tools

Agile Testing, Test Automation & BDD, Singapore www.testingmind.com October 25, 2016

Q & A

29