{"id":20438431,"url":"https://github.com/tinymce/bedrock","last_synced_at":"2025-04-12T22:35:55.147Z","repository":{"id":38182593,"uuid":"69407820","full_name":"tinymce/bedrock","owner":"tinymce","description":"Test runner for browser-based JavaScript tests","archived":false,"fork":false,"pushed_at":"2024-10-22T01:38:10.000Z","size":3022,"stargazers_count":4,"open_issues_count":6,"forks_count":6,"subscribers_count":24,"default_branch":"master","last_synced_at":"2024-10-24T08:28:07.232Z","etag":null,"topics":["testing-tool"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/tinymce.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-09-27T23:45:17.000Z","updated_at":"2024-10-24T04:58:15.000Z","dependencies_parsed_at":"2023-10-03T10:14:55.138Z","dependency_job_id":"c0e83107-02cb-463a-b0e3-8f7e2a58af58","html_url":"https://github.com/tinymce/bedrock","commit_stats":null,"previous_names":["ephox/bedrock"],"tags_count":61,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinymce%2Fbedrock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinymce%2Fbedrock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinymce%2Fbedrock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinymce%2Fbedrock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tinymce","download_url":"https://codeload.github.com/tinymce/bedrock/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248642575,"owners_count":21138351,"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":["testing-tool"],"created_at":"2024-11-15T09:11:01.541Z","updated_at":"2025-04-12T22:35:55.129Z","avatar_url":"https://github.com/tinymce.png","language":"TypeScript","readme":"# Description\n\n`bedrock` is a test runner for JavaScript projects. Its primary use is to test Javascript projects, but it also has a `qunit` wrapper. It can run manually (where the user navigates to the browser themselves), or automatically (where `bedrock` starts the browser and runs the tests automatically). Note, in order to run the tests automatically, the appropriate web-drivers need to be installed and available. For more information on setting up web-drivers, see [here](https://www.npmjs.com/package/selenium-webdriver).\n\n# Installation\n\n`bedrock` is available as an `npm` package. You can install it via the npm package `@ephox/bedrock-server` or from source\n\n## Global Install\n\nA global install will put the bedrock commands (e.g. `bedrock-auto`) automatically on your path.\n\n### Install from npm\n\n`$ npm install -g @ephox/bedrock-server`\n\n### Install from source (start in source directory)\n\n`$ npm install -g .`\n\n## Local Install\n\nA local install will not put the bedrock commands automatically on your path. After installing locally, you can access the commands via:\n\n1. adding `node_modules/.bin` to your path\n2. using `npm run ${command}` from the bedrock source directory\n\n### Install from npm\n\n`npm install @ephox/bedrock-server`.\n\n### Install from source (start in source directory)\n\n`$ npm install .`\n\n# Usage\n\nBedrock has two main modes: test and server. These are available through the commands `bedrock-auto` and `bedrock`.\n\n## Test mode (bedrock-auto)\n\n*Test* mode allows the user to run tests in an automated fashion. Bedrock will spin up the browser itself (assuming the user has the right web-drivers on the path), establish a web-driver connection with this browser and close the browser once the tests have completed. Information on installing web-drivers can be found [here](https://www.npmjs.com/package/selenium-webdriver).\n\nBROWSER: chrome | firefox | safari | MicrosoftEdge | ie | phantomjs\n\ne.g. run automated bedrock tests in chrome against test directory src/test/js/browser\n\n`bedrock-auto --browser chrome --testdir src/test/js/browser`\n\nUse `bedrock-auto --help` to see all arguments possible.\n\n## Server mode (bedrock)\n\n*Server* mode allows the user to host the tests on localhost:{port} where port is the first free port found between 8000 and 20000. It is the most commonly used mode, and therefore is the default bedrock executable.\n\n`bedrock --files src/test/js/browser/TwoTest.ts`\n\nUse `bedrock --help` to see all arguments possible.\n\n# Tests\n\nYou can run bedrock's tests by executing:\n\n`$ npm run test`\n\nThis will not run `test-samples-fail` which will need to be run and verified manually. (All should fail)\n\nIf you just want to run the basic tests (not property-based), use `$ npm run test-atomic`. If you want to run only the property-based tests, use `$ npm run test-props`. If you want to run the sample tests use `$ npm run test-samples-pass` and `$ npm run test-samples-fail`.\n\n## Docker\n\nThe `dockerfile` is just to test the no-sandbox option for chrome-headless. We should build automated tests for it.\n\n## Using selenium standalone machine\n\n`bedrock-auto` accepts a `--useSelenium` flag to lift the browser driver burden into a docker container.\n\nFor local testing you can leverage docker and connect to a local standalone machine. Note that this uses a Linux GUI, so keep that in mind for cross-platform testing.\n\nStart a `selenium/standalone` docker in your local environment:\n\n`docker run -d --net=host --shm-size=\"2g\" selenium/standalone-chrome:latest`.\n\nYou can start a remote selenium docker but bedrock does not play nice with this setup as it requires a server to be accessible to the webdriver\n\n`docker run -d -p 4444:4444 -p 7900:7900 --shm-size=\"2g\" selenium/standalone-chrome:latest`\n\n* Make sure that your port 4444 and port 7900 are not in use when running `--net=host`\n\n# FAQ\n\n## Why is the junit XML output not pretty-printed?\n\nIt's to do with \"escaping\" CDATA end tokens (\"]]\u003e\") in the output. \nIf we pretty-print it, we get extraneous whitespace in the junit output rendered in Jenkins. \n\nSee the comment in modules/server/src/main/ts/bedrock/core/Reporter.ts\n\n# Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md)\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftinymce%2Fbedrock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftinymce%2Fbedrock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftinymce%2Fbedrock/lists"}