Top 18 Test Automation Framework Interview Questions You Must Prepare 27.Apr.2024

Description: 

In this approach tests can be created and executed using reusable components.

Advantages:

  • Centralized maintenance of resources 
  • High in performance
  • Modifications are easy
  • Concentration on complex functionality testing

Disadvantages:

  • Scripting knowledge is mandatory
  • Less or no concentration on data driven testing
  • Takes more time to create

  • Well defined folder structure
  • Initialization script
  • Driver script
  • Organizer spreadsheet
  • Process guidelines document

In this approach tests can be created and executed using keywords

Tasks to be performed:

a) 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. 

b) 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 

c) 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.
  1. Identifying End to End Scenarios.
  2. Identifying verification points.
  3. Identifying General and Alternate Flows.
  4. Identifying the modularity.
  5. Identifying the complex functionality. 

d) Creating Generic and project specific functions.

e) Creating required Automation resources(Functions, Object repository Files, Environment variable files---etc)

f) Creating Tests(Using Object Repository or     Descriptive Programming)

g) Enhancing Tests(Inserting Checkpoints, Output Values, Transaction points, Flow Control Statements, Synchronization, Parametrization---etc )

h) Debugging and running tests(Individual test execution, Test Batch execution --etc)

i) Defining and exporting test results

j) Analyzing results

k) Defect Reporting using Our Company defect   management system.

l) Modifying resources and tests (if required)

m) Performing Re and regression testing 

n) Maintaining Automation Resources 

A set of guidelines, assumptions and process developed by experts in order to perform a task(s) in an effective, efficient and optimized way.

It is a combination of 2 or more approaches

Ex:

Modular framework and Data driven framework                  

Advantages: 

  • Scope is very high as we mix different approaches.
  • Flexible for performing all types of tasks.

Drawbacks:

  • Organizing and managing resources are difficult
  • Complex architecture.
  • Low in performance.

Any word used as the key to a code A reserved word used to identify a specific command or function or method or statement or operator or object etc.

Description: 

In this approach tests can be created and executed using recording feature.

Advantages:

  • Easy to create and takes less time
  • Scripting knowledge is optional
  • Recommended for small scale projects 
  • Recommended for dynamically changing requirements   

Disadvantages:

  • 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

In one project test automation we create and use different types of files and we perform different types of tasks, in order to organize and manage them all, a systematic approach (Automation Framework) is required.

In order to create, store, organize and manage files, a well defined folder structure is required. Folder structure is a mandatory element of any framework, but folder names may vary from one framework to another and company to another.

In this approach keywords can be used for creating and executing tests.

  • Test Objects (EX: Browser, page, webEdit, WinButton---etc)
  • Functions (Built-In and User defined)
  • Methods (Ex: Set, Select, Activate, Navigate---etc)
  • Statements (EX:Dim ,If, For, Exit, wait, option explicit ---etc)
  • Operators (EX: +,/,*,and, or, not---etc

Description:

In this approach tests can be executed using multiple sets of test data

Advantages: 

  • Positive and negative testing can be performed
  • Checking the reliability of system (AUT)

Disadvantages:

  • Maintaining resources is difficult
  • Less or no concentration on complex functionality testing

Folder Structure:

@ObjectRepository
@Environment
@FunctionLibrary

  • Company
  • ProjectSpecific

@TestData
@TestResult
@RecoveryScenarios
@Organizer
@Drivers
@Miscellaneous

Keyword is an Action that can be performed on a GUI Component. Ex . For GUI Component Textbox some Keywords ( Action) would be InputText, VerifyValue, VerifyProperty and so on.

Files to be used:

  • Flat files (.txt),
  • Excel files (.xls)
  • Object repository files (.tsr)
  • XML files (.xml)
  • Library files (.vbs/.qfl)
  • Test Scripts (.mts)
  • Test Batch Files (.mtb) 
  • Recovery scenario files (.qrs)
  • Test Result file (.XML)   Etc...

Automation Framework is not a QTP Tool feature, it’s a 3rd party concept. And this is purely local concept.(framework may vary from one company to another and One project to another)

  • Record/Playback or Linear Framework (1st generation framework).
  • Modular Framework.
  • Data Driven Framework
  • Keyword Driven framework
  • Hybrid Framework Etc..

An Application Map Provides Named References for GUI Components. Application Maps are nothing but "Object Repositry"