Testing


Eradicating all errors is understood as a normal part of development work. The usual way to find and fix bugs is through testing. All developers test code as they add it. No one types pages of code without testing as he or she goes. However, it takes more than these incremental syntax checks to ensure that there isn't a problem. One way to think about solving software problems is to consider how an application should be tested . These three levels of testing are important to conduct (also recommend writing a test plan prior to testing) before you upload your solution:

  1. Unit testing ” Does this one class work? This test ensures that each class meets a small set of requirements and responsibilities assigned to that class. I recommend using JUnit for unit testing (see http://www.junit.org).

  2. System testing ” Does the whole application work? This test is conducted by running the application and making sure everything works together. It is surprising how varying the sequence of button clicks, for example, can reveal a problem (caused sometimes by an attribute assignment being in the wrong place).

  3. Acceptance testing ” Will the evaluator like the application? Acceptance testing helps you uncover applications that aren't ready for submission, even though they might be bug free. Perhaps every button works, but the font color and button background color are the same, making it difficult to read the button text. Or worse , you forgot to provide a place to type search parameters.

Exception handling is covered in more depth in "Exceptions," later in this chapter, but understanding software problems in general terms first is helpful. Focusing on problems in general at the design and project management levels keeps you on track with your programming schedule. The next section begins with discussing how to manage application faults.



JavaT 2 Developer Exam CramT 2 (Exam CX-310-252A and CX-310-027)
JavaT 2 Developer Exam CramT 2 (Exam CX-310-252A and CX-310-027)
ISBN: N/A
EAN: N/A
Year: 2003
Pages: 187

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