Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jquery/testswarm

Distributed continuous integration testing for JavaScript.
https://github.com/jquery/testswarm

Last synced: 3 months ago
JSON representation

Distributed continuous integration testing for JavaScript.

Awesome Lists containing this project

README

        

[![Build Status](https://github.com/jquery/testswarm/actions/workflows/CI.yaml/badge.svg?event=push)](https://github.com/jquery/testswarm/actions/workflows/CI.yaml)
[![Tested with QUnit](https://img.shields.io/badge/tested_with-qunit-9c3493.svg)](https://qunitjs.com/)

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](https://swarm.jquery.org/).

## Project Status

TestSwarm is used in projects of the jQuery Foundation, but it isn't under active development anymore. Although critical issues may be patched in the future, most open issues will remain unaddressed.

Within the jQuery Foundation, we're experimenting with alternative projects, to eventually shut down our own instance of TestSwarm:

- [airtap](https://github.com/airtap/airtap)
- [Karma](https://karma-runner.github.io/)
- [Intern](https://theintern.io/)
- [browserstack-runner](https://github.com/browserstack/browserstack-runner/)

We recommend reviewing those and other alternatives.

## Quick start

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

## Bug tracker

Found a bug? Please report it using our [issue
tracker](https://github.com/jquery/testswarm/issues)!

## 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

1. Create an empty MySQL database and create a user with read and write access to it.

1. 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](https://github.com/jquery/testswarm/wiki/Settings) for more information.

1. *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`

1. 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`.

1. 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`.

1. Install dependencies
`composer install --no-dev`

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

1. Create an entry in your crontab for action=cleanup. This performs various
cleaning duties such as making timed-out runs available again.

`* * * * * curl -s https://swarm.example.org/api.php?action=cleanup > /dev/null`

1. [Create a project](./scripts/README.md#create-projects) and [submit jobs](./scripts/addjob/README.md).

## Get involved

You're welcome to use the GitHub [issue tracker](https://github.com/jquery/testswarm/issues)
to start discussions.

Some of us are also on Gitter at [jquery/dev](https://gitter.im/jquery/dev).

## Documentation

* [TestSwarm wiki](https://github.com/jquery/testswarm/wiki)
* [Submit jobs README](./scripts/addjob/README.md)

## Copyright and license

See [LICENSE.txt](./LICENSE.txt).

## Versioning

TestSwarm uses the Semantic Versioning guidelines as much as possible.

Releases will be numbered in the following format:

`..`

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

For more information on SemVer, please visit .

## History

TestSwarm was originally created by [John Resig](https://johnresig.com/) as a
basic tool to support unit testing of the [jQuery JavaScript
library](https://jquery.com). It later become a [Mozilla Labs](https://labs.mozilla.com/) project,
and has since moved again to become a [jQuery Foundation](https://jquery.org/) project.