Custom Search

Friday, December 25, 2009

Software Testing Levels

Test Level 1 : Unit Testing

In programming, unit testing is a software design and development method where the programmer to verify that the units of source code are working properly. A unit is the smallest testable part of an application. In the programming of a unit of May an individual program, function, procedure, etc, while in object-oriented programming, the smallest unit is a method, which belongs to May in a base / super class abstract class or derived / child class.
Ideally, each test case is independent of others; Double objects like stubs, mock objects or false and the test harness can be used to assist testing a module in isolation. Unit testing is usually done by software developers to ensure that the code of other developers have written meets software requirements and behaves as the developer intended.

The objective of the test is to isolate each part of the program and show that the parts are correct. A unit test provides a strict, a written contract that the piece of code must satisfy. Accordingly, it offers several advantages. Unit testing problems early in the development cycle.
* Unit testing allows the programmer to Refactor code at a later date, and make sure the module still works correctly (ie regression testing). The procedure is to write test cases for all functions and methods so that whenever a change causes a fault, it can be quickly identified and corrected.
* Readily available, unit tests make it easy for the programmer to check whether a piece of code works properly. Good product unit test design test cases that cover all paths of the unit carefully the conditions for a loop.
* In continuous unit testing environments, through the practice of maintaining inherent maintenance, unit tests will continue to accurately reflect the use of executable code from the face of change. According to the development practices in place and unit test coverage, the second of accuracy can be maintained.
* It helps eliminate uncertainty in the units themselves and can be used in a bottom-up testing style approach. By testing the parts of a program first, then testing the sum of its parts, integration testing is much easier.
* A widely debated question is in assessing the need for manual integration. While developing a hierarchy of unit tests in May appears to have achieved integration testing, which is a false sense of confidence since integration testing evaluates many other goals that can only be proved by the human factor. Some argue that a sufficient variety of test automation systems, integration of man by a group test is unnecessary. In fact, the real need ultimately depends on the characteristics of the product under development and its uses. In addition, the manual of the man or the test will depend largely on the availability of resources.
* It provides a way of life of the system documentation. Developers who want to know what functionality is provided by a unit and how the user can view the unit tests to gain a basic understanding of the unity of the API.
* Unit test cases embody characteristics that are essential to the success of the unit. These characteristics can indicate appropriate / inappropriate to use a unit as well as negative behaviors that must be trapped by the device. A unit test in itself, the essential characteristics of these documents, although many software development environments do not rely solely on the code of the document produced in development.
* On the other hand, documentation ordinary story is more sensitive to the drift of the implementation of the program and will become outdated (eg design changes, feature creep, relaxed practices for keeping documents up-to -date).
Limitations of tests
Tests can not be taken for each error in the program - it is impossible to evaluate all execution paths, for all but the most trivial programs. The same is true for unit testing. Furthermore, by definition, the unit tests that test the functionality of the units themselves. Therefore, it will not catch integration errors, or larger system-level errors (such as functions performed in multiple units, or non-functional testing areas such as performance). Unit testing is more effective when used in conjunction with other test software. Like all forms of software testing, unit testing can not show the presence of errors, it can not demonstrate the absence of errors.
Software testing is a combinatorial problem. For example, each boolean decision statement requires at least two tests: one with a result of the "real" and the other with a score of "false". Accordingly, for each line of code written, programmers often need 3 to 5 lines of test code.
To obtain the benefits of unit testing, a sense of discipline is needed throughout the software development process. It is essential to keep careful records, not only tests have been performed, but also of all the changes that were made to the source code of this unit or any other in the software. Using a version control system is essential. If a newer version of the unit is not a test it had previously adopted, the version control software can provide a list of changes to source code (if any) that have been applied to the unit since that time.
It is also essential to implement a sustainable process to ensure that the test failures are reviewed daily and processed immediately. If such a process is not implemented and ingrained into the team, the application will evolve in sync with the unit test suite - more and more false positives and reduce the effectiveness of the test suite.

Test Level 2 : Integration Testing

"Integration test" (sometimes called Integration and Testing, abbreviated I & T) is the phase of software testing in various software modules that are combined and tested as a group. It follows unit testing and precedes the test system.

Tests of integration as input modules that have been unit tested, groups larger aggregates, applies tests defined in a test plan for integration of these aggregates, and delivers its output data ready for integrated system testing.

The purpose of integration is to verify the functional tests, performance and reliability on the major design requirements of the articles. These "design objects", ie sets (or groups of units) shall be exercised through their black box using test interfaces, success and error cases simulated by appropriate parameter and data entry. Simulation of the use of shared data and areas of inter-process communication is tested and subsystems are exercised through their input interface. Test cases are constructed to verify that all components within assemblages interact correctly, for example through procedure calls or process activations, and this is done after the test individual modules, that is to say the unit tests.

The general idea is a "building block" in the check assemblies that are added to a basic check, which is then used to support the integration of new test assemblies.

Some types of integration tests are big bang, top-down and bottom-up.

Big Bang
In this approach, all or most of the developed modules are combined to form a software system or a significant part of the system and then used for integration tests. The Big Bang is very effective method to save time in the integration testing process. However, if the test cases and their results are not properly registered, the whole process of integration will be more complex and prevent the May testing team to achieve the goal of integration.

A type of "Big Bang" integration tests is called usage model testing. Usage type of test can be used in software and hardware integration. The basis of this type of integration is to launch the user tests, as the workload of the user included in similar environments. By testing in this way, the environment is the test, while the individual components are proofed indirectly through their use. Usage type of test has a optimistic approach to the test, because it expects to have some problems with individual components. The strategy relies heavily on the developers of individual components to the test unit for their products. The objective of this strategy is to avoid repeating the tests carried out by developers, and instead of flesh on the problems caused by the interaction of components in the environment. For integration tests, the tests use type can be more efficient and provides better test coverage focused more traditional functional testing. To be more efficient and accurate, care must be used in the definition of the user, as the workload to create realistic scenarios in the exercise of the environment. This gives the integrated environment works as expected for the target audience.

Bottom Up and Top Down
There are two types of integration.

1. Bottom Up

2. Top Down.

Bottom-Up Testing: An approach to integration testing where the lowest level components are tested first, and then used to facilitate testing of components at a higher level. The process is repeated until the element at the top of the hierarchy is tested.

All low or low-level modules, procedures or functions are integrated and tested. After the integration of lower level tests integrated modules, the next level of modules will be trained and can be used for integration tests. This approach is useful only when all or most of the modules of the same level of development loans. This method also allows to determine the levels of software and it is easier to report the progress of testing as a percentage.

Top Down is the procedure where the top integrated modules are tested and part of module testing, step by step, until the end of the relationship with the module. The main advantage of the database is easy to find bugs. Top to bottom, it is easy to find the missing link branch.

Any condition not specified in integration tests, apart from the confirmation of the execution of the design items are usually not tested.

Testing Level 3 : System testing

System testing of software or hardware testing is performed on an integrated system to verify and assess the system with its requirements. System testing falls within the scope of black box testing, and as such, should require no knowledge of the interior design of the code or logic.

In general, the test system has, as its entry, all the "integrated" software components that have successfully passed the integration tests and the software itself incorporated into any applicable hardware system (s). Test system is a limiting type of testing, it seeks to detect defects both within the inter-assemblages "and also in the system as a whole.

System testing is performed throughout the system as part of a functional specification (s) (FRS) and / or a System Requirement Specification (SRS). Test system is a phase of inquiry, where the emphasis is to have almost a destructive attitude and test not only the design but also the behavior and believed the same expectations. It is also intended to test and beyond the limits defined in the hardware / software specification (s). Test system includes load testing and stress testing. Once the load testing and stress tests are completed successfully, the next level of Alpha or Beta Testing Testing will proceed.

Types of system testing

The following examples are the different types of tests that should be considered during the system test:

  • GUI software testing
  • Usability testing
  • Benchmarks
  • Compatibility tests
  • Error handling test
  • Load test
  • Volume test
  • Stress tests
  • Help for usability testing
  • Testing for safety
  • Scalability tests
  • Capacity test
  • Sanity testing
  • Smoke tests
  • Test
  • Ad hoc tests
  • Regression testing
  • Reliability testing
  • Recovery test
  • Test facility
  • Maintenance Test
  • Accessibility tests

Tsting Level 4 : System Integration Test

System Integration Test (SIT) in the context of systems and software

engineering, is a testing process that exercises a software system coexistence with others. The integration of the system has multiple test systems that have made the system tests, tests for entry and their necessary interaction. After this process, the Deliverables are submitted to acceptance testing.

System integration testing (SIT) is a testing phase occurs after the unit tests and

prior to testing user acceptance (UAT).

Some of the Features of SIT:
System Integration Test (SIT) is the testing of the subsystems as a whole, to ensure that they function as a system.
The test should be guided by the requirement of the specification and system integration (SI) of the engineer's knowledge that the system should do.
No requirement to define the specifications of a system fully, they will always be gaps in what the requirement of the specification says and what is expected of a system.
This is where the experience of the engineer SI comes into play, because he / she carries out his work they need to keep your eyes open for any defects or problems. If the engineer must be aware that defects will be present, which there is through informal testing, ie the operating system and see what happens.
The SIT should ensure that the system meets the requirements of the specification of the formal and any implied or "common sense" requirements are met.
S.I.T. should also take place in different environments, for example, different temperatures. This should not be anything fancy, for example, a full environmental tests, but can be as little as possible of the airflow down, or a little, by turning the laboratory or thermostat down a little, it is amazing how small changes in the environment can affect the performance of a system.

Testing Level 5 : Acceptance Testing

In engineering and its various subdisciplines, acceptance testing is black-box testing of a system (eg software, lots of manufacture of mechanical parts, or batches of chemical products) prior to its delivery. In others, it is known that functional testing, black box testing, release acceptance, testing, quality assurance, application testing, confidence testing, testing, validation, testing of acceptance or factory.

In software development, acceptance testing by the supplier of the system is often distinguished from acceptance testing by the customer (the user or the client) before accepting the transfer of ownership. In such environments, the trials to acceptance by the customer is known as the test user acceptance (UAT). This is also known as end-user testing, the site (acceptance) test or field (acceptance) testing.

Acceptance testing generally involves running a series of tests on the completed system. Each test, known as cases, exercises a state of operation of the user's environment or feature of the system and will result in a pass or fail boolean outcome. There is generally no degrees of success or failure. The test environment is usually designed to be identical or as close as possible, provided the user to the environment, including such extremes. These test cases must each be accompanied by test case input data or a formal description of operational activities (or both) to achieve, to thoroughly exercise the specific case and a description of the results.

Acceptance Tests / Criterion (in Agile Software Development) are usually created by customers and expressed in a business language. These are high-level tests to test the compliance of a story or user stories "played" during any sprint / iteration. These tests are created preferably through collaboration between customers, business analysts, testers and developers, but business customers (product owners) are the primary owners of these tests. When the user passes the stories of their acceptance criteria, business owners can be sure that the developers are progressing in the right direction on how the application was intended to work and it is therefore essential that These tests include tests of logic, and interface elements of validation (if required).

Acceptance of test cards are perfectly created during sprint planning and iteration planning meeting, before the development so that developers have a clear idea of what to develop. Sometimes (because of poor planning) tests in May of multiple stories (that are not implemented in the same sprint) and there are different ways to test them during the sprint. A popular technique is to mock external interfaces or data to mimick other stories that could not be played during an iteration (as these stories May were relatively lower priority). A history of the user is not considered complete until the acceptance tests have passed.

Following acceptance test is directed against the entry of data or by using a test script to direct acceptance testers. Then, the results are compared with the results. If there is a good match for all cases, the test suite is said to pass. If not, the system May be either accepted or rejected in conditions previously agreed between the developer and builder.

The aim is to give confidence that the system of record of meeting the needs of both authors and users. The acceptance phase May also act as a gateway to the quality, where no quality defects to be detected in May uncovered.

A main goal of acceptance testing is that, once successfully completed, and provided that certain other (contract) are met acceptance criteria, the authors then sign on the system as satisfying the contract ( prior agreement between developer and manufacturer), and deliver final payment.

Types of acceptance testing
The types of acceptance testing are

Acceptance testing by the user
This May include acceptance testing at the factory, ie the testing facility by users before the plant is moved to its own site, after which the site acceptance testing be performed in May by users on the site.
Operational acceptance testing
Also known as operational readiness test, it is the de facto control to a system to ensure that processes and procedures are in place to allow the system to be used and maintained. This May include controls to safeguard the facilities, procedures for disaster recovery, training for end users, maintenance procedures and safety procedures.
Contract and regulation acceptance testing
Contract acceptance testing, a system is tested against the criteria for acceptance as a contract, before the system is accepted. In regulation acceptance testing, a system is tested to ensure it meets governmental, legal and safety standards.
Alpha and beta test
Alpha testing is carried out at site developers, and testing of the operating system by the staff before it is delivered to external customers. Beta testing is done to clients sites, and testing by a group of customers who use the system to their own sites and feedback before the system is handed over to other customers. This is often called the "field testing".