Skip to Content
JAVASCRIPT網頁應用程式設計
book

JAVASCRIPT網頁應用程式設計

by Alex MacCaw
January 2013
Intermediate to advanced
332 pages
5h 23m
Chinese
GoTop Information, Inc.
Content preview from JAVASCRIPT網頁應用程式設計
測試與除錯
|
149
分散式測試(Distributed Testing
另外還有一種進行跨瀏覽器測試的做法,就是將測試工作委派給一群專門負責測試的瀏
覽器。這也正是 TestSwarm
http://swarm.jquery.org
)所採取的做法:
TestSwarm
的主要目標,是把執行
JavaScript
測試組合(
test suite
)這項複
雜、費時的流程,交由許多不同的瀏覽器來進行,希望能藉此大幅簡化
測試流程。為了達到前述目標,
JavaScript
專案在建立持續整合工作流程
continuous integration workflow
)時,所需要用到的一切工具,
TestSwarm
都會提供。
TestSwarm 的做法並非透過外掛程式或擴充模組來整合瀏覽器的底層 API,它採取截然
不同的手法:讓瀏覽器連到 TestSwarm 端點(endpoint),然後自動執行 TestSwarm
送給它們的所有測試程式。這些瀏覽器可以部署在任何機器或作業系統上—新增一組測
試專用瀏覽器所需的工作,就只是讓它連到 TestSwarm 端點而已。
這種簡單的做法,大幅降低維護持續整合伺服器的困難度。僅需確保一定數量的瀏覽器
有連到 TestSwarm 端點即可。如果網站擁有為數眾多的社群成員,就非常適合採取這樣
的測試方式,而且取得的測試結果,應該也能非常接近真實情況,如圖 9-6 所示。
9-6 TestSwarm 會回傳測試結果,並讓瀏覽器以表格形式呈現整個測試組合的測試情形
122
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

初めてのJavaScript 第3版 ―ES2015以降の最新ウェブ開発

初めてのJavaScript 第3版 ―ES2015以降の最新ウェブ開発

Ethan Brown, 武舎 広幸, 武舎 るみ
PHP编程:第4版

PHP编程:第4版

Kevin Tatroe, Peter MacIntyre
Strange Code

Strange Code

Ronald T. Kneusel
Perfecting Your Thinking Skills

Perfecting Your Thinking Skills

MIT Sloan Management Review

Publisher Resources

ISBN: 9789862766811