TechTalk: Extreme Automation Creating Headless Tests “Automagically”

16
Extreme Automation Creating Headless Tests “Automagically” Chris Kraus DevOps: API Management and Application Development CA Technologies Product Manager DO3T38T @ChrisKraus3 #CAWorld

Transcript of TechTalk: Extreme Automation Creating Headless Tests “Automagically”

Page 1: TechTalk: Extreme Automation Creating Headless Tests “Automagically”

Extreme AutomationCreating Headless Tests “Automagically”

Chris Kraus

DevOps: API Management and Application Development

CA Technologies

Product Manager

DO3T38T

@ChrisKraus3

#CAWorld

Page 2: TechTalk: Extreme Automation Creating Headless Tests “Automagically”

2 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD

For Informational Purposes Only

Terms of this Presentation

© 2015 CA. All rights reserved. All trademarks referenced herein belong to their respective companies. The presentation provided at CA

World 2015 is intended for information purposes only and does not form any type of warranty. Some of the specific slides with customer

references relate to customer's specific use and experience of CA products and solutions so actual results may vary.

Certain information in this presentation may outline CA’s general product direction. This presentation shall not serve to (i) affect the rights

and/or obligations of CA or its licensees under any existing or future license agreement or services agreement relating to any CA software

product; or (ii) amend any product documentation or specifications for any CA software product. This presentation is based on current

information and resource allocations as of November 18, 2015, and is subject to change or withdrawal by CA at any time without notice. The

development, release and timing of any features or functionality described in this presentation remain at CA’s sole discretion.

Notwithstanding anything in this presentation to the contrary, upon the general availability of any future CA product release referenced in

this presentation, CA may make such release available to new licensees in the form of a regularly scheduled major product release. Such

release may be made available to licensees of the product who are active subscribers to CA maintenance and support, on a when and if-

available basis. The information in this presentation is not deemed to be incorporated into any contract.

Page 3: TechTalk: Extreme Automation Creating Headless Tests “Automagically”

3 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD

Abstract

Automated testing is an extreme time saver, especially when consider regression testing. Regression testing is the testing and retesting of applications when a new feature is introduced in order to verify the existing functionality is still working. In order to accomplish this, tests cases need to be executed, taking a lot of time, especially if they are done manually.

This session will show you how to build API tests that follow the user’s journey through the appellation –creating those headless tests magically

Chris Kraus

CA Technologies

Product Manager

Page 4: TechTalk: Extreme Automation Creating Headless Tests “Automagically”

4 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD

Agenda

CHANGES TO WEB SITES - STATIC TO DYNAMIC

WHY CREATE TESTS THAT FOLLOW THE USER JOURNEY

UNDERSTANDING THE GENERATED DATA AND HOW IT IS HANDLED

GENERATING DYNAMIC TESTS THAT FOLLOW THE USER JOURNEY

DEMO DOCUMENT TRANSACTIONS AND FUNCTIONAL TESTS

1

2

3

4

5

Page 5: TechTalk: Extreme Automation Creating Headless Tests “Automagically”

5 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD

Changes to web sites – Static to Dynamic

Early 2000’s HTTP post to HTML response– <Form Action=mypage.jsp>

– POST or GET name=value pairs

– Simple formatting of HTML response

Mid 2005’s AJAX based web pages– SOAP or XML data requested

– There is now a “application with bugs” in the browser parsing the data and presenting data

Enter 2010’s HTML 5 applications– RESTful request for data

– Response XML or JSON

– Browser code is still a “application with bugs”

Static

Dynamic

Page 6: TechTalk: Extreme Automation Creating Headless Tests “Automagically”

6 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD

Why create tests that follow the user journey?

UI (User Interface) testing follows the movement of a user through the application.

The test data for a UI test starts with input and then “builds” with more user data or system returned data.

Data presented on each screen plug new data creates the journey

Page 7: TechTalk: Extreme Automation Creating Headless Tests “Automagically”

7 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD

Understand the generated data and how it is handled

Input data on first page becomes a dataset

Create properties bases on “value” for sharing

Data returned to the page via API is potential data into next step

Show me cars

Show me mileage

AcuraBuick…

VIN NbrAcura

Get a car loan

TermsVIN NbrAcura

AUTO-MAGIC CREATION OF APPLICATION TESTS DATASETS, FILTERS, AND PROPERTY DRIVEN STEPS

Page 8: TechTalk: Extreme Automation Creating Headless Tests “Automagically”

8 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD

How do find the API’s and the ordering for generation?

Start Document Transactions– Limit scope of transactions by

IP address

– Associate transactions with start and stop time

– Works for any client applications

– Requires java agent in backend

10:25 am192.168.168.44

“Acura”“Buick”

GET /get/cars

“TL”“RTX”

GET /get/cars/model/Acura

GET /get/cars/Vin/ABC123DEF

“Miles”“Not salvage”“Color”

10:25 am192.168.168.44

J2EEDevTest Agent

Page 9: TechTalk: Extreme Automation Creating Headless Tests “Automagically”

9 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD

How do find the API’s and the ordering for generation?

Use the Chrome plugin to see API’s

– Chrome plugin from Google plugin

– Plugin lives in browser and see’s requests and response data

– View before encryption and signatures

– Works with any backend server

AcuraBuick

/get/cars

TLRTX

/get/cars/model/Acura

/get/cars/Vin/ABC123DEF

MilesNot salvageColor

+Install Plugin

CA Continuous Application Insight ServerGenerate CA Application Tests

Transactions

Page 10: TechTalk: Extreme Automation Creating Headless Tests “Automagically”

10 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD

Demo - User Journey API tests

Generate Functional test

Document Transactions

Generate functional testChrome plugin

Page 11: TechTalk: Extreme Automation Creating Headless Tests “Automagically”

11 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD

Handle Dynamic Data

The user data along with returned data from the application is dynamic. Generated tests are data driven and parameter driven to ensure they actually run.

Follow the user Journey

Applications are API’s used in the order of the User Journey through the application. The order of the API’s makes a difference.

Generate API test

API tests are easily generated to follow the user journey. The API’s are more stable then automating the UI’s.

The API’s should be leveraged in multiple applications.

SummaryA Few Words to Review

Page 12: TechTalk: Extreme Automation Creating Headless Tests “Automagically”

12 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD

Q & A

Page 13: TechTalk: Extreme Automation Creating Headless Tests “Automagically”

13 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD

Recommended Sessions

SESSION # TITLE DATE/TIME

DO4T16SCase Study: Manheim Implements Test Data

Management to Reduce Testing Time and Costs11/18/2015 at 04:30 pm

DO4T25T Tech Talk: Service Virtualization on Demand 11/18/2015 at 04:30 pm

DO3X114SFreeing the World from Slow: How Service Virtualization

and the Concept of S.P.E.E.D. 11/19/2015 at 3:45 pm

Page 14: TechTalk: Extreme Automation Creating Headless Tests “Automagically”

14 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD

Must See Demos

SV Innovations

DevOps

Theater 3

DevOps Sim

DevOps

Theater 3

SV on Demand

DevOps

Theater 3

SV Use Cases

DevOps

Theater 3

Page 15: TechTalk: Extreme Automation Creating Headless Tests “Automagically”

15 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD

Follow On Conversations At…

Smart Bar

DevOps

Theater 3 & 4

Tech Talks

DevOps

Theater 3 & 4

Page 16: TechTalk: Extreme Automation Creating Headless Tests “Automagically”

16 © 2015 CA. ALL RIGHTS RESERVED.@CAWORLD #CAWORLD

For More Information

To learn more, please visit:

http://cainc.to/Nv2VOe

CA World ’15