{"id":381,"date":"2015-09-23T21:12:06","date_gmt":"2015-09-23T20:12:06","guid":{"rendered":"http:\/\/www.mytipsfor.com\/writing\/testobjectives\/?p=381"},"modified":"2015-09-29T20:35:57","modified_gmt":"2015-09-29T19:35:57","slug":"step1-in-testautomation","status":"publish","type":"post","link":"http:\/\/www.mytipsfor.com\/writing\/testobjectives\/step1-in-testautomation\/","title":{"rendered":"STOP! Read this before you start your next Test Automation Project"},"content":{"rendered":"<h2>Thinking of starting new test automation project, <em><span style=\"color: #ff6600;\">STOP! <\/span><\/em>, take a coffee and read this first.<\/h2>\n<p style=\"text-align: left;\">I&#8217;ll give you the Punch line of this story first:<br \/>\nIt is almost a classic already, but still so valid and highly recommended reading for all those considering a start in test automation.<\/p>\n<h2 style=\"text-align: center;\"><span style=\"color: #ff6600;\"><em><strong>Software Test Automation <\/strong><\/em><\/span><\/h2>\n<p style=\"text-align: center;\"><span style=\"color: #ff6600;\"><em><strong>by Mark Fewster and Dorothy Graham<br \/>\nAddison-Wesley, ISBN-13: 978-0201331400<br \/>\n<\/strong><\/em><\/span><\/p>\n<p style=\"text-align: center;\">Available from various book and online stores.<br \/>\nFor example, from <a href=\"http:\/\/www.mytipsfor.com\/writing\/testobjectives\/Testware\">TextBooks.com where you get <em><strong>30% discount<\/strong><\/em> on this book<\/a>.<\/p>\n<p>Remember that the biggest problem with test automation is <strong>not<\/strong> the execution engine <em>(I.e. to execute your test cases against SUT)<\/em> but the challenge of making your test suites reliable, maintainable and effective over time. This is way too often forgotten as many focus on the test execution, without realising that the design of your test cases and the test framework &amp; test ware architecture is actually the key to the success. Infact, you should actually design your test framework in a such way that the execution engine is modular and can be changed to something else later, this way you can also avoid any <em>&#8220;vendor lock-in&#8221;<\/em> situations..<\/p>\n<p>So its worth to have a read few words about test frameworks and test ware architecture, my personal favourite is book by Mark Fewster and Dorothy Graham available at <a href=\"http:\/\/www.mytipsfor.com\/writing\/testobjectives\/Testware\"><span style=\"text-decoration: underline;\"><span style=\"color: #0000ff; text-decoration: underline;\">Textbooks.com<\/span><\/span><\/a> (<em>or in many other online store<\/em>). You should start first thinking how to manage your test cases, version control, meta data like headers, scope, test data, etc. But soon you should also consider the way you actually constract your test cases itself, there should be a way to decouple test case logic from SUT specific test steps.<\/p>\n<h3>Example:<\/h3>\n<p>You might have a test case that has <a title=\"#TestObjectives\" href=\"http:\/\/www.mytipsfor.com\/writing\/testobjectives\/category\/testobjectives\/\">#TestObjective<\/a> to verify that AMEX Credit Card number is accepted on payment application.<\/p>\n<p>The logic and purpose of your test cases is rather clear, isn&#8217;t it? You want to confirm that the numberic format complies with the standards set to AMEX Credit card followed up successfull validation by the payment gateway.<\/p>\n<p>But what you are not specifying there are the steps to nagivate through the application under test to perform the test. This is exactly what we want to achieve also in our reliable test automation test case design, you want to decouple test case logic from actual steps. Another way of looking at this is to consider few steps in version X of the application under test, but consider what would happen if the very first step, say welcome screen, does change. Your <a title=\"#TestObjectives\" href=\"http:\/\/www.mytipsfor.com\/writing\/testobjectives\/category\/testobjectives\/\">#TestObjective<\/a> remains the same but steps to execute the test in the new version Y of the application under test just happen to be different.<\/p>\n<p>The best approach is to abstract your test case into logical groups of actions, or modules. Using our example those logical steps could be:<\/p>\n<ol>\n<li><strong><span style=\"color: #ff6600;\">Start the application under test<\/span><\/strong><br \/>\nThis can be web page, application, or even physical interface<\/li>\n<li><strong><span style=\"color: #ff6600;\">Authenticate<\/span><\/strong><br \/>\nThis can be just simple user name \/ password, or on another application or version of the application it can be 2 factor authentication<\/li>\n<li><strong><span style=\"color: #ff6600;\">Navigate to Payment module<\/span><\/strong><br \/>\nHere you might need to go through welcome page and some menus to get to the place where we do the actual test<\/li>\n<li><strong><span style=\"color: #ff6600;\">Enter valid AMEX Credit card number<\/span><\/strong><br \/>\nThis should also be a reference to your test data set, i.e. you can re-use the same test case for all your valid or invalid test data<\/li>\n<li><strong><span style=\"color: #ff6600;\">Confirm AMEX Credit card number is accepted<\/span><\/strong><br \/>\nHere again the way to confirm this could be different dependent on your application<\/li>\n<\/ol>\n<p>Now consider each of these steps to be re-usable modules, building blocks. If your application under test goes through an upgrade and the menu structure does change, you don&#8217;t have to change hundreds of test cases but only single common module (Step 3 in our case) and all your test cases are relevant again. Similarly If your want to add another test objective for Master Card, you can re-use your modules and just add test data set to your step 4.<\/p>\n<h3>Summary<\/h3>\n<p>This is just one of the key aspects how to keep your test suites relevant, remember that your best possible return of investment comes from multiple test execution cycles of your test cases. I.e. if it takes X number of hours to run the test manually, you will only get the benefit until your test scripting time Y and cost of your test framework have been covered.<\/p>\n<p>You can read more about this topic from the excellent book (<a href=\"http:\/\/www.mytipsfor.com\/writing\/testobjectives\/Testware\"><span style=\"text-decoration: underline;\"><span style=\"color: #0000ff; text-decoration: underline;\">here<\/span><\/span><\/a>) mentioned earlier, and I will also collate my own experiences from last 15 years of building test frameworks in another blog post later on..<\/p>\n<p>Until next time!..\u2606\u2606\u2606<br \/>\n<a href=\"http:\/\/www.mytipsfor.com\/writing\/testobjectives\/Testware\"><img loading=\"lazy\" class=\"wp-image-396 size-full alignleft\" title=\"Best Test Automation Book\" src=\"http:\/\/www.mytipsfor.com\/writing\/testobjectives\/wp-content\/uploads\/2015\/09\/cmd_get_it_now.jpg\" alt=\"\" width=\"199\" height=\"46\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Summary of key concepts for successfull Test automation including practical steps for establishing reliable, maintainable and relevant test automation regime. <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[32,35,34,33],"_links":{"self":[{"href":"http:\/\/www.mytipsfor.com\/writing\/testobjectives\/wp-json\/wp\/v2\/posts\/381"}],"collection":[{"href":"http:\/\/www.mytipsfor.com\/writing\/testobjectives\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.mytipsfor.com\/writing\/testobjectives\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.mytipsfor.com\/writing\/testobjectives\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.mytipsfor.com\/writing\/testobjectives\/wp-json\/wp\/v2\/comments?post=381"}],"version-history":[{"count":19,"href":"http:\/\/www.mytipsfor.com\/writing\/testobjectives\/wp-json\/wp\/v2\/posts\/381\/revisions"}],"predecessor-version":[{"id":410,"href":"http:\/\/www.mytipsfor.com\/writing\/testobjectives\/wp-json\/wp\/v2\/posts\/381\/revisions\/410"}],"wp:attachment":[{"href":"http:\/\/www.mytipsfor.com\/writing\/testobjectives\/wp-json\/wp\/v2\/media?parent=381"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.mytipsfor.com\/writing\/testobjectives\/wp-json\/wp\/v2\/categories?post=381"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.mytipsfor.com\/writing\/testobjectives\/wp-json\/wp\/v2\/tags?post=381"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}