20-29 - Announcements Lecture 20 Assignment 3 Write down...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Announcements Lecture 20 Assignment 3 Write down stats Exam 1 wed. bring student ID and pencils Friday off Topics for today: Finish Testing (part 4) More UML Review for exam Testing Tips for Systems Most of the time, you will test systems that contain collections of classes, each with several methods If a method implements an interface, its specification should document input parameters and expected results Carefully document each method parameter and class attribute using comments as you write the code Leave a trace of execution by displaying the method name as you enter it Display values of all input parameters upon entry to a method Display the values of any class attributes that are accessed by this method Display the values of all method outputs after returning from a method Plan for testing as you write each module rather than after the fact Developing the Test Data Test data should be specified during the analysis and design phases for the different levels of testing: unit, integration, and system In black-box testing, we are concerned with the relationship between the unit inputs and outputs There should be test data to check for all expected inputs as well as unanticipated data In white-box testing, we are concerned with exercising alternative paths through the code Test data should ensure that all if statement conditions will evaluate to both true and false (branch coverage) Check special cases called boundary conditions Using a Test Framework A test framework is a software product that facilitates writing test cases, organizing the test cases into test suites, running the test suites, and reporting the results A test framework often used for Java products is JUnit , an open-source product that can be used in a stand-alone mode and is available from http://www.junit.org Testing in Review Program testing is done at several levels starting with the smallest testable piece (called a unit) Integration testing: once units are individually tested, they can then be tested together System testing: once the whole program is put together, it is tested as a whole Acceptance testing involves testing in an operational manner demonstrating its functionality Black-box testing tests the item based on its functional requirements without knowledge of its internal structure White-box testing tests the item using knowledge of its internal structure Various other tools and techniques are used Preparations for Testing A test plan should be developed early in a project http://www.faqs.org/faqs/software-eng/testing-faq/section-18.html http://en.wikipedia.org/wiki/IEEE_829 Aspects of a test plan include deciding how the software will be tested, when the tests will occur, who will do the testing, and what test data will be used If the test plan is developed early enough, testing can take place concurrently with the design and coding...
View Full Document

Page1 / 55

20-29 - Announcements Lecture 20 Assignment 3 Write down...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online