Testing
Software Testing
Software testing is the process of evaluating a software system to identify any defects, errors, or gaps in its functionality. It is an essential part of the software development life cycle (SDLC) and aims to ensure that the software meets the specified requirements and functions correctly.
it involves a range of activities and techniques that aim to verify and validate the software's behaviour against its intended requierements and user expeditions, as well as to identify any unexpeted or undesired outcomes.
The goal of the software testing is to ensure that the software works as expected,meets quality standards, delivers value to it's users.
Types of software testing:
There are basically four types of software tesing
1.Unit testing
2.Integration Testing
3.Validation Testing
4.System Testing
1.Unit Testing
Unit testing is a type of software testing that verifies the behaviour and functionality of individual units or components of a software application, such as functions,methods, classes , libraries, framework or services. it is performed by the developers to insure that it works as intende and meets its requirements and involves writing and executing automated test cases that target specific units of code in isolation from the rest of the system.
it involves blackbox testing and white box testing.
i. Black Box Testing (unknown internal code structure)
Blackbox testing is the type of software testing in which the functionality of the software is not known. The testing is done without the internal knowledge of the products or project. Testers evaluate the system's input and output and compare tthe results with expected outcomes to determine if the software is working correctly.
This types of testing focuses on the software's behaviour, and tester does not have any knowlege of the underlying code nad internal logic.
Under blackbox testing also there are many technique to tests the software like;
(a). Graph -based Testing
it is a software testing technique that involves using graphs to model the behavior and interactions of a software syatem. Testers use these models to identify potential defects,coverage gaps , and other issues in the system.
(b). Boundary value analysis
it is a testing technique that focuses on testing values at the boundaries of the input domains. the objectives of this technique is to identify any defects that may occurs at the edge of the input range, which can help tester identify pottential issues that may occur when thee software is deployed in production.
(c). Equivalence partitioning
it is a software testing technique the involves dividing the input doamin of a syatem into equivalent classes or partitions. Testers identify the input values that produce the sme output, and test a representative value from reach partition. This approach helps in reducing the numbers of test cases and improves the efficiency of the testing purpose.
(d). cause-effect graphing
it is a testing technique that involves creating a graphical representation of fthe system's behaviour based on its input and outputs. Tester identify the einputs that cause specific behaviours or outputs and use this inforamtion to create a cause-effect graph. this approach helps in identifying the most critical scenarios for testing and can helps testers to identify abd resolve defects more quickly.
ii. White Box Testing (known internal source code)
White box testing tests the software by using the knowledge of internal data structures, physical logic flow, and architecture at the level of source code. it is aslo known as structural testing that evaluate the internal workings oa an application, including its code,design and internal logic. Testers use this technique to verify the correctness of the applicatio's code,including the expected and unexpected interaction between different parts of code.
Whitebox testing is typically performed by the developers who have knowledge of the system's internal architecture and implementation details. it can be performed at different levels of software development process, including unit testing , intergation testing and system testing. white box testing is used to ensure that the code is functioning as expected and to identify and issues that may occurs during the operation of the system.
There are many technique to perform whitebox testing such as :
(a). Basic path Testing
it is whitebox testing technique used to test the flow of control within software application. th technique involves creeating a ,mathematical model of application's control flow graph , which represents all possible sequences of execution. Testers then use this model to derive a set of test cases to ensure that all paths in the application are tested at leat once.
(b).Decision Tree
In whitebox testing , a decision tree is a graphical representation of all possible decision paths in a software appliactions. the tree is constructed based on the application's decidion-logic, with each node representing a decision point and each branch representing a possible decision outcome. Testers use the decision tree to identify the most critical decision points in the application and to create test cases to ensure that each possible decision path is tested at leat once.
(c) Control structures.
it refer to the flow of control within a software appliaction. In programming ,control structures are used to determine the order in which stattements are executed. control structuure includes conditional statements (if/else),loops(for/while) andd functional calls. testers use knowledge of the control structure in white box testing to ensure that appliaction is behaving as expected and to identify any defects or issues that may occur during execution.
2.Integration Testing
Integration testing is a type of testing that focuses on verifying the interactions and compatibility between different components or modules of thee software system. it is performed after unit testing and involves testing the integrated system to ensure that individual components work together as intended and produce the expected output.
it involves incremental testing and non-incremental testing.
i.Incremental Testing
In this approach, the software components are integrated incrementally i.e one by one,until all components are integrated and teested together as a compleete system. each incremental step includes the integration and testing of anew module,and the previously integrrated modules are tested to ensure that they are stll functioning correctly.
This testing can be done differently like;
(a). Top-Down integration testing
In this approach , the testing starts from top layer of application, which is the user interface layer, and proceeds downwards to the lower layers. this type of testing is useful for appliactions with complex architectures.
(b). Bottom-Up Integration Testing
In this approach, testing starts from the lower layers of the application and proceeds upwards to the top layer. this type of testing is suitable for applications with alarge numbers of modules.
(c). Hybrid integration Testing
This approach combine both top-down and bottom_up approach integration testing approaches, where the testing is done in both directions to eensure that all the componebts of the software appliaction are integrated and work together correctly.
ii.Non-incremental Testing
In this approach, all the components of the software applications are integrated and tested together as complete system in one go.,without any incremental steps. the advantages of non-incremental testing are that it provides a complete view if the system and it ensures that all the components work togethers as intended. However , this approach is often riskier,as it is difficult to identify the root cause of defects and fixing them can be time-consuming.
3.System Testing
System testing is the type of testing that verifies the behaviour and functionality of a complete system in a real-world environment. it is performed after integration testing and involves testing the system as a whole to ensure that it meets the specified requirements and user expectations.
it involves acceptance testing,regression testing,recovery testing,security testing,stress testing,performance testing.
i.Acceptance Testing
This type of testing is carried out to verify whether the system meets the user requirements and whether it is ready for release. It is typically performed by end-users,stakeholders, and product owners nad can take tthe form of manual or automated testing.
ii.Regression Testing
This testing is done to ensure that the changes made to the system do not negatively affect the existing functionalities. it is usually done after every new release or update.
iii.Recovery Testing
This testing is done to check the systeem's ability to recover from hardware or software failures. it helps to ensure that the system can resume normal operations after an unexpected event or crash.
iv.Security Testing
This testing is done to identify and mitigate potential security risks and vulnerabilities in the system. it helps to ensure that thee syatem is secure against cyber-attacks and unauthorized access.
v.Stress Testing
This type of testing is carriedout to assess the system's performance under high stress conditions. it helps to determine the system's breaking points and its ability to handle heavy loads and high traffic.
vi.Performance Testing
This testing is carried out to check the system's performancee,speed and responsiveness under normal or expected conditions. It helps to identify any bottleenecks,latency issues, and other performance-releeased problems in the syystem.
4. Validation Testing
it involves alpha testing and beta testing.
i. Alpha Testing
It is preliminary testing carried out by developers to insure the software's overall functionality and identify any issues before releasing it to the geeneeral public. it's a kind of in-house testing where developers test the software before its launch.
ii. Beta Testing
It is thee secondd stage of testing , in which the software is tested by group of users, known as beta testers, who are not part of the development team. The software is released to the beta testers, who then evaluate it in a real-world environment and provide feedback on the software's performance,usability and , overall user experience. the feedback received from beta testers is used to make the final adjustments and improvements to the software before it is released to the public.
Different between alpha and beta testing
=>(participants): Alpha testing is done by the software development team, while beta testing is conducted by a group of users who are not a part of the development team
=>(environments): Alpha testing is done in-house, i.e within the company's premises, while Beta testing is carried out in a real-world environment.
=>(objectives): Alpha testing is focused on identifying and fixing bugs and errors in the software, while Beta tesing is focused on evaluating the software's performance,usability and user experience.
=>(Timing): Alpha testing is carried out before the software is released to the public, while Beta testing is donee after the software's alpha testing phase is completed and before its official release.
=>(scope): alphha teesting covered limitedd numbers of users, where Beta testing is open to a large numbers of users.
=>(feedback): In alpha testing feedback is received from software development team, while in Beta testing, feedback is received from end_users.
Test case and Test suit:
In software testing, a test case is a set of instructions,conditions and inputs that are designed to verify the behaviour nad functionality of a specific feature,function or requirements of a software applications.
A test case typically includes a description of the feature being tested,thee expected output or behaviour,and the specific input values or conditions that will be used to test the feature.
A test suite , on the other hand is a collection or group of related test cases that are organized and executed together as a unit. a test suite can be used to test a specific module,component or feature of software application,or it can bee used to test the entire syystem. The purpose of a test suite is to ensure that all the related test cases are executed efficiently and effectively, and to help ensure comprehensive testing of thee software applications.
Test case design