<p><a class="issue-link js-issue-link" data-error-text="Failed to load issue title" data-id="506351426" data-permission-text="Issue title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/2390" data-hovercard-type="pull_request" data-hovercard-url="/openstreetmap/openstreetmap-website/pull/2390/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/pull/2390">#2390</a> introduces tests using cucumber, and I think we should discuss this aspect of the PR separately.</p>
<p><a href="https://cucumber.io/" rel="nofollow">Cucumber</a> is a syntax for writing tests, as an alternative to the MiniTest syntax (that we use) or RSpec (which is very common in the Ruby community). It aims to be a "natural language" way of writing tests, rather than the code-centric approach of the other formats. Here's an example from <a class="issue-link js-issue-link" data-error-text="Failed to load issue title" data-id="506351426" data-permission-text="Issue title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/2390" data-hovercard-type="pull_request" data-hovercard-url="/openstreetmap/openstreetmap-website/pull/2390/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/pull/2390">#2390</a> , to give a flavour of the syntax:</p>
<pre><code> Scenario: Edit a microcosm
    Given there is a user "abe@example.com" with name "Abe"
    And this user is an organizer of this microcosm
    When user "abe@example.com" logs in
    And I am on the microcosms page
    And I click the link to "/microcosms/mappingdc/edit"
    And I set the microcosm in ".edit_microcosm" to "Baltimore", "40", "-76"
    And I submit the form
    Then I should not see "Washington, DC, USA"
    Then I should see "Baltimore"
</code></pre>
<p>It's often written for "system" (or "feature") level tests, that is, tests that use a web browser to read the page output, push buttons and fill in forms, and make assertions based on the results. I tend not to find it used much for the other types of test, like "model", "mailer", "controller" tests and so on.</p>
<p>Cucumber claims that its syntax has a number of advantages, and that being written in something approaching natural language makes it easier for non-technical people to read and contribute to the tests. It's often aimed at "Product Owners" and similar positions in larger companies.</p>
<p>We should discuss whether it's something that we want to use in this repo, or whether we should continue to use the current approach for our system-level tests.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/issues/2545?email_source=notifications&email_token=AAK2OLMZA6T65VIOJ5SHFF3RDUZNPA5CNFSM4KXZTCRKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IOUSFKQ">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLJEK6HIB6UIWVHDWSTRDUZNPANCNFSM4KXZTCRA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AAK2OLL6UIUNHC5DU2PHHZ3RDUZNPA5CNFSM4KXZTCRKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IOUSFKQ.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/issues/2545?email_source=notifications\u0026email_token=AAK2OLMZA6T65VIOJ5SHFF3RDUZNPA5CNFSM4KXZTCRKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IOUSFKQ",
"url": "https://github.com/openstreetmap/openstreetmap-website/issues/2545?email_source=notifications\u0026email_token=AAK2OLMZA6T65VIOJ5SHFF3RDUZNPA5CNFSM4KXZTCRKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IOUSFKQ",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>