-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #242 from bugsnag/rewrite_features
Rewrite test features to new steps
- Loading branch information
Showing
29 changed files
with
350 additions
and
635 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,18 @@ | ||
Feature: Configuring app type | ||
|
||
Background: | ||
Given I set environment variable "API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" | ||
And I configure the bugsnag endpoint | ||
And I set environment variable "APP_TYPE" to "background-queue" | ||
And I have built the service "app" | ||
Given I set environment variable "BUGSNAG_APP_TYPE" to "background-queue" | ||
|
||
Scenario: An error report contains the configured app type when running a go app | ||
Given I set environment variable "AUTO_CAPTURE_SESSIONS" to "false" | ||
When I run the go service "app" with the test case "handled" | ||
Then I wait to receive a request | ||
And the request is a valid error report with api key "a35a2a72bd230ac0aa0f52715bbdc6aa" | ||
Given I set environment variable "BUGSNAG_AUTO_CAPTURE_SESSIONS" to "0" | ||
When I start the service "app" | ||
And I run "HandledErrorScenario" | ||
And I wait to receive an error | ||
And the event "app.type" equals "background-queue" | ||
|
||
Scenario: An session report contains the configured app type when running a go app | ||
Given I set environment variable "AUTO_CAPTURE_SESSIONS" to "true" | ||
When I run the go service "app" with the test case "session" | ||
Then I wait to receive a request after the start up session | ||
And the request is a valid session report with api key "a35a2a72bd230ac0aa0f52715bbdc6aa" | ||
And the payload field "app.type" equals "background-queue" | ||
|
||
Given I set environment variable "BUGSNAG_AUTO_CAPTURE_SESSIONS" to "1" | ||
When I start the service "app" | ||
And I run "SendSessionScenario" | ||
And I wait to receive 2 sessions | ||
And the session payload field "app.type" equals "background-queue" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,18 @@ | ||
Feature: Configuring app version | ||
|
||
Background: | ||
Given I set environment variable "API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" | ||
And I configure the bugsnag endpoint | ||
And I set environment variable "APP_VERSION" to "3.1.2" | ||
And I have built the service "app" | ||
And I set environment variable "BUGSNAG_APP_VERSION" to "3.1.2" | ||
|
||
Scenario: An error report contains the configured app type when running a go app | ||
Given I set environment variable "AUTO_CAPTURE_SESSIONS" to "false" | ||
When I run the go service "app" with the test case "handled" | ||
Then I wait to receive a request | ||
And the request is a valid error report with api key "a35a2a72bd230ac0aa0f52715bbdc6aa" | ||
Given I set environment variable "BUGSNAG_AUTO_CAPTURE_SESSIONS" to "0" | ||
When I start the service "app" | ||
And I run "HandledErrorScenario" | ||
And I wait to receive an error | ||
And the event "app.version" equals "3.1.2" | ||
|
||
Scenario: An session report contains the configured app type when running a go app | ||
Given I set environment variable "AUTO_CAPTURE_SESSIONS" to "true" | ||
When I run the go service "app" with the test case "session" | ||
Then I wait to receive a request after the start up session | ||
And the request is a valid session report with api key "a35a2a72bd230ac0aa0f52715bbdc6aa" | ||
And the payload field "app.version" equals "3.1.2" | ||
Scenario: A session report contains the configured app type when running a go app | ||
Given I set environment variable "BUGSNAG_AUTO_CAPTURE_SESSIONS" to "1" | ||
When I start the service "app" | ||
And I run "SendSessionScenario" | ||
And I wait to receive 2 sessions | ||
And the session payload field "app.version" equals "3.1.2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,11 @@ | ||
Feature: Using auto notify | ||
|
||
Background: | ||
Given I set environment variable "API_KEY" to "a35a2a72bd230ac0aa0f52715bbdc6aa" | ||
And I configure the bugsnag endpoint | ||
And I have built the service "app" | ||
|
||
Scenario: An error report is sent when an AutoNotified crash occurs which later gets recovered | ||
When I run the go service "app" with the test case "autonotify" | ||
Then I wait for 3 seconds | ||
And the request 1 is a valid error report with api key "a35a2a72bd230ac0aa0f52715bbdc6aa" | ||
And the exception "errorClass" equals "*errors.errorString" for request 1 | ||
And the exception "message" equals "Go routine killed with auto notify" for request 1 | ||
When I start the service "app" | ||
And I run "AutonotifyPanicScenario" | ||
And I wait to receive 2 errors | ||
And the exception "errorClass" equals "*errors.errorString" | ||
And the exception "message" equals "Go routine killed with auto notify" | ||
And I discard the oldest error | ||
And the exception "errorClass" equals "panic" | ||
And the exception "message" equals "Go routine killed with auto notify [recovered]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.