39 lines
1.4 KiB
Plaintext
39 lines
1.4 KiB
Plaintext
@c ========================================================================
|
|
@c How to write tests
|
|
@c ========================================================================
|
|
|
|
@node How to write tests
|
|
@chapter How to write tests
|
|
|
|
A primary goal of the ns-3 project is to help users to improve the
|
|
validity and credibility of their results. There are many elements
|
|
to obtaining valid models and simulations, and testing is a major
|
|
component. If you contribute models or examples to ns-3, you may
|
|
be asked to contribute test code. Models that you contribute will be
|
|
used for many years by other people, who probably have no idea upon
|
|
first glance whether the model is correct. The test code that you
|
|
write for your model will help to avoid future regressions in
|
|
the output and will aid future users in understanding the validity
|
|
and bounds of applicability of your models.
|
|
|
|
There are many ways to test that a model is valid. In this chapter,
|
|
we hope to cover some common cases that can be used as a guide to
|
|
writing new tests.
|
|
|
|
@cartouche
|
|
@emph{The rest of this chapter remains to be written}
|
|
@end cartouche
|
|
|
|
@section Testing for boolean outcomes
|
|
|
|
@section Testing outcomes when randomness is involved
|
|
|
|
@section Testing output data against a known distribution
|
|
|
|
@section Providing non-trivial input vectors of data
|
|
|
|
@section Storing and referencing non-trivial output data
|
|
|
|
@section Presenting your output test data
|
|
|