{"id":92,"date":"2022-11-28T08:00:00","date_gmt":"2022-11-28T16:00:00","guid":{"rendered":"https:\/\/dejal.com\/blog\/?p=92"},"modified":"2022-11-21T18:56:02","modified_gmt":"2022-11-22T02:56:02","slug":"simons-automatic-offline-support","status":"publish","type":"post","link":"https:\/\/dejal.com\/blog\/simons-automatic-offline-support\/","title":{"rendered":"Simon&#8217;s automatic offline support"},"content":{"rendered":"<body><p><\/p>\n<p>A useful feature of <a href=\"https:\/\/dejal.com\/simon\/\">Simon<\/a> is how it handles the situation when your computer loses its internet connection.<\/p>\n<p>People sometimes ask me what Simon does in this situation, concerned that it would count as a failure for tests. Simon is smarter than that, though. Every time it starts a check, it first checks if the computer has a current internet connection, and only then performs the check.<\/p>\n<p>If it determines that your internet connection has been disrupted, it places the test in an \u201coffline\u201d state, where it shows a blinking \u201clightning bolt\u201d for the status icon until the connection is restored. This offline state doesn\u2019t count as a failure (or success).<\/p>\n<p>Simon works out if you have a connection by seeing if it can resolve one of two popular domain names; if either work, your connection is probably fine, but if both fail, it is likely disconnected. Using two domains avoids a temporary outage of either one.<\/p>\n<p>You can disable this internet connection check on a per-test basis via the <strong>Can check when offline<\/strong> checkbox on the test editor\u2019s <strong>Options<\/strong> page. This is useful if you want to create a test to notify you when your connection goes down, or for tests that don\u2019t require an internet connection (e.g. using the <strong>Application<\/strong> or <strong>Script<\/strong> service kinds):<\/p>\n<p><img data-recalc-dims=\"1\" decoding=\"async\" title=\"Offline option\" src=\"https:\/\/i0.wp.com\/dejal.com\/blog\/wp-content\/uploads\/2022\/11\/Offline.png?resize=760%2C284&#038;ssl=1\" alt=\"Offline option\" width=\"760\" height=\"284\" border=\"0\" loading=\"lazy\"><\/p>\n<p><\/p>\n<\/body>","protected":false},"excerpt":{"rendered":"<p>A useful feature of Simon is how it handles the situation when your computer loses its internet connection. People sometimes ask me what Simon does in this situation, concerned that it would count as a failure for tests. Simon is smarter than that, though. Every time it starts a check, it first checks if the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[16,4],"tags":[],"class_list":["post-92","post","type-post","status-publish","format-standard","hentry","category-faq","category-simon"],"jetpack_featured_media_url":"","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/dejal.com\/blog\/wp-json\/wp\/v2\/posts\/92","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dejal.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dejal.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dejal.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dejal.com\/blog\/wp-json\/wp\/v2\/comments?post=92"}],"version-history":[{"count":1,"href":"https:\/\/dejal.com\/blog\/wp-json\/wp\/v2\/posts\/92\/revisions"}],"predecessor-version":[{"id":93,"href":"https:\/\/dejal.com\/blog\/wp-json\/wp\/v2\/posts\/92\/revisions\/93"}],"wp:attachment":[{"href":"https:\/\/dejal.com\/blog\/wp-json\/wp\/v2\/media?parent=92"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dejal.com\/blog\/wp-json\/wp\/v2\/categories?post=92"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dejal.com\/blog\/wp-json\/wp\/v2\/tags?post=92"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}