Automation Framework Interview
Test automation framework makes use of software program to execute tests and then decide whether or not the resulted consequences and the anticipated effects are the same or not. Every company needs software program (testing program) checking out correctly, as quickly and thoroughly as possible. To accomplish this, corporations are turning to use automated testing methods.
Automation framework are differing types based at the above organizing of your code, it could be prepared primarily based upon your data, in order that any character who has the better concept to handle the data files together with excel sheet will even have the manage to control the code .An automation testing framework defines a fixed of automation testing guidelines which, whilst observed can increase the overall productiveness and convey higher outcomes apart from saving effort and time from the testing perspective.
Automation Testing Frameworks in 2024
In 2024, Automation Testing Frameworks have evolved to streamline software testing processes, offering enhanced efficiency, flexibility, and reliability in testing software applications.
Selenium:
Selenium is a widely used open-source framework for automating web browsers. It supports multiple programming languages like Java, Python, and C#.
Appium:
Appium is an open-source automation tool for mobile applications on iOS and Android platforms. It supports multiple programming languages.
TestNG:
TestNG is a testing framework designed to simplify a broad range of testing needs, from unit testing to integration testing. It is mainly used with Java.
Cucumber:
Cucumber is a tool for behavior-driven development (BDD) that allows you to write test cases in a natural language format. It supports various programming languages.
Robot Framework:
Robot Framework is a generic open-source automation framework. It is keyword-driven and supports both web and mobile testing.
Junit:
JUnit is a widely used testing framework for Java programming language. It is often used for unit testing.
Cypress:
Cypress excels in end-to-end testing, offering a JavaScript-driven framework with a powerful API, real-time reloading, and comprehensive debugging capabilities for web applications.
Playwright:
Playwright, a versatile testing tool, supports multiple browsers, automation scenarios, and offers a rich set of features, making cross-browser testing efficient and developer-friendly.
TestCafe:
TestCafe simplifies web testing by eliminating browser plugins. It’s platform-agnostic, supports multiple browsers, and focuses on reliability, allowing for parallel test execution with ease.
TestComplete:
TestComplete is a commercial automation tool that supports web, mobile, and desktop application testing.
Katalon Studio:
Katalon Studio is a comprehensive automation tool for web and mobile app testing. It supports both scripting and keyword-driven approaches.
Please verify with up-to-date sources to ensure the latest information on Automation Testing Frameworks in 2024.
What is a framework?
A framework is a set of structure of the entire automation suit. It is also a guideline, if followed can result in a structure which is easy to maintain and enhance. These guidelines include:
- Coding standards
- Handling the test data
- Maintaining and handling the elements (object repository in QTP)
- Handling of environment files and properties file
- Reporting of data
- Handling logs
What is Automation Framework?
A set of guidelines, assumptions and process developed by experts in order to perform a task(s) in an effective, efficient and optimized way.
Why Framework?
In a test automation project, we do perform different tasks by using different types of files. To organize and manage all the files and to finish all the tasks in a systematic approach we use a framework.
What are the different types of Automation Frameworks available in the industry?
There are different types of test automation frameworks and the most common ones are:
- Modular testing framework
- Data driven testing framework
- Library Architecture Testing Framework
- Keyword driven testing framework
- Hybrid testing framework
- Behavior driven development framework
What are the attributes of a good framework?
The characteristics are:
- Modular: The framework should be adaptable to change. Testers should be able to modify the scripts as per the environment or login information change
- Reusable: The commonly used methods or utilities should be written in a common file which is accessible to all the scripts.
- Consistent: The suite should be written in a consistent format by following all the accepted coding practices.
- Independent: The scripts should be written in such a way that they are independent of each other. In case one test fails, it should not holdback remaining test cases (unless it is a login page)
- Logger: It is good to have implemented the logging feature in the framework. This would help in case our scripts run for longer hours (say nightly mode), if the script fails at any point of time, having the log file will help us to detect the location and the type of error.
- Reporting: It is good to have reporting feature automatically embedded into the framework. Once the scripting is done, we can have the results and reports sent via an email.
- Integration: Automation framework should be such that it is easy to integrate it with other application like continuous integration or triggering the automated script as soon as the build is deployed.
What are the advantages of using Test Automation Framework?
- Saves time and money. Automation testing is faster in execution
- Reusability of code. Create one time and execute multiple times with less or no maintenance
- Easy reporting. It generates automatic reports after test execution
- Easy for compatibility testing. It enables parallel execution in combination of different OS and browser environments
- Low cost maintenance. It is cheaper compared to manual testing in a long run
- Automated testing is more reliable
- Automated testing is more powerful and versatile
- It is mostly used for regression testing. Supports execution of repeated test cases
- Minimal manual intervention. Test scripts can be run unattended
- Maximum coverage. It helps to increase the test coverage
What is the purpose of pom.xml file?
Using pom.xml file we can execute test suites in maven. We can maintain jar files well structured.
What are the Pros and Cons of Linear Framework?
Pros:
- Easy to create and takes less time
- Scripting knowledge is optional
- Recommended for small scale projects
- Recommended for dynamically changing requirements
Cons:
- No centralized maintenance of test objects
- Low in performance due to duplicate objects
- Less or no concentration on complex functionality testing
- Less or no concentration on data driven testing
- No centralized maintenance of resources
What are the Pros and Cons of Modular Framework?
Pros:
- Centralized maintenance of resources
- High in performance
- Modifications are easy
- Concentration on complex functionality testing
Cons:
- Scripting knowledge is mandatory
- Less or no concentration on data driven testing
- Takes more time to create
What are the Pros and Cons of Data Driven Framework?
Pros:
- Positive and negative testing can be performed
- Checking the reliability of system (AUT)
Cons:
- Maintaining resources is difficult?
- Less or no concentration on complex functionality testing
What are the Pros and Cons of Hybrid Framework?
Pros:
- Scope is very high as we mix different approaches.
- Flexible for performing all types of tasks.
Cons:
- Organizing and managing resources are difficult
- Complex architecture.
- Low in performance.
What is Automation testing?
Automation testing is the process of testing the software using an automation tool to find the defects. In this process, executing the test scripts and generating the results are performed automatically by automation tools. Some most popular tools to do automation testing are HP QTP/UFT, Selenium Web Driver, etc.
What type of test cases you won’t pick up to automate?
Before picking up the test cases to automate, I do check whether the application is stable or not. So based on this, I don’t pickup test cases when the AUT changes frequently and the test cases which I run rarely and run only one time. When I do usability and exploratory testing.
What is Application Map?
An Application Map Provides Named References for GUI Components. Application Maps are nothing but Object Repository.
What are the different types of tasks to be performed during Test Automation?
Tasks to be performed:
Analyzing the application in terms of Object Identification:
We have to analyze the AUT in terms of Object Identification.
Basically, QTP is an Object based test tool, here first we have to confirm
If the QTP is recognizing all the objects in our application or not.
To do this, we can follow one or more below given methods.
Record and playback some End to End Scenarios.
- Using Object Spy
- Using Object Repository Manager
 We can segregate Software Objects in 3 categories…
- Static Objects(Properties information is constant)
- Dynamic Objects(Properties info changes dynamically)
- Duplicate Objects (Having Similar property info.)
Note: We can handle dynamic Objects using Regular expressions and handle duplicate
Objects using “Index” property.
- Selecting Areas/Test Cases for Automation
Overview: 100% test automation is not possible; we can go for maximum automation.
Generally we select below type of Tests for Automation:
- Tests that we have to execute on every build (Ex: Sanity Tests)
- Â Tests that we have to execute on every modified build (Ex: Regression Tests
- Tests that we have to execute with multiple sets of test data.(Ex: Data Driven Tests
- Tests having complex functionality
- Planning (Effort estimation, Schedule, Work allocation and Automation Framework implementation)
Overview: After selecting some areas for Automation, we have to estimate the efforts     in terms of Scope of the Project, time and resources(Environmental and Human)To estimate efforts, we can follow an one of the below given methods:
- Using Expert based techniques.
- Experienced based techniques.
  Function point analysis.
- Identifying End to End Scenarios.
- Identifying verification points.
- Identifying General and Alternate Flows.
  Identifying the modularity.
 Identifying the complex functionality.
- Creating Generic and project specific functions.
- Creating required Automation resources (Functions, Object repository Files, Environment variable files—etc)
- Creating Tests (Using Object Repository or Descriptive Programming)
- Enhancing Tests (Inserting Checkpoints, Output Values, Transaction points, Flow Control Statements, Synchronization, Parameterization.etc)
- Debugging and running tests (Individual test execution, Test Batch execution.etc)
- Defining and exporting test results
- Analyzing results
- Defect Reporting using Our Company defect management system.
- Modifying resources and tests (if required)
- Performing Re and regression testing
- Maintaining Automation Resources
What is the purpose of testng.xml file?
Using testng.xml we can create suite files, groups, methods and also listeners. We can mark tests for parallel execution. We can trigger testng.xml file from the command prompt or through Jenkins.