1、DevOps测试基础架构与工具链建设技术创新,变革未来1DevOps下的测试执行环境的最佳实践2DevOps下的统一测试服务的最佳实践3测试数据服务的设计与最佳实践4DevOps下的测试报告平台建设与创新53型全球化电商网站的测试基础架构设计DevOps下的测试执行环境与下的测试执行环境与 统一测试服务的最统一测试服务的最佳佳实践实践测试执行环境有哪些痛点? 对使用者而言,测试执行环境的“透明性” 对维护者而言,测试执行环境的“易维护性” 对 于 大 量 测 试 用 例 的 执 行 而 言 , 执 行 能 力 的“ 可 扩 展 性 ” Mobile 移动终端的多样性与碎片化 大型全球化电商网站
2、对测试执行平台的挑战什么是测试执行环境?为什么需要测试执行环境?什么是测试执行环境?为什么需要测试执行环境?大型全球化电商网站对测试执行平台的挑战Global Site CoverageBrowser Coverage测试执行时间*Mobile 测试平台的挑战测试平台的挑战Android 版本碎片化版本碎片化Device Coverage测试执行时间测试执行时间基于基于Jenkins触发测试执行触发测试执行Test Case/RFDO 7 H V W (HFXWLRQ (QYLURQPHQW6VWHP 8QGHU 7 H V W (687)Test Case DesignBusiness Re
3、quirementFeature RequirementTest Requirement7 H V W &DVH5HSRVLWRULocally develop/debug/runJenkinsPull BuildRun5HPRWH 7 H V W (HFXWLRQ (QYLURQPHQW (7HVW %HG)Push基于基于Test Runner / Test Execution SystemTest Case/RFDO 7 HV W (HFXWLRQ (QYLURQPHQW6VWHP 8QGHU 7 HV W (687)Test Case DesignBusiness Requiremen
4、tFeature RequirementTest RequirementTest Requests7 HV W &DVH5HSRVLWRULocally develop/debug/runTest RunnerTest Execution SystemJenkinsPull BuildRun5HPRWH 7 HV W (HFXWLRQ (QYLURQPHQW (7HVW %HG)Push基于基于Selenium Grid提高测试井行执行能力提高测试井行执行能力Test Case6VWHP 8QGHU 7HVW (687)Test Case DesignBusiness RequirementF
5、eature RequirementTest RequirementTest Requests7HVW &DVH5HSRVLWRULocally develop/debug/run/RFDO 7HVW (HFXWLRQ (QYLURQPHQWTest RunnerTest Execution SystemJenkinsPull BuildRun6HOHQLXP +XEPush6HOHQLXP1RGH 16HOHQLXP1RGH 26HOHQLXP1RGH Q Test RequestsRundispatchRundispatchdispatchSelenium Grid简介简介Selenium
6、 Grid简介简介DEMO: 搭建你自己的搭建你自己的Selenium Gridjava -jar selenium-server-standalone-3.11.0.jar -role hubjava -jar selenium-server-standalone-3.11.0.jar -role node -hub http:/localhost:4444/grid/register基于基于Jenkins Cluster提高测试井行执行能力提高测试井行执行能力Jenkins Slave nJenkins Slave 2Test Case6VWHP 8QGHU 7HVW (687)Test
7、Case DesignBusiness RequirementFeature RequirementTest RequirementTest Requests7HVW &DVH5HSRVLWRULocally develop/debug/run/RFDO 7HVW (HFXWLRQ (QYLURQPHQWTest RunnerTest Execution SystemJenkins MasterPull BuildRun6HOHQLXP +XEPush6HOHQLXP1RGH 16HOHQLXP1RGH 26HOHQLXP1RGH Q Test RequestsRundispatchRundi
8、spatchdispatchJenkins Slave 1dispatch基于测试负载,用基于测试负载,用Docker实现实现Selenium Grid的动态扩展与收缩的动态扩展与收缩Jenkins Slave nJenkins Slave 2Test Case6VWHP 8QGHU 7 H V W (687)Test Case DesignBusiness RequirementFeature RequirementTest RequirementTest Requests7 H V W &DVH5HSRVLWRULocally develop/debug/run/RFDO 7 H V W
9、(HFXWLRQ (QYLURQPHQWTest RunnerTest Execution SystemJenkins MasterPull BuildRun6HOHQLXP +XEPush6HOHQLXP1RGH 16HOHQLXP1RGH 26HOHQLXP1RGH Q Test RequestsRundispatchRundispatchdispatchJenkins Slave 1dispatchDispatch and auto scale servicedispatchDynamicallty add/delete selenium node in Grid accoriding
10、to test load6HOHQLXP 1RGHVE RFNHU6HOHQLXP 1RGHVE RFNHURunMobile 测试执行私有云设计与实现测试执行私有云设计与实现Mobile 测试执行私有云设计与实现测试执行私有云设计与实现Mobile私有云测试平台私有云测试平台Mobile私有云测试平台私有云测试平台Mobile私有云测试平台私有云测试平台Mobile私有云测试平台私有云测试平台测试数据服务的设计与最佳实测试数据服务的设计与最佳实践践测试数据的痛测试数据的痛点点On-the-fly测试数据准备的时间消耗Out-of-box测试数据的脏数据测试数据本身组合的复杂性和多样性性能测试
11、数据准备的时间消耗微服务化后,Cross domain的数据准备缺乏Knowledge微服务化后,测试数据准备的环境依赖性测试数据准备测试数据准备1.0时代时代 - 基于基于Java实现的实现的Test Data Utility测试数据准备测试数据准备2.0时代时代 - 基千基千Builder Pattern的实现的实现测试数据准备测试数据准备3.0时代时代 Test Data ServiceTest Data Service的雏形的雏形Use OOB/GDS test data Web Service(5(67IXO)Test Data Preparation Tool6VWHP 8QGHU
12、 7HVW (687)Test Date AdapterEncapsulated utiliites which call API or directly DB access W R SUHSDUH W H V W G D W D2XW-RI-ER 7HVW DWD (*ROGHQ DWD 6HW)测试数据准备测试数据准备3.0时代时代 Test Data Service Test Data Service的雏形的雏形引入内部数据库实现更多高级的功能Web Service(5(67IXO) Test Data Preparation Tool6VWHP 8QGHU 7 H V W (687)T
13、est Date AdapterEncapsulated utiliites which call API or directly DB access W R SUHSDUH W H V W G D W DTest Data Core ServiceOffering dataMeta data management Recipe data managementTest Data Meta DBRecipe DefinitionMeta data for business objects Out-of-box test data测试数据准备测试数据准备3.0时代时代 Test Data Serv
14、ice测试数据准备测试数据准备3.0时代时代 Test Data Service Test Data Service UI测试数据准备测试数据准备3.0时代时代 Test Data Service Test Data Service UIDevOps下的测试报告平台建设与创新下的测试报告平台建设与创新Test Report ServiceGD的的 B I F 试试 E Cq GUI /ideo-based -est Report for PM POq StorA Board -est Report for PM POq Multi-Site StorA Board Comparison -es
15、t Report for LQAq Full -race -est Report for DE/ QEq -est SummarA Report for management teamq -est -rend Report for management teamStory Board Test eportMulti-Site Story oard Compari-on Te-t ReportStory Board Test Report Demofile:/Users/biru/TeamWork/lqa_login_logout/mauireport.html典型的典型的Test Report
16、 Platform架构架构Test Report ServiceGUI Story Board Test ReportFull Trace Test ReportTest Summary ReportRequirement Management System (JIRA/DOORS/ALM)7HVW (HFXWLRQ5HSRUW 0HWD DWDGUI Video-based Test Report6HOHQLXP-HQNLQV6SOXQN引入引入Test Analysis Service提高提高Defect分类效率分类效率Test Report Trace Analysis ServiceH
17、IHFW $ Q D O V L V 0DFKLQH /HDUQLQJ.QRZOHGJH DWDEDVHDefect Management System(JIRA/$/0)Test Report ServiceGUI Story Board Test ReportFull Trace Test ReportTest Summary ReportRequirement Management System (JIRA/DOORS/ALM)7 H V W (HFXWLRQ5HSRUW 0HWD DWDGUI Video-based Test Report6HOHQLXP-HQNLQVDefect A
18、utomatic Classificate and SubmitFailed Test CasesDefect close then send root cause back to Analysis Service, it will be used as machine learning sample setMulti-Site Story Board Comparison Report Generator ServiceMulti-Site Story Board Comparison ReportLQA submit translation and layer out defectTest
19、 Report Statistics ServiceTest Trend Report6SOXQN大型全球化电商网站的测试基础架构设大型全球化电商网站的测试基础架构设计计Test CasesTest Request from CI/CDGlobal Registry ServiceUnified Flow FrameworkSystem Under Test (SUT)Test Bed EnvironmentUnified Mock ServiceLaunch test executionTest executionBuild onCall TDS to prepare(create/ search/update) test dataProvisionTest Bed ServiceTest Report ServiceBuild onTest Execution Report Meta DataTest on SUTProvide Mock for dependencyPrepare test data on SUTTest Data ServiceTest Execution ServiceEngineering Productivity Tools Store大型全球化电商网站的整体测试基础架构设大型全球化电商网站的整体测试基础架构设计计