Monday, 28 March 2016

Software Testing Interview Questions

Software Testing Tutorial

Hi friends,
hope you all are doing good. Today here i am posting some important stuff for interview purpose, so that you can go through these stuffs and get a good response during interview process.
interview ques

Question 1: What is Software/System Testing?
Answer: Software Testing is a process of checking the correctness and completeness of a S/W with regard to customer requirements and expectations is called a Software or System Testing.

Question 2: What is Software?
Answer: Software is a set of executable programs in our computer.

Question 3: What is a Program?
Answer: Program is a set of executable statements.

Software Application V/s Software Product :-

Software Application:- If a s/w is developed for a specific customer or user with regard to their requirements, then it is called software application.

Software Product:- If a s/w is developed for multiple customers or users with regard to their requirements, then the software is called software product.

Manual Testing :- Manual Testing is a process in which Tester test an application, software or system manually. In other words, testing an application without using any Automation tool  i.e. QTP, Selenium etc. is called a Manual Testing 

Define Software :- Software is a set of executable programs in our computer. Software is classified into three categories :-
1. System Software.
2. Programming Software.
3. Application Software.

  • System Software :- A software that provides a platform, on which application software can actually execute. Example of System Software is, Operating System, Servers etc.
  • Programming Software :- A software offering programming and application tools that a developer can use to debug and maintain applications. Example of Programming Software is, Compiler, Debuggers and Interpreters.
  • Application Software :- A group of programs that provides the computer a compatibility to execute data processing tasks for a specific user. Example of Application Software is, Internet Browser and Mobile gaming software.  
Software Testing :- Software Testing is a process of checking the correctness and completeness of a S/W with regard to customer requirements and expectations is called a Software or System Testing.
                                                 OR
Software Testing is a process of determining whether the product developed by developer is a quality product and to assure that the developed product is working as per customer requirements and specifications.
                                 
                                          Testing v/s Debugging
Testing :- Testing is a process or set of activities performed with an intent to identify errors or defects in the software under test.
Debugging :- Debugging is the process of fixation of errors or defects by the developers.

                                  -: Testing Principles :-  
Being a Software Tester we have to aware about Testing Principles which are given below:-
1. Testing shows presence of defects.
2. Exhaustive testing is impossible.
3. Early Testing.
4. Defect Clustering.
5. Pesticide Paradox.
6. Testing is Context Dependent.
7. Absence-of-error-fallacy. 
Let's discuss each Testing Principle in details :-

  • Testing shows presence of defects :- Testing can only show that defects/bugs are there in the application, but can not prove that there are no defects/bugs. Testing reduces the probability of undiscovered defects present in the software, however, even if no defects/bugs are found in an application, it is not a proof of correctness.
  • Exhaustive testing is impossible :- Testing everything (all combinations of module and preconditions) is not possible. However, instead of exhaustive testing we use risks and priorities to focus testing efforts.
  • Early Testing :- Testing should start at the early phase of the Software Development Life Cycle (SDLC) and should be focused on defined objectives.
  • Defect Clustering :- A small number of modules contains bunch of defects.
  • Pesticide Paradox :- If the same tests are repeated constantly, eventually the same set of test cases will not be able to find any new bugs. Therefore to overcome this Pesticide Paradox situation, testers must regularly revised and reviewed the test cases.
  • Testing is Context Dependent :- Testing is context dependent. It means testing is done differently in different context. For example:- safety critical software is tested differently from an E-Commerce site.
  • Absence-of-error-fallacy :- Detecting and fixing defects does not help if the system built is not usable and does not fulfill the user's requirements and expectations.
                               Objectives of Testing :-
There are few objective of Testing which we know about :-
1. Gathering information/Requirement from client or end-user.
2. Tester must have Domain Knowledge.
3. Tester must have testing tools and technology knowledge.
4. To identify defects.
5. To ensure product correctness.
6. To ensure quality improvement of the product. Or Increase quality.
7. To make sure software works according to the customer requirements and specifications.
8. To reduce the failure risk.
9. Adhere time duration.
10. Must be creative.
11. Must have strong analytical skills.
                                 
                                     Tester :- An Introduction
A professional, who exercises software testing is known as a Tester.
Characteristics of Tester :-
1. Creative Thinker.
2. Ability to take the point of view of the end-user.
3. Creative intent with destructive approach.
4. Must be aware of the testing techniques and tools.
5. Must posses the domain knowledge.
Roles and Responsibilities of a Tester :-
There are misconception about responsibilities of a tester that he/she fixes the defects. Testers initial responsibilities are to :-
1. Design and develop test cases.
2. Execute test cases.
3. Perform defect isolation and reporting.

  • Difference between Error, Defect/Bug & Failure :-
Error :- Any incorrect human activity or action that produces a problem in the system is called an Error.
Fault/Defect/Bug :- Deviation from expected behavior to the actual behavior of the system is called Defect/Bug.
Failure :- The deviation identified by the end-user while using the software or system is called Failure.
Note :- [Bug is nothing but a technical slang used for a defect..]  

  • Reason of defects in Software :-
1. Incorrect Requirement
2. Wrong/Poor Design.
3. Poor coding.
4. Complex Business Logic.
5. Complex Technology.
6. Work Pressure.
7. Frequently changing in Requirements.

  • When software testing should start?
A most frequent and important question asks in interview as well as arise in the SDLC phase that "When should start a software testing?"
So, Testing starts as early as initial phase i.e. Requirement gathering phase and continues till Release/Maintenance phase. The purpose of testing as early in the requirement phase, because if we found any defect or issue in the later phase of SDLC, then the cost of fixing bugs is raised. Therefore, to overcome from this situation, we must need to start testing at the right from the initial phase of SDLC.

  • When to stop Testing?
Another most important question from interview perspective is:- "When to stop testing?"
Here are few things we should keep in our mind before stop Testing of any application or product:-
1. Bug rate reaches below down a certain level.
2. Tester should stop testing when testers are not getting high priority bugs.
3. Stop when tester meets the project deadline.  
4. Less ratio of critical bugs.
5. Test budget has reaches its limit. Or comes to an end.
6. Stop when Alpha testing and Beta testing gets completed.
7. Stop when code/design, functionality and requirement reaches a specific point.

  • What is Review, Walkthrough, Peer Review and Inspection? 
1. Review :- Review is a testing technique to verify correctness and completeness of documents. Such as BRS, SRS, HLD and LLD.

Note:- We will discuss BRS, SRS, HLD and LLD later on..

2. Walkthrough :- 
Walkthrough is also a testing technique to Study a document from first to last for its correctness and completeness.

3. Peer Review :- The comparison of two similar documents point-to-point for its completeness and correctness.
4. Inspection :- Inspection is a process of searching a specific factor in documents is called an Inspection.

  • What is PIN (Product/Project Initiation Note) in Testing?
PIN is a document consists of proposal and overall plan to develop a new Software(s/w). 

    • Software Development Life Cycle (SDLC) :- Software Development Life Cycle (SDLC) process is a model plan by which we assure/plan that how to create, develop, implement and eventually close the software.                                                                       OR                                                                        
    • It is a process outlining how the software will born, raised and eventually retired from its functioning.

    In Simple words :- Software Development Life Cycle (SDLC) is a complete plan or process that define the stages and steps to develop a Quality Software.
    Proper understanding of the stages involved in the SDLC process ensure timely development of software product.
    Here are the different stages which we have to gone through in the Software Development Life Cycle (SDLC) process are shown below in the form of image :-

                                    SDLC Life Cycle

    Let us explain each stages here:-

    1. Requirement Gathering/Analysis :- In this initial phase Top level management of the development company or a Business Analyst will collect all the information from the end-user or customer. Then prepare BRS and SRS documents.
    BRS (Business Requirement Specification):- BRS is nothing but a document which consists of correct and complete requirements to develop a new s/w.
    SRS (Software/System Requirement Specification):- SRS is also a document that specifies the, how to develop a new s/w.

    2. Design :- In design phase HLD document and LLD document is prepared.
    HLD (High Level Design or Architectural Design):- This document provides overall architecture of s/w in diagrammatic notation.
    LLD (Low Level Design):- This document specifies internal logic of each and every module or functionality in diagrammatic notation.

    Note:[HLD is software Level, and LLD is Module LEvel Design].

    3. Coding :- In this phase coding part is started. This is one of the longest phase of SDLC. Coding phase is also known as Development phase.

    4. Testing :- Testing phase is basically done by Testers or Test Engineers. In this phase testers performed different kind of testing. In this, testers assure by testing an application that the build given by developer to the testing team is fulfill end-user expectations.

    5. Implementation :- After testing the software developer and tester will deploy and implement the developed software or application for the customer or end-user use. This phase also known as a Deployment phase.

    6. Maintenance :- After deployment of an application or product on customer end, customer starts using that application or product. So if any changes is required further, it comes under Maintenance. In short:- We as a software company care and support of that developed product or an application. This phase also known as a Support phase.

    Software Development Models or Methodologies :- Models are the process or methodologies that are being used for developing a software or project depending on the software or project aims and goals. In short:- Models are the simplification of the overall process to develop a software/project.There are multiple software development models or methodologies available for developing a software:
    1. Waterfall Model
    2. V Model
    3. Incremental Model
    4. RAD Model
    5. Agile Model
    6. Iterative Model
    7. Spiral Model 
    Choosing right model for developing a software/project is very important. Now a days Agile methodology is most popular and used model in the market. Waterfall Model is very traditional model.

    Let's discuss each models in detail:-
    1. Waterfall Model :- The Waterfall model is a popular and traditional version of the SDLC model for developing software. It specifies a sequential flow which the software must undergo.
    Imagine a waterfall on the cliff of a steep mountains, once the water has flowed and begun its journey down the side, it can not turn back. The same case with the Waterfall model, once a development phase is completed the development proceeds to the next phase and there is no back tracking possible.
    The phases of Waterfall model are :-
    1. Requirement Gathering/Analysis
    2. Design
    3. Coding
    4. Testing
    5. Implementation
    waterfall model

    1. Requirement Gathering/Analysis :- In this phase business analyst gather information about what the customer needs, and analysis all aspect related to requirement and other details. All the information collected from the customer is captured in a formal document called System Requirement Specification(SRS). Which serves as an input to the next phase.
    2. Design :- In this phase we define the hardware and software architecture, components, modules, interfaces and data to satisfy the requirement specified in the SRS documents.
    3. Coding :- Based on the system design document the developers starts coding. The system is developed in units. Complete integration of small units is performed to create the final software package.
    4. Testing :- In this phase, both units and integrated once are verified to ensure that they are error free and meet the customer requirements which is given in the SRS document.
    5. Implementation :- In this phase we deploy the developed product in its target location/environment. This task is performed by developers with the help of some tools like compilers, debuggers, interpreters etc.

    Advantages of Waterfall model :- 
    1. Simple and easy to use and understand.
    2. It works for small projects where requirements are clearly defined.
    3. Project under control.
    4. Predefined outputs at every cycle.
    5. Early identifucation of slippage if any.

    Disadvantages of Waterfall model :- 
    1. Poor for long and large projects
    2. Risk chances is higher
    3. Backtracking is not possible
    4. Not feasible for complex projects
    5. Customer requirement may change

    2. V Model :- V Model testing means "Verification and Validation Model". Like the Waterfall model, the V shaped life cycle is a sequential path of execution of processes. Each phase should be completed before the next phase begins. Testing of the product is done parallel with a corresponding phase of SDLC. That is also called Review, Inspection or Static Testing.
    When to use V Model :-
    Where time and cost is the constraints of the project then, we can use such models for quick and cost effective delivery. In comparison with Waterfall model, V model is more or less the same, but the activity of testing starts very early. Whcih leads to less time and cost of the project.
    v model


    Let's discuss Verification and Validation Phase in detail :- 

                              Verification Phase :-

    1. BRS (Business Requirement Specification) :- This phase includes studying the product requirements from the customer perspective.
    2. SRS (System Requirement Specification) :- Deals with understanding and detailing the hardware and communication setup for the product under development.
    3. HLD (High Level Design) :- SRS can be broken down further into modules taking up different functionality which is also referred to as High Level Design. It is also called Architectural Design.
    4. LLD (Low Level Design) :- The internal design for all the system modules is listed out and is also known as LLD. It is also called Module Design.
    5. Coding :- In this phase developer writes code.

                                  Validation Phase :-

    1. Unit Testing :- Unit test cases that were created in the Low Level Design phase are executed in Unit Testing. Unit Testing is conducted by developers only. In this testing, developer test code to find out any bugs or problem in the particular unit or module.
    2. Integration Testing :- In Integration Testing the integration test cases which were created in the Architectural or High Level Design phase are executed. In this phase, we integrate more then one unit or module together to find out any cause or bug during  the interconnection of different different units or modules together. This phase is conducted by developer and tester both.
    3. System Testing :- In System Testing functional and non-functional test cases are executed. This testing is associated with System Requirement Specification (SRS) phase. In this tester checks the entire system for its correctness and completeness.
    4. Acceptance Testing :- Acceptance Testing is conducted to make sure that the Business Requirement Specification (BRS) are met in the user environment. In this testing we also uncover the compatibility and non-functional issues like performance, load, stress etc.

    Advantages of V-Model :- 
    It is very good approach to choose V-Model, where projects are small and easy to understand. As it is very easy to use.
    In V-Model one phase is completed before the next phase is begin.
    Works well where Requirements are clearly defined.
    * Easy to manage due to robustness of the model.
    Disadvantages of V-Model :-
    High risk and less flexibility.
    * Not a good model for large and complex projects.
    * Not good where requirements are frequently change.
    * Working software is not available until the last phase of the life cycle.