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

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)論
主站蜘蛛池模板: 四虎永久在线观看 | 91亚洲精品一区二区福利 | 亚洲午夜久久久久国产 | 激情综合在线观看 | 久国产精品久久精品国产四虎 | 亚洲精品一区国产二区 | 四虎最新网址入口 | 女人洗澡一级毛片一级毛片 | 国产精品国产高清国产专区 | 五月天婷婷缴情五月免费观看 | 日韩不卡视频在线观看 | 亚洲一区二区免费视频 | 国产午夜视频在线观看第四页 | 日本爱爱视频 | 国产性精品 | 四虎新地址4hu 你懂的 | 日本不卡在线一区二区三区视频 | 日韩欧美视频在线播放 | 国产精品久久久久亚洲 | 免费一级毛片麻豆精品 | 久久精品亚洲热综合一本奇米 | 国产片网址 | 欧美一级毛片在线一看 | 91精品国产福利在线观看性色 | 中文字幕波多野不卡一区 | 久久最新免费视频 | 精品一区二区三区的国产在线观看 | 99欧美精品 | 国产亚洲精品久久综合影院 | 中国第一毛片 | 国产99视频精品草莓免视看 | 日日舔夜夜摸 | 亚洲精品久久久久久久久久ty | 亚洲精品一区二区在线播放 | 久久久久久亚洲精品不卡 | 亚洲欧洲一区二区三区久久 | 国产视频第二页 | 精品国产一区二区三区不卡在线 | 日韩狠狠操 | 黄 色 三 级 网站 | 色综合久久中文色婷婷 |