An Introduction of Fundamental Automation Testing

Category: Education

Presentation Description

Automation Testing means using an automation tool to execute your test case suite. Automation testing uses automation tools to write and execute test cases, no manual involvement is required while executing an automated test suite.


Presentation Transcript

slide 1:

iFour Consultancy AutomationTesting Fundamentals of Automation

slide 2:

⚫ Introduction ⚫ What and why Automation Testing ⚫ Automation Testing Process ⚫ Scope of Automation ⚫ Key Benefits Of Automation testing ⚫ Which Test case Automated and not automated ⚫ Automation Testing Tools. ⚫ Type of automation Testing Framework. Agenda

slide 3:

⚫ Selenium is a suite of testing automation tools used for Web-Base applications: ⚫Selenium IDE Selenium RC Selenium Web-Driver and Selenium Grid ⚫These tools provide a rich set of testing functions specifically geared to varied testing scenarios of all types of Web applications ⚫The operations provided by these tools are highly flexible and afford many options for comparing UI elements to expected application behavior ⚫Selenium tests can be executed on multiple browser platforms Introduction

slide 4:

⚫ Automation Testing means using an automation tool to execute your test case suite. ⚫ In other word Automation testing uses automation tools to write and execute test cases no manual involvement is required while executing an automated test suite. ⚫ Usually testers write test scripts and test cases using the automation tool and then group into test suites. ⚫ The main goal of Automation testing is to increase the test efficiency and develop software value. What is Automation Testing

slide 5:

Automated software testing is important due to following reasons: ⚫ Manual Testing of all workflows all fields all negative scenarios is time and money consuming ⚫ It is difficult to test for multilingual sites manually ⚫ Automation does not require Human intervention. You can run automated test unattended overnight ⚫ Automation increases the speed of test execution ⚫ Automation helps increase Test Coverage ⚫ Manual Testing can become boring and hence error-prone Why Automation Testing

slide 6:

Following steps are followed in an Automation Process Automated Testing Process

slide 7:

Following points help to determine scope: ⚫ The features that are important for the business ⚫ Scenarios which have a large amount of data ⚫ Common functionalities across applications ⚫ Technical feasibility ⚫ The extent to which business components are reused ⚫ The complexity of test cases ⚫ Ability to use the same test cases for cross-browser testing Scope of Automation

slide 8:

⚫70 faster than the manual testing ⚫Wider test coverage of application features ⚫Reliable in results ⚫Ensure Consistency ⚫Saves Time and Cost ⚫Improves accuracy ⚫Human Intervention is not required while execution ⚫Increases Efficiency ⚫Better speed in executing tests ⚫Re-usable test scripts ⚫Test Frequently and thoroughly ⚫More cycle of execution can be achieved through automation ⚫Early time to market Key Benefits of Automation testing

slide 9:

Test cases to be automated ⚫ High Risk - Business Critical test cases ⚫ Test cases that are repeatedly executed ⚫ Test Cases that are very tedious or difficult to perform manually ⚫ Test Cases which are time-consuming Test cases to be not automated ⚫ Test Cases that are newly designed and not executed manually at least once ⚫ Test Cases for which the requirements are frequently changing ⚫ Test cases which are executed on an ad-hoc basis. Which Test Cases to Automate and Not Automate

slide 10:

⚫ Selenium is a free open source automated testing suite for web applications across different browsers and platforms. ⚫ It has four components. ⚫Selenium Integrated Development Environment IDE ⚫Selenium Remote Control RC ⚫Web-Driver ⚫Selenium Grid Most Popular Tool For Automation Testing Selenium

slide 11:

⚫ APPIUM is a freely distributed open source mobile application UI Testing framework. ⚫ It is used for native app testing hybrid app testing and mobile web app testing. ⚫ It support an automation testing on physical devices as well as an emulator or simulator both. ⚫ It supports most platforms including iOS Android Windows Firefox OS and Mac. ⚫ It supports running the apps on Android emulators iOS simulators and real devices with Android iOS Windows and Mac operating systems. ⚫ you can write tests with any of your favourite development tools using many different programming languages like Java script Java C Ruby Python PHP Most Popular Tool For Automation Testing Appium iOS/Androd

slide 12:

⚫ A testing framework is a set of guidelines or rules used for creating and designing test cases. ⚫ A framework is comprised of a combination of practices and tools that are designed to help QA professionals test more efficiently. ⚫ A “Test Automation Framework” is scaffolding that is laid to provide an execution environment for the automation test scripts. The framework provides the user with various benefits that help them to develop execute and report the automation test scripts efficiently. It is more like a system that has created specifically to automate our tests. What is a test automation Framework

slide 13:

⚫ In a very simple language we can say that a framework is a constructive blend of various guidelines coding standards concepts processes practices project hierarchies modularity reporting mechanism test data injections etc. to pillar automation testing. Thus the user can follow these guidelines while automating application to take advantages of various productive results. ⚫ The advantages can be in different forms like the ease of scripting scalability modularity under stand-ability process definition re-usability cost maintenance etc. Thus to be able to grab these benefits developers are advised to use one or more of the Test Automation Framework What is a test automation Framework

slide 14:

⚫ Predefine Framework: ⚫ J-unit TDD ⚫Test NGTDD ⚫CucumberBDD ⚫ User define Framework: ⚫Hybrid Automation Framework ⚫Data Driven Automation Framework ⚫Keyword Driven Automation Framework Types of Automation Framework

slide 15:

⚫ Page Object Model is a Design Pattern which has become popular in Selenium Test Automation. It is widely used design pattern in Selenium for enhancing test maintenance and reducing code duplication. ⚫ A page object is an object-oriented class that serves as an interface to a page of your Application Under TestAUT. ⚫ Page Factory is a way to initialize the web elements you want to interact with within the page object when you create an instance of it. Hybrid Driven Framework using POMPage Object Model

slide 16:

⚫ Code reusability – We could achieve code reusability by writing the code once and use it in different tests. ⚫ Code maintainability – There is a clean separation between test code and page specific code such as locators and layout which becomes very easy to maintain code. Code changes only on Page Object Classes when a UI change occurs. It enhances test maintenance and reduces code duplication. ⚫ Object Repository – Each page will be defined as a java class. All the fields in the page will be defined in an interface as members. The class will then implement the interface. ⚫ Readability – Improves readability due to clean separation between test code and page specific code Advantage

slide 17:

This Framework is divided in to three different Phases ⚫ Implementation ⚫ Execution ⚫ Maintenance Phases

slide 18:

⚫ Create Maven project ⚫ Update pom.xml ⚫ Create page Objects ⚫ Create Basic test Cases ⚫ Add log to test case ⚫ Read Common Values from Properties file ⚫ Run Test cases on desired Browser ⚫ Add Extent report ⚫ Create the data driven test cases ⚫ Adding New Test case Implementation

slide 19:

⚫ Run test cases with Maven pom.xml ⚫ Run test cases through Maven CLI command line interface ⚫ Run test cases through run.bat ⚫ Run test cases using Jenkins Maintenance ⚫ Create the repository in GITHUB. ⚫ Commit the code in the local repository. ⚫ Push the project code to GITHUB remote repository from local GIT repository. Execution

slide 20:

⚫ Behaviour-Driven Development BDD is a collaborative approach to software development that bridges the communication gap between business and IT. BDD helps teams communicate requirements with more precision discover defects early and produce software that remains maintainable over time. ⚫ It helps teams create business requirements that can be understood by the whole team. Specifying examples uncovers misunderstanding people might not even be aware of. Teams that practice BDD focus on preventing defects rather than finding them. This leads to less rework and quicker time to market. Behaviour Driven Development BDD using cucumber

slide 21:

Implementation ⚫ Create the maven project ⚫ Add the cucumber plugin ⚫ Create the Feature file ⚫ Write the feature using the Gherkin languageGiven When Then And But keywords. ⚫ Create the step definition file ⚫ Add all the required dependency in to the pom.xml ⚫ Create the Test runner file Execute the step definition file using Junit ⚫ Implement the data driven for filling the data from excel to the application ⚫ Add the log4j for generating the log ⚫ Create the extent report ⚫ Send the report to the concerned developer through email

slide 22:

⚫ Run the test cases through pom.xml ⚫ Run test cases using Jenkins Maintenance ⚫ Create the repository in GITHUB. ⚫ Commit the code in the local repository. ⚫ Push the project code to GITHUB remote repository from local GIT repository. Execution

slide 23:

What is Data Driven Framework ⚫ Data-driven is a test automation framework which stores test data in a table or spread spreadsheet format. ⚫ This allows automation engineers to have a single test script which can execute tests for all the test data in the table. ⚫ In this framework input values are read from data files and are stored into a variable in test scripts. ⚫ DDT Data Driven testing enables building both positive and negative test cases into a single test. ⚫ In Data-driven test automation framework input data can be stored in single or multiple data sources like xls XML csv and databases. Data Driven Automation Framework:

slide 24:

Data Driven Automation Framework:

slide 25:

⚫ Frequently we have multiple data sets which we need to run the same tests on. ⚫ To create an individual test for each data set is a lengthy and time-consuming process. ⚫ Data Driven Testing framework resolves this problem by keeping the data separate from Functional tests. ⚫ The same test script can execute for different combinations of input test data and generate test results. Why Data Driven Framework

slide 26:

⚫ Allows to test application with multiple sets of data values during Regression testing ⚫ Test data and verification data can be organized in just one file and it is separate from the test case logic. ⚫ Base on the tool it is possible to have the test scripts in a single repository. This makes the texts easy to understand maintain and manage. ⚫ Actions and Functions can be reused in different tests. ⚫ Some tools generate test data automatically. This is useful when large volumes of random test data are necessary which helps to save the time. ⚫ Data-driven testing can perform any phase of the development. A data-driven test cares are generally merged in the single process. However it can be used in multiple test cases. ⚫ Allows developers and testers to have clear separation for the logic of their test cases/scripts from the test data. ⚫ The same test cases can be executed several times which helps to reduce test case and scripts. ⚫ Any changes in the test script do not effect the test data Advantage

slide 27:

What is keyword Driven Framework ⚫ A keyword-driven testing is a scripting technique that uses data files to contain the keywords related to the application being tested. ⚫ These keywords describe the set of actions that is required to perform a specific step. ⚫ A keyword-driven test consists of high and low-level keywords including the keyword arguments which is composed to describe the action of a test case. ⚫ In Keyword Driven Testing you first identify a set of keywords and then associate an action or function related to these keywords. Here every testing action like opening or closing of browser mouse click keystrokes etc. is described by a keyword such as open browser click Type text and so on. Keyword Driven Framework

slide 28:

Example 1.login to application " Keyword "login" will be used in our automation framework to the test the login function or action associated with it. 1.logout from application "Keyword "logout" will be used in our automation framework to test the logout function or action associated with it.

slide 29:

In Software Engineering Keyword Driven Testing is done due to following reason ⚫ Common components handled by standard library ⚫ Using this approach tests can be written in a more abstract manner ⚫ High degree of reusability ⚫ The detail of the script is hidden from the users ⚫ Users dont have to use the scripting languages ⚫ The test is concise maintainable and flexible Why do Keyword Driven Testing

slide 30:

⚫ It allows functional testers to plan test automation before the application is ready ⚫ Tests can be developed without programming knowledge ⚫ It is not dependent on a specific programming language or tool ⚫ Compatible with any automation tools available in the market Tools : Few tools which are extensively used for Keyword driven testing. ⚫ HP QTP ⚫ Selenium Advantage

slide 31:

Website Automation Tools: Katalon Studio QTP Watir Mobile Automation Tools: Robotium Selendroid Calabash List of Other Web and Mobile Automation tool

slide 32:

Thank you

authorStream Live Help