,8/31/2018,#,8/31/2018,#,DevOps,测,试基础架构与工具链建,设,技术创新,变革未来,DevOps测试基础架构与工具链建设技术创新,变革未来,1,De,v,Op,s,下的,测试执行环,境的,最佳,实践,De,v,Op,s,下的,统一测试服务,的最,佳,实践,测试,数据服务,的设计与最佳,实践,DevOps,下的,测试报告,平台,建设与创新,3,型全球化电商网站,的测试基,础架构设计,DevOps下的测试执行环境的最佳实践,2,De,v,O,p,s,下的测试执行环境与 统一测试服务的最,佳,实践,DevOps下的测试执行环境与 统一测试服务的最佳实践,3,测试执行环境有哪些痛点?,对使用,者,而言,,测试执行环境的“透明性”,对维护,者,而言,,测试执行环境的“易维护性”,对,于,大量测试用例的执行而言,,执行能力的“可扩展性”,Mobile,移动终端的多样性与碎片化,大型全球化电商网站对测试执行平台的挑战,什么是测试执行环境?为什么需要测试执行环境?,测试执行环境有哪些痛点?什么是测试执行环境?为什么需要测试执,4,大型全球化电商网站对测试,执,行平台的挑战,Global,Site,Coverage,Browser,Coverage,测试,执,行时间,*,大型全球化电商网站对测试执行平台的挑战Global Sit,5,Mobile,测试平台的挑战,Android,版本碎片化,Device,Coverage,测试执行时间,Mobile 测试平台的挑战Android 版本碎片化,6,基于,Je,n,k,i,n,s,触发测试执行,Test,Case,/RFDO,7HVW,(HFXWLRQ,(QYLURQPHQW,6VWHP,8QGHU,7HVW,(687),Test,Case,Design,Business,Requi,r,ement,Feature,Requi,r,ement,Test,Requi,r,ement,7HVW,&DVH,5HSRVLWRU,Locally,develop/debug/run,Jenkins,Pull,Build,Run,5HPRWH,7HVW,(HFXWLRQ,(QYLURQPHQW,(7HVW,%HG),Push,基于Jenkins触发测试执行Test Case/RFDO,7,基于,Test,Runner,/,Test,Execution,System,Test,Case,/RFDO,7HVW,(HFXWLRQ,(QYLURQPHQW,6VWHP,8QGHU,7HVW,(687),Test,Case,Design,Business Requi,r,ement,Feature,Requi,r,ement,Test,Requi,r,ement,Test,Requests,7HVW,&DVH,5HSRVLWRU,Locally,develop/debug/run,Test,Runner,Test,Execution,System,Jenkins,Pull,Build,Run,5HPRWH,7HVW,(HFXWLRQ,(QYLURQPHQW,(7HVW,%HG),Push,基于Test Runner/Test Execution,8,基于,Selenium,Grid,提高测试井行执行能力,Test,Case,6VWHP,8QGHU,7HVW,(687),Test,Case Design,Business,Requi,r,ement,Feature,Requi,r,ement,Test,Requi,r,ement,Test,Requests,7HVW,&DVH,5HSRVLWRU,Locally,develop/debug/run,/RFDO,7HVW,(HFXWLRQ,(QYLURQPHQW,Test,Runner,Test,Execution,System,Jenkins,Pull,Build,Run,6HOHQLXP,+XE,Push,6HOHQLXP,1RGH,1,6HOHQLXP,1RGH,2,6HOHQLXP,1RGH,Q,Test,Requests,Run,dispatch,Run,dispatch,dispatch,基于Selenium Grid提高测试井行执行能力Test,9,Selenium,Grid,简介,Selenium Grid简介,10,Selenium,Grid,简介,Selenium Grid简介,11,DEMO:,搭建你自己的,Selenium,Grid,java-jar,selenium-server-standalone-3.11.0.jar,-role,hub,j,a,va,-j,a,r s,e,l,en,i,u,m-s,e,rv,er,-s,tanda,l,one,-,3.,1,1.0.,j,a,r-r,o,le,nod,e-,hub http:/localhost:4444/grid/register,DEMO:搭建你自己的Selenium Gridjava,12,基于,Jenkins,Cluster,提高测试井行执行能力,Jenkins,Slave,n,Jenkins,Slave,2,Test,Case,6VWHP,8QGHU,7HVW,(687),Test,Case Design,Business,Requi,r,ement,Feature,Requi,r,ement,Test,Requi,r,ement,Test,Requests,7HVW,&DVH,5HSRVLWRU,Locally,develop/debug/run,/RFDO,7HVW,(HFXWLRQ,(QYLURQPHQW,Test,Runner,Test,Execution,System,Jenkins,Master,Pull,Build,Run,6HOHQLXP,+XE,Push,6HOHQLXP,1RGH,1,6HOHQLXP,1RGH,2,6HOHQLXP,1RGH,Q,Test,Requests,Run,dispatch,Run,dispatch,dispatch,Jenkins,Slave,1,dispatch,基于Jenkins Cluster提高测试井行执行能力Jen,13,基于测试负载,用,Docker,实现,Selenium,Grid,的动态扩展与收缩,Jenkins,Slave,n,Jenkins,Slave,2,Test,Case,6VWHP,8QGHU,7HVW,(687),Test,Case,Design,Business,Requi,r,ement,Feature,Requi,r,ement,Test,Requi,r,ement,Test,Requests,7HVW,&DVH,5HSRVLWRU,Locally,develop/debug/run,/RFDO,7HVW,(HFXWLRQ,(QYLURQPHQW,Test,Runner,Test,Execution,System,Jenkins,Master,Pull,Build,Run,6HOHQLXP,+XE,Push,6HOHQLXP,1RGH,1,6HOHQLXP,1RGH,2,6HOHQLXP,1RGH,Q,Test,Requests,Run,dispatch,Run,dispatch,dispatch,Jenkins,Slave,1,dispatch,Dispatch and auto,scale,service,dispatch,Dynamicallty add/delete,selenium node,in Grid,accoriding,to test,load,6HOHQLXP,1RGHV,E,RFNHU,6HOHQLXP,1RGHV,E,RFNHU,Run,基于测试负载,用Docker实现Selenium Grid的,14,Mobile,测试执行私有云设计与实现,Mobile 测试执行私有云设计与实现,15,Mobile,测试执行私有云设计与实现,Mobile 测试执行私有云设计与实现,16,M,ob,il,e,私有云测试平台,Mobile私有云测试平台,17,M,ob,il,e,私有云测试平台,Mobile私有云测试平台,18,M,ob,il,e,私有云测试平台,Mobile私有云测试平台,19,M,ob,il,e,私有云测试平台,Mobile私有云测试平台,20,测试数据服务的设计与最佳实践,测试数据服务的设计与最佳实践,21,测试数据的痛点,On-the-fly,测试数据准备的时间消耗,Out-of-box,测试数据的脏数据,测试数据本身组合的复杂性和多样性,性能测试数据准备的时间消耗,微服务化后,,,Cross,domain,的数据准备缺乏,Knowledge,微服务化后,,测试数据准备的环境依赖性,测试数据的痛点On-the-fly测试数据准备的时间消耗,22,测试数据准备,1.0,时代,-,基于,Java,实现的,Test,Data,Utility,测试数据准备1.0时代-基于Java实现的Test Da,23,测试数据准备,2.0,时代,-,基千,Builder,Pattern,的实现,测试数据准备2.0时代-基千Builder Patter,24,测试数据准备,3.0,时代,Test,Data,Service,Test,Data,Service,的雏形,Use,OOB/GDS,test,data,Web,Service,(5(67IXO),Test,Data,Preparation,Tool,6VWHP,8QGHU,7HVW,(687),Test,Date,Adapter,Encapsulated utiliites,which,call,API,or directly DB,access,WR,SUHSDUH,WHVW,GDWD,2XW-RI-ER,7HVW,DWD,(*ROGHQ,DWD,6HW),测试数据准备3.0时代 Test Data Servic,25,测试数据准备,3.0,时代,Test,Data,Service,Test,Data,Service,的雏形,测试数据准备3.0时代 Test Data Servic,26,引入内部数据库实现更多高级的功能,Web,Service,(5(67IXO),Test,Data,Preparation,Tool,6VWHP,8QGHU,7HVW,(687),Test,Date,Adapter,Encapsulated,utiliites,which call,API,or directly,DB,access,WR,SUHSDUH,WHVW,GDWD,Test,Data,Core,Service,Offering,data,Meta,data,management,Recipe data,management,Test,Data,Meta,DB,Recipe,Definition,Meta,data for business objects Out-of-box test data,测试数据准备,3.0,时代,Test,Data,Service,引入内部数据库实现更多高级的功能Web Service,27,测试数据准备,3.0,时代,Test,Data,Service,Test,Data Service,UI,测试数据准备3.0时代 Test Data Servic,28,测试数据准备,3.0,时代,Test,Data,Service,Test,Data Service,UI,测试数据准备3.0时代 Test Data Servic,29,DevOps,下的测试报告平台建设与创新,DevOps下的测试报告平台建设与创新,30,Test,Report,Service,GD,的,BIF,试,EC,q,GUI,/ideo-based,-est,Report for PM PO,q,StorA,B