<?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 Safebear on Medium]]></title>
        <description><![CDATA[Stories by Safebear on Medium]]></description>
        <link>https://medium.com/@safebear?source=rss-c2f19dff226e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*FyrFYWFK0DnJVLastouGww.png</url>
            <title>Stories by Safebear on Medium</title>
            <link>https://medium.com/@safebear?source=rss-c2f19dff226e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 14:47:12 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@safebear/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[What is the Page Object Model for Automation?]]></title>
            <link>https://medium.com/@safebear/what-is-the-page-object-model-for-automation-9d219a08574d?source=rss-c2f19dff226e------2</link>
            <guid isPermaLink="false">https://medium.com/p/9d219a08574d</guid>
            <category><![CDATA[test-automation]]></category>
            <category><![CDATA[testing]]></category>
            <category><![CDATA[page-object]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[automation-testing]]></category>
            <dc:creator><![CDATA[Safebear]]></dc:creator>
            <pubDate>Tue, 21 Aug 2018 14:49:55 GMT</pubDate>
            <atom:updated>2018-08-21T15:44:45.671Z</atom:updated>
            <cc:license>https://creativecommons.org/licenses/by-nc-nd/4.0/</cc:license>
            <content:encoded><![CDATA[<p>If an online shop changed the login process, or changed a link on the homepage to a button, your clever human brain could still work out how to login or click the button.</p><p>Your test automation suite is not quite as clever as that. If the link changed to a button, or the wording of the link changed, the test will likely not find the button and fail.</p><p>Automation tests can be pretty inflexible and when things change they just can’t cope, so we need to keep that in mind when writing our tests. We have to accept that they’ll need to be regularly maintained, and design our test suite to be easy to do so.</p><h3>How do we do this?</h3><p>In manual test cases, you have an ultimate goal, and a set steps to follow to get there. Each step will have an action to complete, and an expected result for that action. The test will pass or fail dependent on the result of all of the steps. In test automation you’ll have exactly the same concept, but the actions are called methods. You write and store methods separately to the tests and expected results so you can reuse and maintain them.</p><p>In order to do this, we create “Page Objects” to store our methods (actions) on a per page basis, and then our Tests will link to these methods and we can wrap them in assertions to see if they work or not.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/941/1*aUeuq2INnAmzoLkX8xcArw.png" /></figure><h3>Page Objects</h3><p>For each page on your website you’ll create a page object class. It will contain any test methods (actions) that you might do on that page such as identify a form field, enter data, click links and look at the page title.</p><p>Comparing this back to a manual test, these are the actions part of the test step, not the expected results. For these page objects, we don’t care about pass or fail, it doesn’t matter if the link works or not, that’s taken care of in the test. Methods are actions such as “Click on login link” or “Enter login information and submit”. We can even have a method for “check for a message at the top of the page” which isn’t a test, we’ve not said if there should be or not, we’re just looking to see if it is there.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/504/0*bKN8f56ERPWRxXju.png" /></figure><p>This keeps all of the coded automation actions in one easy to find place and makes them very easily reusable, which improves maintainability, reliability and visibility.</p><h3>Tests</h3><p>This is where we actually create and define our tests and expected results. From within a test, we can “call” the methods on our page objects. This makes writing tests very fast, and you can reuse every method/action you have written as often as you like.</p><p>A manual test might look like this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*uEfFNs6RGxxFlIgCa-5iGQ.png" /><figcaption>Manual test script</figcaption></figure><p>Then the automated test would look like this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/467/1*kcnf-nSSBFMjl7CqJIvbpg.png" /><figcaption>Automation test script</figcaption></figure><p>And when executing the test, it would call out to the Page Objects and execute the methods on those pages.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/941/1*aUeuq2INnAmzoLkX8xcArw.png" /><figcaption>Relationship from Test to Page Object</figcaption></figure><h3>How does this make the Test Automation Suite maintainable?</h3><p>At the start of this post, we talked about changing a link on the homepage from a link to a button.</p><p>In a manual test, we’d have to know where all of the steps are that need to be changed and we’d need to go to every test case, and update every test step that says to click on the link.</p><p>In our automation test suite, we know the link is on the home page. We go to our home page object, find the method that says to click the link, and update it to click a button. Voila. One easy to find action is changed and the entire suite is up to date.</p><blockquote><strong>We offer 50% discount on any of our courses to readers of Medium, use discount code MED50 when booking.</strong></blockquote><blockquote><strong><em>Safebear</em></strong><em> run hands on learn-by-doing training courses in Test automation, from </em><a href="https://safebear.co.uk/selenium-landing"><em>crash courses with Selenium</em></a><em> to a complete </em><a href="https://safebear.co.uk/mat"><em>Manual to Automation tester</em></a><em>course, as well as </em><a href="https://safebear.co.uk/performance-landing"><em>Performance testing </em></a><em>courses. You can even learn about </em><a href="https://safebear.co.uk/blockchain-landing"><em>Blockchain</em></a><em>!</em></blockquote><p><em>Originally published at </em><a href="https://safebear.co.uk/safebear-blog/what-is-the-page-object-model-for-automation"><em>safebear.co.uk</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9d219a08574d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Getting Into Test Automation: What You’ll Need to Learn]]></title>
            <link>https://medium.com/@safebear/getting-into-test-automation-what-youll-need-to-learn-e552fe551aec?source=rss-c2f19dff226e------2</link>
            <guid isPermaLink="false">https://medium.com/p/e552fe551aec</guid>
            <category><![CDATA[testing]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[automation-testing]]></category>
            <category><![CDATA[test-automation]]></category>
            <category><![CDATA[training-courses]]></category>
            <dc:creator><![CDATA[Safebear]]></dc:creator>
            <pubDate>Fri, 10 Aug 2018 11:14:44 GMT</pubDate>
            <atom:updated>2018-08-10T11:14:44.375Z</atom:updated>
            <cc:license>https://creativecommons.org/licenses/by-nc-nd/4.0/</cc:license>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KRdF23VhPA3l13Hokh4bIw.jpeg" /></figure><p>It looks like a daunting journey from Manual Testing to Automation Testing. The different languages, tool options, structure and technical jargon you’re faced with can make it difficult to know where to start.</p><p>It doesn’t have to be hard and scary. The steps to getting there are actually surprisingly simple.</p><ol><li>Understand the principles of Object Oriented Languages</li><li>Choose a language and tools</li><li>Learn how to interact with web pages</li><li>Design a test suite structure</li><li>Write tests</li><li>Run tests and report</li></ol><p>Looks a lot less scary as an achievable to-do list. Let’s look at each of these in a little more detail.</p><h3>Understand the principles of Object Oriented Languages</h3><p>This doesn’t mean you have to be able to write an entire application in C# or Java. Most IDEs (integrated development environments) have built in code-completion, which is a bit like the autocomplete you get on phones. With a solid understanding of syntax and some knowledge of where you’re going, the code will almost write itself.</p><h3>Choose a Language and Tools</h3><p>Generally, you will choose the language that your application is being developed in, so your framework can sit alongside application development.</p><p>The tools are influenced by the language you use and the project on which you’re working. Commonly, .NET houses have a tendency towards Visual studio and many Java places use Eclipse or IntelliJ. Once you know how to use one IDE you’ll easily pick up how to use others, similar to how different word processors have different looks and functionality, but ultimately you can write, edit and save documents.</p><h3>Learn how to interact with web pages</h3><p>Selenium with Webdriver is a tool that drives a browser. As a very basic model, think of the browser as a car, the Webdriver as a person driving, Selenium as a SatNav, and you are the person giving destinations to the SatNav. If you want to go to the homepage, you need to use Selenium to tell Webdriver to go to the homepage in the browser.</p><p>In order for the Webdriver to select a link, it needs you to tell it where that link is. You’ll need to learn how to uniquely identify any element on a web page, with the most common methods being ID, XPath and CSS selectors. When you understand how these methods work, identifying elements is easy.</p><h3>Design a test suite structure</h3><p>In manual test scripts, you might have “Go to homepage URL:www.example.com&quot; as a step used hundreds of times in all of your test cases. Good practice is to create that action separate to the test cases, and call it into the test cases that require it. That way if it changes you only need to update it in one place and it’s automatically pulled into all tests.</p><p>Exactly the same principle applies in Test Automation. The more steps you can pull out of the actual test, the more reliable and maintainable the tests become. In automation, the action is called a method. Methods are written completely separate to the tests, and then when the tests are executed they call the method. A very good model that implements this technique is the Page Object Model, taught on <a href="https://safebear.co.uk/courses">our courses</a>.</p><h3>Write tests</h3><p>When writing a manual test script, you have a set of steps with an expected outcome for each. These are grouped together to create a single test case that will pass or fail depending on the results of the steps. The same principles apply in Automation tests. You create a test method (test case), in this test method you execute a set of page object methods (actions), and you use assertions to check all is as it should be (expected results).</p><p>Writing the tests might sound like the hardest bit, but once you have the understanding of how it all works and how to do it, it’s actually the easy bit!</p><h3>Run tests and report</h3><p>Automation tests are usually used in one of two ways:</p><ul><li>As part of BDD where you link the tests to your requirements.The tests are run as part of continuous integration and deployment, and the results report is a BDD level (requirements coverage) report.</li><li>As part of a regression test suite.<br>Test are usually executed as part of continuous integration and deployment. Tests are expected to pass, and reports are simple. Tools/plugins exist to generate project facing reports if required.</li></ul><h3>In Summary</h3><p>Many people that want to get into test automation jump straight in to learning how to code. Although understanding how to code is important, it’s far from the only aspect, and as with spoken languages, it’s much easier to learn through use.</p><p>More important is <a href="https://safebear.co.uk/courses">learning</a> how to set up your framework, and how the structure and relationships in the Automation Test suite works. Once you understand all of that, coding the tests is easy.</p><p><em>Originally published at </em><a href="https://safebear.co.uk/safebear-blog/2018/7/31/getting-into-test-automation-what-youll-need-to-learn"><em>safebear.co.uk</em></a><em>.</em></p><blockquote><strong>We offer 50% off all of our courses to readers of Medium, use discount code MED50 when booking.</strong></blockquote><blockquote><strong><em>Safebear</em></strong><em> run hands on learn-by-doing training courses in Test automation, from </em><a href="https://safebear.co.uk/selenium-landing"><em>crash courses with Selenium</em></a><em> to a complete </em><a href="https://safebear.co.uk/mat"><em>Manual to Automation tester</em></a><em> course, as well as </em><a href="https://safebear.co.uk/performance-landing"><em>Performance testing </em></a><em>courses. You can even learn about </em><a href="https://safebear.co.uk/blockchain-landing"><em>Blockchain</em></a><em>!</em></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e552fe551aec" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>