Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[dsdp-tm-dev] RSE Unit Tests 102

Hi all,

Here's some add-on information regarding enhanced
usage of Junit:

UI testing with Junit
---------------------
It's clear of course that UI things are much harder
to expose to unit testing than non-UI services. We'll
work on resolving these as we go along -- but in 
general, with SWT you can also directly run some 
actions, open dialogs etc. from the unit tests and
verify that certain widgets contain certain values.

Other units to test
-------------------
Remember that unit tests are, well, UNIT TESTS --
they should test the smallest possible unit of
software. In the RSE code base, the following 
possibilities jump to mind immediately:
- The ArchiveHandlerManager
- Persistence things
- Anything on the LocalFileSystem
- Content Assist on Local
- The SystemRegistry API
- All kinds of Filtering
IMHO, the primary candidates for filtering are
those classes and methods that we consider API.
Each and every API class and method should have
an associated test case in the end.

Real connection testing with Junit
----------------------------------
When multiple hosts / systems come into play it's
harder to write the unit tests than for things that
occur on the local machine only.
What we can do easily is test against well-known
host names on the internet (FTP). Beyond that, 
Uwe's Framework allows to use Java Property Files
that reside in the local workspace and hold 
connection information. Stay tuned for some
real-connection test cases to look at from Uwe.



Cheers,
--
Martin Oberhuber
Wind River Systems, Inc.
Target Management Project Lead, DSDP PMC Member
http://www.eclipse.org/dsdp/tm


Back to the top