pre-con ed: who moved my ui? api testing in a headless world
TRANSCRIPT
World®’16
Pre-Con:WhoMovedMyUI?APITestinginaHeadlessWorldUlrichVogt– SrPrincipalEng.ServicesArchitect- CATechnologies
DO5X08E
DEVOPS
HeatherPeyton- PrincipalMarketingManager- CATechnologies
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.
3 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
Abstract
LearnhowtoaddresstheproblemoftestingdataonthewirewithtestingsolutionsfromCATechnologies.TraditionalUATtestingalwayslookstotheworkflowoftheUserInterface(UI)tomanuallyorscriptouttesting.ManymodernAPIsdon’thaveUIsorUIsthatarenotavailabletotheendofthedevcycle.LearnhowmovingtheuserjourneytestjustbelowtheUItothesupportingAPI’scanprovidemorerobusttests,drivemoreautomationandshift-testingleft.
UlrichVogt
CATechnologiesSeniorPrincipalEngineeringServicesArchitect
4 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
Agenda
INTROANDCHANGESINDEVTEST10
FOLLOWINGTHEUSERSJOURNEY
DEMO
WEBSERVICESANDBACKENDS
OUTSIDEANDINSIDEOFANAPPLICATION
EXTENDINGANDEMBEDDINGTESTSAUTOMATICALLY
1
2
3
4
5
6
5 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
IntroandChangesinDevTest10
HeatherPeyton,PrincipalMarketingManager,CATechnologies
6 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
7 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
APITesting– Value-Driven?APIsnowserveastheprimaryinterfaceforapplicationlogic1
IfanAPIbreaks,itcanbreakawholeendtoendvaluechain,notjustanapp!
1- https://en.wikipedia.org/wiki/API_testing
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
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
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
11 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
FollowingtheUser’sJourney
UlrichVogt,SeniorPrincipalEngineeringServicesArchitect,CATechnologies
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
13 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
WhyCreateTeststhatFollowtheUserJourney?
§ UserInterface(UI)testingfollowsthemovementofauserthroughtheapplication.
§ ThetestdataforaUIteststartswithinputandthen“builds”withmoreuserdataorsystemreturneddata.
§ Datapresentedoneachscreenaddingnewdatacreatesthejourney
14 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
WhatistheGeneratedDataandHowitisHandled?
§ Inputdataonfirstpagebecomesadataset
§ Createpropertiesbaseson“value”forsharing
§ DatareturnedtothepageviaAPIispotentialdataintonextstep
Showmecars
Showmemileage
AcuraBuick…
VINNbrAcura
GetacarloanTermsVINNbrAcura
15 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
FindingtheAPIs
Mobileapplicationsandrichbrowserapplications
ServicesprovidedbytheESBDatabeing
servicedupbyESB
ESB
16 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
KeyConsiderationsWhenLookingattheLayer
§ WhatbusinessrulesandvalidationisattheMobilelayer?
§ AretheAPI/Serviceendpointschangingdata?
§ ESBallthedataonthewire?
§ Backendsystems– havetheychanged?ESB
17 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
ConsiderationsforAPIandServiceDeliveryLayers
§ Where’stheUI?– SOAPXML,RESTJSON– HTTP,TP&MessageQueue’s
§ Testingorchestrationofmultipleservicecallstoaccomplisharequirement
§ APIcallsarelessbrittlethanUItesting
§ Nonfunctionalloadtestingtounderstandcompositeresponsetimes
ESB
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
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
20 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
DemoGoogleChromePlugin
21 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
DemoDocumentTransactions
22 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
ExtendingandEmbeddingTestCasesAutomatically
§ Needastandardprefixtoyourtestforauthentication?
§ Wanttovalidatethedatabaseafterexecutingateststepthatupdatesthedatabase?
§ Wanttorunatestwithadditionaldata?
23 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
DemoEmbeddingIntoaTestTemplate
24 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
DemoTestWithEmbeddedDatabaseValidation
25 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
DemoCreateDataDrivenTests
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
27 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
Questions?
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
29 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
MustSeeDemos
ModernizeAppDeliveryIntegratedCDTheater5- DOV501P
DeliverTestDataFasterTestDataManagerTheater5- DOV511P
DeliverBetterAppsServiceVirtualizationTheater5- DOV507P
OrchestrateYourReleaseReleaseAutomationTheater5- DOV513P
30 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
DevOps.comAlanShimel
DO5T21P11/16/201611:30am
PanelSessions
DevOpsLeadership
DO5T02P11/16/20161:45pm
FinancialIndustry
DO5T03P11/16/20164:30pm
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
32 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
Thankyou.
Stayconnectedatcommunities.ca.com
@CAWORLD#CAWORLD ©2016CA.AllRIGHTSRESERVED.33 @CAWORLD#CAWORLD
DevOps– ContinuousDelivery
FormoreinformationonDevOps– ContinuousDelivery,pleasevisit:http://cainc.to/PiTFpu