X

Join Our WhatsApp Group to get latest updates

Join Now

Software Testing

Software Testing
  •  8.1 Testing process 
  •  8.2 Some important terminologies 
  •  8.3 Unit testing 
  •  8.4 Integration testing 
  •  8.5 System testing 
  •  8.6 Regression Testing 
  •  8.7 Performance testing 
  •  8.8 White Box testing and black box testing 
  •  8.9 Acceptance testing 
  •  8.10 Alpha and Beta testing 
  •  8.11 Debugging techniques, tools and approaches


Introduction:- 

Testing is the process of executing a program with the aim of finding errors. To make our software perform well it should be error-free. If testing is done successfully it will remove all the errors from the software.

Types of Testing:-

1. Unit Testing 

It focuses on the smallest unit of software design. In this, we test an individual unit or group of interrelated units. It is often done by the programmer by using sample input and observing its corresponding outputs. Example:

 a) In a program we are checking if loop, method or function is working fine 

 b) Misunderstood or incorrect, arithmetic precedence. 

 c) Incorrect initialization 


2. Integration Testing 

The objective is to take unit tested components and build a program structure that has been dictated by design. Integration testing is testing in which a group of components is combined to produce output.  Integration testing is of four types:

 (i) Top-down 

(ii) Bottom-up 

(iii) Sandwich 

(iv) Big-Bang Example 

a) Black Box testing:- It is used for validation. In this we ignore internal working mechanism and focuse on what is the output?. 

 (b) White Box testing:- It is used for verification. In this we focus on internal mechanism i.e. how the output is achieved? 


White Box Testing: 

 It is also called Glass Box, Clear Box, Structural Testing. White Box Testing is based on the application’s internal code structure. In white-box testing, an internal perspective of the system, as well as programming skills, are used to design test cases. This testing is usually done at the unit level.


System Testing 

This software is tested such that it works fine for the different operating systems. It is covered under the black box testing technique. In this, we just focus on the required input and output without focusing on internal working. In this, we have security testing, recovery testing, stress testing, and performance testing Example: 

 This include functional as well as non functional testing


3. Regression Testing 

 Every time a new module is added leads to changes in the program. This type of testing makes sure that the whole component works properly even after adding components to the complete program. Example 

 In school record suppose we have module staff, students and finance combining these modules and checking if on integration these module works fine is regression testing 

4. Acceptance Testing 

When the software is ready to hand over to the customer it has to go through last phase of testing where it is tested for user-interaction and response. This is important because even if the software matches all user requirements and if user does not like the way it appears or works, it may be rejected. 

Types of Acceptance Testing:


5. Alpha Testing 

This is a type of validation testing. It is a type of acceptance testing which is done before the product is released to customers. It is typically done by QA people. Example:  When software testing is performed internally within the organization


6. Beta Testing 

The beta test is conducted at one or more customer sites by the end-user of the software. This version is released for a limited number of users for testing in a real-time environment Example:  When software testing is performed for the limited number of people 


7. Performance Testing 

It is designed to test the run-time performance of software within the context of an integrated system. It is used to test the speed and effectiveness of the program. It is also called load testing. In it we check, what is the performance of the system in the given load. Example:  

Checking number of processor cycles.


Debugging :

Debugging is the process of finding and resolving defects or problems within a computer program that prevent correct operation of computer software or a system.

Need for debugging: Once errors are known during a program code, it’s necessary to initial establish the precise program statements liable for the errors and so to repair them.


Challenges in Debugging:

There are lot of problems at the same time as acting the debugging. These are the following: 

  • Debugging is finished through the individual that evolved the software program and it’s miles difficult for that person to acknowledge that an error was made. 
  • Debugging is typically performed under a tremendous amount of pressure to fix the supported error as quick as possible. 
  • It can be difficult to accurately reproduce input conditions. 
  • Compared to the alternative software program improvement activities, relatively little research, literature and formal preparation exist at the procedure of debugging. 


Debugging Approaches: 

The following are a number of approaches popularly adopted by programmers for debugging.

Brute Force Method: 

This is the foremost common technique of debugging however is that the least economical method. during this approach, the program is loaded with print statements to print the intermediate values with the hope that a number of the written values can facilitate to spot the statement in error. This approach becomes a lot of systematic with the utilisation of a symbolic program (also known as a source code debugger), as a result of values of various variables will be simply checked and breakpoints and watch-points can be easily set to check the values of variables effortlessly. 


Backtracking: 

This is additionally a reasonably common approach. during this approach, starting from the statement at which an error symptom has been discovered, the source code is derived backward till the error is discovered. sadly, because the variety of supply lines to be derived back will increase, the quantity of potential backward methods will increase and should become unimaginably large so limiting the utilisation of this approach.


Cause Elimination Method: 

In this approach, a listing of causes that may presumably have contributed to the error symptom is developed and tests are conducted to eliminate every error. A connected technique of identification of the error from the error symptom is that the package fault tree analysis. 


Program Slicing: 

This technique is analogous to backtracking. Here the search house is reduced by process slices. A slice of a program for a specific variable at a particular statement is that the set of supply lines preceding this statement which will influence the worth of that variable 


Debugging Tools: 

Debugging tool is a computer program that is used to test and debug other programs. A lot of public domain software like gdb and dbx are available for debugging. They offer console-based command line interfaces. Examples of automated debugging tools include code based tracers, profilers, interpreters, etc. Some of the widely used debuggers are: 

  • Radare2 
  • WinDbg 
  • Valgrind 

Post a Comment

Previous Post Next Post