mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 23:30:12 +01:00
Update cucumber commands
parent
663c21898d
commit
9d4146c2e2
1 changed files with 13 additions and 8 deletions
21
Testing.md
21
Testing.md
|
|
@ -1,6 +1,6 @@
|
||||||
Testing Tracks is fairly simple. For its tests two different technologies are used:
|
Testing Tracks is fairly simple. For its tests two different technologies are used:
|
||||||
* [minitest](https://github.com/seattlerb/minitest) for unit, functional, and integration tests (in `/test`)
|
* [minitest](https://github.com/seattlerb/minitest) for unit, functional, and integration tests (in `/test`)
|
||||||
* [Cucumber](http://cukes.info/) for acceptance tests (in `/features`)
|
* [Cucumber](http://cukes.info/) with [Capybara](https://github.com/jnicklas/capybara) for acceptance tests (in `/features`)
|
||||||
|
|
||||||
## Setup
|
## Setup
|
||||||
|
|
||||||
|
|
@ -8,7 +8,9 @@ Testing Tracks is fairly simple. For its tests two different technologies are us
|
||||||
The tests make use of some gems which need to be installed first. If you have previously done a `bundle install --without development test` you will need to edit your `.bundle/config` and re-run `bundle install`.
|
The tests make use of some gems which need to be installed first. If you have previously done a `bundle install --without development test` you will need to edit your `.bundle/config` and re-run `bundle install`.
|
||||||
|
|
||||||
### Database
|
### Database
|
||||||
(database instructions need to be added)
|
Ensure you have the `test` section properly configured in your `config/database.yml`.
|
||||||
|
|
||||||
|
Since Rails 4.1, the test environment automatically loads the database schema, so you do not need to run the migrations.
|
||||||
|
|
||||||
## Running the tests
|
## Running the tests
|
||||||
|
|
||||||
|
|
@ -31,14 +33,12 @@ bin/rake test test/models/project_test.rb test_has_default_context
|
||||||
|
|
||||||
### Running the acceptance tests
|
### Running the acceptance tests
|
||||||
|
|
||||||
For integration testing Tracks uses cucumber. For those features that require javscript/ajax, Tracks uses Selenium and Capybara
|
Acceptance tests are written using Cucumber. For those features that require JavaScript/AJAX, Tracks uses Capybara and Selenium.
|
||||||
|
|
||||||
To run all the features excluding the work-in-progress (wip) features, run
|
To run all the features excluding the work-in-progress (wip) features, run
|
||||||
|
|
||||||
```
|
```
|
||||||
bin/rake cucumber RAILS_ENV=development
|
bin/cucumber
|
||||||
```
|
```
|
||||||
|
|
||||||
This will execute all features, including those using Selenium.
|
This will execute all features, including those using Selenium.
|
||||||
|
|
||||||
To run the features that are work in progress run these:
|
To run the features that are work in progress run these:
|
||||||
|
|
@ -46,9 +46,14 @@ To run the features that are work in progress run these:
|
||||||
bin/rake cucumber:wip
|
bin/rake cucumber:wip
|
||||||
```
|
```
|
||||||
|
|
||||||
To run a feature by hand run these.
|
To run an individual test file, append the path to the file, as in
|
||||||
```
|
```
|
||||||
bin/cucumber features/my_feature.feature
|
bin/cucumber features/calendar.feature
|
||||||
|
```
|
||||||
|
|
||||||
|
To run a single test, include the path to the file and the test's starting line number, as in
|
||||||
|
```
|
||||||
|
bin/cucumber features/calendar.feature:45
|
||||||
```
|
```
|
||||||
|
|
||||||
If you encounter problems running selenium tests, look at the _Problems with cucumber selenium tests_ section below.
|
If you encounter problems running selenium tests, look at the _Problems with cucumber selenium tests_ section below.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue