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

Discover a powerful and suitable Javascript

系統(tǒng) 4398 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

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

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

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

發(fā)表我的評(píng)論
最新評(píng)論 總共0條評(píng)論
主站蜘蛛池模板: 国产日韩精品视频一区二区三区 | 国产免费一级片 | 亚洲欧美日韩高清专区一区 | 色视频亚洲 | 国产无毛 | 亚洲国产99999在线精品一区 | 亚洲精品福利在线观看 | 欧美一级特黄毛片免费 | 国产精品偷伦视频免费观看的 | 精品欧美一区二区三区在线观看 | 国产一区二区三区免费观看 | 美女操穴视频 | 2022国产男人亚洲欧美天堂 | 国产一区二区免费播放 | 欧美一级毛片免费高清的 | 又粗又硬又大久久久 | 国产日韩欧美91 | 99热久久免费精品首页 | julia中文字幕久久亚洲 | 国产99久久九九精品免费 | 香蕉在线精品亚洲第一区 | 国产精品久久久久影院免费 | 久久日韩| 高清视频 一区二区三区四区 | 天天碰夜夜操 | 久久这里是精品 | 午夜日韩 | 国产在线精品香蕉麻豆 | xxxxxxx泡妞中国 | 国产成人精品亚洲一区 | 日日摸夜夜摸无需播放器 | 在线观看国产一区亚洲bd | 亚洲国产欧洲综合997久久 | 久热免费 | 99热精品在线 | 久草网视频在线观看 | 咪咪爱在线观看 | 青青青青在线成人视99 | 亚洲精品福利一区二区三区 | 欧美理论在线 | 免费欧洲毛片a级视频老妇女 |