Skip to content
This repository

Distributed continuous integration testing for JavaScript.

branch: master

inject: Save a reference to clearTimeout

Follows-up d81e522 which saved a reference to setTimeout.

Fixes #298.
latest commit bd1877cd4e
Timo Tijhof Krinkle authored
Octocat-spinner-32 cache Check filemtime only if the file is readable, prevent errors on first… April 09, 2012
Octocat-spinner-32 config Remove default value for site_url in sql schema August 15, 2013
Octocat-spinner-32 css JobPage: Hide non-functional reset buttons when not logged in January 27, 2014
Octocat-spinner-32 img Bootstrap: Update to v2.2.1, add Responsive module, remove min.css November 28, 2012
Octocat-spinner-32 inc JobPage: Hide non-functional reset buttons when not logged in January 27, 2014
Octocat-spinner-32 js inject: Save a reference to clearTimeout January 27, 2014
Octocat-spinner-32 scripts Fixed various typos in comments December 16, 2013
Octocat-spinner-32 .gitignore gitignore: Remove obsolete ignore for *.pl files January 16, 2014
Octocat-spinner-32 .gitmodules Migrate from Browscap to ua-parser. Fixes #187. November 16, 2012
Octocat-spinner-32 .jshintignore jshintignore: Add inc/libs/ November 20, 2012
Octocat-spinner-32 .jshintrc js: Conform with jQuery JavaScript Style Guide January 15, 2014
Octocat-spinner-32 .travis.yml travis: Add php linting January 16, 2014
Octocat-spinner-32 AUTHORS.txt Add "Reset failed jobs" button. Fixes #222. Closes #235. November 02, 2012
Octocat-spinner-32 CONTRIBUTING.md Docs: Removed IRC channel links in CONTRIBUTING.md December 31, 2013
Octocat-spinner-32 History.md Rename management scripts May 21, 2013
Octocat-spinner-32 MIT-LICENSE.txt LICENSE: Use same whitespace formatting as jquery/jquery.git April 24, 2013
Octocat-spinner-32 README.md readme: Fix broken italic style January 16, 2014
Octocat-spinner-32 api.php Clean up of various documentation comments May 13, 2013
Octocat-spinner-32 index.php Clean up of various documentation comments May 13, 2013
README.md

TestSwarm - Distributed Continuous Integration for JavaScript

TestSwarm provides distributed continuous integration testing for JavaScript.

The main instance monitoring jQuery core and related projects runs at swarm.jquery.org.

Quick start

Clone the repo, git clone --recursive git://github.com/jquery/testswarm.git.

Versioning

TestSwarm uses the Semantic Versioning guidelines as much as possible.

Releases will be numbered in the following format:

<major>.<minor>.<patch>

The -alpha suffix is used to indicate unreleased versions in development.

For more information on SemVer, please visit http://semver.org/.

Bug tracker

Found a bug? Please report it using our issue tracker!

Installation

Environmental compatibility

To run TestSwarm you will need a web server, a database server and PHP. At the moment TestSwarm supports the following, but other configurations may work as well.

  • Apache 2.0+, NGINX 1.2+
  • PHP 5.3.2+ (or PHP-FPM for NGINX)
  • MySQL 4.0+
  • cURL (for the cleanup action; see step 8)

Steps

  1. Set up a MySQL database and create a user with read and write access.

  2. Copy config/sample-localSettings.php to config/localSettings.php
    Copy config/sample-localSettings.json to config/localSettings.json.
    Edit localSettings.json and replace the sample settings with your own.
    Refer to the Settings page for more information.

  3. For Apache:
    Copy config/sample-.htaccess to .htaccess.
    To run TestSwarm from a non-root directory, set web.contextpath in localSettings.json to the correct path from the web root and update RewriteBase in .htaccess. Verify that .htaccess is working properly by opening a page other than the HomePage (e.g. /testswarm/projects) in your browser.
    Required Apache configuration:

    • AllowOverride is set to All (or ensure FileInfo is included).
    • mod_rewrite installed and loaded.

    For NGINX:
    Copy config/sample-nginx.conf to /etc/nginx/sites-available.
    The file name should match your domain e.g. for swarm.example.org:
    cp config/sample-nginx.conf /etc/nginx/sites-available/swarm.example.org.conf
    Open this conf file in your editor and replace the "example" values with the correct values.
    Make sure your install is located at /var/www/testswarm (otherwise update the file to match the correct location).
    Now you need to link the sites-available config to the sites-enabled config:
    (replace the "swarm.example.org" with your own file name):
    ln -s /etc/nginx/sites-available/swarm.example.org.conf /etc/nginx/sites-enabled/swarm.example.org.conf
    Now make sure that php-fpm is running: /etc/init.d/php-fpm status
    if is not running start it: /etc/init.d/php-fpm start

  4. Copy config/sample-robots.txt to robots.txt
    Or, if TestSwarm is not in the root directory, add similar rules to your root robots.txt.

  5. Set storage.cacheDir to a writable directory that is not readable from the web. Either set it to a custom path outside the document root, or use the default cache directory (protected with .htaccess).
    Chmod it: chmod 777 cache.

  6. Install the TestSwarm database by running: php scripts/install.php

  7. Fetch the latest user-agent information: php inc/libs/ua-parser/php/uaparser-cli.php -g
    Note that ua-parser is based on patterns, so you don't need to re-run this after every browser release to be able to detect this, however it is recommmended to periodically run this to stay up to date (once a month should be enough).

  8. Create an entry in your crontab for action=cleanup. This performs various cleaning duties such as making timed-out runs available again.
    * * * * * curl -s http://swarm.example.org/api.php?action=cleanup > /dev/null

  9. Create a project and submit jobs.

Get involved

You're welcome to use the GitHub issue tracker to start discussions.

Or post to the QUnit and Testing forum.

Most of us are also on IRC in the #jquery-dev channel at irc.freenode.net

Planning for TestSwarm and other projects related to testing of javascript applications based around jQuery happens on the jQuery Testing Team wiki

Documentation

Copyright and license

See MIT-LICENSE.txt.

History

TestSwarm was originally created by John Resig as a basic tool to support unit testing of the jQuery JavaScript library. It was later moved to become an official Mozilla Labs and has since moved again to become a jQuery project.

Something went wrong with that request. Please try again.