|
5 | 5 |
|
6 | 6 | Sample demonstrates techniques for using Testspace with Ruby code and the [`rspec` test framework](http://rspec.info/) together with [`simplecov` code coverage gem](https://github.com/colszowka/simplecov) and [`selenium-webdriver` gem](https://rubygems.org/gems/selenium-webdriver/). |
7 | 7 |
|
8 | | -[](https://travis-ci.org/testspace-samples/ruby.rspec) |
9 | | -[](https://samples.testspace.com/projects/85/spaces/312 "Test Cases") |
10 | | -[](https://samples.testspace.com/projects/85/spaces/312/metrics#metric-216 "Line/Statement Coverage") |
| 8 | +*** |
| 9 | +Using Multiple Online CI Services: |
| 10 | + |
| 11 | +[](https://travis-ci.org/munderseth/ruby.rspec) |
| 12 | +[](https://circleci.com/gh/munderseth/ruby.rspec) |
| 13 | +[](https://app.shippable.com/projects/57c59c86d69e8d0f0053cfd4) |
| 14 | + |
| 15 | +*** |
| 16 | +Publishing **Test Content** using www.testspace.com. |
| 17 | + |
| 18 | +[](http://munderseth.stridespace.com/projects/271/spaces/906 "Test Cases") |
| 19 | +[](http://munderseth.stridespace.com/spaces/906/schema/Code%20Coverage "Code Coverage (lines)") |
| 20 | +[](http://munderseth.stridespace.com/spaces/906/schema/Static%20Analysis "Static Analysis (issues)") |
11 | 21 |
|
12 | 22 | *** |
13 | 23 |
|
14 | | -In order to run this sample you will need a host workstation with installed `ruby 2.3.0`, `bundler` and `firefox`. |
| 24 | +In order to run this sample you will need a host workstation that supports the [RSpec test framework](http://rspec.info/) with installed `ruby 2.3.0`, `bundler` and `firefox`. |
| 25 | + |
| 26 | +Running Static Analysis: |
15 | 27 |
|
16 | 28 | <pre> |
17 | | -bundle update |
18 | | -COVERAGE=true bundle exec rake ci:setup:rspec spec |
| 29 | +bundle exec rubocop --format emacs --out tmp/rubocop.txt |
| 30 | +bundle exec brakeman -o tmp/brakeman.json |
| 31 | +bundle exec brakeman_translate_checkstyle_format translate --file="tmp/brakeman.json" > tmp/brakeman_checkstyle.xml |
| 32 | +</pre> |
| 33 | + |
| 34 | +Running Tests with Code Coverage: |
| 35 | + |
| 36 | +<pre> |
| 37 | +bundle install |
| 38 | +export CI_REPORTS=$PWD/spec/reports |
| 39 | +COVERAGE=true xvfb-run --server-args="-screen 0 1024x768x24" bundle exec rake ci:setup:rspec spec |
19 | 40 | </pre> |
20 | 41 |
|
21 | | -Publishing results example: |
| 42 | +Publishing Results using **Testspace**: |
22 | 43 |
|
23 | 44 | <pre> |
24 | | -testspace publish [Tests]spec/reports/*.xml{spec} coverage/coverage.xml |
| 45 | +curl -s https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | sudo tar -zxvf- -C /usr/local/bin |
| 46 | +testspace @.testspace $TESTSPACE_TOKEN/$BRANCH_NAME |
25 | 47 | </pre> |
26 | 48 |
|
27 | | -Checkout the [Space](https://samples.testspace.com/projects/ruby/spaces/rspec). |
28 | 49 |
|
29 | | -*** |
| 50 | +Checkout the [Space](http://munderseth.stridespace.com/projects/ruby.rspec). |
30 | 51 |
|
31 | | -To fork this example using Travis requires: |
| 52 | +*** |
| 53 | +To replicate this sample: |
32 | 54 | - Account at www.testspace.com. |
33 | | - - Travis Environment Variable: |
34 | | - - `TESTSPACE_URL` = `credentials:@my-org-name.testspace.com/my-project/my-space` |
| 55 | + - Environment Variable called `TESTSPACE_TOKEN`: |
35 | 56 | - `credentials` set to `username:password` or your [access token](http://help.testspace.com/using-your-organization:user-settings). |
36 | 57 | - `my-org-name.testspace.com/my-project/my-space` based on your subdomain, project, and space names. Refer [here](http://help.testspace.com/reference:runner-reference#login-credentials) for more details. |
| 58 | + |
| 59 | + |
| 60 | + |
0 commit comments