{"id":2607,"date":"2020-05-15T09:20:15","date_gmt":"2020-05-15T08:20:15","guid":{"rendered":"https:\/\/www.brainbox.consulting\/?p=2607"},"modified":"2020-06-08T15:59:12","modified_gmt":"2020-06-08T14:59:12","slug":"hybrid-test-automation-framework","status":"publish","type":"post","link":"https:\/\/brainbox.consulting\/talent\/hybrid-test-automation-framework\/","title":{"rendered":"Hybrid Test Automation Framework"},"content":{"rendered":"<h2><strong>Introduction: Test Automation Framework<\/strong><\/h2>\n<p>A framework in general is a supporting structure that incorporates combination of protocols or standards followed as a whole to leverage benefits wherever it is used. The same definition applies to a test automation framework as well. It acts as a support structure to the automated test scripts. So, a test automation framework is a set of guidelines or rules used to design and create test cases. A framework comprises of various practices and tools that help in more efficient testing and achieve desired result. It is a conceptual part of test automation that helps testers to use resources more efficiently.<\/p>\n<p>The guidelines or rules that make up a framework can include a suitable combination of coding standards, processes, test data handling methods, project hierarchies, reporting mechanism, modularity etc. The framework facilitates in well organized and systematic design and development of automated test scripts for the application under test and ensures reliable analysis of issues.<\/p>\n<p>In this article we will see the importance of hybrid test automation framework. Also, there are lot of situations where workflows are scattered, and users must use computer\/mobile devices\/handheld devices to access different functionalities. This gives rise to have a container framework that can-do end to end testing and can accommodate automation of hybrid workflows. We will see how Brainbox has developed a test automation framework that can be used to perform end to end testing of both web and mobile applications.<\/p>\n<figure id=\"attachment_2609\" aria-describedby=\"caption-attachment-2609\" style=\"width: 535px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-2609\" src=\"https:\/\/www.brainbox.consulting\/talent\/wp-content\/uploads\/2020\/05\/add400ff-502c-40ce-9c84-902bd0a914d9-300x180.jpg\" alt=\"\" width=\"535\" height=\"321\" srcset=\"https:\/\/brainbox.consulting\/talent\/wp-content\/uploads\/2020\/05\/add400ff-502c-40ce-9c84-902bd0a914d9-300x180.jpg 300w, https:\/\/brainbox.consulting\/talent\/wp-content\/uploads\/2020\/05\/add400ff-502c-40ce-9c84-902bd0a914d9.jpg 725w\" sizes=\"(max-width: 535px) 100vw, 535px\" \/><figcaption id=\"caption-attachment-2609\" class=\"wp-caption-text\">Pic1: End to end mobile and web application testing<\/figcaption><\/figure>\n<h2><strong>Importance of Automation Framework in Software Testing<\/strong><\/h2>\n<p>Test automation has become a fundamental part of Agile and DevOps practices. They support effective and rigorous functional testing by significantly reducing testing time and test coverage. Since a test automation framework is a set of rules to create automated tests, it ensures a consistant and reliable test automation across an organization and increases value of the whole process.<\/p>\n<p>The need of a test framework increases when multiple people are working on different modules of the same project. Having a framework streamlines the testing process and everyone in the team can follow the same standard approach defined by the framework.<\/p>\n<p>A testing framework is always application independent, meaning it is a general skeleton of the project that can be used to test any application. And hence the framework should be scalable and maintainable.<\/p>\n<p>Below are some of the key advantages that a test automation framework provides,<\/p>\n<ul>\n<li><span style=\"color: #000000;\">Improved test efficiency<\/span><\/li>\n<li><span style=\"color: #000000;\">Lower maintenance costs<\/span><\/li>\n<li><span style=\"color: #000000;\">Minimal manual intervention<\/span><\/li>\n<li><span style=\"color: #000000;\">Maximum test coverage<\/span><\/li>\n<li><span style=\"color: #000000;\">Reusability of code<\/span><\/li>\n<\/ul>\n<h2><strong>Different types of Test Automation Frameworks<\/strong><\/h2>\n<p>Each automation framework has its own architecture, advantages, and disadvantages. Some of the frameworks are:<\/p>\n<ul>\n<li><span style=\"color: #000000;\">Linear Automation Framework<\/span><\/li>\n<li><span style=\"color: #000000;\">Modular Driven Framework<\/span><\/li>\n<li><span style=\"color: #000000;\">Behaviour Driven framework<\/span><\/li>\n<li><span style=\"color: #000000;\">Data-Driven Framework<\/span><\/li>\n<li><span style=\"color: #000000;\">Keyword-Driven Framework<\/span><\/li>\n<li><span style=\"color: #000000;\">Hybrid Testing Framework<\/span><\/li>\n<\/ul>\n<h2><strong>Hybrid Test Automation Framework<\/strong><\/h2>\n<p>A hybrid framework is a technique where in we can use of any of combination of two or more automation frameworks mentioned above. As this is a hybrid framework, it has been based on the combination of many types of end-to-end testing approaches.<\/p>\n<p>Since Hybrid framework is a combination of other frameworks, it incorporates the better parts of every approach mitigating the weaknesses of different frameworks. A Hybrid Framework can be created and used to automate any application. This will reduce the man-hours spent in scripting the automation code, since a framework once created can be used to automate multiple applications. Similarly, frameworks can be created according to the project needs and used for automation purposes.<\/p>\n<h2><strong>Business case: Brainbox Test Automation Framework<\/strong><\/h2>\n<p>At Brainbox, we have developed a hybrid test automation framework for end to end application testing of web and mobile android platforms. This kind of container framework will help to solve the problems where there is a need to do an end to end testing of work flows scattered across web and mobile platforms. The framework uses both keyword driven approach and data driven approach where the Test Cases and Test Steps can be defined via simple English specified in an excel document.<\/p>\n<p>This framework uses Python as a programming language and its Pytest framework to write test scripts. Web application testing tool used is Selenium WebDriver and for Mobile applications, it is Appium.<\/p>\n<figure id=\"attachment_2616\" aria-describedby=\"caption-attachment-2616\" style=\"width: 790px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-2616\" src=\"https:\/\/www.brainbox.consulting\/talent\/wp-content\/uploads\/2020\/05\/testcases-300x108.png\" alt=\"\" width=\"790\" height=\"285\" srcset=\"https:\/\/brainbox.consulting\/talent\/wp-content\/uploads\/2020\/05\/testcases-300x108.png 300w, https:\/\/brainbox.consulting\/talent\/wp-content\/uploads\/2020\/05\/testcases-768x277.png 768w, https:\/\/brainbox.consulting\/talent\/wp-content\/uploads\/2020\/05\/testcases-1024x369.png 1024w, https:\/\/brainbox.consulting\/talent\/wp-content\/uploads\/2020\/05\/testcases.png 1202w\" sizes=\"(max-width: 790px) 100vw, 790px\" \/><figcaption id=\"caption-attachment-2616\" class=\"wp-caption-text\">Pic 2: Test Cases<\/figcaption><\/figure>\n<p>The above template that is used for creation of test cases. The Test case scenario is represented using test case name, description and an execute parameter which indicates if the test case needs to be executed or not.<\/p>\n<figure id=\"attachment_2618\" aria-describedby=\"caption-attachment-2618\" style=\"width: 792px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-2618\" src=\"https:\/\/www.brainbox.consulting\/talent\/wp-content\/uploads\/2020\/05\/teststeps-300x100.png\" alt=\"\" width=\"792\" height=\"264\" srcset=\"https:\/\/brainbox.consulting\/talent\/wp-content\/uploads\/2020\/05\/teststeps-300x100.png 300w, https:\/\/brainbox.consulting\/talent\/wp-content\/uploads\/2020\/05\/teststeps-768x256.png 768w, https:\/\/brainbox.consulting\/talent\/wp-content\/uploads\/2020\/05\/teststeps-1024x341.png 1024w, https:\/\/brainbox.consulting\/talent\/wp-content\/uploads\/2020\/05\/teststeps.png 1203w\" sizes=\"(max-width: 792px) 100vw, 792px\" \/><figcaption id=\"caption-attachment-2618\" class=\"wp-caption-text\">Pic 3: Test Steps<\/figcaption><\/figure>\n<p>Each test case is linked to a testcase sheet which will give you detailed test steps for that test case as shown in the above picture. Test description represents user defined functions in english language and test input values are the data inputs to the application. We are using behavioral driven development kind of implemetation using Excel and also driving the data through excel.<\/p>\n<figure id=\"attachment_2620\" aria-describedby=\"caption-attachment-2620\" style=\"width: 565px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-2620\" src=\"https:\/\/www.brainbox.consulting\/talent\/wp-content\/uploads\/2020\/05\/BBframeworkdiagram-300x198.png\" alt=\"\" width=\"565\" height=\"373\" srcset=\"https:\/\/brainbox.consulting\/talent\/wp-content\/uploads\/2020\/05\/BBframeworkdiagram-300x198.png 300w, https:\/\/brainbox.consulting\/talent\/wp-content\/uploads\/2020\/05\/BBframeworkdiagram-768x506.png 768w, https:\/\/brainbox.consulting\/talent\/wp-content\/uploads\/2020\/05\/BBframeworkdiagram-1024x675.png 1024w, https:\/\/brainbox.consulting\/talent\/wp-content\/uploads\/2020\/05\/BBframeworkdiagram.png 1401w\" sizes=\"(max-width: 565px) 100vw, 565px\" \/><figcaption id=\"caption-attachment-2620\" class=\"wp-caption-text\">Pic 4: Brainbox Framework components<\/figcaption><\/figure>\n<p>Our framework architecture has following components:<\/p>\n<ul>\n<li><span style=\"color: #000000;\">TestCases:<\/span><\/li>\n<\/ul>\n<p style=\"padding-left: 40px;\"><span style=\"color: #000000;\">Test Cases are in an Excel written in simple English.<\/span><\/p>\n<ul>\n<li><span style=\"color: #000000;\">Test Case Generation:<\/span><\/li>\n<\/ul>\n<p style=\"padding-left: 40px;\"><span style=\"color: #000000;\">Taking the test case from excel, Test case Generation component converts into python script to create pytests and execute them.<\/span><\/p>\n<ul>\n<li><span style=\"color: #000000;\">Reusable Libraries:<\/span><\/li>\n<\/ul>\n<p style=\"padding-left: 40px;\"><span style=\"color: #000000;\">There are Core libraries and configurations that are generic and contains all the core functionalities of the framework.<\/span><\/p>\n<ul>\n<li><span style=\"color: #000000;\">Object Repository:<\/span><\/li>\n<\/ul>\n<p style=\"padding-left: 40px;\"><span style=\"color: #000000;\">This component has locators for all the UI element of an application.<\/span><\/p>\n<ul>\n<li><span style=\"color: #000000;\">Business Functions:<\/span><\/li>\n<\/ul>\n<p style=\"padding-left: 40px;\"><span style=\"color: #000000;\">This component contains the actual implementation of functions for the application under test.<\/span><\/p>\n<ul>\n<li><span style=\"color: #000000;\">Reporting:<\/span><\/li>\n<\/ul>\n<p style=\"padding-left: 40px;\"><span style=\"color: #000000;\">Framework is also integrated with Allure reporting, that gives a detailed analysis of the Test Case executed. <span style=\"display: inline !important; float: none; background-color: #ffffff; color: #333333; cursor: text; font-family: Georgia,'Times New Roman','Bitstream Charter',Times,serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;\">There is also a functionality where a screenshot is taken when the test fails, to help with further analysis.<\/span><\/span><\/p>\n<h2><strong>Advantages<\/strong><\/h2>\n<ul>\n<li><span style=\"color: #000000;\">The time taken to run the test designed with a hybrid framework is relatively less compared to other frameworks.<\/span><\/li>\n<li><span style=\"color: #000000;\">This can be used when we need all the test cases and inputs that are associated with a test case, in the same test suite.<\/span><\/li>\n<li><span style=\"color: #000000;\">Provides high code re-usability.<\/span><\/li>\n<li><span style=\"color: #000000;\">Independent of Application Under Test, the same framework can be used for other AUTs.<\/span><\/li>\n<li><span style=\"color: #000000;\">A Variety of Test Scenarios can be executed by just varying the Test Data in the External Data File.<\/span><\/li>\n<\/ul>\n<h2><span style=\"color: #000000;\"><strong>Disadvantages<\/strong><\/span><\/h2>\n<ul>\n<li><span style=\"color: #000000;\">Clear knowledge on the combining different framework is required.<\/span><\/li>\n<li><span style=\"color: #000000;\">Tests are fully scripted in a Hybrid Testing Framework thus increases the automation effort.<\/span><\/li>\n<\/ul>\n<h2><strong>\u00a0<\/strong><strong>Summary<\/strong><\/h2>\n<p>The process of creating Automation framework requires detailed planning and extreme efforts. To achieve desirable features, one should design a robust and reliable framework. Such type of framework can then be used for any kind of application with minimum changes in any type of organization who requires automation testing. At Brainbox, we have designed and developed one such framework that can be used to test both Web and Mobile applications.<\/p>\n<p>Contact us at sales@brainbox.consulting for more information and we would be happy to assist you with testing related services.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction: Test Automation Framework A framework in general is a supporting structure that incorporates combination of protocols or standards followed&#8230;<\/p>\n","protected":false},"author":7,"featured_media":2030,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_mi_skip_tracking":false},"categories":[23],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/brainbox.consulting\/talent\/wp-json\/wp\/v2\/posts\/2607"}],"collection":[{"href":"https:\/\/brainbox.consulting\/talent\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/brainbox.consulting\/talent\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/brainbox.consulting\/talent\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/brainbox.consulting\/talent\/wp-json\/wp\/v2\/comments?post=2607"}],"version-history":[{"count":12,"href":"https:\/\/brainbox.consulting\/talent\/wp-json\/wp\/v2\/posts\/2607\/revisions"}],"predecessor-version":[{"id":2631,"href":"https:\/\/brainbox.consulting\/talent\/wp-json\/wp\/v2\/posts\/2607\/revisions\/2631"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/brainbox.consulting\/talent\/wp-json\/wp\/v2\/media\/2030"}],"wp:attachment":[{"href":"https:\/\/brainbox.consulting\/talent\/wp-json\/wp\/v2\/media?parent=2607"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/brainbox.consulting\/talent\/wp-json\/wp\/v2\/categories?post=2607"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/brainbox.consulting\/talent\/wp-json\/wp\/v2\/tags?post=2607"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}