8.1.1 • Published 4 years ago

@ephox/bedrock v8.1.1

Weekly downloads
204
License
Apache-2.0
Repository
github
Last release
4 years ago

Description

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.

Installation

bedrock is available as an npm package. You can install it via the npm package @ephox/bedrock or from source

Global Install

A global install will put the bedrock commands (e.g. bedrock-auto) automatically on your path.

Install from npm

$ npm install -g @ephox/bedrock

Install from source (start in source directory)

$ npm install -g .

Local Install

A local install will not put the bedrock commands automatically on your path. After installing locally, you can access the commands via:

  1. adding node_modules/.bin to your path
  2. using npm run ${command} from the bedrock source directory

Install from npm

npm install @ephox/bedrock.

Install from source (start in source directory)

$ npm install .

Usage

bedrock has three main modes: test, server, and framework. These are available through three commands: bedrock-auto, bedrock, and bedrock-framework.

Test mode (bedrock-auto)

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.

BROWSER: chrome | firefox | safari | MicrosoftEdge | ie | phantomjs

e.g. run automated bedrock tests in chrome against test directory src/test/js/browser

bedrock-auto --browser chrome --testdir src/test/js/browser

Use bedrock-auto --help to see all arguments possible.

Server mode (bedrock)

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.

bedrock --files src/test/js/browser/TwoTest.ts

Use bedrock --help to see all arguments possible.

Framework mode (bedrock-framework)

Framework mode allows bedrock to run using an existing framework. The only currently supported testing framework is qunit. Bedrock assumes that a single page is responsible for running all the tests, so a page and browser are the only things required. Another parameter framework is also possible, but its only possible value currently is qunit.

e.g. Run existing tests on a qunit page using phantom

bedrock-framework --page tests/index.html --browser phantomjs

Use bedrock-framework --help to see all arguments possible.

Tests

You can run bedrock's tests by executing:

$ npm run test

This will not run test-samples-fail which will need to be run and verified manually. (All should fail)

If 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.

Docker

The dockerfile is just to test the no-sandbox option for chrome-headless. We should build automated tests for it.

8.1.1

4 years ago

8.0.4

4 years ago

8.0.3

4 years ago

8.0.2

5 years ago

8.0.1

5 years ago

7.0.5

5 years ago

7.0.4

5 years ago

7.0.3

5 years ago

7.0.2

5 years ago

7.0.1

5 years ago

6.0.1

5 years ago

5.1.1

5 years ago

5.0.3

5 years ago

5.0.2

5 years ago

5.0.1

5 years ago

4.5.4

5 years ago

4.5.3

5 years ago

4.5.2

5 years ago

4.5.1

5 years ago

4.4.2

5 years ago

4.4.1

5 years ago

4.3.3

5 years ago

4.3.2

5 years ago

4.3.1

5 years ago

4.3.0

5 years ago

4.2.11

5 years ago

4.2.10

5 years ago

4.2.9

5 years ago

4.2.8

5 years ago

4.2.7

5 years ago

4.2.6

5 years ago

4.2.5

5 years ago

4.2.4

5 years ago

4.2.3

5 years ago

4.2.2

5 years ago

4.2.1

5 years ago

4.2.0

5 years ago

4.1.0

5 years ago

4.0.14

5 years ago

4.0.13

5 years ago

4.0.12

5 years ago

4.0.11

5 years ago

4.0.10

5 years ago

4.0.9

5 years ago

4.0.8

5 years ago

4.0.7

5 years ago

4.0.6

5 years ago

4.0.5

5 years ago

4.0.4

5 years ago

4.0.3

5 years ago

4.0.2

5 years ago

4.0.1

5 years ago

4.0.0

5 years ago

3.2.1

5 years ago

3.2.0

5 years ago

3.1.2

5 years ago

3.1.1

6 years ago

3.1.0

6 years ago

3.0.0

6 years ago

2.4.0

6 years ago

2.3.0

6 years ago

2.2.2

6 years ago

2.2.1

6 years ago

2.1.0

6 years ago

2.0.12

6 years ago

2.0.11

6 years ago

2.0.10

6 years ago

2.0.9

6 years ago

2.0.8

6 years ago

2.0.7

6 years ago

2.0.6

6 years ago

2.0.5

6 years ago

2.0.4

6 years ago

2.0.3

6 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.8.0

6 years ago

1.7.2

7 years ago

1.7.1

7 years ago

1.7.0

7 years ago

1.6.0

7 years ago

1.5.2

7 years ago

1.5.1

7 years ago

1.5.0

7 years ago

1.4.5

7 years ago

1.4.4

7 years ago

1.4.3

7 years ago

1.4.2

7 years ago

1.4.1

7 years ago

1.4.0

7 years ago

1.3.10

7 years ago

1.3.9

7 years ago

1.3.8

7 years ago

1.3.7

7 years ago

1.3.6

7 years ago

1.3.5

8 years ago

1.3.4

8 years ago