<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Alex Ivanova on Medium]]></title>
        <description><![CDATA[Stories by Alex Ivanova on Medium]]></description>
        <link>https://medium.com/@melnelen?source=rss-da8e34f00b8e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*pCaierq28F67sTGpg6K10Q.jpeg</url>
            <title>Stories by Alex Ivanova on Medium</title>
            <link>https://medium.com/@melnelen?source=rss-da8e34f00b8e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 04:47:14 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@melnelen/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Stop Relying on Testing at the End. Build Quality from the Start.]]></title>
            <link>https://medium.com/quality-compass/stop-relying-on-testing-at-the-end-build-quality-from-the-start-052e6e09bc49?source=rss-da8e34f00b8e------2</link>
            <guid isPermaLink="false">https://medium.com/p/052e6e09bc49</guid>
            <category><![CDATA[quality-assurance]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[engineering-management]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[quality-software]]></category>
            <dc:creator><![CDATA[Alex Ivanova]]></dc:creator>
            <pubDate>Wed, 18 Nov 2026 20:57:35 GMT</pubDate>
            <atom:updated>2026-11-18T20:57:35.356Z</atom:updated>
            <content:encoded><![CDATA[<h4>What a $125 million NASA mistake — and a real engineering transformation — can teach us about delivering better software.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/990/1*HuFjgXBazU__rR6Se0H_DA.jpeg" /><figcaption>Mars Climate Orbiter, NASA/JPL-Caltech</figcaption></figure><p>On September 23, 1999, NASA’s Mars Climate Orbiter was approaching the red planet after a nine-month journey through space.</p><p>Instead of entering its intended orbit, the spacecraft descended far too close to the surface and burned up in the Martian atmosphere.</p><p><strong>NASA had lost a spacecraft valued at approximately $125 million.</strong></p><p>The cause? A mismatch between two measurement systems.</p><p>It sounds like a simple conversion error. But NASA’s investigation revealed a much bigger problem.</p><p>The interface specification required metric units (newton-seconds), while ground software produced thruster data in imperial units (pound-force seconds). The discrepancy wasn’t caught during development or verification. Key navigation personnel hadn’t participated in important requirements and design reviews or ground-software testing.</p><p><strong>The problem was a failure to establish shared understanding, challenge assumptions, and verify that independently developed components respected their documented agreement.</strong></p><p>And there’s an even more troubling detail.</p><p><strong>Warning signs appeared months before the spacecraft was lost.</strong></p><p>The navigation team had noticed anomalous trajectory data, but the underlying problem wasn’t identified and resolved. NASA’s investigation highlighted failures in communication, escalation, and verification.</p><p><strong>The lesson? Mistakes are inevitable. Even the best engineers are not immune to them. What matters is whether our engineering practices can catch and resolve them before they become disasters.</strong></p><p>Unfortunately, Mars missions don’t offer a rollback button.</p><p>This happened in 1999. Our tools have evolved dramatically since then, but the challenges remain familiar: teams working with different assumptions, inadequate communication, and safeguards that fail when needed most.</p><h3>The experience that changed my perspective</h3><p>In 2020, while working at OpenClassrooms, I experienced a transformation that fundamentally changed how I think about software quality.</p><p>Our Quality Manager at the time, Vincent Dauce, led a move away from traditional Quality Assurance toward <strong>Quality Assistance</strong> (what is now known as shift-left approach). Instead of primarily validating completed features, QA engineers increasingly helped product teams take ownership of quality themselves.</p><p>Our role evolved toward coaching, collaboration, challenging assumptions, and preventing problems earlier. It wasn’t simply a new name for the quality team. It changed how we all worked and collaborated.</p><p>And it wasn’t about sacrificing delivery speed for quality. Quite the opposite. Vincent reported a <strong>30–40% reduction in cycle time</strong> as the transformation progressed.</p><p>For me, this demonstrated that earlier feedback and fewer unnecessary handoffs can improve both product quality and delivery speed.</p><h3>And we were far from the only ones</h3><p>Shift-left is an established approach, with many engineering organizations applying its principles.</p><h3>Google Cloud: Catching problems before code is merged</h3><p>Google integrates automated testing, analysis, and reviews into development, allowing engineers to detect issues before changes are merged.</p><h3>Microsoft: Building accessibility into development</h3><p>Microsoft encourages teams to identify accessibility issues during design and development, using tools such as Accessibility Insights, rather than relying exclusively on final audits.</p><p>Different practices, same principle: <strong>quality and delivery speed don’t have to compete.</strong></p><h3>Shift-left: More than testing earlier</h3><p>The traditional software delivery process often looks like this:</p><p><em>Requirements → Design → Development → Testing → Release</em></p><p>Even in Agile organizations, these handoffs can persist.</p><p><strong>The problem? By the time the testing begins, many decisions that determine the product quality have already been made.</strong></p><p>Shift-left changes this approach. It looks more like this:</p><p><em>Requirements + Verification loop → Design + Verification loop → Development + Testing loop → Final Validation → Release → Monitoring</em></p><p>Product, design, engineering, and quality teams collaborate earlier to challenge assumptions, identify risks, and establish shared expectations. Requirements reviews, design reviews, automated checks, and exploratory testing provide feedback throughout the whole process, rather than primarily at the end.</p><p><strong>Shift-left isn’t simply about testing sooner. It’s about preventing problems earlier, detecting them faster, and making quality a shared responsibility.</strong></p><h3>Why should engineering leaders care?</h3><h3>1. Less rework, more predictable delivery</h3><p>A misunderstood requirement discovered during a review will take minutes to clarify. Discovered after implementation, it could require redesign, code changes, and another round of testing.</p><h3>2. Faster feedback means faster delivery</h3><p>When feedback arrives while work is still in progress, issues are easier to investigate and changes tend to be smaller. Teams spend less time waiting for final validation and reopening what’s supposed to be completed work.</p><h3>3. Better collaboration and shared ownership</h3><p>Product, design, engineering, and quality teams bring different perspectives on business needs, user experience, technical constraints, and risk. Together, they can identify problems that might otherwise go unnoticed.</p><h3>4. Greater confidence in releases</h3><p>Release confidence shouldn’t depend on a final testing phase catching every defect. It should come from evidence gathered throughout development: validated requirements, reviewed designs, automated checks, and understood risks.</p><p>Of course, that evidence is only useful when teams act on it.</p><p><strong>An alert nobody investigates isn’t much of a safeguard. It’s just an expensive notification.</strong></p><h3>How to start shifting quality left</h3><p>You don’t need to transform your entire organization overnight.</p><h3>1. Bring the right people into conversations early.</h3><p>Involve product, design, engineering, and quality teams when discussing important features and risks. Challenge assumptions before they become implementation details.</p><h3>2. Treat requirements and design as opportunities to prevent defects.</h3><p>Review user journeys, edge cases, error states, accessibility, and business rules before development. Think beyond the happy path.</p><h3>3. Introduce meaningful quality gates.</h3><p>More gates don’t automatically mean better quality. Use reviews, checks, and block deployments only where it makes sense, and respect the gates, no easy bypassing.</p><h3>4. Close the loop on unexpected results.</h3><p>Detecting a problem is only valuable if someone acts on it. Shared ownership doesn’t mean unclear accountability. Important issues still need someone responsible for communication and following through resolution.</p><h3>5. Encourage people to challenge assumptions.</h3><p>Make it safe for anyone to question requirements, designs, implementations, or unexpected product behavior.</p><h3>Shift-left doesn’t mean removing testing at the end</h3><p>Some risks only become visible when the complete system is assembled or operating in production. End-to-end testing, independent verification, release validation, and monitoring remain essential. The difference is that they become <strong>additional layers of protection rather than the organization’s only line of defense</strong>.</p><h3>Quality isn’t a final destination, it’s the journey</h3><p>Most software organizations aren’t sending spacecrafts to Mars.</p><p>But they face similar challenges: interconnected systems, multiple disciplines, incomplete information, and human assumptions.</p><p>We can’t eliminate every mistake. We can only build engineering practices that make mistakes easier to prevent, faster to discover, and less likely to reach customers.</p><p><strong>Quality comes from challenging assumptions, establishing shared understanding, and continuously verifying that what we’re building matches what we intended.</strong></p><p><strong>A question for engineering leaders:</strong></p><p>When someone identifies a quality concern early in your development process, does it get addressed — or does it get lost in the conversation?</p><p>I’d love to hear your experiences.</p><p><em>Quality Compass 🧭 | Issue #01</em></p><p><em>Quality Compass explores real engineering stories, fresh perspectives, and practical strategies for building better software.</em></p><p><strong>Coming next:</strong> <em>The Bugs We Write Before Writing Code</em> — How unclear requirements, incomplete designs, and unchallenged assumptions create defects before development even begins.</p><h3>Sources and further reading</h3><ul><li><a href="https://www.jpl.nasa.gov/news/mars-climate-orbiter-team-finds-likely-cause-of-loss/">NASA JPL — Mars Climate Orbiter investigation</a></li><li><a href="https://llis.nasa.gov/lesson/641">NASA — Mars Climate Orbiter Mishap Investigation Board</a></li><li><a href="https://medium.com/qe-unit/there-is-no-more-quality-assurance-manomano-openclassrooms-32149e86b347">QE Unit — Quality Assistance at OpenClassrooms</a></li><li><a href="https://www.ssid.fr/qualite-affaire-de-tous-openclassrooms-vincent-dauce/">Vincent Dauce — When Quality Becomes Everyone’s Responsibility (2026)</a></li><li><a href="https://docs.cloud.google.com/docs/cloud-approach-to-change">Google Cloud — Google’s Approach to Change</a></li><li><a href="https://www.microsoft.com/insidetrack/blog/shifting-left-to-get-accessibility-right-at-microsoft/">Microsoft — Shifting Left to Get Accessibility Right</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=052e6e09bc49" width="1" height="1" alt=""><hr><p><a href="https://medium.com/quality-compass/stop-relying-on-testing-at-the-end-build-quality-from-the-start-052e6e09bc49">Stop Relying on Testing at the End. Build Quality from the Start.</a> was originally published in <a href="https://medium.com/quality-compass">Quality Compass</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Comment configurer votre projet Xcode pour les tests avec des tests Unitaire et UI en 4 étapes]]></title>
            <link>https://melnelen.medium.com/comment-configurer-votre-projet-xcode-pour-les-tests-avec-des-tests-unitaire-et-ui-en-4-%C3%A9tapes-7e1aa9ec9175?source=rss-da8e34f00b8e------2</link>
            <guid isPermaLink="false">https://medium.com/p/7e1aa9ec9175</guid>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[xcode]]></category>
            <category><![CDATA[unit-testing]]></category>
            <category><![CDATA[testing]]></category>
            <category><![CDATA[setup-guide]]></category>
            <dc:creator><![CDATA[Alex Ivanova]]></dc:creator>
            <pubDate>Fri, 27 Oct 2023 18:59:06 GMT</pubDate>
            <atom:updated>2023-10-27T18:59:06.347Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CEtuEZNX2m0-eNIOAU9qXw.jpeg" /><figcaption>Image by Alex Ivanova</figcaption></figure><p>Ayant commencé ma carrière dans le domaine du test et de l’assurance qualité de différentes applications logicielles, j’ai acquis une compréhension approfondie de l’importance des tests dans le processus de développement. À travers mon expérience, j’ai réalisé que les tests jouent un rôle crucial non seulement dans l’identification des bugs, mais aussi dans leur prévention dès le départ.</p><p>En programmation, j’ai observé une tendance commune à négliger l’importance de rédiger des tests. Cela entraîne souvent des difficultés à localiser et résoudre les bugs qui surviennent après l’intégration d’une nouvelle fonctionnalité.</p><p>Adopter une mentalité de test garantit non seulement l’exécution sans accroc des projets, mais instaure également un sentiment de confiance dans le produit final.</p><h3>Allons droit au but</h3><p><strong>Voici comment configurer les tests unitaires :</strong></p><p>Pour effectuer des tests unitaires, vous pouvez inclure le <strong>Unit Testing Bundle</strong> dans votre projet Xcode de deux manières :</p><h3>#1 Si vous créez un tout nouveau projet</h3><p>En créant votre nouveau projet, veuillez cocher <strong>Include Tests</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gfs8D-7fadVaAe1C0D-ing.png" /></figure><h3>#2 Si vous voulez ajouter des tests à un projet existant</h3><p>Allez dans <strong>File &gt; New &gt; Target...</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7z0MuF8McRIVs1y-O5heDQ.png" /></figure><p>Et faites défiler vers le bas ou recherchez <strong>test</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QCqwB8Q5_LzqSbkzPs3j8A.png" /></figure><p>De là, vous pouvez ajouter <strong>Unit Testing Bundle</strong> et <strong>UI Testing Bundle</strong> un par un.</p><h3>#3 Où commencer à rédiger vos tests</h3><ol><li>Dans le <strong>Project navigator</strong>, vous trouverez deux nouveaux dossiers de tests :</li></ol><ul><li><strong>&lt;YourProjectName&gt;Tests</strong> : Ajoutez vos tests unitaires ici.</li><li><strong>&lt;YourProjectName&gt;UITests</strong> : Ajoutez vos tests d&#39;interface utilisateur ici.</li></ul><p>2. À l’intérieur de ces dossiers, vous trouverez des sous-classes d’exemples <strong>XCTestCase</strong> :</p><ul><li><strong>&lt;YourProjectName&gt;Tests.swift</strong> : Ajoutez vos tests unitaires ici.</li><li><strong>&lt;YourProjectName&gt;UITests.swift</strong> : Ajoutez vos tests d&#39;interface utilisateur ici.</li><li><strong>&lt;YourProjectName&gt;UITestsLaunchTests.swift</strong> : Ajoutez vos tests d&#39;interface utilisateur ici, qui s&#39;exécuteront après le lancement de l&#39;application mais avant la capture d&#39;écran.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/662/1*pfiwLffgN6fx816cbcDQiw.png" /></figure><p>Si vous ouvrez <strong>&lt;YourProjectName&gt;Tests.swift</strong>, vous trouverez du code d&#39;exemple:</p><pre>import XCTest<br>final class MyToDoListTests: XCTestCase {<br>    override func setUpWithError() throws {<br>        // Put setup code here. This method is called before the invocation of each test method in the class.<br>    }<br>    override func tearDownWithError() throws {<br>        // Put teardown code here. This method is called after the invocation of each test method in the class.<br>    }<br>    func testExample() throws {<br>        // This is an example of a functional test case.<br>        // Use XCTAssert and related functions to verify your tests produce the correct results.<br>        // Any test you write for XCTest can be annotated as throws and async.<br>        // Mark your test throws to produce an unexpected failure when your test encounters an uncaught error.<br>        // Mark your test async to allow awaiting for asynchronous code to complete. Check the results with assertions afterwards.<br>    }<br>    func testPerformanceExample() throws {<br>        // This is an example of a performance test case.<br>        measure {<br>            // Put the code you want to measure the time of here.<br>        }<br>    }<br>}</pre><p>Il a trois méthodes : <strong>setUpWithError()</strong> pour la configuration initiale de chaque test, <strong>tearDownWithError()</strong> pour effectuer le nettoyage après chaque exécution de test, une méthode de test appelée <strong>testExample()</strong> pour effectuer un test, et <strong>testPerformanceExample()</strong> pour écrire un test de performance. Nous discuterons de chacune de ces méthodes dans un autre article.</p><h3>#4 Comment exécuter vos tests</h3><h3>Option 1:</h3><p>La manière la plus simple d’exécuter tous vos tests est de se rendre dans <strong>Product &gt; Test</strong>. Là, vous trouverez également le moyen le plus rapide de le faire, qui consiste à utiliser le <strong>raccourci</strong> <strong>⌘ U</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/534/1*NMlqUiM930kErphQ-4nnGw.png" /></figure><h3>Option 2:</h3><p>Une autre façon consiste à naviguer jusqu’à votre fichier de tests Swift, tel que <strong>&lt;YourProjectName&gt;Tests.swift</strong>, et cliquez sur le bouton <strong>Play</strong>. Il vous suffit de survoler la forme en diamant à côté du nom de la classe, et vous le trouverez. Vous trouverez également la forme en diamant à côté du nom de chacun des tests.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fh5hROgJ8e06oKdiPg27nQ.png" /></figure><p>Pour exécuter uniquement l’un des tests, tel que <strong>testExample()</strong>, cliquez sur le bouton <strong>Play</strong> à côté de son nom.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C7GZ6EiXnYJX6AAHfUiXiQ.png" /></figure><h3>Option 3:</h3><p>Vous pouvez également suivre ces étapes :</p><ol><li>Ouvrez le <strong>Test navigator</strong>.</li><li>Localisez le dossier que vous souhaitez tester, soit <strong>&lt;YourProjectName&gt;Tests</strong> ou <strong>&lt;YourProjectName&gt;UITests</strong>.</li><li>Passez votre souris sur le nom du dossier.</li><li>Cliquez sur le bouton <strong>Play</strong> qui apparaît.</li></ol><p>Cela exécutera tous les tests dans le dossier sélectionné.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/656/1*XszIaM5V1LW6jdfhDj020w.png" /></figure><p>Vous pouvez également choisir d’exécuter uniquement une classe de test telle que <strong>&lt;YourProjectName&gt;Tests.swift</strong>, ainsi que l&#39;un des tests tels que <strong>testExample()</strong> en cliquant sur le bouton <strong>Play</strong> à côté du nom du test ou de la classe de test que vous souhaitez exécuter.</p><h3>Résumé</h3><p>La configuration de votre projet pour utiliser des tests est facile lorsque vous connaissez les étapes à suivre. L’automatisation du processus de détection des erreurs dès le début du cycle de développement vous donne confiance dans la correction de votre code. Lorsque tous vos tests passent, vous pouvez être plus certain que votre code fonctionne comme prévu.</p><p>Les tests sont une compétence essentielle pour devenir un bon développeur. Maintenant que votre projet est prêt, vous pouvez commencer à ajouter des tests. Dans le prochain article, nous explorerons comment écrire votre premier test.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7e1aa9ec9175" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to setup your Xcode project for testing with Unit and UI Tests in 4 simple steps]]></title>
            <link>https://melnelen.medium.com/how-to-setup-your-xcode-project-for-testing-with-unit-and-ui-tests-in-4-simple-steps-47a5e89650c9?source=rss-da8e34f00b8e------2</link>
            <guid isPermaLink="false">https://medium.com/p/47a5e89650c9</guid>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[xcode]]></category>
            <category><![CDATA[unit-testing]]></category>
            <category><![CDATA[testing]]></category>
            <category><![CDATA[setup-guide]]></category>
            <dc:creator><![CDATA[Alex Ivanova]]></dc:creator>
            <pubDate>Fri, 27 Oct 2023 13:30:16 GMT</pubDate>
            <atom:updated>2023-10-27T15:21:05.302Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CEtuEZNX2m0-eNIOAU9qXw.jpeg" /><figcaption>Image by Alex Ivanova</figcaption></figure><p>Having started my career in testing and ensuring the quality of various software applications, I have gained a deep understanding of the significance of testing in the development process. Through my experience, I have realized that testing plays a crucial role not only in identifying bugs but also in preventing them from occurring in the first place.</p><p>In development, I have observed a common tendency to overlook the importance of writing tests. This often results in difficulties in pinpointing and resolving bugs that arise after integrating a new feature.</p><p>Embracing a testing mindset not only ensures the smooth execution of projects but also instills a sense of confidence in the final product.</p><h3>Let’s get to the point</h3><p><strong>Here is how to set up unit testing:</strong></p><p>To perform unit tests, you can include the <strong>Unit Testing Bundle</strong> in your Xcode project in two ways:</p><h3>#1 If you’re creating a brand new project</h3><p>While creating your new project check <strong>Include Tests</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gfs8D-7fadVaAe1C0D-ing.png" /></figure><h3>#2 If you want to add tests to an existing project</h3><p>Go to <strong>File &gt; New &gt; Target...</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7z0MuF8McRIVs1y-O5heDQ.png" /></figure><p>And scroll down or search for <strong>test</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QCqwB8Q5_LzqSbkzPs3j8A.png" /></figure><p>From here you can add the <strong>Unit Testing Bundle</strong> and the <strong>UI Testing Bundle</strong> one by one.</p><h3>#3 Where to begin writing your tests</h3><ol><li>In the <strong>Project navigator</strong>, you will find two new testing folders:</li></ol><ul><li><strong>&lt;YourProjectName&gt;Tests</strong>: Add your unit tests here.</li><li><strong>&lt;YourProjectName&gt;UITests</strong>: Add your UI tests here.</li></ul><p>2. Inside these folders, you will find example XCTestCase subclasses:</p><ul><li><strong>&lt;YourProjectName&gt;Tests.swift</strong>: Add your unit tests here.</li><li><strong>&lt;YourProjectName&gt;UITests.swift</strong>: Add your UI tests here.</li><li><strong>&lt;YourProjectName&gt;UITestsLaunchTests.swift</strong>: Add your UI tests here, which will run after the app launch but before taking a screenshot.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/662/1*pfiwLffgN6fx816cbcDQiw.png" /></figure><p>If you open <strong>&lt;YourProjectName&gt;Tests.swift</strong> you will find some example code:</p><pre>import XCTest<br><br>final class MyToDoListTests: XCTestCase {<br>    override func setUpWithError() throws {<br>        // Put setup code here. This method is called before the invocation of each test method in the class.<br>    }<br>    override func tearDownWithError() throws {<br>        // Put teardown code here. This method is called after the invocation of each test method in the class.<br>    }<br>    func testExample() throws {<br>        // This is an example of a functional test case.<br>        // Use XCTAssert and related functions to verify your tests produce the correct results.<br>        // Any test you write for XCTest can be annotated as throws and async.<br>        // Mark your test throws to produce an unexpected failure when your test encounters an uncaught error.<br>        // Mark your test async to allow awaiting for asynchronous code to complete. Check the results with assertions afterwards.<br>    }<br>    func testPerformanceExample() throws {<br>        // This is an example of a performance test case.<br>        measure {<br>            // Put the code you want to measure the time of here.<br>        }<br>    }<br>}</pre><p>It has three methods: <strong>setUpWithError()</strong> for the initial setup of each test, <strong>tearDownWithError()</strong> to perform cleanup after each test execution, a test method called <strong>testExample()</strong> to perform a test, and <strong>testPerformanceExample()</strong> to write a performance test. We will discuss each of these methods in another article.</p><h3>#4 How to run your tests</h3><h3>Option 1:</h3><p>The easiest way to run all of your tests is to go to <strong>Product &gt; Test</strong>. There you will find also the fastest way to do this, which is by using the <strong>shortcut</strong> <strong>⌘ U</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/534/1*NMlqUiM930kErphQ-4nnGw.png" /></figure><h3>Option 2:</h3><p>Another way is to navigate to your Swift tests file, such as <strong>&lt;YourProjectName&gt;Tests.swift</strong>, and click the <strong>Play</strong> button there. Simply hover over the diamond shape next to the class name, and you will find it. You will find the diamond shape next to the name of each of the tests as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fh5hROgJ8e06oKdiPg27nQ.png" /></figure><p>To run only one of the tests, such as <strong>testExample()</strong>, click the <strong>Play</strong> button next to its name.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C7GZ6EiXnYJX6AAHfUiXiQ.png" /></figure><h3>Option 3:</h3><p>You can also follow these steps:</p><ol><li>Open the <strong>Test navigator</strong>.</li><li>Locate the folder you want to test, either <strong>&lt;YourProjectName&gt;Tests</strong> or <strong>&lt;YourProjectName&gt;UITests</strong>.</li><li>Hover over the folder name with your mouse.</li><li>Click the <strong>Play</strong> button that appears.</li></ol><p>This will execute all the tests in the selected folder.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/656/1*XszIaM5V1LW6jdfhDj020w.png" /></figure><p>You can also choose to run only one test class such as <strong>&lt;YourProjectName&gt;Tests.swift</strong>, as well as only one of the tests such as <strong>testExample()</strong> by clicking the <strong>Play</strong> button next to the name of the test or test class you wish to run.</p><h3>Summary</h3><p>Setting up your Xcode project to use tests is easy when you know the steps to follow. Automating the process of catching errors early in the development cycle provides confidence in the correctness of your code. When all your tests pass, you can be more certain that your code is functioning as intended.</p><p>Testing is an essential skill for becoming a good developer. Now that your project is ready, you can start adding tests. In the next article, we will explore how to write your first test.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=47a5e89650c9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Rendre Le Web Plus Accessible]]></title>
            <link>https://melnelen.medium.com/rendre-le-web-plus-accessible-df29c55f4afc?source=rss-da8e34f00b8e------2</link>
            <guid isPermaLink="false">https://medium.com/p/df29c55f4afc</guid>
            <category><![CDATA[web]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[web-design]]></category>
            <category><![CDATA[accessibility]]></category>
            <dc:creator><![CDATA[Alex Ivanova]]></dc:creator>
            <pubDate>Tue, 06 Jul 2021 09:34:51 GMT</pubDate>
            <atom:updated>2021-07-06T09:42:29.990Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Se_JytzpouJHW5Qj" /><figcaption>Photo by <a href="https://unsplash.com/@courtneymcook?utm_source=medium&amp;utm_medium=referral">Courtney Cook</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h4>pour que nous puissions tous en profiter</h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplay.ht%2Fembed%2F%3Farticle_url%3Dhttps%3A%2F%2Fmedium.com%2F_p%2Frendre-le-web-plus-accessible-df29c55f4afc&amp;display_name=Play&amp;url=https%3A%2F%2Fplay.ht%2Farticles%2Fdf29c55f4afc&amp;image=https%3A%2F%2Flh3.googleusercontent.com%2Fa-%2FAAuE7mC2g4rmLresL1zY0067xgvw1e0N8IfF-Gy8YtRBAg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=play" width="700" height="90" frameborder="0" scrolling="no"><a href="https://medium.com/media/0a406d88c7dd451c3aba58a7de8e5449/href">https://medium.com/media/0a406d88c7dd451c3aba58a7de8e5449/href</a></iframe><h3>Qu’est-ce que c’est l’accessibilité ?</h3><p>L’accessibilité peut être considérée comme la « capacité d’accéder » et de bénéficier d’un système. Le sens considéré ici se réfère à la conception de produits, appareils ou services de manière à être utilisables par des personnes ayant le plus large éventail de capacités possible, opérant dans le plus large éventail de situations possible. Il s’agit de rendre les choses accessibles à tous (que l’on ait un handicap ou non).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*whZDZQUEsZZJa8-6" /></figure><p>L’objectif derrière l’accessibilité est de faciliter l’accès à notre application aux personnes handicapées ou ayant des besoins spécifiques. Cela passe par garantir un « accès direct »(sans assistance) et un « accès indirect » (en s’assurant de la compatibilité avec les outils d’aide aux personnes, type liseuses d’écran). Cependant, la recherche et le développement en matière d’accessibilité sont avantageux pour tous.</p><p>L’accessibilité ne doit pas être confondue avec la utilisabilité, qui est la mesure dans laquelle un produit peut être utilisé par des utilisateurs spécifiques pour atteindre des objectifs spécifiés avec efficacité et satisfaction dans un contexte d’utilisation spécifié.</p><h3>Quel est l’impact ?</h3><p>Tout le monde rencontre des barrières d’accessibilité lorsqu’il y a un décalage entre nos besoins et notre environnement. L’expérience de l’inadéquation peut être permanente, temporaire ou situationnelle.</p><p>Par exemple (1. n’utiliser qu’un seul bras | 2. ne pas entendre) :</p><ul><li><strong>Permanente :</strong> avoir un bras | être sourd</li><li><strong>Temporaire :</strong> avoir une blessure au bras | avoir une infection de l’oreille</li><li><strong>Situationnelle :</strong> porter des produits d’épicerie lourds | porter des écouteurs antibruit</li></ul><p>Si vous concevez un produit, tel qu’un haut-parleur à commande vocale, les personnes à mobilité réduite et celles qui effectuent plusieurs tâches (cuisiner, conduire) peuvent également l’utiliser. C’est ce qu’on appelle l’effet Curb-cut (<em>coupe-trottoir</em>).</p><p>ℹ️ L’effet Curb-cut tire son nom des rampes d’accès (« Curb-cut » en anglais), ces zones du trottoir qui descendent jusqu’au niveau de la route. Elles ont été adoptées dans des villes du monde entier pour aider les personnes à mobilité réduite à monter et à descendre du trottoir. Cependant, de nombreuses personnes en bénéficient, y compris les cyclistes, les parents avec des poussettes, les voyageurs avec des valises à roulettes et à peu près n’importe qui d’autre avec un jeu de roues.</p><h3>Comment les utilisateurs se servent des technologie d’assistance ?</h3><p><strong>Les technologies d’assistance (TA)</strong> sont des dispositifs, du matériel et des logiciels spécialisés qui vont au-delà de ce qui peut être accompli avec les produits traditionnels pour surmonter les obstacles à l’accessibilité.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*RA8t41sAuw6ZiRLw" /></figure><p>Les fonctionnalités de personnalisation telles que <strong>le contraste élevé</strong> et <strong>les couleurs inversées</strong> peuvent aider les utilisateurs ayant une faible acuité visuelle et une faible sensibilité à la lumière. Lorsque les gens sont incapables de percevoir les informations visuelles avec des modifications, <strong>les lecteurs d’écran</strong> et <strong>les afficheurs braille</strong> peuvent émettre dans d’autres modalités. Les lecteurs d’écran convertissent les informations en sons et les afficheurs braille en informations tactiles.</p><p>Il est possible de modifier la façon dont les utilisateurs interagissent avec les appareils en modifiant la façon dont ils reçoivent les entrées. Par exemple, les utilisateurs qui subissent des tremblements peuvent frapper des touches involontairement, afin de pouvoir modifier <strong>la vitesse des touches</strong> et <strong>la durée de maintien</strong>. Les gens peuvent également utiliser le suivi de la tête, le regard oculaire et la commande vocale comme alternatives au clavier et à la souris.</p><h3>Mais que peut bien être le WCAG ?</h3><p>Pour aider les gens à réfléchir à ce qui est nécessaire pour rendre les sites plus accessibles, le World Wide Web Consortium (W3C) a créé les <a href="https://www.w3.org/WAI/standards-guidelines/wcag/">Web Content Accessibility Guidelines (WCAG)</a>.</p><p>Les quatre principes majeurs de l’accessibilité sont :</p><ul><li><strong>Perceptible</strong> (le contenu peut être présenté selon différentes modalités : vue, son et toucher)</li><li><strong>Opérable</strong> (le contenu peut être interagi de différentes manières, pas seulement à l’aide d’une souris ou de gestes spécifiques)</li><li><strong>Compréhensible</strong> (le contenu est prévisible, clair et aide les utilisateurs avec les interactions)</li><li><strong>Robuste</strong> (le contenu est compréhensible par un vaste panel d’utilisateurs aux handicaps variés et par différents types d’outils d’assistance)</li></ul><p>Quels que soient les changements technologiques, ces principes fondamentaux seront toujours valables. Dans chaque principe, il existe plusieurs lignes directrices, et dans chaque ligne directrice se trouvent des critères de réussite spécifiques et testables.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*4NqUwJPl_8gDL7zA" /></figure><blockquote>Mais tout comme le fait de respecter la loi ne garantit pas forcément un comportement éthique, suivre les règles d’accessibilité Web ne garantit pas pour autant un design inclusif. Cela permet juste de répondre aux exigences minimales.</blockquote><h3>Créer du contenu perceptible</h3><p>Pour pouvoir percevoir les images, les icônes ou encore des graphiques, les personnes malvoyantes ont besoin de descriptions textuelles. Ces descriptions peuvent être ajoutées au code HTML et peuvent être lues par des technologies d’assistance.</p><p>Toutes les vidéos doivent être sous-titrées pour les utilisateurs qui ne peuvent pas entendre, et tout le contenu audio, comme les épisodes de podcast ou les enregistrements de réunion, doit comporter des transcriptions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/709/0*o972uEQKWka_o5yI" /></figure><p>⏯ De nos jours, de nombreux lecteurs vidéo vous permettent d’ajouter automatiquement des sous-titres à votre contenu. Le problème avec les sous-titres automatiques est qu’ils ne suivent pas les meilleures pratiques pour créer une expérience de lecture facile. Ils n’incluent pas de ponctuation, ont souvent une orthographe incorrecte et parfois le texte est complètement faux. Donc, vérifiez toujours la qualité des sous-titres automatisés pour plus de précision, ajoutez de la ponctuation, ajustez les points de rupture si nécessaire et ajoutez des informations non vocales importantes à l’aide de crochets.</p><blockquote><strong>Une hiérarchie des titres est l’une des choses apparemment les plus simples, mais les plus importantes, que vous puissiez faire pour rendre votre contenu accessible.</strong></blockquote><p>Utilisez les bonnes balises de titre (h1, h2 etc.) dans votre code HTML,, afin que les utilisateurs de technologies d’assistance puissent parcourir la structure de la page et passer d’un titre à l’autre. C’est un moyen beaucoup plus efficace de naviguer. Une bonne hiérarchie des titres fonctionne comme une carte et aide les utilisateurs à comprendre rapidement la structure de votre contenu, à parcourir la page et à trouver les informations qu’ils recherchent.</p><p>Une autre chose importante à garder à l’esprit est que contrairement à la présentation visuelle, les technologies d’assistance doivent linéariser le contenu car, avec le son et le braille, une seule chose peut être communiquée à la fois. Lorsque le contenu est linéarisé, il doit toujours apparaître dans un ordre logique, de sorte que l’ordre du code doit correspondre à l’ordre visuel.</p><blockquote><strong>Enfin, vous ne devez jamais vous fier à un type spécifique de signal sensoriel.</strong></blockquote><p>Évitez les instructions telles que « appuyez sur le gros bouton bleu » ou « vous entendrez un bip une fois le test terminé », car ces instructions seraient inutiles pour les personnes qui ne peuvent percevoir ces signaux.</p><h3>Assurez-vous que votre interface est opérationnelle</h3><p>Chaque élément interactif du site doit pouvoir fonctionner avec un clavier, pas parce que toutes les personnes qui ne peuvent pas utiliser la souris ou les interactions tactiles seront des utilisateurs de clavier. L’utilisation du clavier se traduit bien par d’autres modes d’interaction alternatifs, et les interactions du lecteur d’écran sont souvent basées sur le clavier.</p><p>Le temps dont les gens ont besoin pour accomplir une tâche est très différent d’une personne à l’autre! Si vous avez un contenu en mouvement ou mis à jour automatiquement, donnez aux utilisateurs la possibilité de l’arrêter ou de le supprimer complètement.</p><blockquote>Voici une règle simple : ne pas avoir d’effets de clignotements à plus de trois flashs par seconde, car cela peut déclencher des crises chez certaines personnes.</blockquote><h3>Rendez votre site compréhensible</h3><p>La lisibilité est la facilité avec laquelle vous pouvez reconnaître les lettres et les distinguer. La lisibilité est la facilité de lecture des mots dans une phrase ou un paragraphe.</p><p>Certaines polices ont des lettres qui se ressemblent beaucoup, telles que la lettre majuscule O et le chiffre 0, ou les lettres minuscules g et q. Les polices lisibles peuvent être particulièrement utiles pour les utilisateurs ayant des difficultés de lecture, mais elles permettent à tout le monde de lire et de comprendre plus facilement le texte.</p><p>Une façon de tester une police sur l’ambiguïté des caractères consiste à utiliser le test Il1. Essayez-le par vous-même! Choisissez quelques caractères que vous utilisez et tapez la lettre majuscule I, la lettre minuscule l et le chiffre 1 côte à côte. Les polices lisibles seront conçues de manière à faciliter la différenciation de ces caractères. Dans les polices à faible lisibilité, les caractères peuvent sembler pratiquement identiques.</p><p>Vous pouvez améliorer la lisibilité et la lisibilité en choisissant des polices avec des ouvertures et des compteurs ouverts, en vous assurant qu’il y a suffisamment d’espace autour du texte et que le trait est uniforme.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*lT6qlL7R2bn3MGrN" /></figure><p>Les lecteurs d’écran ont besoin de savoir quelle langue ils lisent pour pouvoir la prononcer correctement. Il aide également les navigateurs à afficher les bons caractères alphabétiques. Définissez la langue de votre contenu par programmation, à la fois pour la page HTML entière et les paragraphes de texte qui apparaissent dans une langue différente (pour ces morceaux de texte séparément).</p><p>Répétez régulièrement les éléments (comme la navigation) d’une page à l’autre. S’il y a des éléments qui remplissent une fonction similaire, ils doivent être étiquetés, avoir la même apparence et se comporter de la même manière.</p><blockquote><strong>Les éléments visuels importants doivent avoir un contraste suffisant avec l’arrière-plan.</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/283/0*kVxj8ZJ0S5iu_Oyx" /></figure><p>Les designers trouvent souvent que les exigences d’accessibilité relatives aux couleurs sont restrictives et craignent de ne pas pouvoir utiliser des couleurs ou des combinaisons spécifiques s’ils souhaitent rendre leurs créations accessibles. S’il est vrai que les exigences d’accessibilité posent certaines contraintes, elles ne limitent jamais les couleurs que vous pouvez utiliser dans votre palette, mais uniquement la façon dont vous les utilisez.</p><p>Quelles que soient les couleurs que vous utilisez dans votre travail, assurez-vous qu’au moins certaines combinaisons ont un contraste suffisamment élevé. Les WCAG 2.1 exigent un rapport de contraste entre le texte et l’arrière-plan d’au moins 4,5: 1 pour le texte normal et de 3: 1 pour le texte grand (18 pt) et gras (14 pt) au niveau AA.</p><p>⁉️ Avez-vous déjà rempli un formulaire qui a été retourné avec un tas de champs surlignés en rouge, mais aucune explication pourquoi? Cela peut être très frustrant. Essayez d’être aussi précis que possible sur les informations que les utilisateurs doivent saisir.</p><p>La couleur peut être efficace pour attirer l’attention de l’utilisateur sur des zones spécifiques de la page et pour aider les utilisateurs à identifier différents types d’informations en un coup d’œil. Cependant, les indices de couleur ne sont pas utiles aux utilisateurs aveugles ou qui perçoivent la couleur différemment. Bien que vous ne devriez pas hésiter à utiliser la couleur, pour concevoir de manière inclusive, vous devez vous assurer que des indices supplémentaires sont également disponibles.</p><blockquote><strong>N’utilisez la couleur que comme signal secondaire pour communiquer des informations.</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*4O_l2esCE1xPv--m" /></figure><h3>Créez un contenu Web robuste</h3><p>Tout d’abord, vous devez vous assurer qu’il n’y a pas d’erreurs de validation dans votre balisage. Des erreurs de balisage telles que des identifiants en double ou des balises de début et de fin erronées peuvent empêcher les technologies d’assistance de communiquer correctement les informations.</p><p>Deuxièmement, assurez-vous que tous les éléments du site, en particulier les composants personnalisés, ont des rôles, des états et des propriétés attribués.</p><h3>Comment gérer les tests d’accessibilité ?</h3><p>L’accessibilité est un travail d’équipe! Chaque personne dans une organisation doit faire sa part pour s’assurer que les produits répondent aux exigences d’accessibilité. Cela inclut les développeurs, les designers, les chefs de produit, les créateurs de contenu et les testeurs d’assurance qualité. Tout le monde n’a pas besoin d’être un expert en accessibilité, mais chacun doit savoir quelles considérations d’accessibilité s’appliquent à son rôle. Les concepteurs visuels doivent vérifier leur contraste de couleur et choisir des polices accessibles. Les designers d’interface utilisateur doivent être conscients des différentes modalités d’interaction. Les développeurs doivent s’assurer qu’ils utilisent un balisage accessible. Les créateurs de contenu doivent vérifier que leurs matériaux sont clairement structurés et fournir des descriptions pour les images. Les chefs de produit doivent définir les exigences d’accessibilité lors de la planification d’un projet et vérifier qu’elles sont respectées.</p><blockquote><strong>Il est préférable de tester l’accessibilité au fur et à mesure et de l’aborder comme un processus itératif.</strong></blockquote><h4>Vérificateurs automatisés</h4><p>Il existe de nombreux outils de test automatisés, mais la plupart d’entre eux identifieront les mêmes types de problèmes. Les outils de test automatisés sont très limités. L’interprétation des résultats exigera toujours un jugement humain.</p><p>Voici quelques outils que vous pouvez essayer :</p><ul><li><a href="https://chrome.google.com/webstore/detail/lighthouse/blipmdconlkpinefehnmjammfjpmpbjk">Lighthouse</a> (Chrome)</li><li><a href="https://chrome.google.com/webstore/detail/axe/lhdoppojpmngadmnindnejefpokejbdd">Axe</a> (Chrome)</li><li><a href="https://wave.webaim.org/extension">WAVE</a> (Chrome and Firefox)</li><li><a href="https://chrome.google.com/webstore/detail/headingsmap/flbjommegcjonpdmenkdiocclhjacmbi">HeadingsMap</a> (Chrome)</li><li><a href="https://validator.w3.org/nu/">Nu Html Checker</a></li><li><a href="https://www.paciellogroup.com/resources/contrastanalyser/">TPG Colour Contrast Analyser</a></li><li><a href="https://support.apple.com/guide/voiceover/welcome/10">VoiceOver</a> (Utilisateurs Mac uniquement)</li><li><a href="http://www.nvaccess.org/">NVDA screen reader</a> (Utilisateurs PC uniquement)</li></ul><h4>Rapport basé sur WCAG</h4><p>Pour tous les problèmes détectés par les vérificateurs automatisés, assurez-vous de les parcourir manuellement avant de les inclure dans votre rapport.</p><p>Si vous évaluez un site dans son ensemble, il peut être utile d’organiser vos résultats en fonction des critères de réussite des WCAG. Vous pouvez créer une table avec les colonnes suivantes:</p><ul><li><strong>Nom et numéro du critère de succès :</strong> identifiez le critère par son nom et son numéro de référence, et incluez un lien vers le document WCAG pour plus de commodité.</li><li><strong>État général :</strong> répond aux exigences / nécessite des correctifs mineurs / nécessite des correctifs majeurs</li><li><strong>Commentaires :</strong> des détails sur vos résultats ainsi que des exemples spécifiques, des captures d’écran et des recommandations dans la mesure du possible. En cas de doute, décrivez le problème que vous rencontrez et qui, selon vous, pourrait être touché.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Cai5ymfOTHkfbSU8" /><figcaption>Photo by <a href="https://unsplash.com/@melihildt?utm_source=medium&amp;utm_medium=referral">Melisa Hildt</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Et ensuite ?</h3><p>Idéalement, nous penserons à l’accessibilité dès le début du processus de conception et le communiquerons à toutes les équipes. En réalité, les designers ne pensent toujours pas assez à l’accessibilité. Les développeurs implémentent des modèles basés sur des conceptions visuelles sans nécessairement avoir suffisamment d’informations sur le comportement prévu. Les propriétaires de produits ne savent pas toujours ce qu’il faut rechercher pour déterminer s’ils ont quelque chose qui est accessible.</p><p>La réflexion sur l’accessibilité doit se faire dans plusieurs rôles et départements différents, la communication est donc essentielle ! Les meilleures solutions varieront en fonction du projet, de l’organisation et du degré de collaboration entre les départements. Autant que possible, essayez d’intégrer ce travail aux processus et pratiques déjà en place.</p><p>Si vous souhaitez approfondir ce sujet, je vous suggère fortement de suivre le cours <a href="https://openclassrooms.com/fr/courses/6691346-concevez-un-contenu-web-accessible">Concevez Un Contenu Web Accessible</a> @ <a href="https://openclassrooms.com/fr">OpenClassrooms.com</a></p><p>Il s’agit d’un cours simple de six heures qui fera de vous un expert de l’accessibilité pour le web 💪</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=df29c55f4afc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Making The Web More Accessible]]></title>
            <link>https://medium.com/openclassrooms-product-design-and-engineering/making-the-web-more-accessible-a878c39457a5?source=rss-da8e34f00b8e------2</link>
            <guid isPermaLink="false">https://medium.com/p/a878c39457a5</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[accessibility]]></category>
            <category><![CDATA[testing]]></category>
            <category><![CDATA[quality-assurance]]></category>
            <category><![CDATA[web-design]]></category>
            <dc:creator><![CDATA[Alex Ivanova]]></dc:creator>
            <pubDate>Fri, 20 Nov 2020 13:47:15 GMT</pubDate>
            <atom:updated>2020-11-25T09:50:16.108Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="a dog laying in front of a closed door" src="https://cdn-images-1.medium.com/max/1024/0*Sza3SuV_RFwddez4" /><figcaption>Photo by <a href="https://unsplash.com/@courtneymcook?utm_source=medium&amp;utm_medium=referral">Courtney Cook</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h4>so that we can all benefit from it</h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplay.ht%2Fembed%2F%3Farticle_url%3Dhttps%3A%2F%2Fmedium.com%2F_p%2Fmaking-the-web-more-accessible-a878c39457a5&amp;display_name=Play&amp;url=https%3A%2F%2Fplay.ht%2Farticles%2Fa878c39457a5&amp;image=https%3A%2F%2Fd262ilb51hltx0.cloudfront.net%2Ffit%2Fc%2F300%2F300%2F0%2Aa2l3VVqNBba8hpfB.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=play" width="700" height="90" frameborder="0" scrolling="no"><a href="https://medium.com/media/e1bcae2e2f878dfbd6b5218a1160fa98/href">https://medium.com/media/e1bcae2e2f878dfbd6b5218a1160fa98/href</a></iframe><h3>What is accessibility?</h3><p>Accessibility can be viewed as the <strong>“ability to access”</strong> and benefit from a system. The sense considered here refers to the design of products, devices, or services so as to be usable by people with the widest possible range of abilities, operating within the widest possible range of situations. This is about making things accessible to all people (whether they have a disability or not).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*XP_Lm4jcCqoecMic" /></figure><p>The concept of accessible design and the practice of accessible development focuses on enabling access for people with disabilities, or special needs by ensuring both “direct access” (unassisted) and “indirect access” meaning compatibility with a person’s assistive technology. However, research and development in accessibility brings benefits to everyone.</p><p>Accessibility is not to be confused with usability, which is the extent to which a product can be used by specified users to achieve specified goals with effectiveness and satisfaction in a specified context of use.</p><h3>What is the impact?</h3><p>Everybody experiences accessibility barriers when there is a mismatch between their needs and their environment. The experience of the mismatch can be permanent, temporary, or situational.</p><p>For example (1. using only one arm <strong>| </strong>2. not being able to hear):</p><ul><li><strong>Permanent: </strong>having one arm <strong>| </strong>being deaf</li><li><strong>Temporary: </strong>having an arm injury <strong>| </strong>having an ear infection</li><li><strong>Situational: </strong>carrying heavy groceries <strong>| </strong>wearing noise-canceling headphones</li></ul><p>If you design a product, such as a voice-activated speaker, people with limited hand mobility and those who are multi-tasking (cooking, driving), can also use it. It is called the curb-cut effect.</p><p>ℹ️ The curb-cut effect gets its name from physical curb cuts, the areas of the sidewalk that slope down to road level. They were adopted in cities worldwide to help people in mobility devices get on and off the sidewalk. However, many people benefit from them, including cyclists, parents with strollers, travelers with rolling suitcases, and pretty much anyone else with a set of wheels.</p><h3>How do individuals use assistive technologies?</h3><p><strong>Assistive technologies (ATs)</strong> are specialized devices, hardware, and software that go beyond what can be accomplished with mainstream products to address accessibility barriers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Fk3_pQ2Rvsmrwh8r" /></figure><p>Personalization features such as <strong>high contrast</strong> and <strong>inverted colors</strong> can help users with low visual acuity and light sensitivities. When people are unable to perceive visual information with modifications, <strong>screen readers</strong> and <strong>braille displays</strong> can output into other modalities. Screen readers convert information into sound and braille displays into tactile information.</p><p>It’s possible to change how users interact with devices by changing how they receive input. For example, users who experience tremors may hit keys unintentionally, so they can change the <strong>key speed</strong> and <strong>hold duration</strong>. People can also use head tracking, eye gaze, and voice control as alternatives to the keyboard and mouse.</p><h3>What the frack is WCAG?</h3><p>To help people consider what is needed to make sites more accessible, the World Wide Web Consortium (W3C) created the <a href="https://www.w3.org/WAI/standards-guidelines/wcag/">Web Content Accessibility Guidelines (WCAG)</a>.</p><p>The top four accessibility principles are:</p><ul><li><strong>Perceivable</strong> (content can be presented through different modalities: sight, sound, and touch)</li><li><strong>Operable</strong> (content can be interacted with in different ways, not just by using a mouse or specific gestures)</li><li><strong>Understandable</strong> (content is predictable, clear, and helps users with interactions)</li><li><strong>Robust</strong> (content supports a wide presentation across a variety of user agents and different types of assistive technologies)</li></ul><p>No matter how much technology changes, these core principles will always hold. Within each principle, there are several guidelines, and within each guideline are specific, testable success criteria.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-IQqa1jQN5wVhe64" /></figure><blockquote><strong>But just like following laws doesn’t guarantee ethical behavior, following web accessibility guidelines doesn’t guarantee inclusive design. It just satisfies minimum requirements.</strong></blockquote><h3>Create perceivable content</h3><p>People who can’t see to perceive illustrations, image links, icons, and charts require alternative text descriptions. These descriptions can be added to the HTML code and can be read by assistive technologies.</p><p>All videos should be captioned for users who can’t hear, and all audio content, like podcast episodes or meeting recordings, should have transcripts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/709/0*I_a1J2SevrPi732Z" /></figure><p>⏯ These days, many video players, allow you to automatically add captions to your content. The issue with automated captions is that they don’t follow best practices for creating an easy reading experience. They don’t include punctuation, often have incorrect spelling, and sometimes get the text entirely wrong. So always quality-check automated captions for accuracy add punctuation, adjust breaking points where needed, and add important non-speech information using square brackets.</p><blockquote><strong>A heading hierarchy is one of the seemingly simplest, yet most important things you can do to make your content accessible.</strong></blockquote><p>Identify headings in the markup, so that assistive technology users can scan the structure of the page and jump from heading to heading. It’s a much more efficient way to navigate. A good heading hierarchy functions as a map and helps users quickly understand the structure of your content, scan the page, and find the information they’re looking for.</p><p>Another important thing to keep in mind is that unlike visual presentation, assistive technologies need to linearize content because, with sound and braille, only one thing can be communicated at a time. When the content is linearized, it should still appear in a logical order, so the code order should match the visual order.</p><blockquote><strong>Lastly, you should never rely on one specific type of sensory cue.</strong></blockquote><p>Avoid instructions like “press the big blue button’” or “you will hear a beep once the test is finished,” since these instructions would be useless to people who need to adapt them to another modality.</p><h3>Ensure your interface is operable</h3><p>Every interactive element on the site should be operable with a keyboard, not because everyone who can’t use mouse or touch interactions will be a keyboard user. Keyboard operability translates well into other alternative modes of interaction, and screen reader interactions are often keyboard-based.</p><p>The amount of time people need to accomplish a task is very different from person to person! If you have any moving or auto-updating content, give people the option to stop it or get it out of the way entirely.</p><blockquote><strong>This one is simple: don’t have anything that flashes at more than three flashes per second as it can trigger seizures in some people.</strong></blockquote><h3>Make your site understandable</h3><p>Legibility is how easily you can recognize letters and tell them apart. Readability is the ease of reading words across a sentence or paragraph.</p><p>Some typefaces have letters that look very similar to each other, such as the capital letter O and the number 0, or the lowercase letters g and q. Legible fonts can be especially helpful for users with reading disabilities, but it makes it easier for everyone to read and understand the text.</p><p>One way to test a typeface on character ambiguity is to use the <strong>Il1 test.</strong> Try it for yourself! Pick a few typefaces you’re using and type out the capital letter I, the lowercase letter l, and the number 1 next to each other. Legible fonts will be designed in a way that makes it easier to differentiate these characters. In typefaces with poor legibility, the characters can look virtually identical.</p><p>You can improve legibility and readability by choosing typefaces with open apertures and counters, making sure there is enough space around the text, and have a uniform stroke.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1Mry66hyASYMXZ4_" /></figure><p>Screen readers need to know what language they’re reading in order to pronounce it correctly. It also helps browsers display the right alphabetical characters. Define the language of your content programmatically, both for the whole HTML page and paragraphs of text that appear in a different language (for those pieces of text separately).</p><p>Keep repeating elements consistently (like navigation) from page to page. If there are elements that serve a similar function, they should be labeled, look, and behave the same way.</p><blockquote><strong>Important visual elements should have enough contrast with the background.</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/283/0*IcIYUf2Ml8qVCfd0" /></figure><p>Designers often find accessibility requirements around color restrictive and worry that they can’t use specific colors or combinations if they want to make their designs accessible. While it’s true that accessibility requirements pose some constraints, they never limit which colors you can use in your palette, only how you use them.</p><p>Whatever colors you use in your work, make sure that at least some combinations have high enough contrast. The WCAG 2.1 require a contrast ratio between text and background of at least 4.5:1 for regular text, and 3:1 for large (18pt) and bold text (14pt) at level AA.</p><p>⁉️ Have you ever filled out a form that was returned with a bunch of fields highlighted in red, but no explanations why? It can be very frustrating. Try to be as specific as possible about the information you need users to enter.</p><p>Color can be effective for drawing user&#39;s attention to specific areas on the page and helping users identify different types of information at a glance. However, color cues are not helpful to users who are blind or perceive color differently. While you shouldn’t shy away from using color, to design inclusively, you need to make sure additional cues are also available.</p><blockquote><strong>Only use color as a secondary cue for communicating information.</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*EV67yiDcaGbhjczT" /></figure><h3>Build a robust web content</h3><p>Firstly, you should make sure that there are no validation errors in your markup. Markup errors like duplicate IDs or stray start and end tags can prevent assistive technologies from properly communicating information.</p><p>Secondly, make sure that all elements on the site, especially any custom components, have assigned roles, states, and properties.</p><h3>How to manage accessibility testing?</h3><p>Accessibility is a team effort! Every person in an organization needs to do their part in ensuring that products meet accessibility requirements. That includes developers, designers, product managers, content creators, and QA testers. Not everyone needs to be an accessibility expert, but everyone should know what accessibility considerations apply to their role. Visual designers should check their color contrast and pick accessible typefaces. UI designers should be mindful of different interaction modalities. Developers should make sure they are using accessible markup. Content creators should check that their materials are structured clearly and provide descriptions for images. Product managers should define accessibility requirements when planning a project and check that they are met.</p><blockquote><strong>It is better to test accessibility as you go and approach it as an iterative process.</strong></blockquote><h4>Automated checkers</h4><p>There are many automated testing tools but most of them will identify the same types of issues. Automated testing tools are very limited. Interpreting the results will always require human judgment.</p><p>Here are some tools you can try:</p><ul><li><a href="https://chrome.google.com/webstore/detail/lighthouse/blipmdconlkpinefehnmjammfjpmpbjk">Lighthouse</a> (Chrome)</li><li><a href="https://chrome.google.com/webstore/detail/axe/lhdoppojpmngadmnindnejefpokejbdd">Axe</a> (Chrome)</li><li><a href="https://wave.webaim.org/extension">WAVE</a> (Chrome and Firefox)</li><li><a href="https://chrome.google.com/webstore/detail/headingsmap/flbjommegcjonpdmenkdiocclhjacmbi">HeadingsMap</a> (Chrome)</li><li><a href="https://validator.w3.org/nu/">Nu Html Checker</a></li><li><a href="https://www.paciellogroup.com/resources/contrastanalyser/">TPG Colour Contrast Analyser</a></li><li><a href="https://support.apple.com/guide/voiceover/welcome/10">VoiceOver</a> (Mac users only)</li><li><a href="http://www.nvaccess.org/">NVDA screen reader</a> (PC users only)</li></ul><h4>WCAG Based Report</h4><p>For all issues found by automated checkers, make sure to go through them manually before including them in your report.</p><p>If you’re evaluating a site as a whole, it can be helpful to organize your findings based on WCAG success criteria. You can create a table with the following columns:</p><ul><li><strong>Success criterion name and number:</strong> identify the criterion by name and its reference number, and include a link to the <a href="https://www.w3.org/WAI/standards-guidelines/wcag/">WCAG document</a> for convenience.</li><li><strong>Overall status:</strong> meets requirements / requires minor fixes / requires major fixes</li><li><strong>Comments:</strong> Details about your findings along with specific examples, screenshots, and recommendations wherever possible. When in doubt, describe the issue you’re encountering and who you think may be impacted.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*HseI8ABv0sQftNKe" /><figcaption>Photo by Ben Kolde on Unsplash</figcaption></figure><h3>What next?</h3><p>Ideally, we will think about accessibility from the beginning of the design process and communicate it across teams. In reality, designers still don’t think enough about accessibility. Developers implement patterns based on visual designs without necessarily having enough information about the intended behavior. Product owners don’t always know what to look for to determine whether they have something accessible.</p><p>Thinking about accessibility needs to happen across several different roles and departments, so communication is key! The best solutions will vary depending on the project, organization, and amount of collaboration between departments. As much as possible, try to integrate this work with processes and practices that are already in place.</p><p>If you are interested in going deeper into this topic I strongly suggest you follow the course <a href="https://openclassrooms.com/en/courses/6663451-make-your-web-content-accessible">Make Your Web Content Accessible</a> @ <a href="https://openclassrooms.com/en">OpenClassrooms.com</a></p><p>This is an easy, six-hour course that will make you an expert on accessibility for the web 💪</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a878c39457a5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/openclassrooms-product-design-and-engineering/making-the-web-more-accessible-a878c39457a5">Making The Web More Accessible</a> was originally published in <a href="https://medium.com/openclassrooms-product-design-and-engineering">Product, Experience &amp; Technology @ OpenClassrooms</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Utiliser BDD pour de bon]]></title>
            <link>https://medium.com/openclassrooms-produit-design-et-ing%C3%A9nierie/utiliser-bdd-pour-de-bon-baff37be3ab5?source=rss-da8e34f00b8e------2</link>
            <guid isPermaLink="false">https://medium.com/p/baff37be3ab5</guid>
            <category><![CDATA[engineering]]></category>
            <category><![CDATA[testing]]></category>
            <category><![CDATA[qa]]></category>
            <category><![CDATA[codeception]]></category>
            <category><![CDATA[bdd]]></category>
            <dc:creator><![CDATA[Alex Ivanova]]></dc:creator>
            <pubDate>Tue, 04 Feb 2020 14:30:00 GMT</pubDate>
            <atom:updated>2020-02-20T15:45:21.566Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y0cRIVUZV8ajJSuT-7YJnQ.jpeg" /><figcaption>Image from <a href="https://thepolicytimes.com/wp-content/uploads/2017/11/automation.jpg">thepolicytimes.com</a></figcaption></figure><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplay.ht%2Fembed%2F%3Farticle_url%3Dhttps%3A%2F%2Fmedium.com%2F_p%2Futiliser-bdd-pour-de-bon-baff37be3ab5&amp;display_name=Play&amp;url=https%3A%2F%2Fplay.ht%2Farticles%2Fbaff37be3ab5&amp;image=https%3A%2F%2F0%2Aa2l3VVqNBba8hpfB.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=play" width="700" height="185" frameborder="0" scrolling="no"><a href="https://medium.com/media/5c6bdf95f8b26ac78bdedea7e8eacf4f/href">https://medium.com/media/5c6bdf95f8b26ac78bdedea7e8eacf4f/href</a></iframe><h3>Utiliser BDD pour de bon</h3><p>Serait-il compliqué pour vous d’expliquer à un enfant âgé de 3 ans comment un navigateur Web fonctionne ? Le même défi s’applique au développement de logiciels car le domaine client peut être assez difficile à comprendre.</p><p>Nous avons besoin d’exemples pour comprendre ce dont le client a besoin. Travailler avec des exemples concrets nous aide à mieux communiquer parce que nous sommes en mesure de comprendre le problème plus facilement. Pour ce faire, nous pouvons utiliser une méthode connue comme la BDD (<em>behavior driven development en anglais | la programmation pilotée par le comportement en français).</em></p><h3>Utiliser BDD pour créer les exemples est incroyable !</h3><p>C’est incroyable parce que cela transforme des scénarios humains en tests. La BDD encourage l’exploration et le débat afin de formaliser les exemples décrivant les conditions requises pour les fonctionnalités à implémenter. C’est un langage commun que tous les membres de l’équipe doivent utiliser pendant le processus de développement afin de pouvoir vérifier que les exemples ont un sens pour tous dans l’équipe.</p><h3>Ok. Alors, comment fait-on ?</h3><p>Nous décrivons une fonctionnalité spécifique d’une application, avec un ensemble de scénarios et d’exemples décrivant cette fonctionnalité.<br>Le fichier de fonctionnalités <em>(feature file)</em> est écrit au format Gherkin. Fondamentalement, Gherkin est un texte brut avec un peu de structure supplémentaire. Chaque phrase est ensuite connectée à un ensemble d’instructions de votre code d’automatisation qui doit être exécuté pour terminer l’étape.</p><p><strong>L’idée d’un test BDD peut être résumée ainsi :</strong></p><ul><li>décrire une fonctionnalité dans des scénarios en utilisant un texte formel</li><li>utiliser des exemples pour concrétiser des choses abstraites</li><li>écrire le code réel en implémentant chaque étape du scénario</li></ul><p>Dans nos exemples ici, nous allons utiliser Codeception mais vous êtes libre d’utiliser n’importe quel framework BDD qui convient à votre stack technique. Codeception peut générer un fichier de fonctionnalités pour vous. Nous pouvons les placer dans un dossier bdd et créer un feature file search :</p><pre>codecept generate:feature bdd search</pre><p>Ce modèle peut être rempli en définissant un acteur et des objectifs :</p><blockquote><strong>As a(n)</strong> actor<br><strong>I want to</strong> do a certain action<br><strong>In order to</strong> achieve a certain goal</blockquote><p>Dans notre exemple, nous allons utiliser la fonctionnalité de recherche du site <a href="http://www.openclassrooms.com/">OpenClassrooms.com</a>.</p><pre>Feature: Search<br> As a visitor<br> I want to search for paths<br> In order to find the one that I am interested in</pre><p>Nous devons maintenant écrire le scénario que nous allons utiliser pour notre automatisation. Les scénarios sont écrits étape par étape en utilisant l’approche <strong>Given-When-Then </strong>(Etant donné-Quand-Alors).</p><h3>Voici le modèle pour écrire des cas de tests BDD</h3><blockquote><strong>Given</strong> a certain scenario<br><strong>When</strong> an action takes place<br><strong>Then</strong> this should be the outcome</blockquote><p>En continuant sur notre exemple, nous pouvons écrire un scénario qui ressemble à ceci :</p><pre>Scenario Outline: Visitor can find a path<br>  Given I am a visitor<br>  When I am on the &quot;search&quot; page<br>   And I filter by &lt;category&gt;<br>   And I search by &lt;keyword&gt;<br>  Then I see the correct &lt;path&gt;Examples:<br>      | category | keyword | path            |<br>      | &quot;paths&quot;  | &quot;dev&quot;   | &quot;Web Developer&quot; |<br>      | &quot;paths&quot;  | &quot;ai&quot;    | &quot;AI Engineer&quot;   |</pre><p>Ici, nous avons recours à une technique avancée où nous pouvons mettre en place des Exemples en utilisant un Scenario Outline afin d’exécuter notre test plusieurs fois avec différents paramètres. Les valeurs sont remplacées par les placeholders (espaces réservés)&lt;category&gt;, &lt;keyword&gt; et &lt;result&gt;, qui sont remplis par le tableau des Exemples. Chaque ensemble de valeurs est exécuté comme un test différent.</p><p>Sur Codeception nous pouvons tester ce scénario en exécutant en mode dry-run :</p><pre>codecept dry-run bdd search.feature</pre><p>Nous devrions maintenant définir facilement les étapes du scénario en exécutant :</p><pre>codecept gherkin:snippets bdd</pre><p>Pour faire correspondre les étapes d’un fichier de fonctionnalité avec le code PHP, nous utilisons des annotations qui sont ensuite ajoutées aux méthodes. Les étapes peuvent également être associées à des expressions regex et des paramètres peuvent également être passés dans des chaînes autres que les expressions regex à l’aide de : params placeholder <em>(l’espace réservé params)</em>.</p><p>Voici un exemple utilisant les étapes définies dans notre scénario :</p><pre>/**<br> * @Given I am a visitor<br> */</pre><pre>/**<br> * @When I am on the :page page<br> */</pre><pre>/**<br> * @When I filter by :category<br> */</pre><pre>/**<br> * @When I search by :keyword<br> */</pre><pre>/**<br> * @Then I should see the correct :path<br> */</pre><p>Les étapes sont définies dans les context files<em> (fichiers de contexte)</em>. Le contexte par défaut est une classe d’acteurs, c’est-à-dire que pour la suite de tests bdd, le contexte est la classe BddTester. Vous pouvez définir le contexte dans un fichier bdd.suite.yml ainsi :</p><pre>gherkin:<br> contexts:<br>   default:<br>     — BddTester</pre><p>Nous allons ensuite connecté les annotations aux méthodes préexistantes de notre framework d’automatisation basé sur Codeception. Réutiliser le code existant est toujours bon 👍</p><p>Voici quelques exemples :</p><pre>/**<br> * @Given I am a visitor<br> */<br>public function iAmAVisitor()<br>{<br>    $this-&gt;setLocale(&#39;en&#39;);<br>}</pre><pre>/**<br> * @When I am on the :page page<br> */<br>public function iAmOnThePage($page)<br>{<br>    $this-&gt;amOnPage($page);<br>}</pre><pre>/**<br> * @When I filter by :category<br> */<br>public function iFilterByCategory($category = &#39;all&#39;)<br>{<br>    $this-&gt;searchPage-&gt;addCategoryFilter($category);<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Yed2naR75TZhU966" /><figcaption>Photo by <a href="https://unsplash.com/@paul_?utm_source=medium&amp;utm_medium=referral">Paul Hanaoka</a></figcaption></figure><h3>À quel point devrions-nous être précis ?</h3><p>Il y a un grand débat sur ce à quoi devrait ressembler un test BDD. La question est de savoir à quel point cela devrait être détaillé pour être précis, mais compréhensible. Nous voulons aussi que cela soit utile à tout le monde.</p><p>D’après mon expérience, que vous utilisiez BDD comme solution unique pour créer votre framework d’automatisation de test ou seulement dans quelques tests end-to-end (de bout-en-bout), il est préférable de rendre vos étapes aussi lisibles que possible. Pour la plupart, cela signifie être moins spécifique et entrer dans les détails uniquement dans vos méthodes (dans la base de code de votre automatisation), mais pas dans vos fichiers de fonctionnalités BDD.</p><p>Chez <a href="https://openclassrooms.com/fr/">OpenClassrooms</a>, nous utilisons BDD pour créer des scénarios end-to-end. Tout en gardant des tests plus courts et plus spécifiques en utilisant le framework <a href="https://codeception.com/">Codeception </a>. Voici quelques exemples de tests end-to-end sur notre plateforme :</p><blockquote>Visitor can sign up and become a self-paid student.<br>Student can get their projects validated and finish their path.<br>Mentor can create a mentorship session and evaluate their student’s progress.<br>Assessor can create a presentation sessions and evaluate student’s project.<br>Admin can create a new course.</blockquote><h3>BDD ou ne pas BDD ?</h3><p>Prendre la décision de créer un grand nombre de scénarios de test en utilisant cette approche est très subjectif. Jusqu’à présent, chez OpenClassrooms, nous expérimentons toujours et essayons de déterminer combien d’entre eux nous aurons besoin. Nous avons commencé par créer 10 scénarios de test BDD end-to-end et, dans le cadre de ce processus, nous découvrirons à quel point ils seront utiles à notre équipe.</p><p>Ne tester que ce qui est utile demande de la nuance et de l’expérience. Il y a beaucoup de subtilité entre déterminer ce qui mérite d’être testé et ce qui mérite d’être automatisé. L’utilisation de BDD peut être une arme à double tranchant et vous devez faire attention ! Ayez toujours à l’esprit votre objectif, ce que vous gagnez en utilisant cette approche, ce que vous sacrifiez et surtout… faites vos propres expériences et introduisez progressivement BDD dans votre workflow.</p><h3>Avantages de l’utilisation de BDD</h3><ol><li>Il peut atteindre un public plus large.</li><li>Il favorise une meilleure communication entre les membres de l’équipe.</li><li>Il définit les critères d’acceptation avant le développement.</li></ol><h3>Inconvénients de BDD</h3><ol><li>Si les exigences ne sont pas correctement spécifiées, BDD peut ne pas être efficace.</li><li>Les testeurs utilisant BDD doivent avoir des compétences techniques suffisantes.</li><li>C’est moins flexible que du code pur.</li><li>Cela ajoute une complexité supplémentaire à votre framework.</li></ol><h3>En bref</h3><p>L’idée principale de BDD est d’avoir pour objectif essentiel de prévenir les problèmes de communication, c’est-à-dire que tous les membres de l’équipe communiquent plus souvent et mieux en s’appuyant sur des exemples concrets et non sur des exigences abstraites.</p><p>Je sais que ce n’est pas une solution miracle, mais j’espère vraiment que cela améliorera la collecte des exigences et la testabilité de notre application.</p><h3>P.S.</h3><p>J’ai créé un exemple de code disponible sur <a href="https://github.com/melnelen/ExampleBddWithCodeception">GitHub</a> spécialement pour cet article.</p><p>Pour plus d’informations sur la configuration de votre propre infrastructure d’automatisation BDD avec Codeception, consultez <a href="https://codeception.com/docs/07-BDD">la documentation BDD Codeception</a>.</p><p>Pour plus d’informations sur les parcours et les cours disponibles sur la plateforme d’OpenClassroms, vous pouvez rechercher vos sujets favoris sur <a href="https://openclassrooms.com/fr/search">la page de recherche d’OpenClassrooms</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=baff37be3ab5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/openclassrooms-produit-design-et-ing%C3%A9nierie/utiliser-bdd-pour-de-bon-baff37be3ab5">Utiliser BDD pour de bon</a> was originally published in <a href="https://medium.com/openclassrooms-produit-design-et-ing%C3%A9nierie">Technologie @ OpenClassrooms</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using BDD for good]]></title>
            <link>https://medium.com/openclassrooms-product-design-and-engineering/using-bdd-for-good-dd2c51464b82?source=rss-da8e34f00b8e------2</link>
            <guid isPermaLink="false">https://medium.com/p/dd2c51464b82</guid>
            <category><![CDATA[codeception]]></category>
            <category><![CDATA[qa]]></category>
            <category><![CDATA[bdd]]></category>
            <category><![CDATA[testing]]></category>
            <category><![CDATA[quality-assurance]]></category>
            <dc:creator><![CDATA[Alex Ivanova]]></dc:creator>
            <pubDate>Thu, 21 Nov 2019 15:42:54 GMT</pubDate>
            <atom:updated>2020-02-04T14:37:59.975Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y0cRIVUZV8ajJSuT-7YJnQ.jpeg" /><figcaption>Image from <a href="https://thepolicytimes.com/wp-content/uploads/2017/11/automation.jpg">thepolicytimes.com</a></figcaption></figure><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplay.ht%2Fembed%2F%3Farticle_url%3Dhttps%3A%2F%2Fmedium.com%2F_p%2Fusing-bdd-for-good-dd2c51464b82&amp;url=https%3A%2F%2Fplay.ht%2Farticles%2Fdd2c51464b82&amp;image=https%3A%2F%2F0%2Aa2l3VVqNBba8hpfB.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=play" width="700" height="185" frameborder="0" scrolling="no"><a href="https://medium.com/media/b9e078c33f049bc5c569c3d427b1356d/href">https://medium.com/media/b9e078c33f049bc5c569c3d427b1356d/href</a></iframe><p>How complicated would it be for you to explain to a 3-year-old child how the web browser works? The same challenge applies to software development as the client domain can be pretty difficult to understand.</p><p>We need examples to understand what the client needs. Working with real-world examples helps us to communicate better because we’re able to relate to the problem more easily. To do that, we can use a method called Behavior Driven Development (aka BDD).</p><h3><strong>Using BDD to create the examples is amazing!</strong></h3><p>It’s amazing because it turns human scenarios into tests. Behavior Driven Development encourages exploration and debate in order to formalize the examples describing the requirements for the features that need to be implemented. It is a common language for all team members to use during the development process so you can check that the examples make sense to everyone in the team.</p><h3>Ok. So how do we do this?</h3><p>We describe a specific feature of an application, with a set of scenarios and examples describing this feature.<br>The feature file is written in a Gherkin format. Basically Gherkin is a plain-text language with a little extra structure. Each sentence is then connected to a set of instructions in your automation code that needs to be executed in order to complete the step.</p><p><strong>The idea of a BDD test can be narrowed down to:</strong></p><ul><li>describe a feature in scenarios using a formal text</li><li>use examples to make abstract things concrete</li><li>write actual code implementing each step of the scenario</li></ul><p>In our examples here we’re going to use Codeception but you are free to use any BDD framework that suits your technology stack. Codeception can generate a feature file for you. We can place our feature files in a bdd directory and create a search feature file:</p><pre>codecept generate:feature bdd search</pre><p>This template can be fulfilled by setting actor and goals:</p><blockquote><strong>As a(n)</strong> actor<br><strong>I want to</strong> do a certain action<br><strong>In order to</strong> achieve a certain goal</blockquote><p>In our example, we are going to use the search feature on the <a href="http://www.openclassrooms.com/">OpenClassrooms.com</a> website.</p><pre>Feature: Search<br> As a visitor<br> I want to search for paths<br> In order to find the one that I am interested in</pre><p>We now need to write the scenario that we are going to use for our automation. Scenarios are written in a step-by-step manner using the <strong>Given-When-Then</strong> approach.</p><h3>Here is the template for writing BDD test cases</h3><blockquote><strong>Given</strong> a certain scenario<br><strong>When</strong> an action takes place<br><strong>Then</strong> this should be the outcome</blockquote><p>Continuing on our example we can write a scenario that looks like this:</p><pre>Scenario Outline: Visitor can find a path<br>  Given I am a visitor<br>  When I am on the &quot;search&quot; page<br>   And I filter by &lt;category&gt;<br>   And I search by &lt;keyword&gt;<br>  Then I see the correct &lt;path&gt;</pre><pre>Examples:<br>      | category | keyword | path            |<br>      | &quot;paths&quot;  | &quot;dev&quot;   | &quot;Web Developer&quot; |<br>      | &quot;paths&quot;  | &quot;ai&quot;    | &quot;AI Engineer&quot;   |</pre><p>Here we are using an advanced technique where by using a Scenario Outline we can set up Examples in order to run our test multiple times with different parameters. The values are replaced with the placeholders &lt;category&gt;, &lt;keyword&gt; and &lt;result&gt;, which are filled by the Examples table. Each set of values is executed as a different test.</p><p>In Codeception we can test this scenario by executing it in dry-run mode:</p><pre>codecept dry-run bdd search.feature</pre><p>We should now define the scenario steps easily by executing:</p><pre>codecept gherkin:snippets bdd</pre><p>To match steps from a feature file to PHP code we use annotations which are <strong>then</strong> added to methods. Steps can also be matched with regex expressions and parameters can also be passed in non-regex strings using the : params placeholder.</p><p>Here is an example using the steps defined in our scenario:</p><pre>/**<br> * @Given I am a visitor<br> */</pre><pre>/**<br> * @When I am on the :page page<br> */</pre><pre>/**<br> * @When I filter by :category<br> */</pre><pre>/**<br> * @When I search by :keyword<br> */</pre><pre>/**<br> * @Then I should see the correct :path<br> */</pre><p>Steps are defined in Context files. The default context is an actor class, i.e. for the bdd testing suite, the context is BddTester class. You can define the context in a bdd.suite.yml file like so:</p><pre>gherkin:<br> contexts:<br>   default:<br>     — BddTester</pre><p>We then connected the annotations to pre-existing methods in our automation framework based on Codeception. Re-using existing code is always great 👍</p><p>Here are a couple of examples:</p><pre>/**<br> * @Given I am a visitor<br> */<br>public function iAmAVisitor()<br>{<br>    $this-&gt;setLocale(&#39;en&#39;);<br>}</pre><pre>/**<br> * @When I am on the :page page<br> */<br>public function iAmOnThePage($page)<br>{<br>    $this-&gt;amOnPage($page);<br>}</pre><pre>/**<br> * @When I filter by :category<br> */<br>public function iFilterByCategory($category = &#39;all&#39;)<br>{<br>    $this-&gt;searchPage-&gt;addCategoryFilter($category);<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*OmSFy9PZ1bOMBrKz" /><figcaption>Photo by <a href="https://unsplash.com/@paul_?utm_source=medium&amp;utm_medium=referral">Paul Hanaoka</a></figcaption></figure><h3>How specific should we get?</h3><p>There is a big debate on what exactly should a BDD test look like. The question is how detailed it should be in order to be specific, yet understandable. We also want it to be useful to everyone.</p><p>Based on my experience, whether you’re using BDD as a sole solution for creating your test automation framework or you’re using it in only a few end-to-end tests, it is better to make your steps as readable as possible. For the most part, this means being less specific and getting into the details only in your methods (back in the code base of your automation) but not in your BDD feature files.</p><p>At <a href="https://openclassrooms.com/en/">OpenClassrooms</a> we use BDD to create some long end-to-end scenarios. While keeping shorter and more specific tests using pure <a href="https://codeception.com/">Codeception</a> framework. Some examples of end-to-end tests on our platform include:</p><blockquote>Visitor can sign up and become a self-paid student.<br>Student can get their projects validated and finish their path.<br>Mentor can create a mentorship session and evaluate their student’s progress.<br>Assessor can create a presentation sessions and evaluate student’s project.<br>Admin can create a new course.</blockquote><h3><strong>To BDD or not to BDD?</strong></h3><p>Making the decision how many of your test cases to create using this approach is very subjective. So far in OpenClassrooms we are still experimenting and trying to figure out just how many of them we are going to need. We started by creating 10 end-to-end BDD test cases and in the process, we’ll find out just how useful they’re going to be for our team.<br> <br>Testing just what’s useful takes nuance and experience. There is a lot of subtlety in figuring out what’s worth testing and what’s worth automating. Using BDD can be a double-edged sword and you need to be careful! Always have in mind what your goal is, what you’re gaining by using this approach, what you’re sacrificing and most of all.. do your own experiments and introduce BDD gradually to your workflow.</p><h3>Benefits of using BDD</h3><ol><li>It can reach a wider audience.</li><li>Promotes better communication between members of the team.</li><li>Defines acceptance criteria prior to development.</li></ol><h3>Disadvantages of BDD</h3><ol><li>If the requirements are not properly specified BDD may not be effective.</li><li>Testers using BDD need to have sufficient technical skills.</li><li>It is less flexible than pure code.</li><li>It adds additional complexity to your framework.</li></ol><h3>Summary</h3><p>The main idea behind BDD is that it’s driven to prevent communication gaps, that is having everyone in the team communicating more often, better and based on real-world examples and not on abstract requirements.</p><p>I know it’s not a magic bullet but I’m really hopeful it will improve the requirements gathering and testability of our application.</p><h3>PS</h3><p>I created an example code available on <a href="https://github.com/melnelen/ExmpleBddWithCodeception">GitHub</a> for the purpose of this article. It contains the code shown here.</p><p>For more information on setting up your own BDD automation framework with Codeception, you can go to the <a href="https://codeception.com/docs/07-BDD">BDD Codeception documentation</a>.</p><p>For more information on the paths and courses available on the OpenClassroms platform, you can search for your favorite topics at the <a href="https://openclassrooms.com/en/search">OpenClassrooms search page</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dd2c51464b82" width="1" height="1" alt=""><hr><p><a href="https://medium.com/openclassrooms-product-design-and-engineering/using-bdd-for-good-dd2c51464b82">Using BDD for good</a> was originally published in <a href="https://medium.com/openclassrooms-product-design-and-engineering">Product, Experience &amp; Technology @ OpenClassrooms</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>