Skip to content

Commit

Permalink
Merge pull request #195 from buildkite/pie-1707-log-standard-error-fr…
Browse files Browse the repository at this point in the history
…om-ruby-test-collector

Log standard error raised during upload
  • Loading branch information
nprizal authored Jun 1, 2023
2 parents 1200f4f + 2c34694 commit f0b18a1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,15 @@ git commit -am "Add Buildkite Test Analytics"
git push origin add-buildkite-test-analytics
```

### VCR
If your test suites use [VCR](https://github.com/vcr/vcr) to stub network requests, you'll need to modify the config to allow actual network requests to Test Analytics.

```
VCR.configure do |c|
c.ignore_hosts "analytics-api.buildkite.com"
end
```

## 🗨️ Annotations

This gem allows adding custom annotations to the span data sent to Buildkite using the [.annotate](https://github.com/buildkite/test-collector-ruby/blob/d9fe11341e4aa470e766febee38124b644572360/lib/buildkite/test_collector.rb#L64) method. For example:
Expand Down
1 change: 1 addition & 0 deletions lib/buildkite/test_collector/uploader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ def self.upload(data)
retry
end
rescue StandardError => e
$stderr.puts e
$stderr.puts "#{Buildkite::TestCollector::NAME} #{Buildkite::TestCollector::VERSION} experienced an error when sending your data, you may be missing some executions for this run."
end
end
Expand Down

0 comments on commit f0b18a1

Please sign in to comment.