Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md summary about testing #2442

Merged
merged 1 commit into from
Dec 13, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 29 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,14 +188,18 @@ data already loaded.

### Tests

Solidus uses [RSpec](http://rspec.info) for tests. Refer to its documentation for
more information about the testing library.

#### CircleCI

We use CircleCI to run the tests for Solidus as well as all incoming pull
requests. All pull requests must pass to be merged.

You can see the build statuses at
[https://circleci.com/gh/solidusio/solidus](https://circleci.com/gh/solidusio/solidus)
[https://circleci.com/gh/solidusio/solidus](https://circleci.com/gh/solidusio/solidus).

#### Running all tests
#### Run all tests

To execute all the tests, run this command at the root of the Solidus project
to run specs for all projects:
Expand All @@ -204,45 +208,51 @@ to run specs for all projects:
bash build.sh
```

This runs using postgresql by default, but can be overridden by specifying
`DB=sqlite` or `DB=mysql` in the environment.
This runs using PostgreSQL by default, but can be overridden by setting the `DB`
environment variable to `DB=sqlite` or `DB=mysql`. For example:

```
DB=mysql bash build.sh
```

[PhantomJS](http://phantomjs.org/) is required for the frontend and backend
test suites.
[ChromeDriver](https://sites.google.com/a/chromium.org/chromedriver/home) is
required to run the frontend and backend test suites.

#### Running an individual test suite
#### Run an individual test suite

Each gem contains its own series of tests.
Each gem contains its own series of tests. To run the tests for the core project:

To run the tests for the core project.
```shell
cd core
bundle exec rspec
```

If you would like to run specs against a particular database you may specify the
desired database, which defaults to sqlite3.
By default, `rspec` runs the tests for SQLite 3. If you would like to run specs
against another database you may specify the database in the command:

```shell
DB=postgresql bundle exec rspec
```

You can also enable fail fast in order to stop tests at the first failure
```shell
FAIL_FAST=true bundle exec rspec spec/models/state_spec.rb
```
#### Code coverage reports

If you want to run the [SimpleCov](https://github.com/colszowka/simplecov) code
coverage report:

If you want to run the simplecov code coverage report
```shell
COVERAGE=true bundle exec rspec
```

### Extensions
In addition to core functionality provided in Solidus, there are a number of ways to add
features to your store that are not (or not yet) part of the core project.

In addition to core functionality provided in Solidus, there are a number of
ways to add features to your store that are not (or not yet) part of the core
project.

A list can be found at [extensions.solidus.io](http://extensions.solidus.io/).

If you want to write an extension for Solidus, you can use the [solidus\_cmd](https://www.github.com/solidusio/solidus_cmd.git) gem.
If you want to write an extension for Solidus, you can use the
[solidus_cmd](https://www.github.com/solidusio/solidus_cmd.git) gem.

Contributing
------------
Expand Down