18
Building a Test Automation Framework THE BASICS COPYRIGHT UTOPIA SOLUTIONS, INC. 1

Building a Test Automation Framework · ─Example “core” framework •Assumptions ─You understand what test automation is (and isn’t) ─You understand why a “framework”

  • Upload
    others

  • View
    14

  • Download
    0

Embed Size (px)

Citation preview

  • Building a Test Automation FrameworkTHE BASICS

    COPYRIGHT UTOPIA SOLUTIONS, INC.1

  • About Us…

    Brett Haase• Test Automation Architect• Works with many clients / Engagements• Nearly 20 years in industry• Makes Great Omelets• Award winning STEM Toy Creator

    COPYRIGHT UTOPIA SOLUTIONS, INC.2

    Email: [email protected]: @brett7threeLinkedIn: linkedin.com/in/bretthaase

    Hemant Ojha• Sr. Test Automation Engineer• Almost 10 years industry experience• Pragmatist• Adventure sports lover• Occasional Skydiver

    Email: [email protected]: @hemanto22LinkedIn: linkedin.com/in/ojhahemant

    mailto:[email protected]:[email protected]

  • Building a Test Automation Framework• What will this webinar address?

    ─ Framework architecture─ Questions to answer while building a framework─ Key components of a framework─ Example “core” framework

    • Assumptions─ You understand what test automation is (and isn’t)─ You understand why a “framework” is necessary

    COPYRIGHT UTOPIA SOLUTIONS, INC.3

  • Typical Framework ArchitectureCommon Framework Components• Required

    ─ Test engine

    ─ Reporting

    ─ Browser Driver & Wrappers

    ─ API Testing Client

    ─ Dependency / Build Management

    • Recommended─ Logging

    ─ Browser Hosting

    ─ Assertion Library

    ─ BDD Tools (if doing BDD in general)

    ─ Data Management

    COPYRIGHT UTOPIA SOLUTIONS, INC.4

  • Choosing a Language

    • Key criteria to consider─ Prevalent skills on the team

    ─ Availability of required libraries

    ─ Language of application under test

    COPYRIGHT UTOPIA SOLUTIONS, INC.5

  • Test Engine

    Why a test engine?─ Manage tests─ Manage pre / post test

    execution actions─ Group / categorize tests─ Reporting / logging

    COPYRIGHT UTOPIA SOLUTIONS, INC.6

  • Browser Drivers & Wrappers

    • Selenium is powerful, but has limitations─ Synchronization

    ─ Complex element interactions

    ─ AJAX support

    COPYRIGHT UTOPIA SOLUTIONS, INC.7

  • API Testing Support

    • Rest Assured / Karate / etc.• Why UI and API in the same

    framework?─ Reuse of common framework

    components─ Easy access to data setup via API─ Promotes testing at the appropriate

    layer

    COPYRIGHT UTOPIA SOLUTIONS, INC.8

    CoreFramework ConfigurationReporting

    Data ManagementUtilities

  • Reporting• Key reporting capabilities

    ─ Well organized results─ Inclusion of test artifacts (screenshots,

    attachments, etc.)─ Historical data / trends─ Filtering and sorting

    COPYRIGHT UTOPIA SOLUTIONS, INC.9

    Extent Reports

    Allure

  • Build Tool

    • Build Tool Responsibilities─ Dependency management─ Code packaging─ Running tests / generating

    reports─ Deployment

    COPYRIGHT UTOPIA SOLUTIONS, INC.10

  • Other Components

    COPYRIGHT UTOPIA SOLUTIONS, INC.11

  • CI/CD Support & Framework Extensibility

    COPYRIGHT UTOPIA SOLUTIONS, INC.12

  • Sample FrameworkHIGH LEVEL WALKTHROUGH

    COPYRIGHT UTOPIA SOLUTIONS, INC.13

  • Framework Core & Sample Application

    COPYRIGHT UTOPIA SOLUTIONS, INC.14

    FRAMEWORK CORE SAMPLE APPLICATION PROJECT

    DEPENDENCY

  • Framework Core as a Dependency

    COPYRIGHT UTOPIA SOLUTIONS, INC.15

  • Writing Tests

    COPYRIGHT UTOPIA SOLUTIONS, INC.16

    Fluent Approach

    The Classic Way

  • Test Results – Extent Reports

    COPYRIGHT UTOPIA SOLUTIONS, INC.17

  • Questions…

    COPYRIGHT UTOPIA SOLUTIONS, INC.18

    …. and Answers!

    Direct future questions to:

    Brett HaaseTest Automation ArchitectUtopia Solutions, Inc.

    Email: [email protected]: @brett7threeLinkedIn: linkedin.com/in/bretthaase

    ?Hemant OjhaSr. Test Automation EngineerUtopia Solutions, Inc.

    Email: [email protected]: @hemanto22LinkedIn: linkedin.com/in/ojhahemant

    Utopia Solutions Framework Corehttps://github.com/UtopiaSolutions/UtopiaSolutionsFWCore

    A Sample Application and Java projecthttps://github.com/UtopiaSolutions/SampleApplication

    mailto:[email protected]:[email protected]://github.com/UtopiaSolutions/UtopiaSolutionsFWCorehttps://github.com/UtopiaSolutions/SampleApplication