JavaScript Integrated Testing Tool Test Swarm released

Source: Internet
Author: User
Tags php and mysql selenium grid

John Resig, creator of the jQuery JavaScript library, released the Test Swarm platform for Distributed continuous integration testing of client JavaScript. With deep disappointment that traditional JavaScript testing environments cannot be expanded), John's new project is still a private alpha version. It aims to provide a system for many developers and communities to test browsers.

As John said, it is very difficult to test jQuery in a variety of browsers:

We strive to support the current version, the latest version, and the upcoming daily build/beta version of all mainstream browsers in the jQuery project. We have implemented these support standards based on the frequency of browser upgrade. balance-Safari and Opera users are frequently upgraded ).

This article contains 12 browsers.

◆ Internet Explorer 6, 7, and 8. Excluding the 7 mode in 8)

◆ Firefox 2, 3 and daily build

◆ Safari 3.2, 4

◆ Opera 9.6, 10

◆ Chrome 1 and 2

Of course, this is only for Windows platforms and does not include OS X and Linux. We have adopted a wise strategy for jQuery projects, and usually only tests on one platform, but ideally, You need to test Firefox, Safari, and Opera on all platforms as cross-platform browsers ). The final result is that 10 independent test suites will be run on 12 independent browsers before and after each submission. The scalability of cross-browser JavaScript testing is not good yet.

If the test needs to interact with users, this is terrible for jQuery and even any Web applications that use a large number of JavaScript.

Some Test suites such as Yahoo UI, jQuery UI, and Selenium can automate user interaction. You can compile a test similar to "click a button ). In most cases, this meets our requirements, but all these are just a simulation of actual user interaction. Nothing can be compared to manually running a test that is easy to reproduce and verifiable.

This is the biggest scalability problem. By multiplying the number of tests you want to run with an automated test suite, it is impossible to manually run 100 tests in 12 browsers. There must be a better way, because it is obvious that cross-browser JavaScript testing is not scalable yet.
Solutions like Selenium Grid have several restrictions:

As far as I know, Selenium Grid needs Selenium to run the test. At present, no mainstream JavaScript library uses Selenium to do so at a great cost ).

It cannot test non-desktop machines. Every server must run a backend program to process a large number of tasks, so that mobile devices will not work.

It cannot test unknown browsers. Each browser requires special callback code to let Selenium load the browser, so that unknown browsers such as IE 8, Opera 10, Firefox Nightly and Chrome may not be able to run.

The most important thing is that Selenium Grid requires you to have a large number of machines to run the test, which is not feasible, especially in Distributed Open Source JavaScript development. Therefore, we need more effective solutions.

John's solution, Test Swarm, is based on a JavaScript client that continuously sends connection requests to the central server to run the Test. The server collects Test suites and sends them to their respective clients:

The following is how Test Swarm works: the open-source JavaScript library submits the Test suite to the central server, and users will also participate. Library users need to open two additional browser windows in their daily work to help us work, so they will feel that they are also participating in the project !).

The library can also send manual tests to users. When the new manual test arrives, the user will be notified to pass the sound prompt ?), In this way, they can execute quickly.

The help provided by users is not free of charge: We can count the most active users, and then reward the previous several T-shirts, cups, books, etc ).

Related information

What protocol is Test Swarm based on?

Based on the MIT protocol, the server uses PHP and MySQL, and the client uses some simple JavaScript ).

Except for the Framework owner, what value do you think it has for other organizations?

I think this is of great benefit to other organizations and vendors. The following is my expected growth plan:

First open to the mainstream JavaScript library, they have established a test suite and a test system ).

Next, we will open it to other open-source JavaScript projects.

It is then open to other organizations as long as these organizations allow anonymous users to run their tests.

Of course, through these steps, any organization can easily download server software and run its own swarm instance-without passing the Test of the main Test Swarm server.

In his initial statement, John also mentioned the "pull ate" version of Test Swarm:

Test Swarm's "pull ate" version has aroused a lot of interest. At present, there is no plan to release the software in the form of open source ), I would like to leave some space for future extensions. Maybe users will get some compensation for manual tests-just like Mechanical Turk testing JavaScript-I don't know, but it is determined that the growth space is large ).

If you are interested in Test Swarm, you can obtain its alpha version.

  1. Comparison of the performance of JavaScript-parsed Json strings in various browsers
  2. Javascript lexical scopes that must be taken into account by technicians
  3. Topic: JavaScript-based Web Client development

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.