The software life cycle is made by several phases, namely analysis, design, implementation, test, maintenance. Those phases can be combined in sequences, i.e. waterfall or in iterations, i.e. spiral, agile. Considering the importance that the quality of software has, the test phase is rising in importance. The objective of testing is to certify the correctness, completeness and reliability of the software. The software test is influenced by 5 parameters: the development model, knowledge of the code, the time of development, the level of automation and the granularity. Example of test code with Android are useful to go in depth of this concept.
The waterfall development model considers the realization of software through different stages at the end of each there is a test. If the test is passed, it is possible to proceed to the next phase. This process has drawback such as:
- if development takes more than planned, the test phase can be much shorter (possibly nothing);
- it is possible the tests are not included at all;
- if the time between the error detection and error solving grows, it becomes more difficult and costly to solve.
For this reason in the 90’s the test driven model grew in popularity. With this approach, the requirements are completed with test cases; the software is written together with tests to automatized the process and to further check if new software can generate problems to the existing one. In this way, test and source code are seen as a unique part of the implementation.
The other test parameters
Depending on the maturity of the software, the test phase could be Alpha, Beta etc. The Alpha test is the first one to the whole software, it is the first to have done and it is generally internal to the organization and made by the developers themselves. If the product is reasonably stable, it is launched to the market and users are invited to give feedback about it. That is the Beta version of the software.
The granularity of the test saves a great quantity of time. Testing the final version of a big product can give errors that are then difficult to solve. Therefore the best approach is to divide the software in elements with different granularity and test them from the smallest to the biggest. The smallest elements to test are the classes of the software. Only if each class is performing as expected, is possible to proceed with more complex test. Unit test are elementary tests focused on that. The bigger element of software after the class is the module, where more than one class is combined together. To test modules, other modules are created: these are the stub. If also the module test is performing fine, the system test is finally required.
Knowledge of the code divides type of tests into white and black box. The white box tests are made by the individuals who have knowledge of the code and can see into the code itself to correct error and test every functionality. It has a deep level of details and easier to automatize. On the other side, the software can be seen externally, without knowledge about its operation: black box test. Those kind of test can be made by users or not code experts.
Type of test
Type of test are performance, load/volume and stress. Those are executed accordingly to the objective of the software. The performance test is about correctness and efficiency of the product. Every requirements must be met. The load/volume testconcerns the use of a lot of resources for the software. It could a high number of users, a big file, a big job to a printer, or a zero-volume testing with empty tasks to stress this limit case. It aims to test the management of the memory during the activities. Thestress test is an attempt to break the system introducing non predictable elements that generate chaos. It could be done using double users all at once; turning off some devices via SNMP; using resources.
The test phase of the software life cycle is part of the development blueprints. It is so important to make adopting a different software development model. Other elements that create a robust software concerns the granularity of the test, knowledge of the source code and the type of test to execute. Putting all together the goal is produce a software that has good quality and positive impact on the users.