Test Swarm of the use of JavaScript for integration testing [infoq]

Test Swarm of the use of JavaScript for integration testing

Dionysios G. Synodinos translator author Zhang Published in at 12:09 on April 1, 2009

. NET,
Continuous Integration

jQuery JavaScript Library Founder John Resig released Test Swarm , The platform for distributed client-side JavaScript continuous integration testing. JavaScript because of the traditional test environment (not expansion) are deeply disappointed, John's new project (currently in alpha version or private) aimed at a large number of developers and communities to provide a test of the system browser.

As John mentioned, In a variety of browser jQuery very difficult test :

We strive to jQuery at all major projects to support the current version of the browser, the latest release and the upcoming release of a daily build version / beta version (in accordance with our customers to upgrade your browser to support the frequency of these standards a number of balance - Safari and Opera users to upgrade a very high frequency).

At time of publication of this article contains a total of 12 browser.

  • Internet Explorer 6,7,8. (Not including 8 7 mode)
  • Firefox 2,3 and a daily build version of
  • Safari 3.2,4
  • Opera 9.6,10
  • Chrome 1,2

Of course, this is only on Windows platform, and does not include the OS X and Linux. JQuery project for us to take a sensible strategy, usually only on a test platform, but under ideal circumstances required test on all platforms in Firefox, Safari and Opera (all three are cross-platform browser). Finally the results are presented before and after every time we have to separate at 12 browser 10 running on an independent test suite. Cross-browser JavaScript is not enough to test scalability.

If the test required to interact with users, it is even for any large-scale use of jQuery's Web applications JavaScript is a dreadful thing.

Some test suite (such as Yahoo UI, jQuery UI, and Selenium) can automate user interaction (like you can write "click the button" This kind of test). In most cases this will satisfy our requirements, but all these only the actual user interaction are a simulation. Nothing can make things run a number of easy to reproduce by hand (and verifiable) mentioned in the same breath test.

This is the biggest scalability problem. With automated test suite you want to run the test multiplied by the number of hand at 12 months to run a browser test 100 is a fairy tale. Must have a better way, because it is clear: cross-browser's JavaScript is not enough to test scalability.

As Selenium Grid Such a solution There is some limit :

  • As far as I know, Selenium Grid required to run tests using Selenium. Which there is no mainstream JavaScript library using Selenium (not a small price to do so).
  • It can not test the non-desktop machine. Each server must be running a background process to deal with many tasks, such mobile devices on the point of death.
  • Unknown it can not test the browser. Browser are required for each special Selenium callback code to allow the browser to load, so Unknown browser (Such as IE 8, Opera 10, Firefox Nightly and Chrome) may not be able to run.
  • Above all: Selenium Grid with large machines require you to run tests, this is not very feasible, especially in the development of distributed under open source, especially JavaScript. Therefore, we need more effective solutions.

John proposed solutions Test Swarm of JavaScript-based client, the client will be continuously connected to the central server to run the test request. Server test suite to collect and send it to their clients on:

The following is my idea of the work of the Test Swarm by: open-source JavaScript library will be submitted to the test suite on a central server, while users will also be involved. Library users at the necessary day-to-day work of two additional browser window open to support our work, so that they feel are involved in the project (in fact, is one such!).

Libraries can also be sent to the user manual test. The arrival of a new manual test will be notified when the user (through the voice prompts?), So that they can be quickly implemented.

Assist users of these are not free: we can take part in the most positive statistics on users, and then carried out several awards before (T-shirt, cup, book, etc.).

InfoQ to contact to learn more about John Resig related information.

InfoQ: Test Swarm protocol based on what?

MIT-based protocol (server-side using PHP and MySQL, client are some simple JavaScript).

InfoQ: In addition to outside the framework of the owner, do you think it is what the value of other organizations?

I think that other organizations and vendors to benefit. The following is my idea of the growth plan:

  • First of all, open to the mainstream JavaScript library (they had better set up a test suite and test system).
  • Next open the JavaScript to the other open source projects.
  • Then open to other organizations, as long as these organizations allow anonymous users to run their tests on the line.

Of course, through these steps, any organization can easily download server software and run their own swarm examples - the need for a major test of the Test Swarm server.

In the first statement, John also referred to Test Swarm of the "corporate" version of :

Test Swarm of the "corporate" version has aroused the interest of a lot of people. What is yet to plan (except in the form of open-source release of the software), I'd want to leave space for future expansion (perhaps the user manual will get some compensation test - the test is like JavaScript as Mechanical Turk -- - I do not know, but its growth is determined by a lot of space).

If interested can Test Swarm Obtained from the alpha version of its .

Also available through the on InfoQ JavaScript , jQuery , Rich Internet applications And Continuous Integration Channel for more information.

See the original English text of: Crowdsourcing JavaScript Integration Testing with Test Swarm

分类:Development 时间:2009-06-06 人气:935
blog comments powered by Disqus


  • Continuous Integration Summary 2010-08-16

    First, what is continuous integration (Continuous Integration)? This term has been in the field of software development lasted N years, a relatively simple definition as follows: Continuous Integration (CI) is a practice that allows teams to receive

  • Continuous integration (transfer) 2010-04-12

    Continuous Integration Martin Fowler & Matthew Foemmel the transparent translation Martin Fowler Chief Scientist, ThoughtWorks Language Translator: January 23, 2002, we are honored to organize the Internet in exchange UMLCHINA listened to Mr. Martin

  • Continuous Integration essence of the theory (reproduced Matt) 2010-04-07

    Continuous Integration essence of the theory (reproduced) is a continuous integration principle of program development, which requires each member of the development team integrate their work frequently results, this frequency is usually at least onc

  • Continuous integration program 2010-09-18

    Bigger and bigger projects, testing has become a burden, a full regression test the whole system had to spend more than 1000 Man-day, if this do not make use automated testing, then the next development is simply a nightmare. Therefore, continuous in

  • Continuous Integration brief summary 2008-09-09

    A theoretical articles: Continuous integration period as short as possible to encourage the project team to submit the code, while ensuring that every check in will not damage our building through. It is built with daily difference is that the code s

  • Continuous Integration - the cornerstone of the second part of agile development 2010-05-10

    Reprinted from Scrum Chinese network http://www.scrumcn.com/agiledev/html/?183.html In the continuous integration - the cornerstone of agile development we introduced the first part of the concept of continuous integration and value, this section we

  • Continuous Integration - a cornerstone of agile development Part II 2010-05-10

    Reprinted from the Chinese network http://www.scrumcn.com/agiledev/html/?183.html Scrum In the continuous integration - the cornerstone of agile development we introduced the first part of the concept of continuous integration and value, we have to i

  • Continuous integration, to be or not to be 2009-10-21

    I have a post in the "continuous integration tool of choice", there are many continuous integration keep abreast of the discussion it really that useful or helpful in what circumstances the problem. Felt with this, in turn with this article. Con

  • Java web projects unit and integration testing 2009-04-07

    Writing a few years ago, and for colleagues to consider to find out easily posted on here, the article a bit long, put in the attachment The importance of unit testing has long been popular, test-driven development with the last two years the promoti

  • Unit testing. Integration testing and system testing of the basic concepts 2010-06-24

    Unit testing is focused on achieving with source code for each unit test a program to check the correctness of various program modules to achieve the required functionality. Integration testing the modules have been tested assembled, mainly associate

iOS 开发

Android 开发

Python 开发



PHP 开发

Ruby 开发






Javascript 开发

.NET 开发



Copyright (C) codeweblog.com, All Rights Reserved.

CodeWeblog.com 版权所有 闽ICP备15018612号

processed in 0.312 (s). 12 q(s)