for basically everything” Site Reliability Engineering Edited by Betsy Beyer, Chris Jones, Jennifer Petoff and Niall Richard Murphy https://landing.google.com/sre/sre-book/chapters/introduction/
I’ve published Rails CI result as a public dataset on BigQuery https://console.cloud.google.com/bigquery?p=rails-travis -result&d=rails_travis_result&page=dataset - You can find the test was failed before or not on Rails CI via http://has-it-failed.herokuapp.com - There’s a room for improvement if we have CI result database (e.g. Make CI result passed if failed one is a flaky test)
Type Description id INTEGER Job id on TravisCI data STRING Job attributes in JSON log STRING Job log started_at TIMESTAMP When this job started build_number INTEGER Build number job belongs to build_data STRING Build attributes job belongs to commit_data STRING Commit attributes job belongs to
Type Description id INTEGER Job id on TravisCI data STRING Job attributes in JSON log STRING Job log started_at TIMESTAMP When this job started build_number INTEGER Build number job belongs to build_data STRING Build attributes job belongs to commit_data STRING Commit attributes job belongs to Partitioned by started_at
have all results (for now) - Some rows don’t have commit_data (for now) - I paid to store this dataset but you need to pay money to run query - Be sure to query with “WHERE started_at” - Full scan costs only $0.2 for now but amount of data keeps increasing
-Itest -Ilib -I../activesupport/lib -I../actionpack/lib -I../actionview/lib -I../activemodel/lib test/commands/server_test.rb Run options: --seed 10052 # Running: ....F Failure: Rails::Command::ServerCommandTest#test_using_server_mistype_without_suggestion [test/commands/server_test.rb:38]: Expected /Maybe you meant/ to not match "Could not find server \"t\". Maybe you meant \"cgi\"?\nRun `rails server --help` for more options.\n". rails test test/commands/server_test.rb:35 ..................... Finished in 0.760100s, 34.2060 runs/s, 71.0433 assertions/s. 26 runs, 54 assertions, 1 failures, 0 errors, 0 skips ^^^ +++ --- test/configuration/middleware_stack_proxy_test.rb
-Itest -Ilib -I../activesupport/lib -I../actionpack/lib -I../actionview/lib -I../activemodel/lib test/commands/server_test.rb Run options: --seed 10052 # Running: ....F Failure: Rails::Command::ServerCommandTest#test_using_server_mistype_without_suggestion [test/commands/server_test.rb:38]: Expected /Maybe you meant/ to not match "Could not find server \"t\". Maybe you meant \"cgi\"?\nRun `rails server --help` for more options.\n". rails test test/commands/server_test.rb:35 ..................... Finished in 0.760100s, 34.2060 runs/s, 71.0433 assertions/s. 26 runs, 54 assertions, 1 failures, 0 errors, 0 skips ^^^ +++ --- test/configuration/middleware_stack_proxy_test.rb Test class, test method Failed info
data, build_number, build_data, extractCiResult(log) AS parse_result FROM `rails-travis-result.rails_travis_result.jobs` WHERE "#{from.iso8601}" < started_at AND started_at < "#{to.iso8601}" ) WHERE parse_result <> "error" AND JSON_EXTRACT_SCALAR(data, "$.state") = "failed" AND JSON_ARRAY_LENGTH( JSON_EXTRACT(parse_result, "$.failedTests") ) > 0
data, build_number, build_data, extractCiResult(log) AS parse_result FROM `rails-travis-result.rails_travis_result.jobs` WHERE "#{from.iso8601}" < started_at AND started_at < "#{to.iso8601}" ) WHERE parse_result <> "error" AND JSON_EXTRACT_SCALAR(data, "$.state") = "failed" AND JSON_ARRAY_LENGTH( JSON_EXTRACT(parse_result, "$.failedTests") ) > 0
one is flaky 1. Generate JUnit format XML test report 2. Send test report to the service 3. The service collects flaky tests data and returns 0 or 1 4. Use the value in step 3 as exit code
Flaky tests Data 1. Generate XML and always returns 0 Web server $ test $(curl --form "[email protected]" https://server) = ‘0’ result.xml 2. Send test report to the service
Flaky tests Data 1. Generate XML and always returns 0 Web server $ test $(curl --form "[email protected]" https://server) = ‘0’ result.xml 3. Service returns 0 or 1 2. Send test report to the service
Flaky tests Data 1. Generate XML and always returns 0 Web server $ test $(curl --form "[email protected]" https://server) = ‘0’ result.xml 3. Service returns 0 or 1 4. Verify returned value 2. Send test report to the service
result as a public dataset on BigQuery https://console.cloud.google.com/bigquery?p=rails-travis -result&d=rails_travis_result&page=dataset - You can find the test was failed before or not on Rails CI via http://has-it-failed.herokuapp.com - There’s a room for improvement if we have CI result database (e.g. Make CI result passed if failed one is a flaky test)