您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 项目/工程管理 > 前端JS持续集成及自动化测试方案
前端持续集成及自动化测试方案团结进取承上启下激情创新产品研发部:黄勇我们为什么要做前端自动化测试?为什么两个阶段第一阶段:FastUI单元测试+持续集成第二阶段:Web自动化测试第一阶段方案Qunit+QUnitAdapter+JsTestDriver+BambooQunit为什么是Qunit?Qunit:Jquery团队开发Jquery框架测试框架更符合JS用法的API良好的界面支持异步测试个人感觉使用何种单元测试框架不是很重要!QunitAdapter+JsTestDriver(1)QunitAdapter+JsTestDriver(2)Thegoalofthejs-test-driveristobethetestrunnerforJavaScripttesting.ItisnotourgoaltobetheassertionframeworkfortheJavaScripttesting,insteadwehopethattheopen-sourcecommunitywillintegrateawidevarietyofassertionframeworkaspluginstojs-test-driver.QunitAdapter+JsTestDriver(3)EclipsePlugin:MavenPlugin:JsTestDriverCoverageThegoalofthejs-test-driveristobethetestrunnerforJavaScripttesting.ItisnotourgoaltobetheassertionframeworkfortheJavaScripttesting,insteadwehopethattheopen-sourcecommunitywillintegrateawidevarietyofassertionframeworkaspluginstojs-test-driver.Bamboo1.CI服务器:支持Bamboo、Jenkins(Hundon)2.主要功能:a.据触发策略自动从配置管理服务器(SVN)下载最新代码b.通过自动执行脚本(支持maven、ant、bat等)进行构建c.通知策略注意事项:1.QunitAdapter有QunitAdapter.js的window.equals方法更改为window.equal或复制一份window.equals命名为window.equal。2.Bamboo如果部署在Windows服务器上面,最好不用服务方式启动。搭建持续集成环境时:编写单元测试用例时:1.测试用例代码通过独立源码的文件夹归类放置。源码目录:src测试用例目录:src-test例子演示第二阶段思路SahivsSelenium功能对比ThoughSahiisaimedatnon-programmertestersandSeleniumatprogrammersSahivs.Selenium:简单演示Sahi例子演示
本文标题:前端JS持续集成及自动化测试方案
链接地址:https://www.777doc.com/doc-6119613 .html