Testswarm
Distributed continuous integration testing for JavaScript.
Install / Use
/learn @jquery-archive/TestswarmREADME
TestSwarm
TestSwarm provides distributed continuous integration testing for JavaScript.
⚠️ Project status TestSwarm remains used by jQuery Foundation projects such as jQuery and jQuery UI, but is no longer under active development. Critical issues may be patched, but new issues will not be addressed.
We recommend reviewing these alternatives: QTap, Karma, Testem, grunt-contrib-qunit, browserstack-runner, Airtap, Intern, Web Test Runner.
Documentation
- About TestSwarm (Philosophy, Architecture, How is it different?)
- API Guide
- Automation Guide
- How to: Submit jobs
- Project history (Screenshots)
Further reading:
- JavaScript Testing Does Not Scale, John Resig, 2009.
- TestSwarm Alpha Open!, John Resig, 2009.
- JSConf talk: TestSwarm, John Resig, 2009.
- Video: TestSwarm Walkthrough, John Resig, 2009.
Quick start
Clone the repo
git clone https://github.com/jquery/testswarm.git
Installation
Browser compatibility
- Chrome 58+ (2017)
- Edge 15+ (2017, both legacy MSEdge and Chromium-based)
- Firefox 45+ (2016)
- Internet Explorer 9+
- Opera 36+ (2016)
- Safari 9+ (2015)
- Android 4.3+ (2013)
- iOS Mobile Safari 7+ (2013)
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.10+
- PHP 5.4+ (or PHP-FPM for NGINX)
- MySQL 5.6+
- cURL (for the cleanup action; see step 8)
Steps
-
Create an empty MySQL database and create a user with read and write access to it.
-
Copy
config/sample-localSettings.phptoconfig/localSettings.php<br/> Copyconfig/sample-localSettings.jsontoconfig/localSettings.json.<br/> EditlocalSettings.jsonand replace the sample settings with your own.<br/> Refer to the Settings page for more information. -
For Apache:<br/> Copy
config/sample-.htaccessto.htaccess.<br/> To run TestSwarm from a non-root directory, setweb.contextpathinlocalSettings.jsonto the correct path from the web root and update RewriteBase in.htaccess. Verify that.htaccessis working properly by opening a page other than the HomePage (e.g./testswarm/projects) in your browser.<br/>Required Apache configuration:<br/>AllowOverrideis set toAll(or ensureFileInfois included).mod_rewriteinstalled and loaded.
For NGINX:<br/> Copy
config/sample-nginx.confto/etc/nginx/sites-available. <br/>The file name should match your domain e.g. for swarm.example.org:<br/>cp config/sample-nginx.conf /etc/nginx/sites-available/swarm.example.org.conf<br/>Open this conf file in your editor and replace the "example" values with the correct values. <br/>Make sure your install is located at/var/www/testswarm(otherwise update the file to match the correct location).<br/> Now you need to link thesites-availableconfig to thesites-enabledconfig:<br/> (replace the "swarm.example.org" with your own file name):<br/>ln -s /etc/nginx/sites-available/swarm.example.org.conf /etc/nginx/sites-enabled/swarm.example.org.conf<br/> Now make sure that php-fpm is running:/etc/init.d/php-fpm status<br/> if is not running start it:/etc/init.d/php-fpm start -
Copy
config/sample-robots.txttorobots.txt<br/> Or, if TestSwarm is not in the root directory, add similar rules to your rootrobots.txt. -
Set
storage.cacheDirto a writable directory that is not readable from the web. Either set it to a custom path outside the document root, or use the defaultcachedirectory (protected with .htaccess).<br/>Chmod it:chmod 777 cache. -
Install dependencies
composer install --no-dev -
Install the TestSwarm database by running:
php scripts/install.php -
Create an entry in your crontab for action=cleanup. This performs various cleaning duties such as making timed-out runs available again.<br/>
* * * * * curl -s https://swarm.example.org/api.php?action=cleanup > /dev/null
Get involved
You're welcome to use the GitHub issue tracker to start discussions.
Some of us are also on Gitter at jquery/dev.
Copyright and license
See LICENSE.txt.
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 https://semver.org/.
Related Skills
node-connect
345.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
104.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
345.4kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
345.4kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
