Skip to content

Latest commit

 

History

History
36 lines (27 loc) · 2.7 KB

index.md

File metadata and controls

36 lines (27 loc) · 2.7 KB

#Overwatch ##An introduction to testing Tests in Overwatch take one of two forms:

  • Expect xxx toBeMadeOfXs
  • Expect xxx toBeBefore yyy

The toXxx part is called the expectation. The part before the expectation is called the actual value. The part after the expectation is called the expected value, and may be optional, depending on the expectation.

Test results have a status:

  • Pass (shown in green) - The test completed successfully
  • Unsatisfactory (shown in yellow) - The test completed successfully, but encountered an unexpected result not considered a failure
  • Fail (shown in red) - The test encountered a result considered a failure, as according to the test's expectation.
  • Error (shown in red) - The test failed to execute. The most common cause is attempting to run an expectation that requires administrative permissions as a non-admin.

##Expectations Overwatch comes bundled with the following expectations:

  • toPing - Expects the hostname or IP address given as the actual to respond to an ICMP ping
  • toResolveTo - Expects the hostname given as the actual to have a DNS record with the value of the expected
  • toRespondHttp - Expects the URL given as the actual to respond with a HTTP code
  • toRespondWithMimeType - Expects the URL given as the actual to respond with Content-Type equal to the expected
  • toContainText - Expects the URL given as the actual to contain the text, or match the regular expression given as the expected

Overwatch is also set up in such a way to allow the creation of 3rd Party "addon" expectations, see Extending Overwatch

##Getting test results Tests are run by the overwatch:tests:run command (php app/console overwatch:tests:run) and the results are saved into the database.

Overwatch will pass test results off to result reporters as it saves them to the database. Overwatch comes bundled with the following result reporters:

  • EmailReporter - Will send a notification e-mail to each user in the same group as the test, if the user's notification settings allow
  • SmsReporter - Will send an SMS alert to each user in the same group as the test, as long as the user has provided a telephone number and their notification settings allow.

Overwatch is also set up in such a way to allow the creation of 3rd Party "addon" result reporters, see Extending Overwatch

##Overwatch REST API In addition to being extensible, Overwatch is designed to be hackable, and as such exposes a RESTful API.