CSC 405 Lecture Notes Week 4
Some Project Specific Testing Details
Relevant Testing Theory
-
Mapping Testing Terminology onto 405 and 406
-
Consider last week's testing activities.
-
What follows are notes on how they'll be accomplished in 405 & 406.
-
These are notes, not the
answers.
-
Unit Testing
-
For the OCU, CppUnit looks like a good choice.
-
Originally a port of JUnit to C++.
-
Start at sourceforge site.
-
For the kernel-level code,
unit testing may not be done independently.
-
See the "Linux Test Project" for a start.
-
It may provide some unit testing.
-
It also is at sourceforge.
-
Module Testing
-
CppUnit provides test fixtures.
-
It provides other class-level testing features.
-
See the CppUnit "Cookbook".
-
LTP provides support for kernel module testing.
-
There is also the scalable testing platform.
-
Integration Testing
-
OCU and kernel-level independently tested.
-
OCU teams write stub for kernel model.
-
Not clear what kernel stubs may be possible.
-
System Testing
-
The issue of kernel builds needs to be worked out.
-
Also, the issue of how far to go with competing 802-11 and Batman needs to be
determined.
-
Acceptance Testing
-
Once OCU user-level spec is done, write acceptance spec from it.
-
If possible, have actual human OCU users conduct acceptance tests (or Julie as
customer rep).
-
STP claims to provide kernel acceptance testing.
-
Black Box Testing
-
The OCU may be black-box testable in its entirety.
-
For kernel-level, black-box testing is driven by specs, as possible.
-
White box
-
OCU may not need explicit white-box tests.
-
For kernel, it depends on what LTP has to offer, or comparable testing
frameworks.
-
Testing Design
-
To be determined based on chosen frameworks.
-
For the physical layout, I suggest standard UNIX directories, a la the CSC 309
testing repository.
-
Test Plan
-
I strongly recommend a common, uniform structure for these
-
C/C++ Function comment for unit test plans.
-
C++ .h file comment for module test plans.
-
Source-resident .html for integration plan.
-
Use doxygen (or equiv) for generating browsable test plans.
-
Top-down Testing
-
Test OCU top-down, with MESH stub.
-
OCU model unit tests may be done bottom up, as necessary.
-
Bottom-up Testing
-
Test kernel-level bottom up / inside out.
-
Test Case
-
Again, I recommend having a standard test design convention for how this is
represented.
-
Testing Oracle
-
For OCU, given absence of formal(ized) spec, the oracle will be a human domain
expert.
-
For kernel-level, the extant specs are used, with human interpretation as
necessary.
-
Testing Stub
-
As noted above, major stub is for OCU testing.
-
Test Driver
-
Provided by the chosen frameworks.
-
Also, if dynamic testing feature is implemented, the OCU is a live run-time
test driver.
-
Regression Testing
-
CppUnit is both programmatic and file based.
-
Kernel-level is most likely log file based.
-
STP may provide regression support.
-
Test Coverage
-
gcov is a widely-used C coverage tool.
-
LTP has lcov, a graphical front-end to gcov.
-
Test Subsumption
-
OCU is simple enough so as not to need this.
-
LTP may have some support, but not likely.
-
Test Automation
-
Done with make, per the requirements of the chosen frameworks.
-
Mutation Testing
-
Most likely not performed in 405.
-
We may do some in 406
-
Testing Harness
-
Covered above, particularly under Test Drivers.
-
Testing Framework
-
To summarize ...
-
CppUnit for OCU testing.
-
LTP for kernel-level testing.
-
Other possibilities are CxxTest, DejaGnu.
-
Resources (see 405 main index for links)
-
opensourcetesting.org
-
sourceforge.net/apps/
mediawiki/cppunit
-
ltp.sourceforge.net
-
cxxtest.tigris.org
-
www.gnu.org/software/dejagnu
-
sourceforge.net/projects/stp
-
Design and testing best practices.
-
Concrete structure in Fisher's 308,309 Standard Operating Procedures (SOPs):
-
Vol 1 -- Repository Structure
-
Vol 2 -- Design & Imple'n Conventions
-
Vol 3 -- Testing Conventions
-
Widely-used tools:
-
CppUnit
-
Gcov
-
Linux Test Project, Lcov
-
An exemplary site for testing "best practices"
-
Check out the SQLite Testing site at
www.sqlite.org/testing.html
-
Its testing design and infrastructure look a lot like what we'll need for 405
and 406 project testing.