亚洲免费在线-亚洲免费在线播放-亚洲免费在线观看-亚洲免费在线观看视频-亚洲免费在线看-亚洲免费在线视频

Discover a powerful and suitable Javascript

系統(tǒng) 3859 0
?

Your browser doesn't support the features required by impress.js, so you are presented with a simplified version of this presentation.

For the best experience please use the latest Chrome , Safari or Firefox browser.

Discover a powerful and suitable

Javascript Automatic Testing Toolkit

by Daniel Yang

Purpose

Find out the best Javascript testing library for us.

QUnit vs Jasmine

  • support in brower & Node.js
  • testing of DOM manipulation
  • TDD or BDD

BDD or TDD

in Jasemine

expect(5).toEqual(5);

expect(5).not.toEqual(5);

in Qunit

strictEqual(5, 5);

notStrictEqual(5, 5);

But we need something more...

  • how to test in different browers
  • how to test with a AMD loader
  • and how to automatic testing

JsTestDriver + Jasmine

This is the Taobao's solutions in used, but it has some bugs which make people get fighting mad.

Pro

  • testing in different browers
  • automatic testing
  • BDD style script

Con

  • asynchronous support is not good, and you shall mock up the data when using AJAX.
  • couldn't support all Jasmine method
  • and it built in Java(not JS)

Is there any libaray
can solve these problems?

My answer is Buster.js

Easy to deploy

use npm to install & manager

npm install -g buster

npm install buster-amd

Browser Testing

Buster.JS can automate browsers, JsTestDriver style.

buster server

Buster.JS also has a static browser runner that runs tests by opening a web page in a browser. This is similar to QUnit, Mocha, etc.

buster static

AJAX Testing

using Sinon.JS to mock out the entire XHR stack in a browser, so we can test AJAX easily.

Asynchronous tests

To tag a test as async, have the test function take one argument, done.

The done argument is a function. Call it to tell Buster.JS that the asynchronous test has finished running.

Test reporters

Buster.JS can create all human-consumable reports(by Terminal, JSON, XML and HTML).

Buster Test Reporters Doc

Buster.JS is still beta, so it has some rough edges.

But I think this solutions will satisfy our needs.

Thanks for your watching!

?

Discover a powerful and suitable Javascript Automatic Testing Toolkit


更多文章、技術(shù)交流、商務(wù)合作、聯(lián)系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號(hào)聯(lián)系: 360901061

您的支持是博主寫作最大的動(dòng)力,如果您喜歡我的文章,感覺我的文章對(duì)您有幫助,請(qǐng)用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點(diǎn)擊下面給點(diǎn)支持吧,站長(zhǎng)非常感激您!手機(jī)微信長(zhǎng)按不能支付解決辦法:請(qǐng)將微信支付二維碼保存到相冊(cè),切換到微信,然后點(diǎn)擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對(duì)您有幫助就好】

您的支持是博主寫作最大的動(dòng)力,如果您喜歡我的文章,感覺我的文章對(duì)您有幫助,請(qǐng)用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長(zhǎng)會(huì)非常 感謝您的哦!!!

發(fā)表我的評(píng)論
最新評(píng)論 總共0條評(píng)論
主站蜘蛛池模板: 99爱在线精品视频网站 | 狠狠干综合 | 97精品国产97久久久久久 | 亚洲综合首页 | 亚洲欧美乱综合图片区小说区 | 国产片一级aaa毛片视频 | 亚洲一级毛片在线观 | 日本高清不卡视频 | www欧美com| 毛片在线观看网站 | 黄色影院网站 | 天天操操操操操 | 久久综合一区 | 日韩美一区二区 | 台湾亚洲精品一区二区tv | 777奇米影视色888成人 | 欧美乱xxxxx强| 一级特级欧美a毛片免费 | 久草色播 | 手机在线看福利 | 天天干天天插天天操 | 国产网红在线观看 | 免费视频爱爱太爽在线观看 | 高清欧美一区二区三区 | 97视频免费播放观看在线视频 | 久久天天躁狠狠躁夜夜2020一 | 中文字幕影院 | 日韩精品亚洲精品485页 | 91视频夜色 | 国产小视频精品 | 一级一毛片 | a一级黄色片 | 日本国产成人精品视频 | 波多野结衣一区二区在线 | 超清中文乱码精品字幕在线观看 | 香焦视频在线观看黄 | 大片毛片女女女女女女女 | 国产真实乱人偷精品 | xxxx免费观看 | 国产不卡在线 | 亚洲一区欧美日韩 |