Added by Kerry Lamb, last edited by Kerry Lamb on Jun 27, 2007  (view change)

Labels:

Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.

Testing to ensure that the edits, processes, and outputs conform to the specification or expectation. This level of testing is concerned with the entire system, not just small pieces or units of code. A common way of differentiating between unit testing and functional testing is to ask whether the order of the tests matters. If the order matters, the test is part of functional testing

Definition

Functional testing is the level of testing which is concerned with the entire system, not just small pieces or units of code. The entire application is tested to ensure that the edits, processes, and outputs conform to the specification or expectation. This is more than just a sum of unit tests, because functional testing finds those errors where integration fails. A common way of differentiating between unit testing and functional testing is to ask whether the order of the tests matters. If the order matters, the test is part of functional testing.

Functional testing is frequently done as black-box testing where the testing ignores the internal mechanism of the system or component and focuses solely on the outputs generated in response to selected inputs and execution conditions.

There are many free and commercial products that support functional testing.

When to Start

Functional tests are defined and executed when the units of the application are considered complete. If portions of the application are changed after testing has begun, the testing is usually considered invalidated and should be repeated. White box testing relaxes that requirement slightly, in that tests known to be unaffected by the changed code can be considered as still valid.

When the code or environment is modified, functional tests are repeated. Automated functional testing allows a reliable repetition of all the tests.

Examples and Ideas

Web Pages and DFDS forms

Human entry forms typically require significant error trapping. Functional tests usually include supplying each field with a valid value, an empty value, an invalid value, and any edge conditions such as zero, negative, very large number or string, special characters including apostrophes, etc. Each navigation button must also be tested. An automation tool that captures and plays back keystrokes may be useful in reducing the effort in repeating tests for these kinds of units. Microsoft's ACT is one such tool, and Microsoft's new Team product includes a tool for testing web pages. Another free tool, HttpUnit, is a set of java classes that emulate a browser and allows java test code to examine the responses. It can be incorporated with JUnit to write a test suite.
A useful method of doing functional testing without a testing tool is to build a spreadsheet of all the cases to be tested. This spreadsheet should identify every field, navigation item, and display element in the application to be tested and specify the action to be taken and the result to be expected. See the example spreadsheet at registration_tests.xls to see how the tests for a Web function composed of three pages.

SQL

A Data Transformation Service (DTS) can be tested on the development or evaluation servers directly from within Enterprise Manager. A complete functional test would also test the job script to ensure the UDL and other required tools are in place.

C# and Java

Functional testing is performed at the application level, so the language used to write the application should be immaterial.

COBOL

Batch programs in COBOL are typically tested by creating an input file of correct data and a WFL to process that file. The file should be modified to have invalid data to test each field for proper edits. If the program updates the database, it may be necessary to roll back the database to an initial condition before each subsequent run of test data.

External Interface or Data Exchange Testing

A subset of functional testing, this verifies the exchange of data between two or more entities (e.g., systems or organizations or applications). See External Interface Testing for more details.

Tools and Reviews

Survey of Web Application Testing Tools

Local Resources

Expected Costs

Functional testing is fundamental to the development process and needs to be a separate line item in the project workplan. If the application had good unit testing, the functional testing should take much less time than if there was not good unit testing.

Expected Benefits

Functional testing ensures the delivery of a working product. Failure to test is unprofessional, at best.