pre-con ed: who moved my ui? api testing in a headless world

33
World ® ’1 6 Pre-Con: Who Moved My UI? API Testing in a Headless World Ulrich Vogt – Sr Principal Eng. Services Architect - CA Technologies DO5X08E DEVOPS Heather Peyton - Principal Marketing Manager - CA Technologies

Upload: ca-technologies

Post on 08-Jan-2017

54 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: Pre-Con Ed: Who Moved My UI? API Testing in a Headless World

World®’16

Pre-Con:WhoMovedMyUI?APITestinginaHeadlessWorldUlrichVogt– SrPrincipalEng.ServicesArchitect- CATechnologies

DO5X08E

DEVOPS

HeatherPeyton- PrincipalMarketingManager- CATechnologies

Page 2: Pre-Con Ed: Who Moved My UI? API Testing in a Headless World

2 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

ForInformationalPurposesOnlyTermsofthisPresentation

©2016CA.Allrightsreserved.Alltrademarksreferencedhereinbelongtotheirrespectivecompanies.Thepresentationprovided atCAWorld2016isintendedforinformationpurposesonlyanddoesnotformanytypeofwarranty.Someofthespecificslideswith customerreferencesrelatetocustomer'sspecificuseandexperienceofCAproductsandsolutionssoactualresultsmayvary.

CertaininformationinthispresentationmayoutlineCA’sgeneralproductdirection.Thispresentationshallnotserveto(i)affecttherightsand/orobligationsofCAoritslicenseesunderanyexistingorfuturelicenseagreementorservicesagreementrelatingtoanyCAsoftwareproduct;or(ii)amendanyproductdocumentationorspecificationsforanyCAsoftwareproduct.Thispresentationisbasedon currentinformationandresourceallocationsasofNovember1,2016,andissubjecttochangeorwithdrawalbyCAatanytimewithout notice.Thedevelopment,releaseandtimingofanyfeaturesorfunctionalitydescribedinthispresentationremainatCA’ssolediscretion.

Notwithstandinganythinginthispresentationtothecontrary,uponthegeneralavailabilityofanyfutureCAproductrelease referencedinthispresentation,CAmaymakesuchreleaseavailabletonewlicenseesintheformofaregularlyscheduledmajorproductrelease.SuchreleasemaybemadeavailabletolicenseesoftheproductwhoareactivesubscriberstoCAmaintenanceandsupport,onawhen andif-availablebasis.Theinformationinthispresentationisnotdeemedtobeincorporatedintoanycontract.

Page 3: Pre-Con Ed: Who Moved My UI? API Testing in a Headless World

3 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Abstract

LearnhowtoaddresstheproblemoftestingdataonthewirewithtestingsolutionsfromCATechnologies.TraditionalUATtestingalwayslookstotheworkflowoftheUserInterface(UI)tomanuallyorscriptouttesting.ManymodernAPIsdon’thaveUIsorUIsthatarenotavailabletotheendofthedevcycle.LearnhowmovingtheuserjourneytestjustbelowtheUItothesupportingAPI’scanprovidemorerobusttests,drivemoreautomationandshift-testingleft.

UlrichVogt

CATechnologiesSeniorPrincipalEngineeringServicesArchitect

Page 4: Pre-Con Ed: Who Moved My UI? API Testing in a Headless World

4 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Agenda

INTROANDCHANGESINDEVTEST10

FOLLOWINGTHEUSERSJOURNEY

DEMO

WEBSERVICESANDBACKENDS

OUTSIDEANDINSIDEOFANAPPLICATION

EXTENDINGANDEMBEDDINGTESTSAUTOMATICALLY

1

2

3

4

5

6

Page 5: Pre-Con Ed: Who Moved My UI? API Testing in a Headless World

5 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

IntroandChangesinDevTest10

HeatherPeyton,PrincipalMarketingManager,CATechnologies

@[email protected]

Page 6: Pre-Con Ed: Who Moved My UI? API Testing in a Headless World

6 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Page 7: Pre-Con Ed: Who Moved My UI? API Testing in a Headless World

7 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

APITesting– Value-Driven?APIsnowserveastheprimaryinterfaceforapplicationlogic1

IfanAPIbreaks,itcanbreakawholeendtoendvaluechain,notjustanapp!

1- https://en.wikipedia.org/wiki/API_testing

Page 8: Pre-Con Ed: Who Moved My UI? API Testing in a Headless World

8 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

ContinuousTestingHowdoYouGetThere?TestingTechnologyAdoptionandMaturity

OptimizedOrganizationforDevOps

*Applicationreleaseautomationview

AGILEMAT

URITY

Silos,manualhandovers,waterfall,onerelease/year,monolithicapps,longtermproject/resourceplanning,errorpronereleaseprocesses

DevOps,end-to-enddelivery,incrementalagile/sprintreleasecadence,multi-

componentmicroapps,automationenabled,therightpeoplewiththerightskills.

Whereareyou?

UI Test Automation

Modeling & Test Generation Automation

API Test Automation & Service Virtualization

Continuous Testing

Page 9: Pre-Con Ed: Who Moved My UI? API Testing in a Headless World

9 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

ServiceVirtualization

ApplicationTest

DevTestPortalDevTestWorkstation

ApplicationTest

DevTestPortalDevTestWorkstation

+AdditionalRunTime

andAppTestLicensesSold

ServiceVirtualization

ApplicationTest

DevTestPortalDevTestWorkstation

CAI– AutoGenerate

VirtualServices

CAI– FindAPIs,GenerateAPI

Tests

CAI

ApplicationTest

DevTestPortalDevTestWorkstation

CAApplicationTest

+CAI– FindAPIs,GenerateAPITests

ServiceVirtualization

CAServiceVirtualizationPowerUser

+AdditionalRunTimeandAppTest LicensesSold

DevTestPortalDevTestWorkstation

AppTest

+CAI– FindAPIs,GenerateAPITests

CASVPowerUser+CAI

+CAI– AutoGenerateVirtualServices

CAApplicationTest

CAServiceVirtualizationPowerUser

DevTest 9.5 DevTest 10.0

Page 10: Pre-Con Ed: Who Moved My UI? API Testing in a Headless World

10 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

CATestDataManager•Find,createandprovisiontestdataautomaticallyandfast.

CAAgileRequirementsDesigner•Automaticallygenerateandmaintainthesmallestsetoftestcasesneededformaximumcoverage.

CAApplicationTest•EditandextendAPItestswithoutwritingcodeandtestthefulltechnologystack.

CAServiceVirtualization•Virtualize3rd partyAPIsandunavailablesystemsforagiletesting.

CAAPIManagement•ManageAPIsandcreateadirectoryofvirtualAPIsforsecureaccess.

https://www.itcentralstation.com/products/ca-test-data-manager

https://www.itcentralstation.com/products/ca-service-virtualization

AModernToolsetforAPITestingTransformation

Page 11: Pre-Con Ed: Who Moved My UI? API Testing in a Headless World

11 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

FollowingtheUser’sJourney

UlrichVogt,SeniorPrincipalEngineeringServicesArchitect,CATechnologies

Page 12: Pre-Con Ed: Who Moved My UI? API Testing in a Headless World

12 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

ChangestoWebSites– StatictoDynamic

§ Early2000’sHTTPposttoHTMLresponse– <FormAction=mypage.jsp>

– POSTorGETname=valuepairs

– SimpleformattingofHTMLresponse

§ Mid2005’sAJAXbasedwebpages– SOAPorXMLdatarequested

– Thereisnowa“applicationwithbugs”inthebrowserparsingthedataandpresentingdata

§ Enter2010’sHTML5applications– RESTful requestfordata

– ResponseXMLorJSON

– Browsercodeisstilla“applicationwithbugs”

Static

Dynamic

Page 13: Pre-Con Ed: Who Moved My UI? API Testing in a Headless World

13 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

WhyCreateTeststhatFollowtheUserJourney?

§ UserInterface(UI)testingfollowsthemovementofauserthroughtheapplication.

§ ThetestdataforaUIteststartswithinputandthen“builds”withmoreuserdataorsystemreturneddata.

§ Datapresentedoneachscreenaddingnewdatacreatesthejourney

Page 14: Pre-Con Ed: Who Moved My UI? API Testing in a Headless World

14 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

WhatistheGeneratedDataandHowitisHandled?

§ Inputdataonfirstpagebecomesadataset

§ Createpropertiesbaseson“value”forsharing

§ DatareturnedtothepageviaAPIispotentialdataintonextstep

Showmecars

Showmemileage

AcuraBuick…

VINNbrAcura

GetacarloanTermsVINNbrAcura

Page 15: Pre-Con Ed: Who Moved My UI? API Testing in a Headless World

15 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

FindingtheAPIs

Mobileapplicationsandrichbrowserapplications

ServicesprovidedbytheESBDatabeing

servicedupbyESB

ESB

Page 16: Pre-Con Ed: Who Moved My UI? API Testing in a Headless World

16 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

KeyConsiderationsWhenLookingattheLayer

§ WhatbusinessrulesandvalidationisattheMobilelayer?

§ AretheAPI/Serviceendpointschangingdata?

§ ESBallthedataonthewire?

§ Backendsystems– havetheychanged?ESB

Page 17: Pre-Con Ed: Who Moved My UI? API Testing in a Headless World

17 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

ConsiderationsforAPIandServiceDeliveryLayers

§ Where’stheUI?– SOAPXML,RESTJSON– HTTP,TP&MessageQueue’s

§ Testingorchestrationofmultipleservicecallstoaccomplisharequirement

§ APIcallsarelessbrittlethanUItesting

§ Nonfunctionalloadtestingtounderstandcompositeresponsetimes

ESB

Page 18: Pre-Con Ed: Who Moved My UI? API Testing in a Headless World

18 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

HowdoIFindtheAPI’sandtheOrderingforGeneration?

§ UsetheCAApplicationTest(CAI)Chromeplugin toseeAPI’s– ‘Developertool’inChrome– Pluginlivesinbrowserandsee’s

requestsandresponsedata– Viewbeforeencryptionand

signatures– Workswithanybackendserver,

notonlyjavabased

AcuraBuick

/get/cars

TLRTX

/get/cars/model/Acura

/get/cars/Vin/ABC123DEF

MilesNotsalvageColor

+InstallPlugin

CAContinuousApplicationInsightServerGenerateCAApplicationTests

Transactions

Page 19: Pre-Con Ed: Who Moved My UI? API Testing in a Headless World

19 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

HowdoIFindtheAPI’sandtheOrderingforGeneration?

§ StartDocumentTransactions– Limitscopeoftransactionsby

IPaddress– Associatetransactionswith

startandstoptime– Worksforanyclient

applications– Requiresjavaagentin

backend

10:25am192.168.168.44

“Acura”“Buick”

GET/get/cars

“TL”“RTX”

GET/get/cars/model/Acura

GET/get/cars/Vin/ABC123DEF

“Miles”“Notsalvage”“Color”

10:25am192.168.168.44

J2EEDevTest Agent

Page 20: Pre-Con Ed: Who Moved My UI? API Testing in a Headless World

20 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

DemoGoogleChromePlugin

Page 21: Pre-Con Ed: Who Moved My UI? API Testing in a Headless World

21 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

DemoDocumentTransactions

Page 22: Pre-Con Ed: Who Moved My UI? API Testing in a Headless World

22 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

ExtendingandEmbeddingTestCasesAutomatically

§ Needastandardprefixtoyourtestforauthentication?

§ Wanttovalidatethedatabaseafterexecutingateststepthatupdatesthedatabase?

§ Wanttorunatestwithadditionaldata?

Page 23: Pre-Con Ed: Who Moved My UI? API Testing in a Headless World

23 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

DemoEmbeddingIntoaTestTemplate

Page 24: Pre-Con Ed: Who Moved My UI? API Testing in a Headless World

24 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

DemoTestWithEmbeddedDatabaseValidation

Page 25: Pre-Con Ed: Who Moved My UI? API Testing in a Headless World

25 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

DemoCreateDataDrivenTests

Page 26: Pre-Con Ed: Who Moved My UI? API Testing in a Headless World

26 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

HandleDynamicData

Theuserdataalongwithreturneddatafromtheapplicationisdynamic.Generatedtestsaredata

drivenandparameterdriventoensuretheyactuallyrun.

FollowtheuserJourney

ApplicationsareAPI’susedintheorderoftheUserJourneythroughtheapplication.TheorderoftheAPI’smakesa

difference.

GenerateAPItest

APItestsareeasilygeneratedtofollowtheuserjourney.TheAPI’saremorestablethen

automatingtheUI’s.TheAPI’sshouldbeleveraged

inmultipleapplications.

SummaryAFewWordstoReview

Page 27: Pre-Con Ed: Who Moved My UI? API Testing in a Headless World

27 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Questions?

Page 28: Pre-Con Ed: Who Moved My UI? API Testing in a Headless World

28 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

RecommendedSessions

SESSION# TITLE DATE/TIME

DO5X09ESoyouimplementedaservicebuss?Howya'gonna testthatmonster?

11/15/2016at10:45am

LagoonK

DO5X10ESharingtheresponsetime?Nothankyou.I’llhaveanotherpieceofpie!

11/15/2016at1:00pm

LagoonK

DO5T12T IntegratedTestingfromAtoZ(SV/Test)11/16/2016at11:30am

DevOpsTheater

Page 29: Pre-Con Ed: Who Moved My UI? API Testing in a Headless World

29 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

MustSeeDemos

ModernizeAppDeliveryIntegratedCDTheater5- DOV501P

DeliverTestDataFasterTestDataManagerTheater5- DOV511P

DeliverBetterAppsServiceVirtualizationTheater5- DOV507P

OrchestrateYourReleaseReleaseAutomationTheater5- DOV513P

Page 30: Pre-Con Ed: Who Moved My UI? API Testing in a Headless World

30 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

DevOps.comAlanShimel

DO5T21P11/16/201611:30am

PanelSessions

DevOpsLeadership

DO5T02P11/16/20161:45pm

FinancialIndustry

DO5T03P11/16/20164:30pm

Page 31: Pre-Con Ed: Who Moved My UI? API Testing in a Headless World

31 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

BaselineTestCreationUsingCAContinuousApplicationInsight– OnYoutube§ EnvironmentIntroduction:BaselineTestCaseAutomationwithCACAI8- Part1 -

https://www.youtube.com/watch?v=juH9yVJ9fVY

§ FilteringTransactionsandCreationOptions:BaselineTestCaseAutomationwithCACAI8- Part2 –https://www.youtube.com/watch?v=i6_bLJeGmKQ

§ CreateaBaseline:BaselineTestCaseAutomationwithCACAI8- Part3 -https://www.youtube.com/watch?v=84vcPiMvfPY

§ ReviewaBaseline:BaselineTestCaseAutomationwithCACAI8- Part4 -https://www.youtube.com/watch?v=BAetSXMfpxA

§ AdvancedBaselineReview:BaselineTestCaseAutomationwithCACAI8- Part5 -https://www.youtube.com/watch?v=vycy3hzLX5E

§ ExecuteExpandedBaselines:BaselineTestCaseAutomationwithCACAI8- Part6 -https://www.youtube.com/watch?v=2UOCh-yjAc0

§ ExecuteData-DrivenBaselines:BaselineTestCaseAutomationwithCACAI8- Part7 -https://www.youtube.com/watch?v=jyJD4mUDafg

Page 32: Pre-Con Ed: Who Moved My UI? API Testing in a Headless World

32 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Thankyou.

Stayconnectedatcommunities.ca.com

Page 33: Pre-Con Ed: Who Moved My UI? API Testing in a Headless World

@CAWORLD#CAWORLD ©2016CA.AllRIGHTSRESERVED.33 @CAWORLD#CAWORLD

DevOps– ContinuousDelivery

FormoreinformationonDevOps– ContinuousDelivery,pleasevisit:http://cainc.to/PiTFpu