0% found this document useful (0 votes)
21 views138 pages

Testing Interview Questions and Answers

The document provides a comprehensive overview of software testing concepts, techniques, and methodologies, including various testing types such as functional, non-functional, and performance testing. It also covers the software testing life cycle, agile methodologies, and common interview questions related to software testing. Additionally, it discusses testing processes, metrics, and the importance of verification and validation in software development.

Uploaded by

divyashree28k
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views138 pages

Testing Interview Questions and Answers

The document provides a comprehensive overview of software testing concepts, techniques, and methodologies, including various testing types such as functional, non-functional, and performance testing. It also covers the software testing life cycle, agile methodologies, and common interview questions related to software testing. Additionally, it discusses testing processes, metrics, and the importance of verification and validation in software development.

Uploaded by

divyashree28k
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 138

1

Contents
Testing Techniques....................................................................................................................................36
METRICS....................................................................................................................................................39
SOFTWARE TESTING BASICS......................................................................................................................44
Automation testing....................................................................................................................................71
V&V...........................................................................................................................................................74
What is Verification?.............................................................................................................................74
What is Validation?................................................................................................................................74
Difference between Verification and Validation....................................................................................75
Difference between Regression and Retesting..........................................................................................76
What is software testing?..........................................................................................................................76
What is Functional testing ?......................................................................................................................77
STLC ?........................................................................................................................................................77
Defect Life cycle.........................................................................................................................................78
Priority and severity..................................................................................................................................79
AGILE.........................................................................................................................................................81
What is Agile Testing?...........................................................................................................................81
Advantages of Agile Testing...................................................................................................................81
Principles of Agile Testing......................................................................................................................81
What is Agile Methodology?..................................................................................................................82
Agile Vs Waterfall Method.................................................................................................................82
Scrum.................................................................................................................................................84
Product Backlog.................................................................................................................................85
Process flow of Scrum Methodologies:.............................................................................................85
eXtreme Programming (XP)...............................................................................................................86
Software Development Life Cycle – SDLC Phases..................................................................................93
Software Testing Challenges in the Iterative Models.............................................................................93
Iterative Model......................................................................................................................................93
Incremental Model................................................................................................................................93
Rapid Application Development (RAD)..................................................................................................93
Spiral Model..........................................................................................................................................93
Prototyping............................................................................................................................................94
2

V Model.................................................................................................................................................94
Waterfall Model in Software Testing.....................................................................................................94
End to end testing.....................................................................................................................................94
Endurance testing ?...................................................................................................................................94
What is Endurance Testing?..................................................................................................................94
Issues found - Endurance Testing..........................................................................................................95
Entry exit criteria.......................................................................................................................................95
What is an Entry Criterion?....................................................................................................................95
Examples for Entry Criterion:.................................................................................................................95
What is an Exit Criterion?......................................................................................................................95
Examples of Exit Criteria:.......................................................................................................................95
What is an Exploratory Testing?............................................................................................................96
Benefits:................................................................................................................................................96
Drawbacks:............................................................................................................................................96
What is Failover Testing?.......................................................................................................................96
Example:................................................................................................................................................96
Factors to be Considered:......................................................................................................................97
What is Functional Testing?...................................................................................................................97
Functional Testing Techniques:.............................................................................................................97
DOMAIN....................................................................................................................................................98
Selenium....................................................................................................................................................98
Selenium Interview Questions...............................................................................................................98

Manual Testing Interview Questions and Answers


Q. How to define a standard process for the entire testing flow, Explain the challenging
situations in Manual Testing career, What is the best way to go about getting a pay rise.

[Link] the above link for the answers to these questions.

Q. What is the most challenging situation you ever had during Testing?
Q. How to perform testing when there are no documents?
Ans. Click here for the detailed post on how to answer these QA interview questions.

Q. How to prepare for a Software Testing/QA interview?


Ans. Click the above link to know – Where should I start with for the interview preparation? It’s
almost 2 years now since I have faced any interview.
3

Q. Mock test to judge your Software Testing Interview Skills


Ans. Take this mock test paper which will be helpful for you to prepare for a testing interview as
well as the CSTE certification exam. Click the above link for questions and answers.

Q. WinRunner Interview questions with answers


Ans. Preparing for WinRunner Interview – These are some of the important Winrunner interview
questions frequently asked in an Automation testing interview. Winrunner questions 1, questions
2 and questions 3

Q. Different Automation Testing Interview Questions


Ans. Click the above link for Automation Interview questions like Difference between
Winrunner and Test Director, What is TSL? What is 4GL and is it similar too?

Q. What is the difference between Performance Testing, Load Testing, and Stress Testing?
Explain with examples?
Ans. Many people are confused with these testing terminologies. Click here for the detailed
explanation of Performance, Load and Stress Testing with examples.

Q. ISTQB questions and answers (more questions here and also here)
Ans. Click the above links to read about ISTQB paper pattern and tips on how to solve these
questions quickly. ISTQB ‘Foundation level’ sample questions with answers are found here.

Q. QTP interview questions


Ans. Quick Test Professional: Interview Questions and answers are found in the above link.

Q. CSTE questions with answers

Ans. Click the above link for questions and answers about CSTE.

Q. What is Desk checking and Control Flow Analysis


Ans. Click here for answers about Desk checking and Control Flow Analysis along with the
examples.

Q. What is Sanity Test (or) Build test?


Ans. Verifying the critical (important) functionality of the software on a new build to decide
whether to carry further testing or not is termed as Sanity Test.

Q. What is the difference between client-server testing and web-based testing


Ans. Click here for the answer.

Q. What is Black Box testing?


Ans. Black box testing is explained with types in the above link.

Q. What is White Box testing?


Ans. Click here for the post explaining about white box testing along with its types
4

Q. What are the different Types of Software Testing?


Ans. Click the above link to refer the post explaining all Software Testing Types in detail.

Q. What is Dynamic Testing?


Ans. It is the testing done by executing the code or program with various input values and later
on the output is verified.

Q. What is GUI Testing?


Ans. GUI or Graphical user interface testing is the process of testing the software user interface
against the provided requirements/mockups/HTML designs etc.,

Q. What is Formal Testing?


Ans. Software verification carried out by following a test plan, testing procedures and proper
documentation with an approval from the customer is termed as Formal Testing.

Q. What is Risk Based Testing?


Ans. Identifying the critical functionality in the system and then deciding the orders in which
these functionalities are to be tested and applying testing after that is termed as Risk-based
Testing.

Q. What is Early Testing?


Ans. Conducting testing as soon as possible in the development lifecycle to find defects at early
stages of STLC. Early testing is helpful to reduce the cost of fixing defects at the later stages of
STLC.

Q. What is Exhaustive Testing?


Ans. Testing functionality with all valid, invalid inputs and pre-conditions is called Exhaustive
testing.

Q. What is Defect Clustering?


Ans. Any small module or functionality may contain a number of defects – concentrating more
on testing these functionalities is known as Defect Clustering.

Q. What is Pesticide Paradox?


Ans. If prepared test cases are not finding defects, add/revise test cases to find more defects, this
is known as Pesticide Paradox.

Q. What is Static Testing?


Ans. Manual verification of the code without executing the program is called as Static Testing.
In this process, the issues are identified in the code by checking code, requirement and design
documents.

Q. What is Positive Testing?


Ans. It is the Testing which is conducted on the application to determine if the system works
properly. Basically known as “test to pass” approach.
5

Q. What is Negative Testing?


Ans. Testing Software with a negative approach to check if the system is not “showing error
when not supposed to” and “not showing error when supposed to” is termed as Negative Testing.

Q. What is an End-to-End Testing?


Ans. Testing the overall functionality of the system including the data integration among all the
modules is called End-to-End Testing.

Q. What is Exploratory Testing?


Ans. Exploring the application, understanding its functionalities, adding (or) modifying the
existing test cases for better testing is called Exploratory testing.

Q. What is Monkey Testing?


Ans. Testing conducted on an application without any plan and carried out randomly with the
tests to find any system crash with an intention of finding tricky defects is called Monkey
Testing.

Q. What is Non-Functional Testing?


Ans. Validating various non-functional aspects of the system such as user interfaces, user-
friendliness, security, compatibility, Load, Stress, and Performance etc., is called Non-Functional
testing.

Q. What is Usability Testing?


Ans. Checking how easily the end users are able to understand and operate the application is
called Usability Testing.

Q. What is Security Testing?


Ans. Validating whether all security conditions are properly implemented in the software (or) not
is called Security testing.

Q. What is Performance Testing?


Ans. The process of measuring various efficiency characteristics of a system such as response
time, load stress transactions per minutes, transaction mix etc., is termed as Performance Testing.

Q. What is Load Testing?


Ans. Analyzing both the functional and performance behavior of an application under various
conditions is called Load Testing.

Q. What is Stress Testing?


Ans. Checking the application behavior under stress conditions
(or)
Reducing the system resources and keeping the load as constant and checking how the
application is behaving is called Stress Testing.
6

Q. What is Process?
Ans. A process is a set of practices performed to achieve a given purpose; it may include tools,
methods, materials or people.

Q. What is Software Configuration Management?


Ans. The process of identifying, Organizing and controlling changes to the Software
development and maintenance.
(or)
It is a methodology to control and manage a software development project.

Q. What is a Testing Process / LifeCycle?


Ans. It includes the below factors:

Writing a Test Plan


Test Scenarios
Test Cases
Executing the Test Cases
Test Results
Defect Reporting
Defect Tracking
Defect Closing
Test Release

Q. What is full form of CMMI?


Ans. Capability Maturity Model Integration

Q. What is a Code Walk Through?


Ans. An informal analysis of the program source code to find the defects and verify the coding
techniques is termed so.

Q. What is Unit Level Testing?


Ans. Testing of single programs, modules or unit of code is termed as Unit Level Testing.

Q. What is Integration Level Testing?


Ans. Testing of related programs, Modules (or) Unit of code.
(or)
Partitions of the system which is ready for testing with other partitions of the system is termed
so.

Q. What is System Level Testing?


Ans. Testing of the entire computer system across all the modules is termed so. This kind of
testing can include Functional as well as Structural Testing.

Q. What is Alpha Testing?


Ans. Testing of a whole computer system before rolling out to the UAT is termed so.
7

Q. What is User Acceptance Testing (UAT)?


Ans. Testing of a computer system by the client to verify if it adhered to the provided
requirements.

Q. What is a Test Plan?


Ans. It is a document describing the scope, approach, resources, and schedule of testing
activities. It identifies test items, features to be tested, testing tasks, who will do each task, and
any risks requiring contingency planning.

Q. What is a Test Scenario?


Ans. Identifying all the possible areas to be tested (or) what is to be tested is termed so.

Q. What is ECP (Equivalence Class Partition)?


Ans. It is a method for deriving test cases.

Q. What is a Defect?
Ans. Any flaw or imperfection in a software work product is termed as a Defect.
(or)
When the expected result does not match with the application actual result, it is termed so.

Q. What is Severity?
Ans. It defines the importance of the defect from the functional point of view i.e. how critical is
a defect with respect to the application.

Q. What is Priority?
Ans. It indicates the importance or urgency of fixing a defect

Q. What is Re-Testing?
Ans. Re-testing the application means verifying whether the defects have been fixed or not.

Q. What is Regression Testing?


Ans. Verifying an existing functional and non-functional area after making changes to the part of
a software or addition of new features is termed so.

Q. What is Recovery Testing?


Ans. Checking whether the system is able to handle some unexpected or unpredictable situations
is called Recovery Testing.

Q. What is Globalization Testing?


Ans. It is the process of verifying whether a software can be run independent of its geographical
and cultural environment. Checking if the application is having features of setting and changing
language, date, format, and currency if it is designed for global users.

Q. What is Localization Testing?


Ans. Verifying globalized application for a particular locality of users, under cultural and
geographical conditions is termed so.
8

Q. What is Installation Testing?


Ans. Checking whether we are able to install a software successfully (or) not, as per the
guidelines given in the installation document is called Installation Testing.

Q. What is Un-Installation Testing?


Ans. Checking whether we are able to uninstall the software from the system successfully (or)
not is called Un-Installation Testing

Q. What is Compatibility Testing?


Ans. Checking whether the application is compatible with different software and hardware
environment or not is called Compatibility Testing.

Q. What is a Test Strategy?


Ans. It is a part of a test plan describing how testing is carried out for the project and what
testing types need to be performed on the application.

Q. What is a Test Case?


Ans. A Test case is a set of pre-conditional steps to be followed with input data and expected
behavior to validate the functionality of a system.

Q. What is Business Validation Test Case?


Ans. A test case which is prepared to check the business condition or a business requirement is
called Business Validation test case.

Q. What is a Good Test Case?


Ans. A Test case that has the high priority of catching defects is called a Good Test Case.

Q. What is Use Case Testing?


Ans. Validating a software to confirm whether it is developed as per the use cases or not is called
Use Case testing.

Q. What is a Defect Age?


Ans. The time gap between the date of detection & the date of closure of a defect is termed so.

Q. What is Showstopper Defect?


Ans. A defect which is not permitting to continue further with testing is called Showstopper
Defect.

Q. What is a Test Closure?


Ans. It is the last phase of the STLC, where the management prepares various test summary
reports that explain the complete statistics of the project based on the testing carried out.

Q. What is Bucket Testing?


Ans. Bucket testing is also known as A/B testing. It is mostly used to study the impact of various
product designs in the website metrics. Two simultaneous versions are run on a single or a set of
web pages to measure the difference in click rates, interface, and traffic.
9

Q. What is meant by Entry Criteria and Exit Criteria in Software Testing?


Ans. Entry Criteria is the process that must be present when a system begins, like,
SRS – Software
FRS
Use Case
Test Case
Test Plan
Exit criteria ensures whether the testing is completed and the application is ready for release,
like,
Test Summary Report,
Metrics
Defect Analysis Report.

Q. What is Concurrency Testing?


Ans. This is a multiple user testing to access the application at the same time to verify the effect
on code, module or DB and it is mainly used to identify the locking and deadlocking situations in
the code.

Q. What is Web Application Testing?


Ans. Web application testing is done on a website to check – load, performance, security,
Functionality, Interface, Compatibility and other usability-related issues.

Q. What is Unit Testing?


Ans. Unit testing is done to check whether the individual modules of the source code are
working properly or not.

Q. What is Interface Testing?


Ans. Interface testing is done to check whether the individual modules are communicating
properly as per the specifications or not. Interface testing is mostly used to test the user interface
of GUI applications.

Q. What is Gamma Testing?


Ans. Gamma testing is done when the software is ready for release with the specified
requirements, this testing is done directly by skipping all the in-house testing activities.

Q. What is Test Harness?


Ans. Test Harness is configuring a set of tools and test data to test an application under various
conditions, which involves monitoring the output with the expected output for correctness.
The benefits of Testing Harness are: Productivity increase due to process automation and
increase in the product quality

Q. What is Scalability Testing?


Ans. It is used to check whether the functionality and performance of a system are capable to
meet the volume and size changes as per the requirements.
Scalability testing is done using load test by changing various software, hardware configurations,
and testing environment.
10

Q. What is Fuzz Testing?


Ans. Fuzz testing is a black box testing technique which uses a random bad data to attack a
program to check if anything breaks in the application.

Q. What is Difference between QA, QC, and Testing?


Ans. QA?
It is process oriented and its Aim is to prevent the defects in an application.

QC?
QC is product oriented and it is a Set of activities used to evaluate a developed work product

Testing?
Executing and verifying an application with the intention of finding defects.

Q. What is Date Driven Testing?


Ans. It is an Automation testing process in which an application is tested with multiple sets of
data with different preconditions as an input to the script.

I hope that the above given Manual and Automation Software Testing Interview Questions and
Answers would have been too beneficial to each of you. And I’m sure that with a thorough
knowledge of these Questions and Answers, you can appear for any Interview confidently and
get through very successfully.

1. What is the MAIN benefit of designing tests early in the life cycle?
It helps prevent defects from being introduced into the code.

2. What is risk-based testing?

Risk-based Testing is the term used for an approach to creating a Test Strategy that is based on
prioritizing tests by risk. The basis of the approach is a detailed risk analysis and prioritizing of
risks by risk level. Tests to address each risk are then specified, starting with the highest risk
first.

3. What is the KEY difference between preventative and reactive approaches to testing?

Preventative tests are designed early; reactive tests are designed after the software has been
produced.

4. What is the purpose of exit criteria?

The purpose of exit criteria is to define when a test level is completed.

5. What determines the level of risk?

The likelihood of an adverse event and the impact of the event determine the level of risk.
11

6. When is used Decision table testing?

Decision table testing is used for testing systems for which the specification takes the form of
rules or cause-effect combinations. In a decision table the inputs are listed in a column, with the
outputs in the same column but below the inputs. The remainder of the table explores
combinations of inputs to define the outputs produced.

Learn More About Decision Table Testing Technique in the Video Tutorial here

7. What is the MAIN objective when reviewing a software deliverable?

To identify defects in any software work product.

8. Which of the following defines the expected results of a test? Test case specification or
test design specification.

Test case specification defines the expected results of a test.

9. What is the benefit of test independence?

It avoids author bias in defining effective tests.

10. As part of which test process do you determine the exit criteria?

The exit criteria is determined on the bases of 'Test Planning'.

11. What is beta testing?

Testing performed by potential customers at their own locations.

12. Given the following fragment of code, how many tests are required for 100% decision
coverage?

if width > length

thenbiggest_dimension = width

if height > width

thenbiggest_dimension = height

end_if

elsebiggest_dimension = length

if height > length


12

thenbiggest_dimension = height

end_if

end_if

13. You have designed test cases to provide 100% statement and 100% decision coverage
for the following fragment of code. if width > length then biggest_dimension = width else
biggest_dimension = length end_if The following has been added to the bottom of the code
fragment above. print "Biggest dimension is " &biggest_dimensionprint "Width: " &
width print "Length: " & length How many more test cases are required?

None, existing test cases can be used.

14. Rapid Application Development?

Rapid Application Development (RAD) is formally a parallel development of functions and


subsequent integration. Components/functions are developed in parallel as if they were mini
projects, the developments are time-boxed, delivered, and then assembled into a working
prototype. This can very quickly give the customer something to see and use and to provide
feedback regarding the delivery and their requirements. Rapid change and development of the
product is possible using this methodology. However the product specification will need to be
developed for the product at some point, and the project will need to be placed under more
formal controls prior to going into production.

15. What is the difference between Testing Techniques and Testing Tools?

Testing technique: – Is a process for ensuring that some aspects of the application system or unit
functions properly there may be few techniques but many tools.

Testing Tools: – Is a vehicle for performing a test process. The tool is a resource to the tester, but
itself is insufficient to conduct testing

Learn More About Testing Tools here

16. We use the output of the requirement analysis, the requirement specification as the
input for writing …

User Acceptance Test Cases

17. Repeated Testing of an already tested program, after modification, to discover any
defects introduced or uncovered as a result of the changes in the software being tested or in
another related or unrelated software component:
13

Regression Testing

18. A wholesaler sells printer cartridges. The minimum order quantity is 5. There is a 20%
discount for orders of 100 or more printer cartridges. You have been asked to prepare test
cases using various values for the number of printer cartridges ordered. Which of the
following groups contain three test inputs that would be generated using Boundary Value
Analysis?

4, 5, 99

19. What is component testing?

Component testing, also known as unit, module and program testing, searches for defects in, and
verifies the functioning of software (e.g. modules, programs, objects, classes, etc.) that are
separately testable. Component testing may be done in isolation from the rest of the system
depending on the context of the development life cycle and the system. Most often stubs and
drivers are used to replace the missing software and simulate the interface between the software
components in a simple manner. A stub is called from the software component to be tested; a
driver calls a component to be tested.

Here is an awesome video on Unit Testing

20. What is functional system testing?

Testing the end to end functionality of the system as a whole is defined as a functional system
testing.

21. What are the benefits of Independent Testing?

Independent testers are unbiased and identify different defects at the same time.

22. In a REACTIVE approach to testing when would you expect the bulk of the test design
work to be begun?

The bulk of the test design work begun after the software or system has been produced.

23. What are the different Methodologies in Agile Development Model?

There are currently seven different agile methodologies that I am aware of:

1. Extreme Programming (XP)


2. Scrum
3. Lean Software Development
4. Feature-Driven Development
5. Agile Unified Process
6. Crystal
14

7. Dynamic Systems Development Model (DSDM)

24. Which activity in the fundamental test process includes evaluation of the testability of
the requirements and system?

A 'Test Analysis' and 'Design' includes evaluation of the testability of the requirements and
system.

25. What is typically the MOST important reason to use risk to drive testing efforts?

Because testing everything is not feasible.

26. What is random/monkey testing? When it is used?

Random testing often known as monkey testing. In such type of testing data is generated
randomly often using a tool or automated mechanism. With this randomly generated input the
system is tested and results are analysed accordingly. These testing are less reliable; hence it is
normally used by the beginners and to see whether the system will hold up under adverse effects.

27. Which of the following are valid objectives for incident reports?

1. Provide developers and other parties with feedback about the problem to enable
identification, isolation and correction as necessary.
2. Provide ideas for test process improvement.
3. Provide a vehicle for assessing tester competence.
4. Provide testers with a means of tracking the quality of the system under test.

28. Consider the following techniques. Which are static and which are dynamic
techniques?

1. Equivalence Partitioning.
2. Use Case Testing.
3. Data Flow Analysis.
4. Exploratory Testing.
5. Decision Testing.
6. Inspections.

Data Flow Analysis and Inspections are static; Equivalence Partitioning, Use Case Testing,
Exploratory Testing and Decision Testing are dynamic.

29. Why are static testing and dynamic testing described as complementary?

Because they share the aim of identifying defects but differ in the types of defect they find.

30. What are the phases of a formal review?


15

In contrast to informal reviews, formal reviews follow a formal process. A typical formal review
process consists of six main steps:

1. Planning
2. Kick-off
3. Preparation
4. Review meeting
5. Rework
6. Follow-up.

31. What is the role of moderator in review process?

The moderator (or review leader) leads the review process. He or she determines, in co-operation
with the author, the type of review, approach and the composition of the review team. The
moderator performs the entry check and the follow-up on the rework, in order to control the
quality of the input and output of the review process. The moderator also schedules the meeting,
disseminates documents before the meeting, coaches other team members, paces the meeting,
leads possible discussions and stores the data that is collected.

Learn More about Review process in Video Tutorial here

32. What is an equivalence partition (also known as an equivalence class)?

An input or output ranges of values such that only one value in the range becomes a test case.

33. When should configuration management procedures be implemented?

During test planning.

34. A Type of functional Testing, which investigates the functions relating to detection of
threats, such as virus from malicious outsiders?

Security Testing

35. Testing where in we subject the target of the test , to varying workloads to measure and
evaluate the performance behaviours and ability of the target and of the test to continue to
function properly under these different workloads?

Load Testing

36. Testing activity which is performed to expose defects in the interfaces and in the
interaction between integrated components is?

Integration Level Testing

37. What are the Structure-based (white-box) testing techniques?


16

Structure-based testing techniques (which are also dynamic rather than static) use the internal
structure of the software to derive test cases. They are commonly called 'white-box' or 'glass-box'
techniques (implying you can see into the system) since they require knowledge of how the
software is implemented, that is, how it works. For example, a structural technique may be
concerned with exercising loops in the software. Different test cases may be derived to exercise
the loop once, twice, and many times. This may be done regardless of the functionality of the
software.

38. When "Regression Testing" should be performed?

After the software has changed or when the environment has changed Regression testing should
be performed.

39. What is negative and positive testing?

A negative test is when you put in an invalid input and receives errors. While a positive testing,
is when you put in a valid input and expect some action to be completed in accordance with the
specification.

40. What is the purpose of a test completion criterion?

The purpose of test completion criterion is to determine when to stop testing

41. What can static analysis NOT find?

For example memory leaks.

42. What is the difference between re-testing and regression testing?

Re-testing ensures the original fault has been removed; regression testing looks for unexpected
side effects.

43. What are the Experience-based testing techniques?

In experience-based techniques, people's knowledge, skills and background are a prime


contributor to the test conditions and test cases. The experience of both technical and business
people is important, as they bring different perspectives to the test analysis and design process.
Due to previous experience with similar systems, they may have insights into what could go
wrong, which is very useful for testing.

44. What type of review requires formal entry and exit criteria, including metrics?

Inspection

45. Could reviews or inspections be considered part of testing?


17

Yes, because both help detect faults and improve quality.

46. An input field takes the year of birth between 1900 and 2004 what are the boundary
values for testing this field?

1899,1900,2004,2005

47. Which of the following tools would be involved in the automation of regression test? a.
Data tester b. Boundary tester c. Capture/Playback d. Output comparator.

d. Output comparator

48. To test a function, what has to write a programmer, which calls the function to be tested
and passes it test data.

Driver

49. What is the one Key reason why developers have difficulty testing their own work?

Lack of Objectivity

50."How much testing is enough?"

The answer depends on the risk for your industry, contract and special requirements.

51. When should testing be stopped?

It depends on the risks for the system being tested. There are some criteria bases on which you
can stop testing.

1. Deadlines (Testing, Release)


2. Test budget has been depleted
3. Bug rate fall below certain level
4. Test cases completed with certain percentage passed
5. Alpha or beta periods for testing ends
6. Coverage of code, functionality or requirements are met to a specified point

52. Which of the following is the main purpose of the integration strategy for integration
testing in the small?

The main purpose of the integration strategy is to specify which modules to combine when and
how many at once.

[Link] are semi-random test cases?


18

Semi-random test cases are nothing but when we perform random test cases and do equivalence
partitioning to those test cases, it removes redundant test cases, thus giving us semi-random test
cases.

54. Given the following code, which statement is true about the minimum number of test
cases required for full statement and branch coverage?

Read p

Read q

IF p+q> 100

THEN Print "Large"

ENDIF

IF p > 50

THEN Print "p Large"

ENDIF

1 test for statement coverage, 2 for branch coverage

55. What is black box testing? What are the different black box testing techniques?

Black box testing is the software testing method which is used to test the software without
knowing the internal structure of code or program. This testing is usually done to check the
functionality of an application. The different black box testing techniques are

1. Equivalence Partitioning
2. Boundary value analysis
3. Cause effect graphing

56. Which review is normally used to evaluate a product to determine its suitability for
intended use and to identify discrepancies?

Technical Review.

57. Why we use decision tables?

The techniques of equivalence partitioning and boundary value analysis are often applied to
specific situations or inputs. However, if different combinations of inputs result in different
19

actions being taken, this can be more difficult to show using equivalence partitioning and
boundary value analysis, which tend to be more focused on the user interface. The other two
specification-based techniques, decision tables and state transition testing are more focused on
business logic or business rules. A decision table is a good way to deal with combinations of
things (e.g. inputs). This technique is sometimes also referred to as a 'cause-effect' table. The
reason for this is that there is an associated logic diagramming technique called 'cause-effect
graphing' which was sometimes used to help derive the decision table

58. Faults found should be originally documented by whom?

By testers.

59. Which is the current formal world-wide recognized documentation standard?

There isn't one.

60. Which of the following is the review participant who has created the item to be
reviewed?

Author

61. A number of critical bugs are fixed in software. All the bugs are in one module, related
to reports. The test manager decides to do regression testing only on the reports module.

Regression testing should be done on other modules as well because fixing one module may
affect other modules.

62. Why does the boundary value analysis provide good test cases?

Because errors are frequently made during programming of the different cases near the 'edges' of
the range of values.

63. What makes an inspection different from other review types?

It is led by a trained leader, uses formal entry and exit criteria and checklists.

64. Why can be tester dependent on configuration management?

Because configuration management assures that we know the exact version of the testware and
the test object.

65. What is a V-Model?

A software development model that illustrates how testing activities integrate with software
development phases
20

66. What is maintenance testing?

Triggered by modifications, migration or retirement of existing software

67. What is test coverage?

Test coverage measures in some specific way the amount of testing performed by a set of tests
(derived in some other way, e.g. using specification-based techniques). Wherever we can count
things and can tell whether or not each of those things has been tested by some test, then we can
measure coverage.

68. Why is incremental integration preferred over "big bang" integration?

Because incremental integration has better early defects screening and isolation ability

69. When do we prepare RTM (Requirement traceability matrix), is it before test case
designing or after test case designing?

It would be before test case designing. Requirements should already be traceable from Review
activities since you should have traceability in the Test Plan already. This question also would
depend on the organisation. If the organisations do test after development started then
requirements must be already traceable to their source. To make life simpler use a tool to manage
requirements.

70. What is called the process starting with the terminal modules?

Bottom-up integration

71. During which test activity could faults be found most cost effectively?

During test planning

72. The purpose of requirement phase is

To freeze requirements, to understand user needs, to define the scope of testing

73. Why we split testing into distinct stages?

We split testing into distinct stages because of following reasons,

1. Each test stage has a different purpose


2. It is easier to manage testing in stages
3. We can run different test into different environments
4. Performance and quality of the testing is improved using phased testing

74. What is DRE?


21

To measure test effectiveness a powerful metric is used to measure test effectiveness known as
DRE (Defect Removal Efficiency) From this metric we would know how many bugs we have
found from the set of test cases. Formula for calculating DRE is

DRE=Number of bugs while testing / number of bugs while testing + number of bugs found by
user

75. Which of the following is likely to benefit most from the use of test tools providing test
capture and replay facilities? a) Regression testing b) Integration testing c) System testing
d) User acceptance testing

Regression testing

76. How would you estimate the amount of re-testing likely to be required?

Metrics from previous similar projects and discussions with the development team

77. What studies data flow analysis?

The use of data on paths through the code.

78. What is Alpha testing?

Pre-release testing by end user representatives at the developer's site.

79. What is a failure?

Failure is a departure from specified behaviour.

80. What are Test comparators?

Is it really a test if you put some inputs into some software, but never look to see whether the
software produces the correct result? The essence of testing is to check whether the software
produces the correct result, and to do that, we must compare what the software produces to what
it should produce. A test comparator helps to automate aspects of that comparison.

81. Who is responsible for document all the issues, problems and open point that were
identified during the review meeting

Scribe

82. What is the main purpose of Informal review

Inexpensive way to get some benefit

83. What is the purpose of test design technique?


22

Identifying test conditions and Identifying test cases

84. When testing a grade calculation system, a tester determines that all scores from 90 to
100 will yield a grade of A, but scores below 90 will not. This analysis is known as:

Equivalence partitioning

85. A test manager wants to use the resources available for the automated testing of a web
application. The best choice is Tester, test automater, web specialist, DBA

86. During the testing of a module tester 'X' finds a bug and assigned it to developer. But
developer rejects the same, saying that it's not a bug. What 'X' should do?

Send to the detailed information of the bug encountered and check the reproducibility

87. A type of integration testing in which software elements, hardware elements, or both
are combined all at once into a component or an overall system, rather than in stages.

Big-Bang Testing

88. In practice, which Life Cycle model may have more, fewer or different levels of
development and testing, depending on the project and the software product. For example,
there may be component integration testing after component testing, and system
integration testing after system testing.

V-Model

89. Which technique can be used to achieve input and output coverage? It can be applied to
human input, input via interfaces to a system, or interface parameters in integration
testing.

Equivalence partitioning

90. "This life cycle model is basically driven by schedule and budget risks" This statement
is best suited for…

V-Model

91. In which order should tests be run?

The most important one must tests first

92. The later in the development life cycle a fault is discovered, the more expensive it is to
fix. Why?

The fault has been built into more documentation, code, tests, etc
23

93. What is Coverage measurement?

It is a partial measure of test thoroughness.

94. What is Boundary value testing?

Test boundary conditions on, below and above the edges of input and output equivalence classes.
For instance, let say a bank application where you can withdraw maximum Rs.20,000 and a
minimum of Rs.100, so in boundary value testing we test only the exact boundaries, rather than
hitting in the middle. That means we test above the maximum limit and below the minimum
limit.

95. What is Fault Masking?

Error condition hiding another error condition.

96. What does COTS represent?

Commercial off The Shelf.

[Link] purpose of which is allow specific tests to be carried out on a system or network that
resembles as closely as possible the environment where the item under test will be used
upon release?

Test Environment

98. What can be thought of as being based on the project plan, but with greater amounts of
detail?

Phase Test Plan

99. What is exploratory testing?

Exploratory testing is a hands-on approach in which testers are involved in minimum planning
and maximum test execution. The planning involves the creation of a test charter, a short
declaration of the scope of a short (1 to 2 hour) time-boxed test effort, the objectives and possible
approaches to be used. The test design and test execution activities are performed in parallel
typically without formally documenting the test conditions, test cases or test scripts. This does
not mean that other, more formal testing techniques will not be used. For example, the tester may
decide to use boundary value analysis but will think through and test the most important
boundary values without necessarily writing them down. Some notes will be written during the
exploratory-testing session, so that a report can be produced afterwards.

100. What is "use case testing"?


24

In order to identify and execute the functional requirement of an application from start to finish
"use case" is used and the techniques used to do this is known as "Use Case Testing"

Bonus!

101. What is the difference between STLC (Software Testing Life Cycle) and SDLC
(Software Development Life Cycle) ?

SDLC deals with developement/coding of the software while STLC deales with validation and
verification of the software

102. What is traceability matrix?

The relationship between test cases and requirements is shown with the help of a document. This
document is known as traceability matrix.

103. What is Equivalence partitioning testing?

Equivalence partitioning testing is a software testing technique which divides the application
input test data into each partition at least once of equivalent data from which test cases can be
derived. By this testing method it reduces the time required for software testing.

104. What is white box testing and list the types of white box testing?

White box testing technique involves selection of test cases based on an analysis of the internal
structure (Code coverage, branches coverage, paths coverage, condition coverage etc.) of a
component or system. It is also known as Code-Based testing or Structural testing. Different
types of white box testing are

1. Statement Coverage
2. Decision Coverage

105. In white box testing what do you verify?

In white box testing following steps are verified.

1. Verify the security holes in the code


2. Verify the incomplete or broken paths in the code
3. Verify the flow of structure according to the document specification
4. Verify the expected outputs
5. Verify all conditional loops in the code to check the complete functionality of the
application
6. Verify the line by line coding and cover 100% testing

106. What is the difference between static and dynamic testing?


25

Static testing: During Static testing method, the code is not executed and it is performed using
the software documentation.

Dynamic testing: To perform this testing the code is required to be in an executable form.

107. What is verification and validation?

Verification is a process of evaluating software at development phase and to decide whether the
product of a given application satisfies the specified requirements. Validation is the process of
evaluating software at the end of the development process and to check whether it meets the
customer requirements.

108. What are different test levels?

There are four test levels

1. Unit/component/program/module testing
2. Integration testing
3. System testing
4. Acceptance testing

109. What is Integration testing?

Integration testing is a level of software testing process, where individual units of an application
are combined and tested. It is usually performed after unit and functional testing.

110. What are the tables in testplans?

Test design, scope, test strategies , approach are various details that Test plan document consists
of.

1. Test case identifier


2. Scope
3. Features to be tested
4. Features not to be tested
5. Test strategy & Test approach
6. Test deliverables
7. Responsibilities
8. Staffing and training
9. Risk and Contingencies

111. What is the difference between UAT (User Acceptance Testing) and System testing?

System Testing: System testing is finding defects when the system under goes testing as a whole,
it is also known as end to end testing. In such type of testing, the application undergoes from
beginning till the end.
26

UAT: User Acceptance Testing (UAT) involves running a product through a series of specific
tests which determines whether the product will meet the needs of its users.

112. Mention the difference between Data Driven Testing and Retesting?

Retesting: It is a process of checking bugs that are actioned by development team to verify that
they are actually fixed.

Data Driven Testing (DDT): In data driven testing process, application is tested with multiple
test data. Application is tested with different set of values.

113. What are the valuable steps to resolve issues while testing?

 Record : Log and handle any problems which has happened


 Report: Report the issues to higher level manager
 Control: Define the issue management process

114. What is the difference between test scenarios, test cases and test script?

Difference between test scenarios and test cases is that

Test Scenarios: Test scenario is prepared before the actual testing starts, it includes plans for
testing product, number of team members, environmental condition, making test cases, making
test plans and all the features that are to be tested for the product.

Test Cases: It is a document that contains the steps that has to be executed, it has been planned
earlier.

Test Script: It is written in a programming language and it's a short program used to test part of
functionality of the software system. In other words a written set of steps that should be
performed manually.

115. What is Latent defect?

Latent defect: This defect is an existing defect in the system which does not cause any failure as
the exact set of conditions has never been met

116. What are the two parameters which can be useful to know the quality of test
execution?

To know the quality of test execution we can use two parameters

 Defect reject ratio


 Defect leakage ratio
27

117. What is the function of software testing tool "phantom"?

Phantom is a freeware, and is used for windows GUI automation scripting language. It allows to
take control of windows and functions automatically. It can simulate any combination of key
strokes and mouse clicks as well as menus, lists and more.

118. Explain what is Test Deliverables ?

Test Deliverables are set of documents, tools and other components that has to be developed and
maintained in support of testing.

There are different test deliverables at every phase of the software development lifecycle

 Before Testing
 During Testing
 After the Testing

119. What is mutation testing?

Mutation testing is a technique to identify if a set of test data or test case is useful by
intentionally introducing various code changes (bugs) and retesting with original test data/ cases
to determine if the bugs are detected.

120. What all things you should consider before selecting automation tools for the AUT?

 Technical Feasibility
 Complexity level
28

 Application stability
 Test data
 Application size
 Re-usability of automated scripts
 Execution across environment

121. How will you conduct Risk Analysis?

For the risk analysis following steps need to be implemented

a) Finding the score of the risk

b) Making a profile for the risk

c) Changing the risk properties

d) Deploy the resources of that test risk

e) Making a database of risk

122. What are the categories of debugging?

Categories for debugging

a) Brute force debugging

b) Backtracking

c) Cause elimination

d) Program slicing

e) Fault tree analysis

123. What is fault masking explain with example?

When presence of one defect hides the presence of another defect in the system is known as fault
masking.

Example : If the "Negative Value" cause a firing of unhandled system exception, the developer
will prevent the negative values inpu. This will resolve the issue and hide the defect of
unhandled exception firing.

124. Explain what is Test Plan ? What are the information that should be covered in Test
Plan ?
29

A test plan can be defined as a document describing the scope, approach, resources and schedule
of testing activities and a test plan should cover the following details.

 Test Strategy
 Test Objective
 Exit/Suspension Criteria
 Resource Planning
 Test Deliverables

125. How you can eliminate the product risk in your project ?

To eliminate product risk in your project, there is simple yet crucial step that can reduce the
product risk in your project.

 Investigate the specification documents


 Have discussions about the project with all stakeholders including the developer
 As a real user walk around the website

126. What are the common risk that leads to the project failure?

The common risk that leads to a project failure are

 Not having enough human resource


 Testing Environment may not be set up properly
 Limited Budget
 Time Limitations

127. On what basis you can arrive to an estimation for your project?

To estimate your project , you have to consider following points

 Divide the whole project into a smallest tasks


 Allocate each task to team members
 Estimate the effort required to complete each task
 Validate the estimation

128. Explain how you would allocate task to team members ?

Task Member
 Analyze software requirement specification  All the members

 Create the test specification  Tester/Test Analyst

 Build up the test environment  Test administrator

 Execute the test cases  Tester, Test administrator


30

 Report defects  Tester

129. Explain what is testing type and what are the commonly used testing type ?

To get an expected test outcome a standard procedure is followed which is referred as Testing
Type.

Commonly used testing types are

 Unit Testing: Test the smallest code of an application


 API Testing: Testing API created for the application
 Integration Testing: Individual software modules are combined and tested
 System Testing: Complete testing of system
 Install/UnInstall Testing: Testing done from the point of client/customer view
 Agile Testing: Testing through Agile technique

130. While monitoring your project what all things you have to consider ?

The things that has to be taken in considerations are

 Is you project on schedule


 Are you over budget
 Are you working towards the same career goal
 Have you got enough resources
 Are there any warning signs of impending problems
 Is there any pressure from management to complete the project sooner

131. What are the common mistakes which creates issues ?

 Matching resources to wrong projects


 Test manager lack of skills
 Not listening to others
 Poor Scheduling
 Underestimating
 Ignoring the small problems
 Not following the process

132. What does a typical test report contains? What are the benefits of test reports?

A test report contains following things:

 Project Information
 Test Objective
31

 Test Summary
 Defect

The benefits of test reports are:

 Current status of project and quality of product are informed


 If required, stake holder and customer can take corrective action
 A final document helps to decide whether the product is ready for release

133. What is test management review and why it is important?

Management review is also referred as Software Quality Assurance or SQA. SQA focusses more
on the software process rather than the software work products. It is a set of activities designed
to make sure that the project manager follows the standard process. SQA helps test manager to
benchmark the project against the set standards.

134. What are the best practices for software quality assurance?

The best practices for an effective SQA implementation is

 Continuous Improvement
 Documentation
 Tool Usage
 Metrics
 Responsibility by team members
 Experienced SQA auditors

135. When is RTM (Requirement Traceability Matrix) prepared ?

RTM is prepared before test case designing. Requirements should be traceable from review
activities.

136. What is difference between Test matrix and Traceability matrix?

Test Matrix: Test matrix is used to capture actual quality, effort, the plan, resources and time
required to capture all phases of software testing

Traceability Matrix:Mapping between test cases and customer requirements is known as


Traceability Matrix

137. In manual testing what are stubs and drivers?

Both stubs and drivers are part of incremental testing. In incremental testing there are two
approaches namely bottom up and top down approach. Drivers are used in bottom up testing and
stub is used for top down approach. In order to test the main module, stub is used, whuich is a
dummy code or program .
32

138. What are the step you would follow once you find the defect?

Once defect is found you would follow the step

a) Recreate the defect

b) Attach the screen shot

c) Log the defect

139. Explain what is "Test Plan Driven" or "Key Word Driven" method of testing?

This technique uses the actual test case document developed by testers using a spread sheet
containing special "key Words". The key words control the processing.

140. What is DFD (Data Flow Diagram) ?

When a "flow of data" through an information system is graphically represented then it is known
as Data Flow Diagram. It is also used for the visualization of data processing.

141. Explain what is LCSAJ?

LCSAJ stands for 'linear code sequence and jump'. It consists of the following three items

a) Start of the linear sequence of executable statements

b) End of the linear sequence

c) The target line to which control flow is transferred at the end of the linear sequence

142. Explain what is N+1 testing?

The variation of regression testing is represented as N+1. In this technique the testing is
performed in multiple cycles in which errors found in test cycle 'N' are resolved and re-tested in
test cycle N+1. The cycle is repeated unless there are no errors found.

143. What is Fuzz testing and when it is used?

Fuzz testing is used to detect security loopholes and coding errors in software. In this technique
random data is added to the system in attempt to crash the system. If vulnerability persists, a tool
called fuzz tester is used to determine potential causes. This technique is more useful for bigger
projects but only detects major fault.

144. Mention what are the main advantages of statement coverage metric of software
testing?
33

The benefit of statement coverage metric is that

a) It does not require processing source code and can be applied directly to object code

b) Bugs are distributed evenly through code, due to which percentage of executable
statements covered reflects the percentage of faults discovered

145. How to generate test cases for replace string method?

a) If characters in new string > characters in previous string. None of the characters should
get truncated

b) If characters in new string< characters in previous string. Junk characters should not be
added

c) Spaces after and before the string should not be deleted

d) String should be replaced only for the first occurrence of the string

146. How will you handle a conflict amogst your team members ?

 I will talk individually to each person and note their concerns


 I will find solution to the common problems raised by team members
 I will hold a team meeting , reveal the solution and ask people to co-operate

147. Mention what are the categories of defects?

Mainly there are three defect categories

 Wrong: When requirement is implemented incorrectly


 Missing: It is a variance from the specification, an indication that a specification was not
implemented or a requirement of the customer is not met
 Extra: A requirement incorporated into the product that was not given by the end
customer. It is considered as a defect because it is a variance from the existing
requirements

148. Explain how does a test coverage tool works?

The code coverage testing tool runs parallel while performing testing on the actual product. The
code coverage tool monitors the executed statements of the source code. When the final testing is
done we get a complete report of the pending statements and also get the coverage percentage.

149. Mention what is the difference between a "defect" and a "failure" in software testing?

In simple terms when a defect reaches the end customer it is called a failure while the defect is
identified internally and resolved then it is referred as defect.
34

150. Explain how to test documents in a project that span across the software development
lifecycle?

The project span across the software development lifecycle in following manner

 Central/Project test plan: It is the main test plan that outlines the complete test strategy of
the project. This plan is used till the end of the software development lifecycle
 Acceptance test plan: This document begins during the requirement phase and is
completed at final delivery
 System test plan: This plan starts during the design plan and proceeds until the end of the
project
 Integration and Unit test plan: Both these test plans start during the execution phase and
last until the final delivery

151. Explain which test cases are written first black boxes or white boxes?

Black box test cases are written first as to write black box test cases; it requires project plan and
requirement document all these documents are easily available at the beginning of the project.
While writing white box test cases requires more architectural understanding and is not available
at the start of the project.

152. Explain what is the difference between latent and masked defects?

 Latent defect: A latent defect is an existing defect that has not caused a failure because
the sets of conditions were never met
 Masked defect: It is an existing defect that has not caused a failure because another
defect has prevented that part of the code from being executed

153. Mention what is bottom up testing?

Bottom up testing is an approach to integration testing, where the lowest level components are
tested first, then used to facilitate the testing of higher level components. The process is repeated
until the component at the top of the hierarchy is tested.

154. Mention what are the different types of test coverage techniques?

Different types of test coverage techniques include

 Statement Coverage: It verifies that each line of source code has been executed and
tested
 Decision Coverage: It ensures that every decision in the source code is executed and
tested
 Path Coverage: It ensures that every possible route through a given part of code is
executed and tested

155. Mention what is the meaning of breadth testing?


35

Breadth testing is a test suite that exercises the full functionality of a product but does not test
features in detail

156. Mention what is the difference between Pilot and Beta testing?

The difference between pilot and beta testing is that pilot testing is actually done using the
product by the group of user before the final deployment and in beta testing we do not input real
data, but it is installed at the end customer to validate if the product can be used in production.

157. Explain what is the meaning of Code Walk Through?

Code Walk Through is the informal analysis of the program source code to find defects and
verify coding techniques

158. Mention what are the basic components of defect report format?

The basic components of defect report format includes

 Project Name
 Module Name
 Defect detected on
 Defect detected by
 Defect ID and Name
 Snapshot of the defect
 Priority and Severity status
 Defect resolved by
 Defect resolved on

159. Mention what is the purpose behind doing end-to-end testing?

End-to end testing is done after functional testing. The purpose behind doing end-to-end testing
is that

 To validate the software requirements and integration with external interfaces


 Testing application in real world environment scenario
 Testing of interaction between application and database

160. Explain what it means by test harness?

A test harness is configuring a set of tools and test data to test an application in various
conditions, it involves monitoring the output with expected output for correctness.

161. Explain in a testing project what testing activities would you automate?

In a testing project testing activities you would automate are


36

 Tests that need to be run for every build of the application


 Tests that use multiple data for the same set of actions
 Identical tests that needs to be executed using different browsers
 Mission critical pages
 Transaction with pages that do not change in short time

Testing Techniques
1. Can you explain boundary value analysis?

In some projects there are scenarios where we need to do boundary value testing. For
instance, let's say for a bank application you can withdraw a maximum of 25000 and a
minimum of 100. So in boundary value testing we only test the exact boundaries rather
than hitting in the middle. That means we only test above the max and below the max.
This covers all scenarios. The following figure shows the boundary value testing for the
bank application which we just described. TC1 and TC2 are sufficient to test all
conditions for the bank. TC3 and TC4 are just duplicate/redundant test cases which really
do not add any value to the testing. So by applying proper boundary value fundamentals
we can avoid duplicate test cases, which do not add value to the testing.

2. Can you explain equivalence partitioning?

In equivalence partitioning we identify inputs which are treated by the system in the same
way and produce the same results. You can see from the following figure applications
TC1 and TC2 give the same results (i.e., TC3 and TC4 both give the same result,
Result2). In short, we have two redundant test cases. By applying equivalence
partitioning we minimize the redundant test cases.
37

So apply the test below to see if it forms an equivalence class or not:

o All the test cases should test the same thing.


o They should produce the same results.
o If one test case catches a bug, then the other should also catch it.
o If one of them does not catch the defect, then the other should not catch it.
3. Can you explain random/monkey testing?

Random testing is sometimes called monkey testing. In Random testing, data is generated
randomly often using a tool. For instance, the following figure shows how randomly-
generated data is sent to the system. This data is generated either using a tool or some
automated mechanism. With this randomly generated input the system is then tested and
results are observed accordingly.

Random testing has the following weakness:

o They are not realistic.


o Many of the tests are redundant and unrealistic.
o You will spend more time analyzing results.
o You cannot recreate the test if you do not record what data was used for testing.

This kind of testing is really of no use and is normally performed by newcomers. Its best
use is to see if the system will hold up under adverse effects.

4. What are semi-random test cases?


38

As the name specifies semi-random testing is nothing but controlling random testing and
removing redundant test cases. So what we do is perform random test cases and
equivalence partitioning to those test cases, which in turn removes redundant test cases,
thus giving us semi-random test cases.

5. Can you explain a pair-wise defect?

Orthogonal array is a two-dimensional array in which if we choose any two columns in


the array and all the combinations of numbers will appear in those columns. The
following figure shows a simple L9(34) orthogonal array. In this the number 9 indicates
that it has 9 rows. The number 4 indicates that it has 4 columns and 3 indicates that each
cell contains a 1, 2, and 3. Choose any two columns. Let's choose column 1 and 2. It has
(1,1), (1,2), (1,3), (2,1), (2,2), (2,3), (3,1), (3,2), (3,3) combination values. As you can see
these values cover all the values in the array. Compare the values with the combination of
column 3 and 4 and they will fall in some pair. This is applied in software testing which
helps us eliminate duplicate test cases.

6. What is negative and positive testing?


39

A negative test is when you put in an invalid input and receive errors.

A positive test is when you put in a valid input and expect some action to be completed in
accordance with the specification.

METRICS
1. What is meant by measures and metrics?

Measures are quantitatively unit defined elements, for instance, hours, km, etc. Metrics
are basically comprised of more than one measure. For instance, we can have metrics
such as km/hr, m/s etc.

2. Can you explain how the number of defects is measured?

The number of defects is one of the measures used to measure test effectiveness. One of
the side effects of the number of defects is that all bugs are not equal. So it becomes
40

necessary to weight bugs according to their criticality level. If we are using the number of
defects as the metric measurement the following are the issues:

o The number of bugs that originally existed significantly impacts the number of
bugs discovered, which in turns gives a wrong measure of the software quality.
o All defects are not equal so defects should be numbered with a criticality level to
get the right software quality measure.
3. Can you explain unit and system test DRE?

DRE is also useful to measure the effectiveness of a particular test such as acceptance,
unit, or system testing. The following figure shows defect numbers at various software
cycle levels. The 1 indicates that defects are input at the phase and2indicates that these
many defects were removed from that particular phase. For instance, in the requirement
phase 100 defects were present, but 20 defects are removed from the requirement phase
due to a code review. So if 20 defects are removed then 80 defects get carried to the new
phase (design) and so on.

4. Can you explain DRE?


41

DRE (Defect Removal Efficiency) is a powerful metric used to measure test


effectiveness. From this metric we come to know how many bugs we found from the set
of bugs which we could have found. The following is the formula for calculating DRE.
We need two inputs for calculating this metric: the number of bugs found during
development and the number of defects detected at the end user.

But the success of DRE depends on several factors. The following are some of them:

o Severity and distribution of bugs must be taken into account.


o Second, how do we confirm when the customer has found all the bugs. This is
normally achieved by looking at the history of the customer.
5. Can you explain defect age and defect spoilage?

Defect age is also called a phase age or phage. One of the most important things to
remember in testing is that the later we find a defect the more it costs to fix it. Defect age
and defect spoilage metrics work with the same fundamental, i.e., how late you found the
defect. So the first thing we need to define is what is the scale of the defect age according
to phases. For instance, the following table defines the scale according to phases. So, for
instance, requirement defects, if found in the design phase, have a scale of 1, and the
same defect, if propagated until the production phase, goes up to a scale of 4.

Once the scale is decided now we can find the defect spoilage. Defect spoilage is defects
from the previous phase multiplied by the scale. For instance, in the following figure we
have found 8 defects in the design phase from which 4 defects are propagated from the
42

requirement phase. So we multiply the 4 defects with the scale defined in the previous
table, so we get the value of 4. In the same fashion we calculate for all the phases. The
following is the spoilage formula.

6. Can you explain how the number of production defects is measured?

This is one of the most effective measures. The number of defects found in a production
is recorded. The only issue with this measure is it can have latent and masked defects
which can give us the wrong value regarding software quality.

7. Can you explain defect seeding?

Defect seeding is a technique that was developed to estimate the number of defects
resident in a piece of software. It's an offline technique and should not be used by
everyone. The process is the following: we inject the application with defects and then
see if the defect is found or not. So, for instance, if we have injected 100 defects we try to
get three values. First how many seeded defects were discovered, how many were not
discovered, and how many new defects (unseeded) are discovered. By using defect
seeding we can predict the number of defects remaining in the system.
43

8. How do you measure test effectiveness?

Test effectiveness is the measure of the bug-finding ability of our tests. In short, it
measures how good the tests were. So effectiveness is the ratio of the measure of bugs
found during testing to the total bugs found. Total bugs are the sum of new defects found
by the user plus the bugs found in the test. The following figure explains the calculations
in a pictorial format.
44

SOFTWARE TESTING BASICS


1. Can you explain the PDCA cycle and where testing fits in?

Software testing is an important part of the software development process. In normal


software development there are four important steps, also referred to, in short, as the
PDCA (Plan, Do, Check, Act) cycle.

Let's review the four steps in detail.

1. Plan: Define the goal and the plan for achieving that goal.
45

2. Do/Execute: Depending on the plan strategy decided during the plan stage we do
execution accordingly in this phase.
3. Check: Check/Test to ensure that we are moving according to plan and are
getting the desired results.
4. Act: During the check cycle, if any issues are there, then we take appropriate
action accordingly and revise our plan again.

So developers and other stakeholders of the project do the "planning and building," while
testers do the check part of the cycle. Therefore, software testing is done in check part of
the PDCA cyle.

2. What is the difference between white box, black box, and gray box testing?

Black box testing is a testing strategy based solely on requirements and specifications.
Black box testing requires no knowledge of internal paths, structures, or implementation
of the software being tested.

White box testing is a testing strategy based on internal paths, code structures, and
implementation of the software being tested. White box testing generally requires
detailed programming skills.

There is one more type of testing called gray box testing. In this we look into the "box"
being tested just long enough to understand how it has been implemented. Then we close
up the box and use our knowledge to choose more effective black box tests.

The above figure shows how both types of testers view an accounting application during
testing. Black box testers view the basic accounting application. While during white box
testing the tester knows the internal structure of the application. In most scenarios white
box testing is done by developers as they know the internals of the application. In black
box testing we check the overall functionality of the application while in white box
46

testing we do code reviews, view the architecture, remove bad code practices, and do
component level testing.

3. Can you explain usability testing?

Usability testing is a testing methodology where the end customer is asked to use the
software to see if the product is easy to use, to see the customer's perception and task
time. The best way to finalize the customer point of view for usability is by using
prototype or mock-up software during the initial stages. By giving the customer the
prototype before the development start-up we confirm that we are not missing anything
from the user point of view.

4. What are the categories of defects?

There are three main categories of defects:

1. Wrong: The requirements have been implemented incorrectly. This defect is a


variance from the given specification.
2. Missing: There was a requirement given by the customer and it was not done.
This is a variance from the specifications, an indication that a specification was
not implemented, or a requirement of the customer was not noted properly.
3. Extra: A requirement incorporated into the product that was not given by the end
customer. This is always a variance from the specification, but may be an attribute
desired by the user of the product. However, it is considered a defect because it's a
variance from the existing requirements.
5. How do you define a testing policy?

The following are the important steps used to define a testing policy in general. But it can
change according to your organization. Let's discuss in detail the steps of implementing a
testing policy in an organization.
47

o Definition: The first step any organization needs to do is define one unique
definition for testing within the organization so that everyone is of the same
mindset.
o How to achieve: How are we going to achieve our objective? Is there going to be
a testing committee, will there be compulsory test plans which need to be
executed, etc?.
o Evaluate: After testing is implemented in a project how do we evaluate it? Are
we going to derive metrics of defects per phase, per programmer, etc. Finally, it's
important to let everyone know how testing has added value to the project?.
o Standards: Finally, what are the standards we want to achieve by testing? For
instance, we can say that more than 20 defects per KLOC will be considered
below standard and code review should be done for it.
6. On what basis is the acceptance plan prepared?

In any project the acceptance document is normally prepared using the following inputs.
This can vary from company to company and from project to project.

1. Requirement document: This document specifies what exactly is needed in the


project from the customers perspective.
2. Input from customer: This can be discussions, informal talks, emails, etc.
3. Project plan: The project plan prepared by the project manager also serves as
good input to finalize your acceptance test.

The following diagram shows the most common inputs used to prepare acceptance test
plans.
48

7. What is configuration management?

Configuration management is the detailed recording and updating of information for


hardware and software components. When we say components we not only mean source
code. It can be tracking of changes for software documents such as requirement, design,
test cases, etc.

When changes are done in adhoc and in an uncontrolled manner chaotic situations can
arise and more defects injected. So whenever changes are done it should be done in a
controlled fashion and with proper versioning. At any moment of time we should be able
to revert back to the old version. The main intention of configuration management is to
track our changes if we have issues with the current system. Configuration management
is done using baselines.

8. How does a coverage tool work?

While doing testing on the actual product, the code coverage testing tool is run
simultaneously. While the testing is going on, the code coverage tool monitors the
executed statements of the source code. When the final testing is completed we get a
complete report of the pending statements and also get the coverage percentage.

9. Which is the best testing model?


49

In real projects, tailored models are proven to be the best, because they share features
from The Waterfall, Iterative, Evolutionary models, etc., and can fit into real life time
projects. Tailored models are most productive and beneficial for many organizations. If
it's a pure testing project, then the V model is the best.

10. What is the difference between a defect and a failure?

When a defect reaches the end customer it is called a failure and if the defect is detected
internally and resolved it's called a defect.

11. Should testing be done only after the build and execution phases are complete?

In traditional testing methodology testing is always done after the build and execution
phases.

But that's a wrong way of thinking because the earlier we catch a defect, the more cost
effective it is. For instance, fixing a defect in maintenance is ten times more costly than
fixing it during execution.

In the requirement phase we can verify if the requirements are met according to the
customer needs. During design we can check whether the design document covers all the
requirements. In this stage we can also generate rough functional data. We can also
review the design document from the architecture and the correctness perspectives. In the
build and execution phase we can execute unit test cases and generate structural and
functional data. And finally comes the testing phase done in the traditional way. i.e., run
the system test cases and see if the system works according to the requirements. During
installation we need to see if the system is compatible with the software. Finally, during
the maintenance phase when any fixes are made we can retest the fixes and follow the
regression testing.
50

Therefore, Testing should occur in conjunction with each phase of the software
development.

12. Are there more defects in the design phase or in the coding phase?

The design phase is more error prone than the execution phase. One of the most frequent
defects which occur during design is that the product does not cover the complete
requirements of the customer. Second is wrong or bad architecture and technical
decisions make the next phase, execution, more prone to defects. Because the design
phase drives the execution phase it's the most critical phase to test. The testing of the
design phase can be done by good review. On average, 60% of defects occur during
design and 40% during the execution phase.

13. What group of teams can do software testing?

When it comes to testing everyone in the world can be involved right from the developer
to the project manager to the customer. But below are different types of team groups
which can be present in a project.

o Isolated test team


o Outsource - we can hire external testing resources and do testing for our project.
o Inside test team
o Developers as testers
o QA/QC team.
14. What impact ratings have you used in your projects?
51

Normally, the impact ratings for defects are classified into three types:

o Minor: Very low impact but does not affect operations on a large scale.
o Major: Affects operations on a very large scale.
o Critical: Brings the system to a halt and stops the show.
15. Does an increase in testing always improve the project?

No an increase in testing does not always mean improvement of the product, company, or
project. In real test scenarios only 20% of test plans are critical from a business angle.
Running those critical test plans will assure that the testing is properly done. The
following graph explains the impact of under testing and over testing. If you under test a
system the number of defects will increase, but if you over test a system your cost of
testing will increase. Even if your defects come down your cost of testing has gone up.

16. What's the relationship between environment reality and test phases?

Environment reality becomes more important as test phases start moving ahead. For
instance, during unit testing you need the environment to be partly real, but at the
acceptance phase you should have a 100% real environment, or we can say it should be
the actual real environment. The following graph shows how with every phase the
environment reality should also increase and finally during acceptance it should be 100%
real.
52

17. What are different types of verifications?

Verification is static type of s/w testing. It means code is not executed. The product is
evaluated by going through the code. Types of verification are:

1. Walkthrough: Walkthroughs are informal, initiated by the author of the s/w


product to a colleague for assistance in locating defects or suggestions for
improvements. They are usually unplanned. Author explains the product;
colleague comes out with observations and author notes down relevant points and
takes corrective actions.
2. Inspection: Inspection is a thorough word-by-word checking of a software
product with the intention of Locating defects, Confirming traceability of relevant
requirements etc.
18. How do test documents in a project span across the software development lifecycle?

The following figure shows pictorially how test documents span across the software
development lifecycle. The following discusses the specific testing documents in the
lifecycle:
53

o Central/Project test plan: This is the main test plan which outlines the complete
test strategy of the software project. This document should be prepared before the
start of the project and is used until the end of the software development lifecycle.
o Acceptance test plan: This test plan is normally prepared with the end customer.
This document commences during the requirement phase and is completed at final
delivery.
o System test plan: This test plan starts during the design phase and proceeds until
the end of the project.
o Integration and unit test plan: Both of these test plans start during the execution
phase and continue until the final delivery.
19. Which test cases are written first: white boxes or black boxes?

Normally black box test cases are written first and white box test cases later. In order to
write black box test cases we need the requirement document and, design or project plan.
All these documents are easily available at the initial start of the project. White box test
cases cannot be started in the initial phase of the project because they need more
architecture clarity which is not available at the start of the project. So normally white
box test cases are written after black box test cases are written.

Black box test cases do not require system understanding but white box testing needs
more structural understanding. And structural understanding is clearer i00n the later part
of project, i.e., while executing or designing. For black box testing you need to only
analyze from the functional perspective which is easily available from a simple
requirement document.
54

20. Explain Unit Testing, Integration Tests, System Testing and Acceptance Testing?

Unit testing - Testing performed on a single, stand-alone module or unit of code.

Integration Tests - Testing performed on groups of modules to ensure that data and
control are passed properly between modules.

System testing - Testing a predetermined combination of tests that, when executed


successfully meets requirements.

Acceptance testing - Testing to ensure that the system meets the needs of the organization
and the end user or customer (i.e., validates that the right system was built).

21. What is a test log?

The IEEE Std. 829-1998 defines a test log as a chronological record of relevant details
about the execution of test cases. It's a detailed view of activity and events given in
chronological manner.

The following figure shows a test log and is followed by a sample test log.

22. Can you explain requirement traceability and its importance?


55

In most organizations testing only starts after the execution/coding phase of the project.
But if the organization wants to really benefit from testing, then testers should get
involved right from the requirement phase.

If the tester gets involved right from the requirement phase then requirement traceability
is one of the important reports that can detail what kind of test coverage the test cases
have.

23. What does entry and exit criteria mean in a project?

Entry and exit criteria are a must for the success of any project. If you do not know where
to start and where to finish then your goals are not clear. By defining exit and entry
criteria you define your boundaries.

For instance, you can define entry criteria that the customer should provide the
requirement document or acceptance plan. If this entry criteria is not met then you will
not start the project. On the other end, you can also define exit criteria for your project.
For instance, one of the common exit criteria in projects is that the customer has
successfully executed the acceptance test plan.

24. What is the difference between verification and validation?

Verification is a review without actually executing the process while validation is


checking the product with actual execution. For instance, code review and syntax check
is verification while actually running the product and checking the results is validation.

25. What is the difference between latent and masked defects?

A latent defect is an existing defect that has not yet caused a failure because the sets of
conditions were never met.

A masked defect is an existing defect that hasn't yet caused a failure just because another
defect has prevented that part of the code from being executed.

26. Can you explain calibration?

It includes tracing the accuracy of the devices used in the production, development and
testing. Devices used must be maintained and calibrated to ensure that it is working in
good order.
56

27. What's the difference between alpha and beta testing?

Alpha and beta testing has different meanings to different people. Alpha testing is the
acceptance testing done at the development site. Some organizations have a different
visualization of alpha testing. They consider alpha testing as testing which is conducted
on early, unstable versions of software. On the contrary beta testing is acceptance testing
conducted at the customer end.

In short, the difference between beta testing and alpha testing is the location where the
tests are done.

28. How does testing affect risk?

A risk is a condition that can result in a loss. Risk can only be controlled in different
scenarios but not eliminated completely. A defect normally converts to a risk.

29. What is coverage and what are the different types of coverage techniques?

Coverage is a measurement used in software testing to describe the degree to which the
source code is tested. There are three basic types of coverage techniques as shown in the
following figure:
57

o Statement coverage: This coverage ensures that each line of source code has
been executed and tested.
o Decision coverage: This coverage ensures that every decision (true/false) in the
source code has been executed and tested.
o Path coverage: In this coverage we ensure that every possible route through a
given part of code is executed and tested.
30. A defect which could have been removed during the initial stage is removed in a later
stage. How does this affect cost?

If a defect is known at the initial stage then it should be removed during that stage/phase
itself rather than at some later stage. It's a recorded fact that if a defect is delayed for later
phases it proves more costly. The following figure shows how a defect is costly as the
phases move forward. A defect if identified and removed during the requirement and
design phase is the most cost effective, while a defect removed during maintenance is 20
times costlier than during the requirement and design phases.

For instance, if a defect is identified during requirement and design we only need to
58

change the documentation, but if identified during the maintenance phase we not only
need to fix the defect, but also change our test plans, do regression testing, and change all
documentation. This is why a defect should be identified/removed in earlier phases and
the testing department should be involved right from the requirement phase and not after
the execution phase.

31. What kind of input do we need from the end user to begin proper testing?

The product has to be used by the user. He is the most important person as he has more
interest than anyone else in the project.

From the user we need the following data:

o The first thing we need is the acceptance test plan from the end user. The
acceptance test defines the entire test which the product has to pass so that it can
go into production.
o We also need the requirement document from the customer. In normal scenarios
the customer never writes a formal document until he is really sure of his
requirements. But at some point the customer should sign saying yes this is what
he wants.
o The customer should also define the risky sections of the project. For instance, in
a normal accounting project if a voucher entry screen does not work that will stop
the accounting functionality completely. But if reports are not derived the
accounting department can use it for some time. The customer is the right person
to say which section will affect him the most. With this feedback the testers can
prepare a proper test plan for those areas and test it thoroughly.
o The customer should also provide proper data for testing. Feeding proper data
during testing is very important. In many scenarios testers key in wrong data and
expect results which are of no interest to the customer.
32. Can you explain the workbench concept?
59

In order to understand testing methodology we need to understand the workbench


concept. A Workbench is a way of documenting how a specific activity has to be
performed. A workbench is referred to as phases, steps, and tasks as shown in the
following figure.

There are five tasks for every workbench:

o Input: Every task needs some defined input and entrance criteria. So for every
workbench we need defined inputs. Input forms the first steps of the workbench.
o Execute: This is the main task of the workbench which will transform the input
into the expected output.
o Check: Check steps assure that the output after execution meets the desired
result.
o Production output: If the check is right the production output forms the exit
criteria of the workbench.
o Rework: During the check step if the output is not as desired then we need to
again start from the execute step.
60

33. Can you explain the concept of defect cascading?

Defect cascading is a defect which is caused by another defect. One defect triggers the
other defect. For instance, in the accounting application shown here there is a defect
which leads to negative taxation. So the negative taxation defect affects the ledger which
in turn affects four other modules.
61

34. Can you explain cohabiting software?

When we install the application at the end client it is very possible that on the same PC
other applications also exist. It is also very possible that those applications share common
DLLs, resources etc., with your application. There is a huge chance in such situations that
your changes can affect the cohabiting software. So the best practice is after you install
your application or after any changes, tell other application owners to run a test cycle on
their application.

35. What is the difference between pilot and beta testing?

The difference between pilot and beta testing is that pilot testing is nothing but actually
using the product (limited to some users) and in beta testing we do not input real data, but
it's installed at the end customer to validate if the product can be used in production.
62

36. What are the different strategies for rollout to end users?

There are four major ways of rolling out any project:

o Pilot: The actual production system is installed at a single or limited number of


users. Pilot basically means that the product is actually rolled out to limited users
for real work.
o Gradual Implementation: In this implementation we ship the entire product to
the limited users or all users at the customer end. Here, the developers get instant
feedback from the recipients which allow them to make changes before the
product is available. But the downside is that developers and testers maintain
more than one version at one time.
o Phased Implementation: In this implementation the product is rolled out to all
users in incrementally. That means each successive rollout has some added
functionality. So as new functionality comes in, new installations occur and the
customer tests them progressively. The benefit of this kind of rollout is that
customers can start using the functionality and provide valuable feedback
progressively. The only issue here is that with each rollout and added
functionality the integration becomes more complicated.
o Parallel Implementation: In these types of rollouts the existing application is run
side by side with the new application. If there are any issues with the new
application we again move back to the old application. One of the biggest
problems with parallel implementation is we need extra hardware, software, and
resources.
63

37. What's the difference between System testing and Acceptance testing?

Acceptance testing checks the system against the "Requirements." It is similar to System
testing in that the whole system is checked but the important difference is the change in
focus:

System testing checks that the system that was specified has been delivered. Acceptance
testing checks that the system will deliver what was requested. The customer should
always do Acceptance testing and not the developer.

The customer knows what is required from the system to achieve value in the business
and is the only person qualified to make that judgement. This testing is more about
ensuring that the software is delivered as defined by the customer. It's like getting a green
light from the customer that the software meets expectations and is ready to be used.

38. Can you explain regression testing and confirmation testing?

Regression testing is used for regression defects. Regression defects are defects occur
when the functionality which was once working normally has stopped working. This is
probably because of changes made in the program or the environment. To uncover such
kind of defect regression testing is conducted.

The following figure shows the difference between regression and confirmation testing.

If we fix a defect in an existing application we use confirmation testing to test if the


defect is removed. It's very possible because of this defect or changes to the application
that other sections of the application are affected. So to ensure that no other section is
affected we can use regression testing to confirm this.

1. What is CMMI and what's the advantage of implementing it in an organization?

CMMI stands for Capability Maturity Model Integration. It is a process improvement


approach that provides companies with the essential elements of an effective process.
CMMI can serve as a good guide for process improvement across a project, organization,
64

or division.
CMMI was formed by using multiple previous CMM processes.

The following are the areas which CMMI addresses:

Systems engineering: This covers development of total systems. System engineers


concentrate on converting customer needs to product solutions and supports them
throughout the product lifecycle.

Software engineering: Software engineers concentrate on the application of systematic,


disciplined, and quantifiable approaches to the development, operation, and maintenance
of software.

Integrated Product and Process Development (IPPD): Integrated Product and Process
Development (IPPD) is a systematic approach that achieves a timely collaboration of
relevant stakeholders throughout the life of the product to better satisfy customer needs,
expectations, and requirements. This section mostly concentrates on the integration part
of the project for different processes. For instance, it's possible that your project is using
services of some other third party component. In such situations the integration is a big
task itself, and if approached in a systematic manner, can be handled with ease.

Software acquisition: Many times an organization has to acquire products from other
organizations. Acquisition is itself a big step for any organization and if not handled in a
proper manner means a disaster is sure to happen.

2. What's the difference between implementation and institutionalization?

Both of these concepts are important while implementing a process in any organization.
Any new process implemented has to go through these two phases.
65

Implementation: It is just performing a task within a process area. A task is performed


according to a process but actions performed to complete the process are not ingrained in
the organization. That means the process involved is done according to the individual
point of view. When an organization starts to implement any process it first starts at this
phase, i.e., implementation, and then when this process looks good it is raised to the
organization level so that it can be implemented across organizations.

Institutionalization: Institutionalization is the output of implementing the process again


and again. The difference between implementation and institutionalization is in
implementation if the person who implemented the process leaves the company the
process is not followed, but if the process is institutionalized then even if the person
leaves the organization, the process is still followed.

3. Can you explain the different maturity levels in a staged representation?

There are five maturity levels in a staged representation as shown in the following figure.

Maturity Level 1 (Initial): In this level everything is adhoc. Development is completely


chaotic with budget and schedules often exceeded. In this scenario we can never predict
quality.

Maturity Level 2 (Managed): In the managed level basic project management is in


place. But the basic project management and practices are followed only in the project
level.

Maturity Level 3 (Defined): To reach this level the organization should have already
achieved level 2. In the previous level the good practices and process were only done at
the project level. But in this level all these good practices and processes are brought to
the organization level. There are set and standard practices defined at the organization
level which every project should follow. Maturity Level 3 moves ahead with defining a
strong, meaningful, organizational approach to developing products. An important
distinction between Maturity Levels 2 and 3 is that at Level 3, processes are described in
more detail and more rigorously than at Level 2 and are at an organization level.

Maturity Level 4 (Quantitatively measured): To start with, this level of organization


should have already achieved Level 2 and Level 3. In this level, more statistics come into
66

the picture. Organization controls the project by statistical and other quantitative
techniques. Product quality, process performance, and service quality are understood in
statistical terms and are managed throughout the life of the processes. Maturity Level 4
concentrates on using metrics to make decisions and to truly measure whether progress is
happening and the product is becoming better. The main difference between Levels 3 and
4 are that at Level 3, processes are qualitatively predictable. At Level 4, processes are
quantitatively predictable. Level 4 addresses causes of process variation and takes
corrective action.

Maturity Level 5 (Optimized): The organization has achieved goals of maturity levels
2, 3, and 4. In this level, processes are continually improved based on an understanding
of common causes of variation within the processes. This is like the final level; everyone
on the team is a productive member, defects are minimized, and products are delivered on
time and within the budget boundary.

The following figure shows, in detail, all the maturity levels in a pictorial fashion.

4. What are the different models in CMMI?

There are two models in CMMI. The first is "staged" in which the maturity level
organizes the process areas.
67

The second is "continuous" in which the capability level organizes the process area.

5. How is appraisal done in CMMI?

SCAMPI stands for Standard CMMI Appraisal Method for Process Improvement.
SCAMPI is an assessment process used to get CMMI certified for an organization.

There are three classes of CMMI appraisal methods: Class A, Class B, and Class C. Class
A is the most aggressive, while Class B is less aggressive, and Class C is the least
aggressive.

Let's discuss these appraisal methods in more detail.

Class A: This is the only method that can provide a rating and get you a CMMI
certificate. It requires all three sources of data instruments, interviews, and documents.

Class B: This class requires only two sources of data (interviews and either documents or
instruments). But please note you do not get rated with Class B appraisals. Class B is just
a warm-up to see if an organization is ready for Class A. With less verification the
appraisal takes less time. In this class data sufficiency and draft presentations are
optional.

Class C: This class requires only one source of data (interviews, instruments, or
documents). Team consensus, validation, observation, data sufficiency, and draft
presentation are optional.

6. Which appraisal method class is best?


68

Normally, organizations use a mix of the classes to achieve process improvement. The
following are some of the strategies which an organization uses:

First Strategy: Use Class B to initiate a process improvement plan, after that apply Class
C to check readiness for Class B or Class A. The following diagram shows this strategy.

Second Strategy: Class C appraisal is used on a subset of an organization. From this we


get an aggregation of weakness across the organization. From this we can prepare a
process improvement plan. We can then apply a Class B appraisal to see if we are ready
for Class A appraisal. The following diagram shows the strategy.

Third Strategy: Class A is used to initiate an organization level process. The process
improvement plan is based on an identified weakness. Class B appraisal should be
69

performed after six months to see the readiness for the second Class A appraisal rating.
The following diagram shows this strategy.

7. What different sources are needed to verify authenticity for CMMI implementation?

There are three different sources from which an appraiser can verify that an organization
followed the process or not.

Instruments: An instrument is a survey or questionnaire provided to the organization,


project, or individuals before starting the assessment so that beforehand the appraiser
knows some basic details of the project.

Interview: An interview is a formal meeting between one or more members of the


organization in which they are asked some questions and the appraiser makes some
judgments based on those interviews. During the interview the member represents some
process area or role which he performs. For instance, the appraiser may interview a tester
or programmer asking him indirectly what metrics he has submitted to his project
manager. By this the appraiser gets a fair idea of CMMI implementation in that
organization.
70

Documents: A document is a written work or product which serves as evidence that a


process is followed. It can be hard copy, Word document, email, or any type of written
official proof.

The following figure is the pictorial view of the sources used to verify how compliant the
organization is with CMMI.

8. Which model should we use and under what scenarios?

Staging defines an organization process implementation sequence. So staging is a


sequence of targeted process areas that describe a path of process improvement the
organization will take. For instance, you cannot do your project planning (Level 2) if you
have not done requirements management (Level 2). While in the continuous model you
select certain process areas even if they're linked with other process areas and mature
there.

So when your organization should only concentrate on specific process areas you will
likely go for the continuous model. But if you want your organization to have a specific
plan and to achieve not only the specific process but also any interlinked process within
that process area you should go for the continuous model.

9. Can you explain capability levels in a continuous representation?

The continuous model is the same as the staged model only that the arrangement is a bit
different. The continuous representation/model concentrates on the action or task to be
completed within a process area. It focuses on maturing the organizations ability to
perform, control, and improve the performance in that specific performance area.

Capability Level 0 Incomplete: This level means that any generic or specific practice of
capability level 1 is not performed.

Capability Level 1: Performed: The capability level 1 process is expected to perform


71

all capability level 1 specific and generic practices for that process area. In this level
performance may not be stable and probably does not meet objectives such as quality,
cost, and schedule, but still the task can be done.

Capability Level 2: Managed: Capability level 2 is a managed process planned


properly, performed, monitored, and controlled to achieve a given purpose. Because the
process is managed we achieve other objectives, such as cost, schedule, and quality.
Because you are managing, certain metrics are consistently collected and applied to your
management approach.

Capability Level 3: Defined: The defined process is a managed process that is tailored
from an organization standard. Tailoring is done by justification and documentation
guidelines. For instance your organization may have a standard that we should get an
invoice from every supplier. But if the supplier is not able to supply the invoice then he
should sign an agreement in place of the invoice. So here the invoice standard is not
followed but the deviation is under control.

Capability Level 4: Quantitatively Managed: The quantitatively managed process is a


defined process which is controlled through statistical and quantitative information. So
from defect tracking to project schedules all are statistically tracked and measured for
that process.

Capability Level 5: Optimizing: The optimizing process is a quantitatively managed


process where we increase process performance through incremental and innovative
improvements.

Continuous representation is the same as staged only that information is arranged in a


different fashion. The biggest difference is one concentrates on a specific process while
the other brings a group of processes to a certain maturity level.

Automation testing
1. Does automation replace manual testing?

Automation is the integration of testing tools into the test environment in such a manner
that the test execution, logging, and comparison of results are done with little human
intervention. A testing tool is a software application which helps automate the testing
process. But the testing tool is not the complete answer for automation. One of the huge
mistakes done in testing automation is automating the wrong things during development.
Many testers learn the hard way that everything cannot be automated. The best
components to automate are repetitive tasks. So some companies first start with manual
testing and then see which tests are the most repetitive ones and only those are then
automated.

As a rule of thumb do not try to automate:


72

o Unstable software: If the software is still under development and undergoing


many changes automation testing will not be that effective.
o Once in a blue moon test scripts: Do not automate test scripts which will be run
once in a while.
o Code and document review: Do not try to automate code and document reviews;
they will just cause trouble.

The following figure shows what should not be automated.

All repetitive tasks which are frequently used should be automated. For instance,
regression tests are prime candidates for automation because they're typically executed
many times. Smoke, load, and performance tests are other examples of repetitive tasks
that are suitable for automation. White box testing can also be automated using various
unit testing tools. Code coverage can also be a good candidate for automation.

2. How does load testing work for websites?

Websites have software called a web server installed on the server. The user sends a
request to the web server and receives a response. So, for instance, when you type
[Link] the web server senses it and sends you the home page as a response.
This happens each time you click on a link, do a submit, etc. So if we want to do load
testing you need to just multiply these requests and responses "N" times. This is what an
automation tool does. It first captures the request and response and then just multiplies it
by "N" times and sends it to the web server, which results in load simulation.
73

So once the tool captures the request and response, we just need to multiply the request
and response with the virtual user. Virtual users are logical users which actually simulate
the actual physical user by sending in the same request and response. If you want to do
load testing with 10,000 users on an application it's practically impossible. But by using
the load testing tool you only need to create 1000 virtual users.

3. Can you explain data-driven testing?

Normally an application has to be tested with multiple sets of data. For instance, a simple
login screen, depending on the user type, will give different rights. For example, if the
user is an admin he will have full rights, while a user will have limited rights and support
if he only has read-only support rights. In this scenario the testing steps are the same but
with different user ids and passwords. In data-driven testing, inputs to the system are read
from data files such as Excel, CSV (comma separated values), ODBC, etc. So the values
are read from these sources and then test steps are executed by automated testing.
74

V&V
What is Verification?

Definition : The process of evaluating software to determine whether the products of a given
development phase satisfy the conditions imposed at the start of that phase.

Verification is a static practice of verifying documents, design, code and program. It includes all
the activities associated with producing high quality software: inspection, design analysis and
specification analysis. It is a relatively objective process.

Verification will help to determine whether the software is of high quality, but it will not ensure
that the system is useful. Verification is concerned with whether the system is well-engineered
and error-free.

Methods of Verification : Static Testing

 Walkthrough
 Inspection
 Review

What is Validation?

Definition: The process of evaluating software during or at the end of the development process
to determine whether it satisfies specified requirements.
75

Validation is the process of evaluating the final product to check whether the software meets the
customer expectations and requirements. It is a dynamic mechanism of validating and testing the
actual product.

Methods of Validation : Dynamic Testing

 Testing
 End Users

Difference between Verification and Validation

The distinction between the two terms is largely to do with the role of specifications.

Validation
is the process of checking whether the specification captures the customer’s needs. “Did I build
what I said I would?”

Verification is the process of checking that the software meets the specification. “Did I build
what I need?”

Verification Validation

1. Verification is a static practice of verifying 1. Validation is a dynamic mechanism of validating


documents, design, code and program. and testing the actual product.

2. It does not involve executing the code. 2. It always involves executing the code.

3. It is human based checking of documents and


3. It is computer based execution of program.
files.

4. Validation uses methods like black box


4. Verification uses methods like inspections,
(functional) testing, gray box testing, and white box
reviews, walkthroughs, and Desk-checking etc.
(structural) testing etc.
76

5. Verification is to check whether the software 5. Validation is to check whether software meets
conforms to specifications. the customer expectations and requirements.

6. It can catch errors that validation cannot catch. 6. It can catch errors that verification cannot catch.
It is low level exercise. It is High Level Exercise.

7. Target is requirements specification, application


7. Target is actual product-a unit, a module, a bent
and software architecture, high level, complete
of integrated modules, and effective final product.
design, and database design etc.

8. Verification is done by QA team to ensure that


8. Validation is carried out with the involvement of
the software is as per the specifications in the SRS
testing team.
document.

9. It generally comes first-done before validation. 9. It generally follows after verification.

Difference between Regression and Retesting


1-Retesting is done to make sure that bug is fixed and failed functionality is working fine or not,
This is kind of verification method followed in testing field for the fixed bugs. Whereas,
Regression is re-execution of the test cases for unchanged part to see that unchanged
functionality is working fine are not.

2- Retesting is a planned testing while Regression is know as the generic testing.

3- Retesting is only done for failed Test cases while Regression is done for passed test cases.

4- We should always keep this in mind, Re-testing has higher priority than the regression
testing.

What is software testing?


Validating the functionality of the software under test in a controlled environment ,

- To ensure the quality and functionality as per the requirements .

-testing is done to find the error in product.

– to verify that product conforms the requirement.

– to make sure that product is doing what is expected.

– to find the compatibility of its different modules.


77

What is Functional testing ?


Functional testing is also known as “Black Box Testing “. It means tester is not interested in the code but
is more interested in the goal of the software.

Functional testing is done to find certain issues (Bugs) that developer normally misses during
writing code and some times they miss certain scenarios. So we can say that functional testing is
needed for

– For the missing functionality.

– For interface errors.

– For Incorrect specification.

– Most of the time initialization errors are found during functional testing.

– Some times functional testing also helps in finding termination error.

STLC ?
very generic idea about this STLC

1) Risk Analysis: Risk Analysis is really a very crucial and much-needed step that really deal
with the probability of undesirable events that leads to a loss to organization i.e is either
financial or client loss. In this phase we identify all the major and potential risk in all SDLC
process and document all the risk with the reason and all the prospective measure to reduce
harm.

2) Planning Process: We can say that actual testing life cycle starts from this phase and . this
phase involves documentation of test specification, creating test plan, estimating resources
needed, setting testing framework, ,setting milestones for the testing, and dealing with all
testing management along with the per-requisite things for Testing of product.

3) Test Design: preparation of test environment and designing of test cases comes in this phase

4) Performing Tests or executing Test: Executing test cases on the basis of milestone set in
Test Plan comes in this phase and this is part that should really be known as TESTING

5) Defect Tracking : During execution of test cases we uncover many defect that is really know
as BUGs in the diary of tester should be tracked so that developer can get the information all
about the severity and location of defect in product.
78

6) Test Reporting and Quantitative measurement: In this phase we gather all the execution
result and makes test report while in Quantitative measurement we measure the quality of
product and for this purpose tester use a very mathematical algorithm that is known as Software
quality metric

Defect Life cycle


Basically, Software Defect or a Bug is a condition which does not meet a software requirement.
A software requirement could be specified in the requirement specification or an end-user
expectation. Defect is an error or a flaw which produces unexpected or incorrect behaviors in the
system. Generally, Defects can be generated during requirement analysis, design,
implementation or testing phase.

After a defect has been found out, it goes with various stages during its lifetime which is
commonly known as Defect Life Cycle .It starts when defect is found and ends when a defect is
closed, after ensuring it’s not reproduced again.

Here in this picture we can easily understand the end to end workflow of the defect stages:-

Now, Lets walk through the different stages of the defect life cycle one by one:-

1. New :- When a defect has been found out and tester has logged the defect in the defect
management tool for the first time, then the state of the defect would be “New”.It is set by
testing team.
2. Open :- When a new logged defect has been reviewed by QA lead and if the defect is valid, the
state of the bug would be “Open” and it is ready to be assigned to development team and if the
bug is invalid QA lead would mark it as “Closed”.
79

3. Assigned:- When QA lead assigns the defect to the corresponding developer, the state of the
defect would be marked as “Assigned”. Developer should start analyzing and fixing the bug at
this state.
4. Rejected / Invalid :– When the developer feels that the bug is not genuine/valid, he rejects the
bug. Then the state of the bug is marked as “rejected”.Also, in some defect management
tools ,it is stated as “Not a Bug”.
5. Could not reproduce:- When developer is not able to reproduce the bug by the steps mentioned
in Steps to Reproduce by QA then developer can mark the bug as ‘CNR’ (Could Not
Reproduced”). In this stage QA should provide detailed reproducing steps to developer.
6. Need More information:- If developer is not clear about the steps to reproduce provided by QA
to reproduce the bug, then he/she can mark it as “Need more information’. In this case QA
needs to add detailed reproducing steps.
7. Ready to test / Fixed:- When developer makes the necessary code changes , the defect has
marked as “Fixed”. The developer now passes the defect to the testing team to verify so he
changes the state as “Ready to Test”.
8. Verified:- When tester retest the bug and found it fixed/non-reproducible, he/she marks it as
“Verified”.
9. Reopened:- If the tester while verifying the defect found that, the defect is still reproducible or
partially fixed then the defect would be marked as “Reopened”.Now the developer has to look
again into this defect.
10. Duplicates:- If the defect logged is repeated twice or the two defects reported has alike results
and steps to reproduce, then one defect status is changed to “DUPLICATE” and it should be
linked to the another similar defect.
11. Deferred:- If there are some issues or hurdles in the current sprint, then the defect would be
taken in upcoming releases instead of the current release then it is marked as “DEFERRED”.
12. Closed:- If the defect has no issues further and it is properly verified, then the tester or test lead
would mark the defect as “Closed”.

Some Important Points to Ponder regarding Defect Life Cycle Implementation:-

 We must make sure that the entire team understands what each defect status exactly means.
Also,the defect life cycle should be properly documented.
 We must ensure that each individual in the team clearly understands his/her responsibility in
regarding of each defect.
 We must ensure that enough detail should be entered in each status change.

Priority and severity


Differentiating between severity and priority of bug is really a very tedious thing to decide by
tester and We tester are quite familiar with Bug and its status in whole software testing life cycle.
But we always face some difficulty in defining priority and severity of a bug. Most of the time
we tester perceives priority and severity pretty same thing, So i am making a broad and
elaborated definition difference between Priority and Severity

Priority: Priority is related to business and revenue so here i will say ” Priority of a bug is
defined by its impact on business. If any thing is related to business then priority of a bug
80

should be defined by Manager and Some higher entity in business( It includes Manager,
Architect, team lead).

Severity: Severity of a bug is decided by its impact on application and theoretically it is


decided by tester.

Type of Severity

1- Blocker: If application is not being started on clicking on its icon, screen of application is
freezing and crashes are coming or UI rendering of application or some data corruption.

2- Critical: When main functionality is not working or there is some logical error in calculation
andr tester is getting wrong result on every input in application

3- Major : If performance of main functionality is not good and secondary functionality is not
working and giving wrong result

4- Normal: Minor functionality is not working properly

5- Minor: When minor functionality is being impacted due to some intermittent errors and some
spelling mistakes

Types of Priority

Immediate(P1): Must be fixed on immeditate effect. All critical and major severity based bug
normally fall in this catagory

High: Highly desirable and schedules, Bug with major and normal severity fall in this category

Medium: This is desirable to be fixed but not schedule or we can say if time permits then bug
will be fixed .Few normal severity bugs fall in this category

Low: Not likely to be fixed and bug with minor severity fall in this category

Ok Friends let me start with example

1- High Priority and High Severity: Suppose someday, not a single person able to login in to
his/her g gmail account then this gonna jolt the business of google and it also seems a big jolt to
its mailing application. So this will be of high priority and high severity

2- High Priority and low severity : Suppose one day we all people wake up in the morning and
just open our laptop and entered url [Link] and as soon home page of google opens
and spelling of colored google looks like FFFFOOOGHEL. Then this will be enough for a
person pron to google search to throw him in sock. This will give big blow to google search, but
search is still working so this bug will be of high priority and low severity
81

3- Low priority and high severity : Suppose any calculator start giving wrong calculation when
calculation takes input more than 18 digit. Since common use don’t go to this extent so this can
be fixed in next release but this is calculation mistake so it should be taken on high priority

4- Low priority and Low severity: Suppose there is spelling mistake in Advertisiing Programs
since user normally don’t see such spelling mistakes so its low priority and low severity bug

AGILE
What is Agile Testing?

A software testing practice that follows the principles of agile software development is called
Agile Testing. Agile is an iterative development methodology, where requirements evolve
through collaboration between the customer and self-organizing teams and agile aligns
development with customer needs.

Advantages of Agile Testing

 Agile Testing Saves Time and Money


 Less Documentation
 Regular feedback from the end user
 Daily meetings can help to determine the issues well in advance

Principles of Agile Testing

 Testing is NOT a Phase: Agile team tests continuously and continuous testing is the
only way to ensure continuous progress.
 Testing Moves the project Forward: When following conventional methods, testing is
considered as quality gate but agile testing provide feedback on an ongoing basis and the
product meets the business demands.
 Everyone Tests: In conventional SDLC, only test team tests while in agile including
developers and BA's test the application.
 Shortening Feedback Response Time: In conventional SDLC, only during the
acceptance testing, the Business team will get to know the product development, while in
agile for each and every iteration, they are involved and continuous feedback shortens the
feedback response time and cost involved in fixing is also less.
 Clean Code: Raised defects are fixed within the same iteration and thereby keeping the
code clean.
 Reduce Test Documentation: Instead of very lengthy documentation, agile testers use
reusable checklist, focus on the essence of the test rather than the incidental details.
 Test Driven: In conventional methods, testing is performed after implementation while
in agile testing, testing is done while implementation.
82

What is Agile Methodology?

AGILE methodology is a practice that promotes continuous iteration of development and


testing throughout the software development lifecycle of the project. Both development and
testing activities are concurrent unlike the Waterfall model

The agile software development emphasizes on four core values.

1. Individual and team interactions over processes and tools


2. Working software over comprehensive documentation
3. Customer collaboration over contract negotiation
4. Responding to change over following a plan

Agile Vs Waterfall Method

Agile and Waterfall model are two different methods for software development process. Though
they are different in their approach, both methods are useful at times, depending on the
requirement and the type of the project.

Agile Model Waterfall Model


 Development of the software flows
 Agile method proposes incremental and
sequentially from start point to end
iterative approach to software design
point.

 The agile process is broken into individual  The design process is not broken into
models that designers work on an individual models

 The customer has early and frequent


 The customer can only see the product
opportunities to look at the product and make
at the end of the project
decision and changes to the project

 Agile model is considered unstructured  Waterfall model are more secure


compared to the waterfall model because they are so plan oriented

 Small projects can be implemented very


 All sorts of project can be estimated
quickly. For large projects, it is difficult to
and completed.
estimate the development time.

 Only at the end, the whole product is


tested. If the requirement error is
 Error can be fixed in the middle of the project. found or any changes have to be made,
the project has to start from the
beginning

 Development process is iterative, and the  The development process is phased,


83

and the phase is much bigger than


project is executed in short (2-4) weeks
iteration. Every phase ends with the
iterations. Planning is very less.
detailed description of the next phase.

 Documentation is a top priority and can


 Documentation attends less priority than
even use for training staff and upgrade
software development
the software with another team

 Every iteration has its own testing phase. It  Only after the development phase, the
allows implementing regression testing every testing phase is executed because
time new functions or logic are released. separate parts are not fully functional.

 In agile testing when an iteration end,


shippable features of the product is delivered  All features developed are delivered at
to the customer. New features are usable right once after the long implementation
after shipment. It is useful when you have good phase.
contact with customers.

 Testers work separately from


 Testers and developers work together
developers

 At the end of every sprint, user acceptance is  User acceptance is performed at the
performed end of the project.

 It requires close communication with  Developer does not involve in


developers and together analyze requirements requirement and planning process.
and planning Usually, time delays between tes
84

Agile Testing Methodology

There are various methods present in agile testing, and those are listed below:

Scrum

SCRUM is an agile development method which concentrates specifically on how to manage


tasks within a team-based development environment. Basically, Scrum is derived from activity
that occurs during a rugby match. Scrum believes in empowering the development team and
advocates working in small teams (say- 7 to 9 members). It consists of three roles, and their
responsibilities are explained as follows:
85

 Scrum Master
o Master is responsible for setting up the team, sprint meeting and removes obstacles to
progress
 Product owner
o The Product Owner creates product backlog, prioritizes the backlog and is responsible
for the delivery of the functionality at each iteration
 Scrum Team
o Team manages its own work and organizes the work to complete the sprint or cycle

Product Backlog

This is a repository where requirements are tracked with details on the no of requirements to be
completed for each release. It should be maintained and prioritized by Product Owner, and it
should be distributed to the scrum team. Team can also request for a new requirement addition or
modification or deletion

Process flow of Scrum Methodologies:

Process flow of scrum testing is as follows:

 Each iteration of a scrum is known as Sprint


 Product backlog is a list where all details are entered to get end product
 During each Sprint, top items of Product backlog are selected and turned into Sprint backlog
 Team works on the defined sprint backlog
 Team checks for the daily work
 At the end of the sprint, team delivers product functionality
86

eXtreme Programming (XP)

Extreme Programming technique is very helpful when there is constantly changing demands or
requirements from the customers or when they are not sure about the functionality of the system.
It advocates frequent "releases" of the product in short development cycles, which inherently
improves the productivity of the system and also introduces a checkpoint where any customer
requirements can be easily implemented. The XP develops software keeping customer in the
target.

Business requirements are gathered in terms of stories. All those stories are stored in a place
called the parking lot.

Q#1. What is Agile Testing?

Ans. Agile Testing is a practice that a QA follows in a dynamic environment where testing
requirements keep changing according to the customer needs. It is done parallel to the
development activity where testing team receives frequent small codes from the development
team for testing.

Q#2. What is the difference between burn-up and burn-down chart?


87

Ans. Burn-up and burn-down charts are used to keep track the progress of the project.

Burn-up charts represent how much work has been completed in any project whereas Burn-down
chart represents the remaining work in a project.

Q#3. Define the roles in Scrum?

Ans. There are mainly three roles that a Scrum team have:

1. Project Owner – who has the responsibility of managing product backlog. Works with end users
and customers and provide proper requirement to the team to build the proper product.
2. Scrum Master – who works with scrum team to make sure each sprint gets complete on time.
Scrum master ensure proper work flow to the team.
3. Scrum Team – Each member in the team should be self-organized, dedicated and responsible for
high quality of the work.

Q#4. What is Product backlog & Sprint Backlog?

Ans. Product backlog is maintained by the project owner which contains every feature and
requirement of the product.

Sprint backlog can be treated as subset of product backlog which contains features and
requirements related to that particular sprint only.

Q#5. Explain Velocity in Agile?

Ans. Velocity is a metric that is calculated by addition of all efforts estimates associated with
user stories completed in a iteration. It predicts how much work Agile can complete in a sprint
and how much time will require to complete a project.

Q#6. Explain the difference between traditional Waterfall model and Agile testing?

Ans. Agile testing is done parallel to the development activity whereas in traditional waterfall
model testing is done at the end of the development.

As done in parallel, agile testing is done on small features whereas in waterfall model testing is
done on whole application.

Q#7. Explain Pair Programming and its benefits?

Ans. Pair programming is a technique in which two programmer works as team in which one
programmer writes code and other one reviews that code. They both can switch their roles.

Benefits:
88

1. Improved code quality: As second partner reviews the code simultaneously, it reduces the
chances of mistake.
2. Knowledge transfer is easy: One experience partner can teach other partner about the
techniques and codes.

Q#8. What is re-factoring?

Ans. Modification of the code without changing its functionality to improve the performance is
called re-factoring.

Q#9. Explain the Iterative and Incremental Development in Agile?

Ans. Iterative Development: Software is developed and delivered to customer and based on the
feedback again developed in cycles or release and sprints. Say in Release 1 software is developed
in 5 sprints and delivered to customer. Now customer wants some changes, then development
team plan for 2nd release which can be completed in some sprints and so on.

Incremental Development:Software is development in parts or increments. In each increment a


portion of the complete requirement is delivered.

Q#10. How do you deal when requirements change frequently?

Ans. This question is to test the analytical capability of the candidate. Answer can be-

Work with PO to understand the exact requirement to update test cases. Also understand the risk
in changing the requirement. Apart from this one should be able to write generic test plan and
test cases. Don’t go for the automation until requirements are finalized.

Q#11. What is a test stub?

Ans. A small code which mimics a specific component in the system and can replace it. Its
output is same as the component it replaces.

Q#12. What qualities should a good Agile tester have?

Ans.

1. Agile tester should be able to understand the requirements quickly.


2. Agile tester should know Agile concepts and principals.
3. As requirements keep changing, he should understand the risk involve in it.
4. Agile tester should be able to prioritize the work based on the requirements.
5. Communication is must for a Agile tester as it requires a lot of communication with developers
and business associates.
89

Q#13. What is difference between Epic, User stories & Tasks?

Ans. User Stories:User Stories defines the actual business requirement. Generally created by
Business owner.

Task: To accomplish the business requirements development team create tasks.

Epic: A group of related user stories is called an Epic.

Q#14. What is a Task board in Agile?

Ans. Task board is dash board which shows progress of the project. It contains:

1. User Story: which has the actual business requirement.


2. To Do: Tasks that can be worked on.
3. In Progress: Tasks in progress.
4. To Verify: Tasks pending for verification or testing
5. Done: Completed tasks.

Q#15. What is Test Driven Development (TDD)?

Ans. It is Test-first development technique in which we add a test first before we write a
complete production code. Next we run the test and based on the result refactor the code to fulfill
the test requirement.

Q#16. How QA can add a value to an agile team?

Ans. QA can provide a value addition by thinking differently about the various scenarios to test a
story. They can provide quick feedback to the developers whether new functionality is working
fine or not.

Q#17. What is Scrum ban?

Ans. It is a software development model which is combination of scrum and kanban. Scrumban
is considered for maintenance projects in which there are frequent changes or unexpected user
stories. It can reduce the minimum completion time for user stories.

Q#18. What is Application Binary Interface?

Ans. Application Binary Interface or ABI defines an interface for complied application programs
or we can say it describes the low level interface between an application and the operating
system.

Q#19. What is Zero sprint in Agile?


90

Ans. It can be defined as pre step to the first sprint. Activities like setting development
environment, preparing backlog etc needs to be done before starting of the first sprint and can be
treated as Sprint zero.

Q#20. What is Spike?

Ans. There may be some technical issues or design problem in the project which needs to be
resolved first. To provide the solution of these problem “Spikes” are created. Spikes are of two
types- Functional and Technical.

Q#21. Name some Agile quality strategies.

Ans. Some Agile quality strategies are-

1. Re-factoring
2. Small feedback cycles
3. Dynamic code analysis
4. Iteration

Q#22. What is importance of daily stand up meeting?

Ans. Daily stand up meeting is essential for any team in which-

1. Team discuss about how much work has been completed.


2. What are the plans to resolve technical issues.
3. What steps need to done to complete the projects etc.

Q#23. What is tracer bullet?

Ans. It can be defined as spike with the current architecture or the current set of best practices.

The purpose of a tracer bullet is to examine how an end-to-end process will work and examine
feasibility.

Q#24. How the velocity of sprint is measured?

Ans. If capacity is measured as a percentage of a 40 hours weeks then completed story points
* team capacity

If capacity is measured in man hours then Completed story points / team capacity

Q#25. What is Agile manifesto?

Ans. Agile manifesto defines an iterative and people-centric approach to software


development. It has basically 4 key values and 12 principals.
91

Q. What is Agile Testing and how is it different to traditional waterfall or the V model?

Agile Testing is testing practice that follows the principles of agile software development. Agile
testing involves all members of an agile team with special skills and expertise to ensure business
value is delivered at frequent intervals.

The big difference is that in Agile environment, testing is not a phase, it is an activity parallel to
development.

In agile environment, small features of software are delivered frequently, so testing activity
should be parallel to development activity. Testing time is short as we are only testing small
features.

In the waterfall model, there is a testing phase at the end of the development so, testing is a big
effort done after the whole application is developed. Testing time is long as we have to test the
whole application.

Q: What is your approach when requirements change continuously?

This question can be asked if you are interviewed for an agile QA position where requirements
are likely to change frequently during development. Although a complete change in requirement
is possible, most of the time, it is the technical details that are subject to change. e.g. the intent of
the requirement or behaviour of the feature is the same but implementation details can change

A: Some possible answers can be:

 Write generic test plans and test cases which focus on the intent of the requirement rather
than its exact details

 Work very closely with the product owners or business analysts to understand the scope
of change so testing can be updated

 Make sure the team understands the risks involved in changing requirements especially
towards the end of sprint

 If you’re going to automate this feature, it is best to wait until the feature is stable and
requirements are finalized

 Negotiate to see if the changes can be kept to a minimum and/or implement the changes
in next sprint

Q: What are good characteristics of an Agile Tester / QA?

When attending an Agile Testing Interview, questions can be asked to find out what you really
understand from an Agile Tester or Agile QA role and how you will fit with the rest of the team.
92

A: Some good characteristics of an Agile Tester are

 Good communicator – In agile teams, there is increased level of communication with the
Devs, QAs and BAs

 Priorities change frequently in agile projects, so the Agile QA should be able to prioritize
the tasks accordingly

 Should not be afraid of change

 Ideally Agile Testers should be multi-skilled and technical or at least understand the
technical terminology so that they don’t feel alienated from the rest of the team when
developers talk in technical terms

 Should understand Agile concepts and principles

 Participate in daily sprint planning, stand-ups, retrospectives. Note the word Participate,
meaning to actually talk and take part in discussions rather than just attending the
meetings

Q: What are the two key factors when working as a QA in an Agile team?

A: QA can add a lot of value to an agile team because of the different mindset. Testers can and
should think about the different possible scenarios to test a story. However the most important
asset that they can bring is:

 To prevent defect. QA should advocate best practices along the way to prevent defects
from entering the system in the first place.

 To provide fast feedback. It is important for developers to know if the new functionality
works as expected and if regression tests pass, and they need that feedback quite quickly.
QA should provide the results of the tests to developers as soon as possible.

Q: What are the three main roles in Scrum?

A: The Scrum team consists of three main roles:

 Product Owner: Manages the product backlog. PO is the voice of the business and
create new features to be developed for the application.

 Scrum Master: Responsible for managing the sprint, remove any impediments and
keeps track of the progress of the project.

 Scrum Team itself: Composed of developers, designers and QA. This forms the team
which is responsible for delivering high quality software.
93

Software Development Life Cycle – SDLC Phases

January 14, 2015 by

SDLC Phases Explained What are the SDLC Phases? Software Development Life Cycle, or
SDLC is a process used to develop software. There are different stages or phases within the
Software Development Life Cycle and in each phase, different activities take… Read More »

Software Testing Challenges in the Iterative Models

February 6, 2010 by

Iterative / Incremental life cycle models, as the name suggests, focus on developing software in
increments or chunks. Popular iterative models include the Agile methodologies such as Scrum,
XP, etc. A common thread amongst the iterative models is that integrated… Read More »

Iterative Model

November 8, 2008 by

An iterative life cycle model does not attempt to start with a full specification of requirements.
Instead, development begins by specifying and implementing just part of the software, which can
then be reviewed in order to

Incremental Model

November 8, 2008 by

The incremental build model is a method of software development where the model is designed,
implemented and tested incrementally (a little more is added each time) until the product is
finished. It involves both development

Rapid Application Development (RAD)

November 8, 2008 by

RAD is, in essence, the “try before you buy” approach to software development. The theory is
that end users can produce better feedback when examining a live system, as opposed to working
strictly with documentation

Spiral Model

November 8, 2008 by
94

The spiral model starts with an initial pass through a standard waterfall lifecycle, using a subset
of the total requirements to develop a robust prototype. After an evaluation period, the cycle is
initiated again, adding

Prototyping

November 8, 2008 by

The software development team, to clarify requirements and/or design elements, may generate
mockups and prototypes of screens, reports, and processes. Although some of the prototypes may
appear to be very substantial, they’re generally similar to

V Model

November 8, 2008 by

The V Model is an enhanced version of the classic waterfall model whereby each level of the
development life cycle is verified before moving on to the next level. With this model, testing
explicitly starts at

Waterfall Model in Software Testing

End to end testing


End-to-end testing is a technique used to test whether the flow of an application right from start to
finish is behaving as expected. The purpose of performing end-to-end testing is to identify system
dependencies and to ensure that the data integrity is maintained between various system components
and systems.

Endurance testing ?

What is Endurance Testing?

Endurance Testing also known as Soak Testing is performed to determine if the application
under test can sustain the continuous loads.

Endurance testing, non-functional testing involves examining the system if it can withstand a
huge load for a longer period of time and thereby measuring the system's reaction parameters.
95

Issues found - Endurance Testing

 Serious memory leaks that would eventually result in application or Operating System
crash
 Failure to close connections between the layers of the system could stall some or all
modules of the system.
 Failure to close database connections under some conditions might result in complete
system crash.
 Gradual degradation of response time of the system as the application becomes less
efficient as a result of prolonged test.

Entry exit criteria


What is an Entry Criterion?

Entry criterion is used to determine when a given test activity should start. It also includes the
beginning of a level of testing, when test design or when test execution is ready to start.

Examples for Entry Criterion:

 Verify if the Test environment is available and ready for use.


 Verify if test tools installed in the environment are ready for use.
 Verify if Testable code is available.
 Verify if Test Data is available and validated for correctness of Data.

What is an Exit Criterion?

Exit criterion is used to determine whether a given test activity has been completed or NOT. Exit
criteria can be defined for all of the test activities right from planning, specification and
execution.

Exit criterion should be part of test plan and decided in the planning stage.

Examples of Exit Criteria:

 Verify if All tests planned have been run.


 Verify if the level of requirement coverage has been met.
 Verify if there are NO Critical or high severity defects that are left outstanding.
 Verify if all high risk areas are completely tested.
 Verify if software development activities are completed within the projected cost.
 Verify if software development activities are completed within the projected timelines.
96

What is an Exploratory Testing?

During testing phase where there is severe time pressure, Exploratory testing technique is
adopted that combines the experience of testers along with a structured approach to testing.

Exploratory testing often performed as a black box testing technique, the tester learns things that
together with experience and creativity generate new good tests to run.

Benefits:

Following are the benefits of Exploratory Testing:

 Exploratory testing takes less preparation.


 Critical defects are found very quickly.
 The testers can use reasoning based approach on the results of previous results to guide
their future testing on the fly.

Drawbacks:

Following are the Drawbacks of Exploratory Testing:

 Tests cannot be reviewed.


 It is difficult to keep track of what tests have been tested.
 It is unlikely to be performed in exactly the same manner and to repeat specific details of
the earlier tests.

What is Failover Testing?

Failover testing is a testing technique that validates a system's ability to be able to allocate extra
resource and to move operations to back-up systems during the server failure due to one or the
other reasons. This determines if a system is capable of handling extra resource such as
additional CPU or servers during critical failures or at the point the system reaches a
performance threshold.

Example:

Failover testing is very much critical for the following types of applications:

 Banking Application
 Financial Application
 Telecom Application
 Trading Platforms
97

Factors to be Considered:

The Following factors need to be considered before considering failover testing:

 The cost to the company due to outages


 The cost of protecting the systems, which are likely to break down
 The likelihood or probability of such disaster
 The potential outage period/downtime due to disaster

What is Functional Testing?

Functional Testing is a testing technique that is used to test the features/functionality of the
system or Software, should cover all the scenarios including failure paths and boundary cases.

Functional Testing Techniques:

There are two major Functional Testing techniques as shown below:

The other major Functional Testing techniques include:

 Unit Testing
 Integration Testing
 Smoke Testing
 User Acceptance Testing
 Localization Testing
 Interface Testing
 Usability Testing
 System Testing
 Regression Testing
 Globalization Testing
98

DOMAIN
Product information management (PIM) means managing the information required to market
and sell products through distribution channels. A central set of product data can be used to feed
information to media such as web sites, print catalogs, ERP systems, and electronic data feeds to
trading partners.

PIM systems generally need to support multiple geographic locations, multi-lingual data, and
maintenance and modification of product information within a centralized catalog. Information kept by
a business can be scattered throughout departments and held by employees or systems, instead of
being available centrally; data may be saved in various formats, or only be available in hard copy form.
Information may be needed for detailed product descriptions with prices, or calculating freight costs.
PIM represents a solution for centralized, media-independent data maintenance, as well as efficient
data collection, management, refinement and output.

Content management (CM) is a set of processes and technologies that supports the collection,
managing, and publishing of information in any form or medium. When stored and accessed via
computers, this information may be more specifically referred to as digital content, or simply as content.
Digital content may take the form of text (such as electronic documents), multimedia files (such as audio
or video files), or any other file type that follows a content lifecycle requiring management. The process
is complex enough to manage that several large and small commercial software vendors such as
Interwoven and Microsoft offer content management software to control and automate significant
aspects of the content lifecycle.

Selenium
Selenium Interview Questions

Q#1: What is Selenium?

A: Selenium is a browser based functional test automation tool. It is basically a library which
you can use in your program to test a web application. It is important to note that selenium is
mainly used for browser automation. It is NOT used for unit testing or API testing.

Selenium Webdriver has many language bindings, which means you can write your tests in your
favorite programming language and using the respective selenium bindings.

Q#2: Another interesting selenium interview question is how many languages does
selenium WebDriver support?

A: The main ones are: Java, C#, php, Ruby, Python


99

Q#3: In Selenium WebDriver, how do you select an item from a drop-down menu?

A: We can select an item from the drop-down menu by Value, by Index or by Visible Text.

Example:

<select id="cars">
<option value="vo">Volvo</ o
<option value="sa">Saab</ o
<option value="me">Mercede

1 <select id="cars">

2 <option value="vo">Volvo</option>

3 <option value="sa">Saab</option>

4 <option value="me">Mercedes</option>

5 <option value="au">Audi</option>

6 </select>

WebElement cars =[Link]

Select car =new Select(cars)

1 WebElement cars = [Link]([Link]("cars"));

3 Select car = new Select(cars)

5 //select by value

6 [Link]("vo"); //this will select Volvo from drop-down

8 //select by index

9 [Link](2); //this will select Saab

10

11 //select by visible text


100

12 [Link]("Audi") //this will select Audi

Q#4: What is the difference between [Link]() and [Link]()

A: You can use both methods to navigate to a url.

Because navigating to a URL is very common, then [Link]() is a convenient way. However it
does the same function as the [Link]().to(“url”)

The [Link]() also has other functions, such as

[Link]().back()
[Link]().forward()
[Link]().refresh()

Q#5: What is the difference between implicit wait and explicit wait in selenium webdriver?

This question is asked in almost all selenium interview questions because many web applications
use AJAX.

A: Selenium Webdriver introduces the concept of waits for AJAX based applications. There are
two waiting methods, implicit wait and explicit wait

Implicit wait:

When an implicit wait is implemented in tests, if WebDriver cannot find an element in the
Document Object Model (DOM), it will wait for a defined amount of time for the element to
appear in the DOM. In other terms, an implicit wait polls the DOM for a certain amount of time
when trying to find an element or elements if they are not immediately available.

Implicit waits can slow down your tests, because once set, the implicit wait is set for the life of
the WebDriver object’s instance. This means that when an application responds normally, it will
still wait for each element to appear in the DOM which increases the overall execution time.

Another downside is if for example you set the waiting limit to be 5 seconds and the elements
appears in the DOM in 6 seconds, your tests will fail because you told it to wait a maximum of 5
seconds.

An example of an implicit wait is:

[Link]().timeouts().implicitlyWait(10, [Link]);

Explicit wait:
101

Explicit waits are better than implicit wait. Unlike an implicit wait, you can write custom code or
conditions for wait before proceeding further in the code.

An explicit wait can be used where synchronization is needed, for example, the page is loaded
but we are still waiting for a call to complete and an element to appear.

Selenium WebDriver provides WebDriverWait and ExpectedCondition classes for implementing


an explicit wait. The ExpectedCondition class provides a set of predefined conditions to wait
before proceeding further in the code.

An example of an explicit wait is:

WebDriverWait wait =new Web

[Link]([Link]

1 WebDriverWait wait = new WebDriverWait(driver, 10);

3 [Link]([Link]("selenium"));

To summarize:

Implicit wait time is applied to all elements in your script and Explicit wait time is applied only
for a particular specified element.

Q#6: How would you count the number of elements on a page?

This is a common selenium interview question because in many cases you want to click on an
item from a list. So it is important to know how to count the elements and select the correct one
from the list.

A: We first need to locate the node element where the items are listed. For example, in the html
code below:

<ul id="movies">
<li>movie title 1</ li>
<li>movie title 2</ li>
.

1 <ul id="movies">

2 <li>movie title 1</li>

3 <li>movie title 2</li>


102

4 .

5 .

6 .

7 <li>movie title 50</li>

8 </ul>

The root element can be located using

List<WebElement>movies =driv

1 List<WebElement> movies = [Link]([Link](ul#movies li))

Then we can use the .size() to get the number of <li> elements

int numberOfMovies =[Link]

1 int numberOfMovies = [Link]();

Q#7: How can you check if a check-box or a radio button is selected?

A: We can use the .isSelected() method, e.g.

[Link]([Link]("id_of_c

1 [Link]([Link]("id_of_checkbox")).isSelected();

Q#8: Is there a way to do drag and drop in selenium WebDriver?

A: Yes, we can use the following code to do drag and drop


103

Actions action =new Actions(dri


WebElement start =driver.f
WebElement end =[Link]
[Link](start,e

1 Actions action = new Actions(driver);

2 WebElement start = [Link]([Link](“[Link]”));

3 WebElement end = [Link]([Link](“[Link]”));

4 [Link](start,end).perform();

Q#9: How would you check if an element is visible on the page?

A: We can use isDisplayed() method. The return type of the method is boolean. So if it return
true then element is visible otherwise it is not.

[Link]([Link](“id_of_e

1 [Link]([Link](“id_of_element”)).isDisplayed();

Q#10: How to check if a button is enabled on the page ?

A: We can Use isEnabled() method. The return type of the method is boolean. So if it return true
then button is enabled else not enabled.

[Link]([Link](“id_of_e

1 [Link]([Link](“id_of_element”)).isEnabled();

Now that you have gone through these selenium interview questions, it is time to take a short
selenium webdriver quiz.

Q #1) What is Automation Testing?

Automation testing or Test Automation is a process of automating the manual process to test the
application/system under test. Automation testing involves use to a separate testing tool which
lets you create test scripts which can be executed repeatedly and doesn’t require any manual
intervention.
104

Q #2) What are the benefits of Automation Testing?

Benefits of Automation testing are:

1. Supports execution of repeated test cases


2. Aids in testing a large test matrix
3. Enables parallel execution
4. Encourages unattended execution
5. Improves accuracy thereby reducing human-generated errors
6. Saves time and money

Q #3) Why should Selenium be selected as a test tool?

Selenium

1. is free and open source


2. have a large user base and helping communities
3. have cross Browser compatibility (Firefox, Chrome, Internet Explorer, Safari etc.)
4. have great platform compatibility (Windows, Mac OS, Linux etc.)
5. supports multiple programming languages (Java, C#, Ruby, Python, Pearl etc.)
6. has fresh and regular repository developments
7. supports distributed testing

Q #4) What is Selenium? What are the different Selenium components?

Selenium is one of the most popular automated testing suites. Selenium is designed in a way to
support and encourage automation testing of functional aspects of web-based applications and a
wide range of browsers and platforms. Due to its existence in the open source community, it has
become one of the most accepted tools amongst the testing professionals.

Selenium is not just a single tool or a utility, rather a package of several testing tools and for the
same reason, it is referred to as a Suite. Each of these tools is designed to cater different testing
and test environment requirements.

The suite package constitutes of the following sets of tools:

 Selenium Integrated Development Environment (IDE) – Selenium IDE is a record and playback
tool. It is distributed as a Firefox Plugin.
 Selenium Remote Control (RC) – Selenium RC is a server that allows a user to create test scripts
in the desired programming language. It also allows executing test scripts within the large
spectrum of browsers.
 Selenium WebDriver – WebDriver is a different tool altogether that has various advantages over
Selenium RC. WebDriver directly communicates with the web browser and uses its native
compatibility to automate.
 Selenium Grid – Selenium Grid is used to distribute your test execution on multiple platforms
and environments concurrently.
105

Q #5) What are the testing types that can be supported by Selenium?

Selenium supports the following types of testing:

1. Functional Testing
2. Regression Testing

Q #6) What are the limitations of Selenium?

Following are the limitations of Selenium:

 Selenium supports testing of only web-based applications


 Mobile applications cannot be tested using Selenium
 Captcha and Barcode readers cannot be tested using Selenium
 Reports can only be generated using third-party tools like TestNG or JUnit.
 As Selenium is a free tool, thus there is no ready vendor support though the user can find
numerous helping communities.
 The user is expected to possess prior programming language knowledge.

Q #7) What is the difference between Selenium IDE, Selenium RC and WebDriver?

Feature Selenium IDE Selenium RC WebDriver

Feature Selenium IDE Selenium RC WebDriver

WebDriver supports a varied


range of versions of Mozilla
Selenium RC supports a varied
Selenium IDE comes as a Firefox, Google Chrome,
Browser range of versions of Mozilla
Firefox plugin, thus it Internet Explorer and Opera.
Compatibility Firefox, Google Chrome,
supports only Firefox Also supports HtmlUnitDriver
Internet Explorer and Opera
which is a GUI less or
headless browser.

Selenium IDE supports


Record and Selenium RC doesn't supports WebDriver doesn't support
record and playback
Playback record and playback feature record and playback feature
feature

Selenium IDE doesn't WebDriver doesn't require


Selenium RC requires server to
require any server to be any server to be started
Server Requirement be started before executing the
started before executing before executing the test
test scripts
the test scripts scripts

Selenium IDE is a WebDriver uses the


Selenium RC is a JavaScript
Architecture Javascript based browser's native
based Framework
framework compatibility to automation

Object Oriented Selenium IDE is not an Selenium RC is semi object WebDriver is a purely object
106

Feature Selenium IDE Selenium RC WebDriver

Feature Selenium IDE Selenium RC WebDriver

object oriented tool oriented tool oriented tool

Dynamic Finders
(for locating web Selenium IDE doesn't Selenium RC doesn't support WebDriver supports dynamic
elements on a support dynamic finders dynamic finders finders
webpage)

WebDriver offers a wide


Selenium IDE doesn't
Handling Alerts, Selenium RC doesn't explicitly range of utilities and classes
explicitly provides aids to
Navigations, provides aids to handle alerts, that helps in handling alerts,
handle alerts, navigations,
Dropdowns navigations, dropdowns navigations, and dropdowns
dropdowns
efficiently and effectively.

WebDriver is designed in a
way to efficiently support
Selenium IDE doesn't testing of iPhone/Android
WAP Selenium RC doesn't support
support testing of applications. The tool comes
(iPhone/Android) testing of iPhone/Andriod
iPhone/Andriod with a large range of drivers
Testing applications
applications for WAP based testing.
For example, AndroidDriver,
iPhoneDriver

Selenium IDE doesn't Selenium RC doesn't support WebDriver supports the


Listener Support
support listeners listeners implementation of Listeners

Selenium RC is slower than


Selenium IDE is fast as it is WebDriver as it doesn't
plugged in with the web- communicates directly with the WebDriver communicates
browser that launches the browser; rather it sends directly with the web
Speed
test. Thus, the IDE and selenese commands over to browsers. Thus making it
browser communicates Selenium Core which in turn much faster.
directly communicates with the
browser.

Q #8) When should I use Selenium IDE?

Selenium IDE is the simplest and easiest of all the tools within the Selenium Package. Its record
and playback feature makes it exceptionally easy to learn with minimal acquaintances to any
programming language. Selenium IDE is an ideal tool for a naïve user.

Q #9) What is Selenese?


107

Selenese is the language which is used to write test scripts in Selenium IDE.

Q #10) What are the different types of locators in Selenium?

The locator can be termed as an address that identifies a web element uniquely within the
webpage. Thus, to identify web elements accurately and precisely we have different types of
locators in Selenium:

 ID
 ClassName
 Name
 TagName
 LinkText
 PartialLinkText
 Xpath
 CSS Selector
 DOM

Q #11) What is the difference between assert and verify commands?

Assert: Assert command checks whether the given condition is true or false. Let’s say we assert
whether the given element is present on the web page or not. If the condition is true then the
program control will execute the next test step but if the condition is false, the execution would
stop and no further test would be executed.

Verify: Verify command also checks whether the given condition is true or false. Irrespective of
the condition being true or false, the program execution doesn’t halt i.e. any failure during
verification would not stop the execution and all the test steps would be executed.

Q #12) What is an XPath?

XPath is used to locate a web element based on its XML path. XML stands for Extensible
Markup Language and is used to store, organize and transport arbitrary data. It stores data in a
key-value pair which is very much similar to HTML tags. Both being markup languages and
since they fall under the same umbrella, XPath can be used to locate HTML elements.

The fundamental behind locating elements using XPath is the traversing between various
elements across the entire page and thus enabling a user to find an element with the reference of
another element.

Q #13) What is the difference between “/” and “//” in Xpath?

Single Slash “/” – Single slash is used to create Xpath with absolute path i.e. the xpath would be
created to start selection from the document node/start node.

Double Slash “//” – Double slash is used to create Xpath with relative path i.e. the xpath would
be created to start selection from anywhere within the document.
108

Q #14) What is Same origin policy and how it can be handled?

The problem of same origin policy disallows to access the DOM of a document from an origin
that is different from the origin we are trying to access the document.

Origin is a sequential combination of scheme, host and port of the URL. For example, for a URL
[Link] the origin is a combination of http,
[Link], 80 correspondingly.

Thus the Selenium Core (JavaScript Program) cannot access the elements from an origin that is
different from where it was launched. For Example, if I have launched the JavaScript Program
from “[Link] then I would be able to access the pages within the
same domain such as “[Link] or
“[Link] The other domains like [Link],
[Link] would no more be accessible.

So, In order to handle same origin policy, Selenium Remote Control was introduced.

Q #15) When should I use Selenium Grid?

Selenium Grid can be used to execute same or different test scripts on multiple platforms and
browsers concurrently so as to achieve distributed test execution, testing under different
environments and saving execution time remarkably.

Q #16) What do we mean by Selenium 1 and Selenium 2?

Selenium RC and WebDriver, in a combination are popularly known as Selenium 2. Selenium


RC alone is also referred as Selenium 1.

Q #17) Which is the latest Selenium tool?

WebDriver

Q #18) How do I launch the browser using WebDriver?

The following syntax can be used to launch Browser:


WebDriver driver = new FirefoxDriver();
WebDriver driver = new ChromeDriver();
WebDriver driver = new InternetExplorerDriver();

Q #19) What are the different types of Drivers available in WebDriver?

The different drivers available in WebDriver are:

 FirefoxDriver
 InternetExplorerDriver
109

 ChromeDriver
 SafariDriver
 OperaDriver
 AndroidDriver
 IPhoneDriver
 HtmlUnitDriver

Q #20) What are the different types of waits available in WebDriver?

There are two types of waits available in WebDriver:

1. Implicit Wait
2. Explicit Wait

Implicit Wait: Implicit waits are used to provide a default waiting time (say 30 seconds)
between each consecutive test step/command across the entire test script. Thus, subsequent test
step would only execute when the 30 seconds have elapsed after executing the previous test
step/command.

Explicit Wait: Explicit waits are used to halt the execution till the time a particular condition is
met or the maximum time has elapsed. Unlike Implicit waits, explicit waits are applied for a
particular instance only.

Q #21) How to type in a textbox using Selenium?

User can use sendKeys(“String to be entered”) to enter the string in the textbox.

Syntax:
WebElement username = [Link]([Link](“Email”));
// entering username
[Link](“sth”);

Q #22) How can you find if an element in displayed on the screen?

WebDriver facilitates the user with the following methods to check the visibility of the web
elements. These web elements can be buttons, drop boxes, checkboxes, radio buttons, labels etc.

1. isDisplayed()
2. isSelected()
3. isEnabled()

Syntax:

isDisplayed():
boolean buttonPresence = [Link]([Link](“gbqfba”)).isDisplayed();
110

isSelected():
boolean buttonSelected = [Link]([Link](“gbqfba”)).isDisplayed();

isEnabled():
boolean searchIconEnabled = [Link]([Link](“gbqfb”)).isEnabled();

Q #23) How can we get a text of a web element?

Get command is used to retrieve the inner text of the specified web element. The command
doesn’t require any parameter but returns a string value. It is also one of the extensively used
commands for verification of messages, labels, errors etc displayed on the web pages.

Syntax:
String Text = [Link]([Link](“Text”)).getText();

Q #24) How to select value in a dropdown?

Value in the drop down can be selected using WebDriver’s Select class.

Syntax:

selectByValue:
Select selectByValue = new Select([Link]([Link](“SelectID_One”)));
[Link](“greenvalue”);

selectByVisibleText:
Select selectByVisibleText = new Select ([Link]([Link](“SelectID_Two”)));
[Link](“Lime”);

selectByIndex:
Select selectByIndex = new Select([Link]([Link](“SelectID_Three”)));
[Link](2);

Q #25) What are the different types of navigation commands?

Following are the navigation commands:


navigate().back() – The above command requires no parameters and takes back the user to the
previous webpage in the web browser’s history.

Sample code:
[Link]().back();

navigate().forward() – This command lets the user to navigate to the next web page with
reference to the browser’s history.
111

Sample code:
[Link]().forward();

navigate().refresh() – This command lets the user to refresh the current web page there by
reloading all the web elements.

Sample code:
[Link]().refresh();

navigate().to() – This command lets the user to launch a new web browser window and navigate
to the specified URL.

Sample code:
[Link]().to(“[Link]

Q #26) How to click on a hyper link using linkText?

[Link]([Link](“Google”)).click();

The command finds the element using link text and then click on that element and thus the user
would be re-directed to the corresponding page.

The above mentioned link can also be accessed by using the following command.

[Link]([Link](“Goo”)).click();

The above command find the element based on the substring of the link provided in the
parenthesis and thus partialLinkText() finds the web element with the specified substring and
then clicks on it.

Q #27) How to handle frame in WebDriver?

An inline frame acronym as iframe is used to insert another document with in the current HTML
document or simply a web page into a web page by enabling nesting.

Select iframe by id
[Link]().frame(“ID of the frame“);

Locating iframe using tagName


[Link]().frame([Link]([Link](“iframe”).get(0));

Locating iframe using index


112

frame(index)
[Link]().frame(0);

frame(Name of Frame)
[Link]().frame(“name of the frame”);

frame(WebElement element)
Select Parent Window
[Link]().defaultContent();

Q #28) When do we use findElement() and findElements()?

findElement(): findElement() is used to find the first element in the current web page matching
to the specified locator value. Take a note that only first matching element would be fetched.

Syntax:

WebElement element = [Link]([Link](“//div[@id=’example’]//ul//li”));


findElements(): findElements() is used to find all the elements in the current web page matching
to the specified locator value. Take a note that all the matching elements would be fetched and
stored in the list of WebElements.

Syntax:
List <WebElement> elementList =
[Link]([Link](“//div[@id=’example’]//ul//li”));

Q #29) How to find more than one web element in the list?

At times, we may come across elements of same type like multiple hyperlinks, images etc
arranged in an ordered or unordered list. Thus, it makes absolute sense to deal with such
elements by a single piece of code and this can be done using WebElement List.

Sample Code

1 // Storing the list

List &lt;WebElement&gt; elementList =


2
[Link]([Link]("//div[@id='example']//ul//li"));

3 // Fetching the size of the list

4 int listSize = [Link]();

5 for (int i=0; i&lt;listSize; i++)

6{

7 // Clicking on each service provider link


113

8 [Link](i).click();

// Navigating back to the previous page that stores link to service


9
providers

10 [Link]().back();

11 }

Q #30) What is the difference between [Link]() and [Link] command?

close(): WebDriver’s close() method closes the web browser window that the user is currently
working on or we can also say the window that is being currently accessed by the WebDriver.
The command neither requires any parameter nor does is return any value.

quit(): Unlike close() method, quit() method closes down all the windows that the program has
opened. Same as close() method, the command neither requires any parameter nor does is return
any value.

Q #31) Can Selenium handle windows based pop up?

Selenium is an automation testing tool which supports only web application testing. Therefore,
windows pop up cannot be handled using Selenium.

Q #32) How can we handle web based pop up?

WebDriver offers the users with a very efficient way to handle these pop ups using Alert
interface. There are the four methods that we would be using along with the Alert interface.

 void dismiss() – The accept() method clicks on the “Cancel” button as soon as the pop up
window appears.
 void accept() – The accept() method clicks on the “Ok” button as soon as the pop up window
appears.
 String getText() – The getText() method returns the text displayed on the alert box.
 void sendKeys(String stringToSend) – The sendKeys() method enters the specified string pattern
into the alert box.

Syntax:
// accepting javascript alert
Alert alert = [Link]().alert();
[Link]();

Q #33) How can we handle windows based pop up?

Selenium is an automation testing tool which supports only web application testing, that means,
it doesn’t support testing of windows based applications. However Selenium alone can’t help the
situation but along with some third party intervention, this problem can be overcome. There are
114

several third party tools available for handling window based pop ups along with the selenium
like AutoIT, Robot class etc.

Q #34) How to assert title of the web page?

//verify the title of the web page


assertTrue(“The title of the window is incorrect.”,[Link]().equals(“Title of the page”));

Q #35) How to mouse hover on a web element using WebDriver?

WebDriver offers a wide range of interaction utilities that the user can exploit to automate mouse
and keyboard events. Action Interface is one such utility which simulates the single user
interactions.

Thus, In the following scenario, we have used Action Interface to mouse hover on a drop down
which then opens a list of options.

Sample Code:

1 // Instantiating Action Interface

2 Actions actions=new Actions(driver);

3 // howering on the dropdown

[Link]([Link]([Link]("id of the
4
dropdown"))).perform();

5 // Clicking on one of the items in the list options

6 WebElement subLinkOption=[Link]([Link]("id of the sub link"));

7 [Link]();

Q #36) How to retrieve css properties of an element?

The values of the css properties can be retrieved using a get() method:

Syntax:
[Link]([Link](“id“)).getCssValue(“name of css attribute”);
[Link]([Link](“id“)).getCssValue(“font-size”);

Q #37) How to capture screenshot in WebDriver?

1 import [Link];

2 import [Link];

3 import [Link];
115

4 import [Link];

5 import [Link];

6 import [Link];

7 import [Link];

8 import [Link];

9 import [Link];

10 import [Link];

11

12 public class CaptureScreenshot {

13 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WebDriver driver;

14 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @Before

15 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public void setUp() throws Exception {

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; driver =
16
new FirefoxDriver();

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
17
[Link]("[Link]

18 &nbsp;&nbsp;&nbsp;&nbsp; }

19 &nbsp;&nbsp;&nbsp;&nbsp; @After

20 &nbsp;&nbsp;&nbsp;&nbsp; public void tearDown() throws Exception {

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
21
[Link]();

22 &nbsp;&nbsp;&nbsp;&nbsp; }

23

24 &nbsp;&nbsp;&nbsp;&nbsp; @Test

25 &nbsp;&nbsp;&nbsp;&nbsp; public void test() throws IOException {

&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Code to


26
capture the screenshot

27 File scrFile = ((TakesScreenshot)driver).getScreenshotAs([Link]);

28 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Code
116

to copy the screenshot in the desired location

[Link](scrFile, new File("C:\\CaptureScreenshot\\


2
[Link]"));&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
9
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;

30 &nbsp;&nbsp;&nbsp;&nbsp; }

31 }

Q #38) What is Junit?

Junit is a unit testing framework introduced by Apache. Junit is based on Java.

Q #39) What are Junit annotations?

Following are the Junit Annotations:

 @Test: Annotation lets the system know that the method annotated as @Test is a test method.
There can be multiple test methods in a single test script.
 @Before: Method annotated as @Before lets the system know that this method shall be
executed every time before each of the test method.
 @After: Method annotated as @After lets the system know that this method shall be executed
every time after each of the test method.
 @BeforeClass: Method annotated as @BeforeClass lets the system know that this method shall
be executed once before any of the test method.
 @AfterClass: Method annotated as @AfterClass lets the system know that this method shall be
executed once after any of the test method.
 @Ignore: Method annotated as @Ignore lets the system know that this method shall not be
executed.

Q #40) What is TestNG and how is it better than Junit?

TestNG is an advance framework designed in a way to leverage the benefits by both the
developers and testers. With the commencement of the frameworks, JUnit gained an enormous
popularity across the Java applications, Java developers and Java testers with remarkably
increasing the code quality. Despite being easy to use and straightforward, JUnit has its own
limitations which give rise to the need of bringing TestNG into the picture. TestNG is an open
source framework which is distributed under the Apache software License and is readily
available for download.

TestNG with WebDriver provides an efficient and effective test result format that can in turn be
shared with the stake holders to have a glimpse on the product’s/application’s health thereby
eliminating the drawback of WebDriver’s incapability to generate test reports. TestNG has an
inbuilt exception handling mechanism which lets the program to run without terminating
unexpectedly.
117

There are various advantages that make TestNG superior to JUnit. Some of them are:

 Added advance and easy annotations


 Execution patterns can set
 Concurrent execution of test scripts
 Test case dependencies can be set

Q #41) How to set test case priority in TestNG?

Setting Priority in TestNG

Code Snippet

1 package TestNG;

2 import [Link].*;

3 public class SettingPriority {

4 &nbsp;&nbsp;&nbsp;&nbsp; @Test(priority=0)

5 &nbsp;&nbsp;&nbsp;&nbsp; public void method1() { &nbsp;&nbsp;

6 &nbsp;&nbsp;&nbsp;&nbsp; }

7 &nbsp;&nbsp;&nbsp;&nbsp; @Test(priority=1)

8 &nbsp;&nbsp;&nbsp;&nbsp; public void method2() { &nbsp;

9 &nbsp;&nbsp;&nbsp;&nbsp; }

10 &nbsp;&nbsp;&nbsp;&nbsp; @Test(priority=2)

11 &nbsp;&nbsp;&nbsp;&nbsp; public void method3() { &nbsp;&nbsp;

12 &nbsp;&nbsp;&nbsp;&nbsp; }

13 }

Test Execution Sequence:

1. Method1
2. Method2
3. Method3

Q #42) What is a framework?

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.
118

Q #43) What are the advantages of Automation framework?

Advantage of Test Automation framework

 Reusability of code
 Maximum coverage
 Recovery scenario
 Low cost maintenance
 Minimal manual intervention
 Easy Reporting

Q #44) What are the different types of frameworks?

Below are the different types of frameworks:

1. Module Based Testing Framework: The framework divides the entire “Application Under Test”
into number of logical and isolated modules. For each module, we create a separate and
independent test script. Thus, when these test scripts taken together builds a larger test script
representing more than one module.
2. Library Architecture Testing Framework: The basic fundamental behind the framework is to
determine the common steps and group them into functions under a library and call those
functions in the test scripts whenever required.
3. Data Driven Testing Framework: Data Driven Testing Framework helps the user segregate the
test script logic and the test data from each other. It lets the user store the test data into an
external database. The data is conventionally stored in “Key-Value” pairs. Thus, the key can be
used to access and populate the data within the test scripts.
4. Keyword Driven Testing Framework: The Keyword driven testing framework is an extension to
Data driven Testing Framework in a sense that it not only segregates the test data from the
scripts, it also keeps the certain set of code belonging to the test script into an external data file.
5. Hybrid Testing Framework: Hybrid Testing Framework is a combination of more than one above
mentioned frameworks. The best thing about such a setup is that it leverages the benefits of all
kinds of associated frameworks.
6. Behavior Driven Development Framework: Behavior Driven Development framework allows
automation of functional validations in easily readable and understandable format to Business
Analysts, Developers, Testers, etc.

Q #45) How can I read test data from excels?

Test data can efficiently be read from excel using JXL or POI API. See detailed tutorial here.

Q #46) What is the difference between POI and jxl jar?

# JXL jar POI jar

JXL supports “.xls” format i.e. binary based format. JXL doesn’t
1 POI jar supports all of these formats
support Excel 2007 and “.xlsx” format i.e. XML based format
119

# JXL jar POI jar

2 JXL API was last updated in the year 2009 POI is regularly updated and released

POI has a well prepared and highly


3 The JXL documentation is not as comprehensive as that of POI
comprehensive documentation

4 JXL API doesn’t support rich text formatting POI API supports rich text formatting

5 JXL API is faster than POI API POI API is slower than JXL API

Q #47) What is the difference between Selenium and QTP?

Feature Selenium Quick Test Professional (QTP)

Selenium supports almost all the popular QTP supports Internet Explorer, Firefox
Browser
browsers like Firefox, Chrome, Safari, and Chrome. QTP only supports Windows
Compatibility
Internet Explorer, Opera etc Operating System

Selenium is distributed as an open source QTP is distributed as a licensed tool and is


Distribution
tool and is freely available commercialized

QTP supports testing of both the web


Application Selenium supports testing of only web
based application and windows based
under Test based applications
application

Object Object Repository needs to be created as a QTP automatically creates and maintains
Repository separate entity Object Repository

Selenium supports multiple programming


Language
languages like Java, C#, Ruby, Python, Perl QTP supports only VB Script
Support
etc

As Selenium is a free tool, user would not


Users can easily get the vendor’s support
Vendor Support get the vendor’s support in troubleshooting
in case of any issue
issues

Q #48) Can WebDriver test Mobile applications?

WebDriver cannot test Mobile applications. WebDriver is a web based testing tool, therefore
applications on the mobile browsers can be tested.

Q #49) Can captcha be automated?

No, captcha and bar code reader cannot be automated.

Q #50) What is Object Repository? How can we create Object Repository in Selenium?
120

Object Repository is a term used to refer to the collection of web elements belonging to
Application Under Test (AUT) along with their locator values. Thus, whenever the element is
required within the script, the locator value can be populated from the Object Repository. Object
Repository is used to store locators in a centralized location instead of hard coding them within
the scripts.

In Selenium, objects can be stored in an excel sheet which can be populated inside the script
whenever required.

What is Selenium 2.0 ?

Web Testing tools Selenium RC and WebDriver are consolidated in single tool in Selenium 2.0

3) Mention what is Selenium 3.0?

Selenium 3.0 is the latest version of Selenium. It has released 2 beta versions of selenium 3.0
with few of the below changes:

Here are few new features added to Selenium 3.0

Beta 1 updates Beta 2 updates (Only for Java)


121

 System property [Link] now forces the


 Minimum Java version is
server in marionette or legacy firefox driver mode, ignoring
now 8+
any related Desired Capability

 It will support for Firefox


 Grid fixes NPE’s on registration when -browser not specified
Via Mozilla’s geckodriver

 Support for Edge is


provided by MS
 It now supports Safari on  Update GeckoDriver –port argument in all bindings
MacOS via Apple’s own
Safari driver

4) How will you find an element using Selenium?

In Selenium every object or control in a web page is referred as an elements, there are different
ways to find an element in a web page they are

 ID
 Name
 Tag
 Attribute
 CSS
 Linktext
 PartialLink Text
 Xpath etc

5) List out the test types that are supported by Selenium?

For web based application testing selenium can be used

The test types can be supported are

a) Functional, Learn More about Functional Testing.

b) Regression

For post release validation with continuous integration automation tool could be used

a) Jenkins

b) Hudson

c) Quick Build
122

d) CruiseCont

6) Explain what is assertion in Selenium and what are the types of assertion?

Assertion is used as a verification point. It verifies that the state of the application conforms to
what is expected. The types of assertion are “assert” , “verify” and “waifFor”.

7) Mention what is the use of X-path?

X-Path is used to find the WebElement in web pages. It is also useful in identifying the dynamic
elements.

Refer Complete Guide on XPath

8) Explain the difference between single and double slash in X-path? Single slash ‘/ ’

 Single slash ( / ) start selection from the document node


 It allows you to create ‘absolute’ path expressions

Double Slash ‘// ’

 Double slash ( // ) start selection matching anywhere in the document


 It enables to create ‘relative’ path expressions

9) List out the technical challenges with Selenium? Technical challenges with Selenium are

 Selenium supports only web based applications


 It does not support the Bitmap comparison
 For any reporting related capabilities have to depend on third party tools
 No vendor support for tool compared to commercial tools like HP UFT
 As there is no object repository concept in Selenium, maintainability of objects becomes difficult

10) What is the difference between type keys and type commands ?

TypeKeys() will trigger JavaScript event in most of the cases whereas .type() won’t. Type key
populates the value attribute using JavaScript whereas .typekeys() emulates like actual user
typing

11) What is the difference between verify and assert commands?

Assert: Assert allows to check whether an element is on the page or not. The test will stop on
the step failed, if the asserted element is not available. In other words, the test will terminated at
the point where check fails.
123

Verify: Verify command will check whether the element is on the page, if it is not then the test
will carry on executing. In verification, all the commands are going to run guaranteed even if
any of test fails.

12) What is JUnit Annotations and what are different types of annotations which are useful
?

In JAVA a special form of syntactic meta-data can be added to Java source code, this is know as
Annotations. Variables, parameters, packages, methods and classes are annotated some of the
Junit annotations which can be useful are

 Test
 Before
 After
 Ignore
 BeforeClass
 AfterClass
 RunWith

13) While using click command can you use screen coordinate?

To click on specific part of element, you would need to use clickAT command. ClickAt
command accepts element locator and x, y co-ordinates as arguments- clickAt (locator,
cordString)

14) What are the advantages of Selenium?

 It supports C#, PHP, Java, Perl, Phython


 It supports different OS like Windows, Linux and Mac OS
 It has got powerful methods to locate elements (Xpath, DOM , CSS)
 It has highly developer community supported by Google

15) Why testers should opt for Selenium and not QTP? Selenium is more popular than QTP
as

 Selenium is an open source whereas QTP is a commercial tool


 Selenium is used specially for testing web based applications while QTP can be used for testing
client server application also
 Selenium supports Firefox, IE, Opera, Safari on operating systems like Windows, Mac, Linux etc.
however QTP is limited to Internet Explorer on Windows.
 Selenium supports many programming languages like Ruby, Perl, Python whereas QTP supports
only VB script

16) What are the four parameter you have to pass in Selenium? Four parameters that you
have to pass in Selenium are

 Host
124

 Port Number
 Browser
 URL

17) What is the difference between setSpeed() and sleep() methods?

Both will delay the speed of execution.

[Link] () : It will stop the current (java) thread for the specified period of time. Its done
only once

 It takes a single argument in integer format

Ex: [Link](2000)- It will wait for 2 seconds

 It waits only once at the command given at sleep

SetSpeed () : For specific amount of time it will stop the execution for every selenium command.

 It takes a single argument in integer format

Ex: [Link](“2000”)- It will wait for 2 seconds

 Runs each command after setSpeed delay by the number of milliseconds mentioned in set
Speed

This command is useful for demonstration purpose or if you are using a slow web application

18) What is same origin policy? How you can avoid same origin policy?

The “Same Origin Policy” is introduced for security reason, and it ensures that content of your
site will never be accessible by a script from another site. As per the policy, any code loaded
within the browser can only operate within that website’s domain.

To avoid “Same Origin Policy” proxy injection method is used, in proxy injection mode the
Selenium Server acts as a client configured HTTP proxy , which sits between the browser and
application under test and then masks the AUT under a fictional URL

19) What is heightened privileges browsers?

The purpose of heightened privileges is similar to Proxy Injection, allows websites to do


something that are not commonly permitted. The key difference is that the browsers are launced
in a special mode called heightened privileges. By using these browser mode, Selenium core can
open the AUT directly and also read/write its content without passing the whole AUT through
the Selenium RC server.
125

20) How you can use “submit” a form using Selenium ?

You can use “submit” method on element to submit form-

[Link] () ;

Alternatively you can use click method on the element which does form submission

21) What are the features of TestNG and list some of the functionality in TestNG which
makes it more effective?

TestNG is a testing framework based on JUnit and NUnit to simplify a broad range of testing
needs, from Unit Testing to Integration Testing. And the functionality which makes it efficient
testing framework are

 Support for annotations


 Support for data-driven testing
 Flexible test configuration
 Ability to re-execute failed test cases

22) Mention what is the difference between Implicit wait and Explicit wait?

Implicit Wait: Sets a timeout for all successive Web Element searches. For the specified amount
of time it will try looking for element again and again before throwing a
NoSuchElementException. It waits for elements to show up.

Explicit Wait : It is a one-timer, used for a particular search.

23) Which attribute you should consider throughout the script in frame for “if no frame Id
as well as no frame name”?

You can use…..[Link]([Link](“//iframe”))….

This will return list of frames.

You will ned to switch to each and every frame and search for locator which we want.

Then break the loop

24) Explain what is the difference between find elements () and find element () ?

find element ():

It finds the first element within the current page using the given “locating mechanism”. It
returns a single WebElement
126

findElements () : Using the given “locating mechanism” find all the elements within the current
page. It returns a list of web elements.

25) Explain what are the JUnits annotation linked with Selenium?

The JUnits annotation linked with Selenium are

 @Before public void method() – It will perform the method () before each test, this method can
prepare the test
 @Test public void method() – Annotations @Test identifies that this method is a test method
environment
 @After public void method()- To execute a method before this annotation is used, test method
must start with test@Before

26) Explain what is Datadriven framework and Keyword driven?

Datadriven framework: In this framework, the test data is separated and kept outside the Test
Scripts, while Test Case logic resides in Test Scripts. Test data is read from the external files
( Excel Files) and are loaded into the variables inside the Test Script. Variables are used for both
for input values and for verification values.

Keyworddriven framework: The keyword driven frameworks requires the development of data
tables and keywords, independent of the test automation. In a keyword driven test, the
functionality of the application under test is documented in a table as well as step by step
instructions for each test.

27) Explain how you can login into any site if it’s showing any authentication popup for
password and username?

Pass the username and password with url

 Syntax-[Link]
 ex- [Link]

28) Explain how to assert text of webpage using selenium 2.0 ?

WebElement el = [Link]([Link](“ElementID”))

//get test from element and stored in text variable

String text = [Link]();

//assert text from expected

[Link](“Element Text”, text);


127

29) Explain what is the difference between Borland Silk and Selenium?

Silk Test Tool Selenium Test Tool

 Borland Silk test is not a free


 Selenium is completely free test automation tool
testing tool

 Silk test supports only Internet  Selenium supports many browsers like Internet
Explorer and Firefox Explorer, Firefox, Safari, Opera and so on

 Silk test uses test scripting  Selenium suite has the flexibility to use many
language languages like Java, Ruby,Perl and so on

 Silk test can be used for client


 Selenium can be used for only web application
server applications

30) What is Object Repository ?

An object repository is an essential entity in any UI automations which allows a tester to store all
object that will be used in the scripts in one or more centralized locations rather than scattered all
over the test scripts.

31) Explain how Selenium Grid works?

Selenium Grid sent the tests to the hub. These tests are redirected to Selenium Webdriver, which
launch the browser and run the test. With entire test suite, it allows for running tests in parallel.

32) Can we use Selenium grid for performance testing?

Yes. But not as effectively as a dedicated Performance Testing tool like Loadrunner.

33) List the advantages of Webdriver over Selenium Server?

 If you are using Selenium-WebDriver, you don’t need the Selenium Server as it is using totally
different technology
 Selenium Server provides Selenium RC functionality which is used for Selenium 1.0 backwards
compatibility
 Selenium Web driver makes direct calls to browser using each browsers native support for
automation, while Selenium RC requires selenium server to inject Javascript into the browser

34) Mention what are the capabilities of Selenium WebDriver or Selenium 2.0 ?

WebDriver should be used when requiring improvement support for

 Handling multiple frames, pop ups , multiple browser windows and alerts
128

 Page navigation and drag & drop


 Ajax based UI elements
 Multi browser testing including improved functionality for browser not well supported by
Selenium 1.0

35) While injecting capabilities in webdriver to perform tests on a browser which is not
supported by a webdriver what is the limitation that one can come across?

Major limitation of injecting capabilities is that “findElement” command may not work as
expected.

36) Explain how you can find broken images in a page using Selenium Web driver ?

To find the broken images in a page using Selenium web driver is

 Get XPath and get all the links in the page using tag name
 In the page click on each and every link
 Look for 404/500 in the target page title

37) Explain how you can handle colors in web driver?

To handle colors in web driver you can use

Use getCssValue(arg0) function to get the colors by sending ‘color’ string as an argument

38) Using web driver how you can store a value which is text box?

You can use following command to store a value which is text box using web driver

[Link]([Link](“your Textbox”)).sendKeys(“your keyword”);

39) Explain how you can switch between frames?

To switch between frames webdrivers [ [Link]().frame() ] method takes one of the


three possible arguments

 A number: It selects the number by its (zero-based) index


 A number or ID: Select a frame by its name or ID
 Previously found WebElement: Using its previously located WebElement select a frame

40) Mention 5 different exceptions you had in Selenium web driver?

The 5 different exceptions you had in Selenium web drivers are

 WebDriverException
 NoAlertPresentException
 NoSuchWindowException
129

 NoSuchElementException
 TimeoutException

41) Explain using Webdriver how you can perform double click ?

You can perform double click by using

 Syntax- Actions act = new Actions (driver);


 [Link](webelement);

42) How will you use Selenium to upload a file ?

You can use “type”command to type in a file input box of upload file. Then, you have to use
“Robot” class in JAVA to make file upload work.

43) Which web driver implementation is fastest?

HTMLUnit Driver implementation is fastest, HTMLUnitDriver does not execute tests on


browser but plain http request, which is far quick than launching a browser and executing tests

44) Explain how you can handle frames using Selenium 2.0 ?

To bring control on HTML frame you can use “SwitchTo” frame method-

[Link]().frame(“frameName”);

To specify a frame you can use index number

[Link]().frame(“[Link]”);

This would bring control on frame named- “frameName” of the 4th sub frame names
“parentFrame”

45) What is the difference between getWindowhandles() and getwindowhandle() ?

getwindowhandles(): It is used to get the address of all the open browser and its return type is
Set<String>

getwindowhandle(): It is used to get the address of the current browser where the control is and
return type is string

46) Explain how you can switch back from a frame?

To switch back from a frame use method defaultContent()

[Link]().defaultContent();
130

47) List out different types of locators?

Different types of locators are

 [Link]()
 [Link]()
 [Link]()
 [Link]()
 [Link]()
 [Link]()
 [Link]
 [Link]()

48) What is the command that is used in order to display the values of a variable into the
output console or log?

 In order to display a constant string, command can be used is echo <constant string>
 If order to display the value of a variable you can use command like echo ${variable name>>

Above is using PHP. If you are using Java, replace echo with [Link]

49) Explain how you can use recovery scenario with Selenium?

Recovery scenarios depends upon the programming language you use. If you are using Java then
you can use exception handling to overcome same. By using “Try Catch Block” within your
Selenium WebDriver Java tests

50) Explain how to iterate through options in test script?

To iterate through options in test script you can loop features of the programming language, for
example to type different test data in a text box you can use “for” loop in Java

// test data collection in an array

String[ ] testData = { “test1” , “test2” , “test3” } ;

// iterate through each test data

For (string s: test data) { [Link] ( “elementLocator”, testData) ; }

51) How can you prepare customized html report using TestNG in hybrid framework ?

There are three ways

 Junit: With the help of ANT


 TestNG: Using inbuilt [Link] to get the HTML report. Also XST reports from ANT, Selenium,
Testng combinations
131

 Using our own customized reports using XSL jar for converting XML content to HTML

52) From your test script how you can create html test report?

To create html test report there are three ways

 TestNG: Using inbuilt [Link] to get the HTML report. Also XLST reports from ANT,
Selenium, TestNG combination
 JUnit: With the help of ANT
 Using our own customized reports using XSL jar for converting XML content to HTML

53) Explain how you can insert a break point in Selenium IDE ?

In Selenium IDE to insert a break point

 Select “Toggle break point” by right click on the command in Selenium IDE
 Press “B” on the keyboard and select the command in Selenium IDE
 Multiple break points can be set in Selenium IDE

54) Explain in Selenium IDE how can you debug the tests?

 Insert a break point from the location from where you want to execute test step by step
 Run the test case
 At the given break point execution will be paused
 To continue with the next statement click on the blue button
 Click on the “Run” button to continue executing all the commands at a time

55) What is Selenese and what are the types of Selenese ?

Selenese is a selenium set of command which are used for running the test

There are three types of Selenese

 Actions: It is used for performing the operations and interactions with the target elements
 Assertions: It is used as a check points
 Accessors: It is used for storing the values in a variable

56) Explain what are the limitations of Selenium IDE?

The limitations of Selenium IDE

 Exceptional handling is not present


 Selenium IDE uses only HTML languages
 External databases reading is not possible with IDE
 Reading from the external files like .txt, .xls is not possible
 Conditional or branching statements execution like if,else, select statements is not possible
132

57) What are the two modes of views in Selenium IDE ?

Either Selenium IDE can be opened as a pop up window or in side bar

58) In selenium IDE what are the element locators that can be used to locate elements on
web page?

In selenium there are mainly 4 locators that are used

 X-path locators
 Css locators
 Html id
 Html name

59) In Selenium IDE how you can generate random numbers and dates for test data ?

In Selenium IDE you can generate random numbers by using Java Script

type

css=input#s

javascript{[Link]()}

And for

type

css=input#s

javascript{new Date()}

60) How you can convert any Selenium IDE tests from Selenese to another language?

You can use the format option of Selenium IDE to convert tests into another programming
language

61) Using Selenium IDE is it possible to get data from a particular html table cell ?

You can use the “storeTable” command

Example store text from cell 0,2 from an html table

storeTable

Css=#table 0.2
133

textFromCell

62) Explain what can cause a Selenium IDE test to fail?

 When a locator has changed and Selenium IDE cannot locate the element
 When element Selenium IDE waiting to access did not appear on the web page and the
operation timed out
 When element Selenium IDE was trying to access was not created

63) Explain how you can debug the tests in Selenium IDE ?

 Insert a break point from the location where you want to execute step by step
 Run the test case
 At the given break point execution will be paused
 To continues with the next step click on the Blue button
 To run commands at a time click on run button

64) From Selenium IDE how you can execute a single line?

From Selenium IDE single line command can be executed in two ways

 Select “Execute this command” by right clicking on the command in Selenium IDE
 Press “X” key on the keyboard after selecting the command in Selenium IDE

65) In which format does source view shows your script in Selenium IDE ?

In Selenium IDE source view shows your script in XML format

66) Explain how you can insert a start point in Selenium IDE?

In two ways selenium IDE can be set

 Press “S” key on the keyboard and select the command in Selenium IDE

 In Seleniun IDE right click on the command and the select “Set / Clear Start Point”

67) What if you have written your own element locator and how would you test it?

To test the locator one can use “Find Button” of Selenium IDE, as you click on it, you would see
on screen an element being highlighted provided your element locator is right or or else an error
message will be displayed

68) What is regular expressions? How you can use regular expressions in Selenium ?

A regular expression is a special text string used for describing a search pattern. In Selenium IDE
regular expression can be used with the keyword- regexp: as a prefix to the value and patterns
needs to be included for the expected values.
134

69) What are core extension ?

If you want to “extend” the defualt functionality provided by Selenium Function Library , you
can create a Core Extension. They are also called “User Extension”. You can even download
ready-made Core Extension created by other Selenium enthusiats.

70) How will you handle working with multiple windows in Selenium ?

We can use the command selectWindow to switch between windows. This command uses the
title of Windows to identify which window to switch to.

71) How will you verify the specific position of an web element

You can use verifyElementPositionLeft & verifyElementPositionTop. It does a pixel comparison


of the position of the element from the Left and Top of page respectively

72) How can you retrive the message in an alert box ?

You can use the storeAlert command which will fetch the message of the alert pop up and store it
in a variable.

73) What is selenium RC (Remote Control)?

Selenium IDE have limitations in terms of browser support and language support. By using
Selenium RC limitation can be diminished.

 On different platforms and different web browser for automating web application selenium RC
is used with languages like Java, C#, Perl, Python
 Selenium RC is a java based and using any language it can interact with the web application
 Using server you can bypass the restriction and run your automation script running against any
web application

74) Why Selenium RC is used?

Selenium IDE does not directly support many functions like condition statements, Iteration,
logging and reporting of test results, unexpected error handling and so on as IDE supports only
HTML language. To handle such issues Selenium RC is used it supports the language like Perl,
Ruby, Python, PHP using these languages we can write the program to achieve the IDE issues.

75) Explain what is the main difference between web-driver and RC ?

The main difference between Selenium RC and Webdriver is that, selenium RC injects javascript
function into browsers when the page is loaded. On the other hand, Selenium Webdriver drives
the browser using browsers built in support

76) What are the advantages of RC?


135

Advantages of RC are

 Can read or write data from/ to .xls, .txt, etc


 It can handle dynamic objects and Ajax based UI elements
 Loops and conditions can be used for better performance and flexibility
 Support many Programming languages and Operating Systems
 For any JAVA script enabled browser Selenium RC can be used

77) Explain what is framework and what are the frameworks available in RC?

A collection of libraries and classes is known as Framework and they are helpful when testers
has to automate test cases. NUnit, JUnit, TestNG, Bromine, RSpec, unittest are some of the
frameworks available in RC .

78) How can we handle pop-ups in RC ?

To handle pop-ups in RC , using selectWindow method, pop-up window will be selected and
windowFocus method will let the control from current window to pop-up windows and perform
actions according to script

79) What are the technical limitations while using Selenium RC?

Apart from “same origin policy” restriction from js, Selenium is also restricted from exercising
anything that is outside browser.

80) Can we use Selenium RC to drive tests on two different browsers on one operating
system without Selenium Grid?

Yes, it is possible when you are not using JAVA testing framework. Instead of using Java
testing framework if you are using java client driver of selenium then TestNG allows you to do
this. By using “parallel=test” attribute you can set tests to be executed in parallel and can define
two different tests, each using different browser.

81) Why to use TestNG with Selenium RC ?

If you want full automation against different server and client platforms, You need a way to
invoke the tests from a command line process, reports that tells you what happened and
flexibility in how you create your test suites. TestNG gives that flexibility.

82) Explain how you can capture server side log Selenium Server?

To capture server side log in Selenium Server, you can use command

 java –jar .jar –log [Link]

83) Other than the default port 4444 how you can run Selenium Server?
136

You can run Selenium server on java-jar [Link]-port other than its default port

84) How Selenium grid hub keeps in touch with RC slave machine?

At predefined time selenium grid hub keeps polling all RC slaves to make sure it is available for
testing. The deciding parameter is called “remoteControlPollingIntervalSeconds” and is defined
in “grid_configuration.yml”file

85) Using Selenium how can you handle network latency ?

To handle network latency you can use [Link] for network latency

86) To enter values onto text boxes what is the command that can be used?

To enter values onto text boxes we can use command sendkeys()

87) How do you identify an object using selenium?

To identify an object using Selenium you can use

isElementPresent(String locator)

isElementPresent takes a locator as the argument and if found returns a Boolean

88) In Selenium what are Breakpoints and Startpoints?

 Breakpoints: When you implement a breakpoint in your code, the execution will stop right
there. This helps you to verify that your code is working as expected.
 StartpointsStartpoint indicates the point from where the execution should begin. Startpoint can
be used when you want to run the testscript from the middle of the code or a breakpoint.

89) Mention why to choose Python over Java in Selenium?

Few points that favor Python over Java to use with Selenium is,

 Java programs tend to run slower compared to Python programs.


 Java uses traditional braces to start and ends blocks, while Python uses indentation.
 Java employs static typing, while Python is dynamically typed.
 Python is simpler and more compact compared to Java.

90) Mention what are the challenges in Handling Ajax Call in Selenium Webdriver?

The challenges faced in Handling Ajax Call in Selenium Webdriver are


137

 Using "pause" command for handling Ajax call is not completely reliable. Long pause time makes
the test unacceptably slow and increases the testing time. Instead, "waitforcondition" will be
more helpful in testing Ajax applications.
 It is difficult to assess the risk associated with particular Ajax applications
 Given full freedom to developers to modify Ajax application makes the testing process
challenging
 Creating automated test request may be difficult for testing tools as such AJAX application often
use different encoding or serialization technique to submit POST data.

91) Mention what is IntelliJ?

Intellij is an IDE that helps you to write better and faster code for Selenium. Intellij can be used
in the option to Java bean and Eclipse.

92) Mention in what ways you can customize TestNG report?

You can customize TestNG report in two ways,

 Using ITestListener Interface


 Using IReporter Interface

93) To generate pdf reports mention what Java API is required?

To generate pdf reports, you need Java API IText.

94) Mention what is Listeners in Selenium WebDriver?

In Selenium WebDriver, Listeners "listen" to the event defined in the selenium script and behave
accordingly. It allows customizing TestNG reports or logs. There are two main listeners i.e.
WebDriver Listeners and TestNG Listeners.

95) Mention what are the types of Listeners in TestNG?

The types of Listeners in TestNG are,

 IAnnotationTransformer
 IAnnotationTransformer2
 IConfigurable
 IConfigurationListener
 IExecutionListener
 IHookable
 IInvokedMethodListener
 IInvokedMethodListener2
 IMethodInterceptor
 IReporter
 ISuiteListener
 ITestListener
138

96) Mention what is desired capability? How is it useful in terms of Selenium?

The desired capability is a series of key/value pairs that stores the browser properties like
browser name, browser version, the path of the browser driver in the system, etc. to determine
the behavior of the browser at run time.

For Selenium,

 It can be used to configure the driver instance of Selenium WebDriver.


 When you want to run the test cases on a different browser with different operating systems
and versions.

97) For Database Testing in Selenium Webdriver what API is required?

For Database Testing in Selenium Webdriver, you need JDBC (Java Database Connectivity)
API. It allows you to execute SQL statements.

98) Mention when to use AutoIT?

Selenium is designed to automate web-based applications on different browsers. But to handle


window GUI and non-HTML popups in the application you need AutoIT. know more about How
to use AutoIT with Selenium

99) Mention why do you need Session Handling while working with Selenium?

While working with Selenium, you need Session Handling. This is because, during test
execution, the Selenium WebDriver has to interact with the browser all the time to execute given
commands. At the time of execution, it is also possible that, before current execution completes,
someone else starts execution of another script, in the same machine and in the same type of
browser. So to avoid such situation you need Session Handling.

100) Mention what are the advantages of Using Git Hub For Selenium?

The advantages of Using Git Hub for Selenium are

 Multiple people when they work on the same project they can update project details and inform
other team members simultaneously.
 Jenkins can help you to build the project from the remote repository regularly. This helps you to
keep track of failed builds.

You might also like