Unit Testing:-
Unit testing is an action used to validate that separate units of source code remain working properly.
A function, method, Loop or statement in the program is working fine. It is executed by the Developer. In unit testing, Individual functions or procedures are tested to make sure that they are operating correctly and all components are tested individually.
Unit testing is a strategy that utilizes the white-box method and concentrates on testing individual programming units. These units are sometimes specifying to as modules or atomic modules and they represent the smallest programming entity
examples- If you are testing a function; whether loop or statement in a program is working properly or not then this is called as unit testing. A beneficial example of a framework that allows automated unit testing is JUNIT (a unit testing framework for java). XUnit [20] is a more general framework which supports other languages like C#, ASP, C++, Delphi and Python to name a few.
Tests that are performed during the unit testing:-
- Module Interface test: In module interface test, it is checked whether the information is properly flowing into the program unit (or module) and properly happen out of it or not.
- Local data structures: These are tested to inquiry if the local data within the module is stored properly or not.
- Boundary conditions: It is observed that much software often fails at boundary related conditions. That’s why boundary related conditions are always tested to make safe that the program is properly working at its boundary conditions.
- Independent paths: All independent paths are tested to see that they are properly executing their task and terminating at the end of the program.
- Error handling paths: These are tested to review if errors are handled properly by them or not.
2. Functional Testing:-
Functional testing means testing the application against business requirements. Functional testing is executed using the functional specifications given by the client or by the design specifications according to use cases given by the design team. The role of functional testing is to validate the behavior of an application.
Functional testing is always concentrating on customer requirements and whereas the Non-Functional testing is always concentrating on customer expectations.
Functional and Non Functional Test Cases Functional test cases target business goals and nonfunctional test cases target performance, resource utilization, usability, compatibility etc. Functional testing is a part of system testing.
Example of functional testing…
Considering example if you are functionally testing a word processing application, a partial list of checks you would perform minimally includes creating, saving, editing, spell checking and printing documents.
Types of Functional Testing!!
- Positive functional testing: - This testing carries exercising the application’s functions with valid input and also verifying that the outputs are correct.
Example:- Again continuing with the word processing example, a positive test for the printing function might be to print a document containing both texts as well as graphics to a printer that is online, filled with paper and for which the correct drivers are installed.
Negative functional testing:- This testing involves exercising application functionality using a combination of invalid inputs, some unexpected operating conditions and by some other “out-of-bounds” scenarios.
Example:- Again continuing with the word processing example, a negative test for the printing function might be to disconnect the printer from the computers while a document is printing.
What probably should happen in these scenarios are a plain-English error message displayed, informing the user what happened and instructing him/her on how to fix the problem.
3. Integration testing:-
When individual software modules are merged and tested as a group than it is known as integration testing. Integration testing is set between Unit Testing and System Testing.
Types of Integration Testing
Top-Down Integration Testing: Top Down Integration as the term suggests, starts always at the top of the program hierarchy and travels towards its branches. This can be done in either depth-first or breadth-first.
Bottom-Up Integration Testing: Bottom –Up integration as it name implies starts at the lowest level in the program structure.
Some Techniques of integration testing: Techniques of integration testing can be given below
- Top-down testing approach
- Bottom-up testing approach
- Big-Bang testing approach
- Sandwiched testing approach
Integration Testing Example
You have to test the keyboard of a computer than it is a unit testing but when you have to combine the keyboard and mouse of a computer together to see its working or not then it is the integration testing. So it is prerequisite that for performing integration testing a system must be unit tested before.
Note:
If you want to join our whatsapp group to learn ethical hacking and programming from expert tutors and get latest tech news on your whatsapp number you can contact us on +92-3374887910. Group yearly fee is $12. Those who are interested can contact us ASAP.
Course Include:
- C Programming
- Python programming
- Ruby programming
- C++ programming
- Java programming
- Perl programming
- Java script
- web development
- Linux
- Windows
- Mac
- Networking
- Cryptography
- Mathematics
- Social Engineering
Thanks for Reading!
Comments
Post a Comment