To assure and maintain the quality of software and to represent the ultimate review of specification, design, and coding, Software testing is required. There are different levels of testing • Unit Testing: In this type of testing, errors are detected individually from every component or unit by individually testing the components or units of software to ensure that they are fit for use by the developers. It is the smallest testable part of the software. • Integration Testing: In this testing, two or more modules which are unit tested are integrated to test i.e., technique interacting components, and are then verified if these integrated modules work as per the expectation or not, and interface errors are also detected. • System Testing: In system testing, complete and integrated Softwares are tested i.e., all the system elements forming the system are tested as a whole to meet the requirements of the system. • Acceptance Testing: This is a kind of testing conducted to ensure that the requirements of the users are fulfilled before its delivery and that the software works correctly in the user’s working environment. Unit Testing Unit Testing is a fundamental aspect of software testing where individual components or functions of a software application are tested in isolation. This method ensures that each unit of the software performs as expected. By focusing on small, manageable parts of the application, unit testing helps identify and fix bugs early in the development process, significantly improving code quality and reliability. • Objective of Unit Testing • The objective of Unit Testing are follows • To isolate a section of code. • To verify the correctness of the code. • To test every function and procedure. • To fix bugs early in the development cycle and to save costs. • To help the developers understand the code base and enable them to make changes quickly. • To help with code reuse. Types of Unit Testing There are 2 types of Unit Testing: • Manual Testing • Automation Testing Manual unit testing • Manual testing is like checking each part of a project by hand, without using any special tools. People, like developers, do each step of the testing themselves. But manual unit testing isn’t used much because there are better ways to do it and it has some problems: • It costs more because workers have to be paid for the time they spend testing, especially if they’re not permanent staff. • It takes a lot of time because tests have to be done every time the code changes. • It is hard to find and fix problems because it is tricky to test each part separately. • Developers often do manual testing themselves to see if their code works correctly. Types of Unit Testing Automated unit testing • Automated unit testing is a way of checking if software works correctly without needing lots of human effort. We use special tools made by people to run these tests automatically. These are part of the process of building the software. Here’s how it works: • Developers write a small piece of code to test a function in the software. This code is like a little experiment to see if everything works as it should. • Before the software is finished and sent out to users, these test codes are taken out. They’re only there to make sure everything is working properly during development. • Automated testing can help us check each part of the software on its own. This helps us find out if one part depends too much on another. It’s like putting each piece of a puzzle under a magnifying glass to see if they fit together just right. • We usually use special tools or frameworks to do this testing automatically. These tools can tell us if any of our code doesn’t pass the tests we set up. • The tests we write should be really small and focus on one specific thing at a time. They should also run on the computer’s memory and not need internet connection. Workflow of Unit Testing
Unit Testing Techniques
• There are 3 types of Unit Testing Techniques. They are follows • Black Box Testing: This testing technique is used in covering the unit tests for input, user interface, and output parts. • White Box Testing: This technique is used in testing the functional behavior of the system by giving the input and checking the functionality output including the internal design structure and code of the modules. • Gray Box Testing: This technique is used in executing the relevant test cases, test methods, and test functions, and analyzing the code performance for the modules. Integration Testing • Integration testing is the process of testing the interface between two software units or modules. • It focuses on determining the correctness of the interface. • The purpose of integration testing is to expose faults in the interaction between integrated units. • Once all the modules have been unit-tested, integration testing is performed. Integration Testing Big-Bang Integration Testing • It is the simplest integration testing approach, where all the modules are combined and the functionality is verified after the completion of individual module testing. • Big-bang integration testing is a software testing approach in which all components or modules of a software application are combined and tested at once. • This approach is typically used when the software components have a low degree of interdependence or when there are constraints in the development environment that prevent testing individual components. Integration Testing Bottom-Up Integration Testing • In bottom-up testing, each module at lower levels are tested with higher modules until all modules are tested. • The primary purpose of this integration testing is that each subsystem tests the interfaces among various modules making up the subsystem. • This integration testing uses test drivers to drive and pass appropriate data to the lower-level modules. Integration Testing Top-Down Integration Testing • Top-down integration testing technique is used in order to simulate the behaviour of the lower-level modules that are not yet integrated. • In this integration testing, testing takes place from top to bottom. • First, high-level modules are tested and then low-level modules and finally integrating the low-level modules to a high level to ensure the system is working as intended. Integration Testing Mixed Integration Testing • A mixed integration testing is also called sandwiched integration testing. • A mixed integration testing follows a combination of top down and bottom-up testing approaches. • In top-down approach, testing can start only after the top-level module have been coded and unit tested. • In bottom-up approach, testing can start only after the bottom level modules are ready. • This sandwich or mixed approach overcomes this shortcoming of the top-down and bottom-up approaches. • It is also called the hybrid integration testing. also, stubs and drivers are used in mixed integration testing. System Testing • System testing is a type of software testing that evaluates the overall functionality and performance of a complete and fully integrated software solution. • It tests if the system meets the specified requirements and if it is suitable for delivery to the end-users. • This type of testing is performed after the integration testing and before the acceptance testing. System Testing Process Types of System Testing • Performance Testing: Performance Testing is a type of software testing that is carried out to test the speed, scalability, stability and reliability of the software product or application. • Load Testing: Load Testing is a type of software Testing which is carried out to determine the behavior of a system or software product under extreme load. • Stress Testing: Stress Testing is a type of software testing performed to check the robustness of the system under the varying loads. • Scalability Testing: Scalability Testing is a type of software testing which is carried out to check the performance of a software application or system in terms of its capability to scale up or scale down the number of user request load. Acceptance Testing It is formal testing according to user needs, requirements, and business processes conducted to determine whether a system satisfies the acceptance criteria or not and to enable the users, customers, or other authorized entities to determine whether to accept the system or not. Types of Acceptance Testing • User Acceptance Testing (UAT) • Business Acceptance Testing (BAT) • Contract Acceptance Testing (CAT) • Regulations Acceptance Testing (RAT) • Operational Acceptance Testing (OAT) • Alpha Testing • Beta Testing