{"id":18376974,"url":"https://github.com/bbc/spassky","last_synced_at":"2025-07-13T17:08:13.972Z","repository":{"id":56896563,"uuid":"2155816","full_name":"bbc/spassky","owner":"bbc","description":"Distributed web testing tool","archived":false,"fork":false,"pushed_at":"2011-10-20T22:04:33.000Z","size":339,"stargazers_count":25,"open_issues_count":1,"forks_count":1,"subscribers_count":58,"default_branch":"master","last_synced_at":"2025-05-21T19:50:30.983Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/BBC/spassky","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bbc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-08-04T17:17:40.000Z","updated_at":"2019-04-16T17:43:07.000Z","dependencies_parsed_at":"2022-08-21T01:20:35.195Z","dependency_job_id":null,"html_url":"https://github.com/bbc/spassky","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/bbc/spassky","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbc%2Fspassky","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbc%2Fspassky/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbc%2Fspassky/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbc%2Fspassky/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bbc","download_url":"https://codeload.github.com/bbc/spassky/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbc%2Fspassky/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261274144,"owners_count":23133871,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T00:25:44.874Z","updated_at":"2025-07-13T17:08:13.943Z","avatar_url":"https://github.com/bbc.png","language":"JavaScript","readme":"Spassky\n=======\nSpassky is a test framework that allows us to automate the process of running JavaScript Unit tests on various browsers and devices.\nIt currently supports running tests in QUnit, but in theory, will support any JavaScript framework that the browser supports.\n\nSpassky was a protagonist in the greatest Chess match of last century - which being played by an American and a Soviet Russian, was a Cold War metaphor. Spassky eventually resigned and Fischer won the championship.\n\nArchitecture\n------------\n```\n                   +-----+\n                   | You |\n                   +--+--+\n                      |\n                      |\n                      v\n +------------------------------------------+\n |         Spassky Central Server           |\n +------------------------------------------+\n           |           |          |\n           |           |          |\n           v           v          v\n       +-------+   +-------+   +-----+\n       |iPhone3|   |iPhone4|   |Nokia|\n       |-------|   |-------|   |-----|\n       |       |   |       |   | +++ |\n       |       |   |       |   | +++ |\n       |   +   |   |   +   |   | +++ |\n       +-------+   +-------+   +-----+\n```\n\nDevelopers push JS unit tests to the Spassky server through a command line interface.\nMultiple devices connected to the central Spassky server will poll the server for a suite of tests.\nThe browser will be redirected to the test page, run the tests, and then are redirected to the idle loop.\n\nInstallation\n------------\n\n```\ngem install spassky\n```\n\n![Spassky](https://github.com/BBC/spassky/raw/master/spassky.jpg)\n\n\nUsage\n-----\n\nStart the server:\n\n```\nspassky server --port 9191\n```\n\nConnect test devices by browsing to http://localhost:9191/device/connect on the device. The device will stay in an idle meta refresh loop until it receives a test to run.\n\nCheck what devices are connected to the server:\n\n```\nspassky devices --server http://localhost:9191\n```\n\nRun a single html file (the second parameter is the test name):\n\n```\nspassky run --pattern html_test.html --test html_test.html --server http://localhost:9191\n```\n\nRun a test with colour:\n\n```\nspassky run --pattern html_test.html --test html_test.html --server http://localhost:9191 --colour\n```\n\nRun a directory that contains a test\n\n```\nspassky run --pattern test_directory --test html_test.html --server http://localhost:9191\n```\n\nWhy?\n----\nWe need to run automated tests on a wide range of web-enabled devices with very mixed capabilities. Some of them have JavaScript, but in many cases it's not standard and buggy. That means web testing tools targeted at desktop browsers don't tend to work very well, if at all. Spassky uses legacy techniques and as little client-side JavaScript as possible to ensure we can run tests on as many devices as possible.\n\nHow it works\n------------\nPhysical devices act as test agents, connected permanently to a central server using meta refresh tags. Using a command-line utility, developers execute tests against those browsers by posting to the central server. The tests themselves are plain HTML pages, that are expected to call an assert URL (e.g. by embedding an image) within a time frame.\n\nTest structure\n--------------\nTests can be either a single html file, or a directory containing multiple files.\n\nIf spassky is given a directory, it will pass all files in that directory to that server. Any other files in the test directory can be linked to from the html file relatively.\n\n### An example test directory:\n```\ntest_name\n |-scripts/main.js\n |-css/main.css\n |-test.html\n```\n\nSome features that would be nice to have\n----------------------------------------\n- Assertions on network activity (e.g. for caching tests)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbc%2Fspassky","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbbc%2Fspassky","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbc%2Fspassky/lists"}