前端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例子演示

1 / 15
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功