Google News
logo
Software Testing Interview Questions
Software testing is the process of evaluating and verifying that a software product or application does what it is supposed to do. The benefits of testing include preventing bugs, reducing development costs and improving performance. 
 
Testers use it to validate and verify software programs, applications, and products. Unlike other steps, testing is an ongoing stage in the software development life cycle (SDLC). Several test designs are used to verify the software codes.
Software testing is governed by seven principles:  
 
Absence of errors fallacy : Even if the software is 99% bug-free, it is unusable if it does not conform to the user's requirements. Software needs to be bug-free 99% of the time, and it must also meet all customer requirements.

Testing shows the presence of errors : Testing can verify the presence of defects in software, but it cannot guarantee that the software is defect-free. Testing can minimize the number of defects, but it can't remove them all. 

Exhaustive testing is not possible : The software cannot be tested exhaustively, which means all possible test cases cannot be covered. Testing can only be done with a select few test cases, and it's assumed that the software will produce the right output in all cases. Taking the software through every test case will cost more, take more effort, etc., which makes it impractical.

Defect clustering : The majority of defects are typically found in a small number of modules in a project. According to the Pareto Principle, 80% of software defects arise from 20% of modules.

Pesticide Paradox : It is impossible to find new bugs by re-running the same test cases over and over again. Thus, updating or adding new test cases is necessary in order to find new bugs.

Early testing : Early testing is crucial to finding the defect in the software. In the early stages of SDLC, defects will be detected more easily and at a lower cost. Software testing should start at the initial phase of software development, which is the requirement analysis phase.

Testing is context-dependent : The testing approach varies depending on the software development context. Software needs to be tested differently depending on its type. For instance, an ed-tech site is tested differently than an Android app.
There are four steps in a normal software development process. In short, these steps are referred to as PDCA.

Plan : It defines the goal and the plan for achieving that goal.

Do/ Execute : It depends on the plan strategy decided during the planning stage. It is done according to this phase.

Check : This is the testing part of the software development phase. It is used to ensure that we are moving according to plan and getting the desired result.

Act : This step is used to solve if there any issue has occurred during the check cycle. It takes appropriate action accordingly and revises the plan again.

The developers do the "planning and building" of the project while testers do the "check" part of the project.
Record : Log and handle any problems which have happened

Report : Report the issues to higher level manager

Control : Define the issue management process
Difference between test scenarios and test cases is that
 
Test Scenarios : A Test Scenario is any functionality that can be tested. It is also called Test Condition or Test Possibility.
 
Test Cases : It is a document that contains the steps that have 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 the functionality of the software system. In other words a written set of steps that should be performed manually.
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.
The dictionary definition of regression is the act of going back to a previous place or state. In software, regression implies that a feature that used to work suddenly stopped working after a developer added a new code or functionality to the software.
 
Regression problems are pervasive in the software industry, as new features are getting added all the time. Developers don't build these features in isolation, separate from the existing code. Instead, the new code interacts with the legacy code and modifies it in various ways, introducing side effects, whether intended or not.
 
As a result, there is always a chance that introducing new changes may negatively impact a working feature. It's important to keep in mind that even a small change has the potential to cause regression.
 
Regression testing helps ensure that the new code or modifications to the existing code don't break the present behaviour. It allows the tester to verify that the new code plays well with the legacy code.
API stands for Application Programming Interface. It is a means of communication between two software components. An API abstracts the internal workings and complexity of a software program and allows the user of that API to solely focus on the inputs and outputs required to use it.
API
When building software, developers rarely write software from scratch and make use of other third-party libraries. An API allows two software components to talk to each other by providing an interface that they can understand.
 
Another use of an API is to provide data required by an application. Let's say you are building a weather application that displays the temperature. Instead of building the technology to collect the temperature yourself, you'd access the API provided by the meteorological institute
A software bug is an error in the software that produces wrong results. A software tester tests the software to find bugs in it.
 
There are many causes for the bugs—for example, poor design, sloppy programming, lack of version control, or miscommunication. Throughout development, developers introduce hundreds or thousands of bugs in the system. The goal of the tester is to uncover those bugs.
 
You can find a bug in many different ways, regardless of your role. When building the software, the software developer might notice the bug in another module, written by another developer or by themselves. The tester actively tries to find the bugs as part of a routine testing process. Finally, the users could see the bugs when the software is in production.
 
All bugs, no matter how they are found, are recorded into a bug-tracking system. A triage team triages the bugs and assigns a priority to the bug, and assigns the bug to a software developer to fix it. Once the developer resolves the problem, they check in the code and mark that bug as ready for testing. Once a bug is ready for testing, it goes to the tester, who tests the software to verify if it’s indeed fixed. If it is, then it’s closed. If not, they assign it to the same developer with a description of the exact steps to reproduce the bug. Some examples of popular bug-tracking systems include BugZilla, FogBugz, etc.
The difference between a web application and desktop application is that a web application is open to the world with potentially many users accessing the application simultaneously at various times, so load testing and stress testing are important. Web applications are also prone to all forms of attacks, mostly DDOS, so security testing is also very important in the case of web applications.
A decision table consists of inputs in a column with the outputs in the same column but below the inputs.
 
The decision table testing is used for testing systems for which the specification takes the form of rules or cause-effect combination. The reminders you get in the table explore combinations of inputs to define the output produced.
No. Alpha Testing Beta Testing
1) It is always done by developers at the software development site. It is always performed by customers at their site.
2) It is also performed by Independent testing team It is not be performed by Independent testing team
3) It is not open to the market and public. It is open to the market and public.
4) It is always performed in a virtual environment. It is always performed in a real-time environment.
5) It is used for software applications and projects. It is used for software products.
6) It follows the category of both white box testing and Black Box Testing. It is only the kind of Black Box Testing.
7) It is not known by any other name. It is also known as field testing.
Smoke testing Sanity testing Dry-run testing
It is shallow, wide and scripted testing. It is narrow and deep and unscripted testing A dry run testing is a process where the effects of a possible failure are internally mitigated.
When the builds come, we will write the automation script and execute the scripts. So it will perform automatically. It will perform manually. For Example, An aerospace company may conduct a Dry run of a takeoff using a new aircraft and a runway before the first test flight.
It will take all the essential features and perform high-level testing. It will take some significant features and perform in-depth testing.  
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
Traceability matrix : In this, we will make sure that each requirement has got at least one test case.

Test case review : In this, we will check whether all the scenarios are covered for the particular requirements.
Test case Use Case
It is a document describing the input, action, and expected response to control whether the application is working fine based on the customer requirements. It is a detailed description of Customer Requirements.
It is derived from test scenarios, Use cases, and the SRS. It is derived from BRS/SRS.
While developing test cases, we can also identify loopholes in the specifications. A business analyst or QA Lead prepares it.
Cookie is said to be a personalized user’s identity or information that is required to communicate between different web pages as well as track user’s navigation through the website pages. Whenever we access any website on any web browser, their respective cookie is written on the hard disk.
 
Cookies are used to track user sessions, displays ads, remember user’s choice while accessing any website, remember and retrieve the user’s shopping cart, track the unique number of visitors, etc.
 
Suppose an e-commerce site is accessible in many countries like the US, Canada, Australia, and their testing is done in India. In that case, while testing the e-commerce site for different countries in India, at first respective countries cookies is set so that actual data like time zone, etc., are accessed of that particular country.
Client-side validation is the one which is basically done at the browser level where the user’s input is validated at the browser itself with no involvement of the server.
 
Let’s understand it with the help of an Example.
 
Suppose a user is entering an incorrect email format while filling a form. The browser will instantly prompt an error message to correct it before moving on to the next field. Thus every field is corrected before submitting the form.
 
The client-side validation is usually done by script language such as JavaScript, VBScript, HTML 5 attributes.
 
The two types of Client-side validation are :
 
* Field-level validation
* Form level validation
Server-side validation occurs where the validation and processing of user requests require the response from the server. To understand it more clearly, the user’s input is being sent to the server and validation is done using server-side scripting languages such as PHP, Asp.NET, etc.
 
After the validation process, feedback is sent back to the client in the form of a dynamically generated web page.
 
When compared to the Client-Side validation process, the Server-side validation process is more secure because here application is protected against malicious attacks and users can easily bypass client-side scripting language.
Client-server application is the one where the application itself gets loaded or installed on a server whereas the application EXE file is loaded on all client machines. This environment is usually used in Intranet networks.
 
Following tests are performed on a Client-server application :
 
* GUI testing on both client and server systems.
* Client-server interaction.
* The functionality of an application.
* Load and performance testing.
* Compatibility testing.

All the test cases and test scenarios used in client-server application testing is derived from the tester’s experience and requirement specifications.
Static Testing Dynamic Testing
Helps in finding bugs without executing any code Execution of code is required to find results of running tests
Done at the time of the verification process Executed during the validation process
A cost-effective way of testing Little expensive
Example – Reviewing, Walkthrough, Inspection Example – Unit testing, system testing, integration testing
A technique of software testing where the application is tested by ingesting inputs randomly. This test does not follow any pre-defined set of rules. It is carried out to check the behavior of the application.
The Requirement Traceability Matrix (RTM) is a bi-directional matrix that captures the details of requirements and their traceability. Created at the initial steps of a project, RTM tracks the requirement by analyzing the deliverables and business requirements.
* LoadRunner(HP) : This testing tool contains a wide array of application environments, platforms, and databases. It is typically suitable for web applications and others.

* QA load(Compuware) : This tool is used for load testing of web, database, and char-based systems.

* WebLoad(RadView) : It is used to compare running tests with test metrics.

* Rational Performance Tester (IBM) : It allows finding out the presence and cause of bottlenecks.

* Silk Performer (Borland) : This testing tool lets you predict the behavior of e-business environment.

* Explain the concepts of Test Fusion Report of QTP.

* Test Fusion report displays different aspects of the test run, soon after the tester runs a test. The Test Fusion report is used to display all the aspects of test run, it specifies where the application failures occurred, the test data used, and the detailed explanation of every checkpoint stating pass or failure and the application screenshots of every step by highlighting the discrepancies.

* Test Fusion Report is a compilation of the entire testing process. It includes an overview of where the failures occurred, the test data that was used in testing, screenshots to support inconsistencies and a detailed view of checkpoints.
Following are some common problems in the software development process:
 
* Bad requirements
* Unrealistic schedules
* Inadequate testing
* Adding new features
* Poor communication
The best practices for an effective SQA implementation is :
 
* Continuous Improvement
* Documentation
* Tool Usage
* Metrics
* Responsibility by team members
* Experienced SQA auditors
27 .
What is the 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.
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.
a) If characters in new string > characters in the previous string. None of the characters should get truncated.
 
b) If characters in new string < characters in the 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.
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.
31 .
Mention what the difference between a "defect" and a "failure" in software testing is?
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 to as a defect.
* The adaptability of the test case for automation
* Mastering the automation tool
* Reusability of automation script
* Automating complex test cases
Following are various types of software testing :
 
* Smoke testing
* System testing
* Unit testing
* Functional testing
* Performance testing
* Shakeout testing
* Alpha and Beta testing
* Load testing and stress testing
* White box and Black box testing
* Integration testing and regression testing
Quality assurance is explained as that aspect of quality management that deals with convincing the customers according to their set necessities for the software’s quality will be fulfilled.
HTTP response codes are enlisted below:
 
2xx – This means ‘Success
3xx- This means ‘Redirection
4xx- This means ‘Application error
5xx- This means ‘Server error
The proxy server is a server that acts as an intermediary or is the one that lies between the client and the main server.
 
The communication between the main server and client-server is done through a proxy server as the client request of any connection, file, resources from the main server is sent through a proxy server and again the response from the main server or local cached memory to client-server is done through the proxy server.
 
Some of the most common proxy servers based on their purpose and functionality are listed below:
 
* Transparent proxy
* Web proxy
* Anonymous proxy
* Distorting proxy
* High anonymity proxy


The proxy server is basically used for the following purposes:
 
* To improve the performance of web response.
* In case of the presence of a document in the cache memory, the response is directly sent to the client.
* Proxy server filters web page content in the form of web proxies.
* A proxy server is also used to block offensive web content to be accessed by the user especially in an organization, school, and college.
* Web proxies prevent the attack of computer viruses and malware.
37 .
What is Early Testing?
Perform testing as soon as possible in the development lifecycle to find defects at the early stages of STLC. Early testing is helpful to reduce the cost of fixing defects at the later stages of STLC.
38 .
What is Exhaustive Testing?
Testing functionality with all valid, invalid inputs and pre-conditions is called Exhaustive testing.
39 .
What is Defect Clustering?
Any small module or functionality may contain a number of defects and to concentrate more on testing these functionalities is known as Defect Clustering.
40 .
What is Pesticide Paradox?
If already prepared test cases do not find defects, add/revise test cases to find more defects, this is known as Pesticide Paradox.
41 .
What is Positive Testing?
It is the form of testing which is conducted on the application to determine if the system works properly or not. Basically, it is known as the “test to pass” approach.
42 .
What is Negative Testing?
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.
It is the process of verifying whether the software can be run independently of its geographical and cultural environment. Verifying if the application has the feature to set and change language, date, format, and currency or if it is designed for global users.
44 .
What is Localization Testing?
Verifying globalized application for a particular locality of users, under cultural and geographical conditions is termed as Localization Testing.
Bucket testing is also known as A/B testing. It is mostly used to study the impact of various product designs on website metrics. Two simultaneous versions run on a single or a set of web pages to measure the difference in click rates, interface, and traffic.
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.
You can identify the quality of testing by using :
 
Defect reject ratio : (No. of defects rejected/ total no. of defects raised) X 100

Defect leakage ratio : (No. of defect missed/total defects of software) X 100
A test log is a chronological record of relevant details about the execution of test cases. It provides detailed information about the success of each test performed to validate the quality, performance, and functionality of the software.
Baseline testing is the process of running a set of tests to capture performance information. It is to compare the performance of software with its own previous version. Baseline testing aims to improve the performance and capabilities of the application.
Benchmark testing is the process of testing a software’s performance with respect to industry guidelines (given by some other organization). It compares our application performance with other company’s application’s performance and helps to identify where the application stands compared to others.
Defect refers to any deviation from the specifications mentioned in the product functional specification document. A defect results in a deviation in the actual and expected result of the application. 
 
Failure is when a product is completed and is delivered to the customers and the customer finds an issue in the product or software.
A latent bug is a bug that is present in the system from previous iterations or releases. It is a low priority bug. It includes those bugs that remain dormant or unhidden.
 
A golden bug is a bug that appears in every iteration or release, affecting the major module. It is a high priority bug as it may affect the critical functionality of the system.
Bottom-up testing is a type of testing approach where the lowest level components are tested first with the higher modules with the help of drivers. This approach is highly convenient for fault localization and is time-efficient when compared to the big bang testing approach.
In this method, testing starts from the top and move to the bottom by seeking help from stubs. It follows the software system’s control flow. In top-down testing, fault localization is easy and the possibility of obtaining an early prototype is high.
 
It works on the concept of priority testing and resolves major design defects on the highest priority. The only disadvantage of this approach is that it requires too many stubs and gives the least importance to modules that are present at the lower level.
Also known as flood testing, Volume testing is a type of software testing, which is done to identify whether the system can handle a large amount of data. In Volume testing, the software is subjected to a huge volume of data and the system performance is analyzed by increasing the volume of data in the database. It helps in identifying the impact on response time and system behavior.
Entry Criteria : It is defined as the process which requires to be run when the testing begins. It involves:
 
* Test plans
* Test cases
* Use cases
* Software Requirement Specification (SRS)
* Functional Requirement Specification (FRS)

Exit Criteria : It is used when a product is completely testing and when it is ready to be released. It involves:
 
* Metrics
* Defect Analysis Report
* Test Summary Reports
To deal with un-reproducible bugs, a tester can follow the given steps :
 
* Applying test steps that are as close to the bug description as possible.
* Processing the environment of that test.
* Analyzing and calculating the results created by the test execution.
* Keeping the time and resource constraints under examination.
The essential components of defect report format include
 
* 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
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.
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.
RAD is a software development methodology that uses minimal planning in favor of rapid prototyping. In the RAD model, the functional modules are developed in parallel as prototypes and are integrated to make the complete product for faster product delivery. RAD follows the following four main phases : 
RDA
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.
In order 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. The formula for calculating DRE is
 
DRE=Number of bugs while a testing/number of bugs while testing + number of bugs found by a user
The two types of recording methods are : 
 
Context-sensitive : It is the default mode of recording that recognizes objects in the application regardless of their location on the screen. The objects are recorded in the application and the operations performed on them. 
 
Analog : This method is used for recording operations that cannot be recorded at the level of an object. 
CAST stands for Computer-Aided Software Testing which is an automated process, technique, and tool used by a computer to test software apps and programs. CAST’s performance is equivalent to thousands of users working at a time as the CAST-based tools evaluate the code using the testing tools and built-in software testing solutions.
This is a way to prioritize defects or bugs based on factors like the risk involved, defect severity, and frequency of occurrence. Triage means the degree of urgency and the role of a tester is to prioritize and resolve the bug based on its priority.
This is an add-on/extension version of the waterfall model. It has an additional feature where there is a specific corresponding testing phase for SDLC. It is an SDLC model where the execution of processes happens sequentially in a V-shape.
You can frame your own answer for this software testing interview question using the following : 
 
If someone is passionate about testing and holds the right knowledge and skills testing, it is easy to involve such a candidate in the existing project workflow. I will start with the below steps:
 
* Brief him about the project
* Involve in testing activities
* Communicate the progress
The key difference between code coverage and functional coverage are :

Code Coverage Functional Coverage
It validates the functionality of the source code It tests the functionality of design
Works on different design specifications It works on a single design specification
It is a means to check communication protocols in various domains like :
 
* Switching
* Wireless
* VoIP
* Routing
* Switching
If the enabled parameter in test annotation is selected as false, we can skip a method in TestNG.
 
Code :

@Test(enabled = false)
Cyclomatic complexity is used to measure the complexity of the software using the control flow graph of the software. The following are the steps to calculate cyclomatic complexity and test cases design are: 
 
* Construct graph with nodes and edges from code
* Identify independent paths
* Cyclomatic complexity calculation
* Design of test cases
SPICE stands for Software Process Improvement and Capability Determination. In the field of software development processes, SPICE is a standard framework for assessing the efficiency and effectiveness of the development process. IEC (International Electrotechnical Commission) and ISO (International Organization for Standardization) jointly developed SPICE.
The term 'sanity testing' refers to a subset of regression testing. The sanity testing ensures that the changes made to the code do not adversely affect the system's performance. After the software build is received, a sanity test is conducted to ensure that the changes made to the code are working correctly. As a checkpoint, this testing is used to determine whether the build can proceed with further testing. Sanity testing focuses on validating the functionality of the application rather than detailed testing.
 
Features : 
 
* It focuses on a smaller section of the application and is a subset of regression testing.
* The process is undocumented.
* Sanity testing is often unscripted.
* In this approach, limited functionalities are deeply tested.
* A tester is usually responsible for performing this task.
BVA (Boundary Value Analysis) is a black box software testing technique that uses boundary values to create test cases. Input values near the boundary have a higher probability of error, so BVA is used to test boundary values. BVA includes values at the boundaries in the test cases. If the input falls within the boundary range, then the test is positive; if it falls outside, then it is negative. There are several types of values, including maximum or minimum, inside or outside edge, and typical or error values.
Static testing is a technique in which you test the software without actually executing it. It involves doing code walkthroughs, code reviews, peer-reviews, or using sophisticated tools such as eslint, StyleCop to perform static analysis of the source code. Static testing is typically performed during software development.
Validation : It is defined as a process that involves dynamic testing of software products by running it. This process validates whether we are building the right software that meets that customer requirement or not. It involves various activities like system testing, integration testing, user acceptance testing, and unit testing.
 
Verification : It is defined as a process that involves analyzing the documents. This process verifies whether the software conforms to specifications or not.  Its ultimate goal is to ensure the quality of software products, design, architecture, etc. 

Verification  Validation 
It checks whether the software meets the specification or not. It checks whether the specification captures the customer’s needs or not.  
It is a type of static testing.  It is a type of dynamic testing. 
There is no requirement of executing the code. There is a requirement for executing the code.
This process is performed by the QA team to make sure that the software is built as per the specifications in the SRS document. This process is performed with the involvement of the testing team. 
Reviews, walkthroughs, inspections, and desk-checking are some methods that can be used in verification.  Black box testing, white box testing, and non-functional testing are some methods that can be used during validation.
It identifies the bugs or errors early in the development process. It can identify the bugs or errors that the verification process cannot catch.
It is performed before the validation process. It is performed after the verification process.
In software testing, defect cascading is the scenario in which one defect leads to the occurrence of several other defects in a program. If a defect goes unnoticed during testing or if it doesn't get reported, it has the potential to trigger other problems. The result is that multiple defects arise during the later stages of the production process.
Non-functional testing tests the system's non-functional requirements, which refer to an attribute or quality of the system explicitly requested by the client. These include performance, security, scalability, and usability.
 
Non-functional testing comes after functional testing. It tests the general characteristics unrelated to the functional requirements of the software. Non-functional testing ensures that the software is secure, scalable, high-performance, and won't crash under heavy load.