Application Testing

Application testing must be performed in order to ensure that an application is capable of proper function, even if presented with invalid or conflicting data. It also provides a simple measure of base functionality within the expected operational environment. Automated alpha-phase testing may be done using code-based agents based on classes within the System.Diagnostics namespace of the .NET Framework. Test users often perform additional human-interaction testing during the beta-testing phase.

graphics/note_icon.gif

Testing can only prove that specific bugs exist. It cannot prove that an application is entirely free of errorsonly that no known bugs remain .


Testing should include each module when the code is first created (unit testing); then combinations of modules should be tested as each module is integrated into the application (integration testing). Testing is also crucial after a correction or update has been performed in order to ensure that the changes have not introduced new errors or caused unexpected results (regression testing).

graphics/tip_icon.gif

Stubs are often used during unit-level testing of individual modules and classes. A stub is a replacement code segment that automatically returns the correct response when called by the module under test. This avoids extensive processing and the data-access overhead generated by calling the actual codeassuming that the code even exists. In cases where multiple developers are working on separate portions of an application, stubs may be mandated during the independent development of various portions of the application.


When planning for a test, you need to determine which software segment or functionality will be tested, what approach will be used during testing, what constitutes a success or failure within the testing boundaries, and who the responsible individuals will be during testing. Reporting and documenting during testing, including both successful and failed results, are important parts of the complete documentation for your application.

Testing should include a measure of three key elements of operation:

  • Correctness When given a known set of valid data, the application should produce the expected result. This element tests whether an application is functioning correctly.

  • Reliability When provided valid data repeatedly, the application should produce the expected result for each iteration. This element tests whether an application can function in repeated use, assuring that values are not held over from one iteration to the next .

  • Robustness When provided with invalid data, the application should be able to prevent invalid input or raise an error during improper operation. This element ensures that the application can cope with invalid data.

The following sections discuss three forms of testingunit testing, integration testing, and regression testing.

Unit Testing

Unit testing involves the testing of a single code module or class. This level of testing ensures that each module can perform properly alone and allows testing to be conducted before other code segments may have been created. This approach also limits the scope of testing to a smaller segment of code and makes it possible to test modules of very resource- intensive applications without heavily loading the development server.

Integration Testing

Integration testing ensures that all modules work with one another within an application by locating errors that may arise between code segments. Integration testing is performed in several ways:

  • Bottom-up This approach begins at the unit level and then progresses to increasingly more complex levels of integration.

  • Top-down This approach involves testing the full functionality of the application by using stubs for modules still under development. Focused testing can then be performed on smaller subsystems and code modules in order to eliminate any identified errors.

  • Umbrella This approach involves testing specific units and their integration, while leaving other modules represented by stubs. It is therefore a combination of bottom-up and top-down testing.

Which method of integration testing you use is largely a matter of personal preference. Bottom-up testing is most useful on large applications, where substantial code may be available before the entire application is sufficiently finished to be tested. Top-down testing is useful when there is a main code path that's finished while other code is still being written. Umbrella testing is often used when an application is to be released in a limited form, with additional functionality added in successive versions as more elements are tested and integrated into the product.

Regression Testing

Regression testing is performed each time a change is made to an application to ensure that the modification has not introduced new errors into the application and that the change provides the desired result. Regression testing takes place throughout an application's lifecycle, both during development and when an application is being upgraded or patched.

graphics/alert_icon.gif

When testing an international application, make sure you are using either Unicode or the proper code page for each language and that you test the application using each set of localization settings.




Developing and Implementing WindowsR-based Applications with Visual BasicR. NET and Visual StudioR. NET Exam CramT 2 (Exam 70-306)
Developing and Implementing WindowsR-based Applications with Visual BasicR. NET and Visual StudioR. NET Exam CramT 2 (Exam 70-306)
ISBN: N/A
EAN: N/A
Year: 2002
Pages: 188

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net