TestSwarm provides distributed continuous integration testing for JavaScript.
The main instance monitoring jQuery core and related projects runs at swarm.jquery.org.
Clone the repo, git clone git://github.com/jquery/testswarm.git
, or
download the latest
release.
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/.
Found a bug? Please report it using our issue tracker!
To run TestSwarm you will need a web server, a database server and PHP. At the moment TestSwarm only supports Apache and MySQL.
- Apache 2.0+
- PHP 5.2.3+
- MySQL 4.0+
- curl (for the cleanup action; see below)
-
Create a mysql database and a user who can connect and write to it.
-
Initialize the database:
mysql DBNAME -u USER -p < config/testswarm.sql
-
Copy
./config/testswarm-sample.ini
to./testswarm.ini
and change the options to correspond to your MySQL database information. -
Copy
./config/.htaccess-sample
to./.htaccess
. If needed change the RewriteBase to match the contextpath configuration set in the testswarm.ini -
Currently the only supported webserver is Apache (which uses a .htaccess file).
To run testswarm from a non-root directory of Apache, modify the contextpath option in the testswarm.ini to fit for your needs, e.g.contextpath = "/testswarm/"
.
Test if/testswarm/login
loads. If it doesn't, make sure your.htaccess
is actually being read (e.g. by putting some jibberish into the.htaccess
file, which should result in a HTTP 500 error). If it doesn't get loaded, make sureAllowOverride
is set to "All
" (at least not to "None
") in your Apache configuration. -
Make sure [storage][cacheDir] is set to an existing writable directory that is not readable from the web. Either set it to a custom path outside the web root in testswarm.ini, or use the default 'cache' directory protected with .htaccess and
chmod 777 cache
. -
Copy
./config/robots.txt
to./robots.txt
(or add similar rules to your mainrobots.txt
file if TestSwarm is not in the root directory). -
Create an entry to your crontab for action=cleanup. This performs various cleaning duties such as making timed-out runs available again for testing.
* * * * * curl -s http://example.org/api.php?action=cleanup > /dev/null
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
See MIT-LICENSE.
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.