JUnit Test Plan
Description
- These are the tests that help verify what actions are possible with the goal of being able to measure progress.
- We are using a top-down approach at defining our tests.
- The total number of tests must not be modified but the actual tests can change in explicitness as we progress.
- I’m only listing automatable tests here.
- I greatly encourage defining other regression tests during the development, but they will not be accounted for here.
- We will need discipline creating our Commands. See Req Action Undo One and Dev Doc Commands
- A tool was created to generate the code structure. For example, given the table, it should produce code like this:
// /**
// * Test #1 for requirement ReqCompCompBind
// *
// * Author:
// */
// public void testReqCompCompBind1() {
// // TODO: implement
// assertTrue("Unimplemented", false);
// }
- Use ctrl-/ to uncomment the block when ready to implement it.
- We will use this tool once to generate the structure of all our tests. We will comment out those that we can’t yet implement. When ready to implement them, we will uncomment them.
- Keeping the number of tests to implement constant lets us graph out our progress (% of tests implemented, % of tests passing)
- The tests listed here are very general; when implemented should try to cover as much code as possible, testing from the highest level possible.
- We have 71 tests for our mandatory requirements.
- 1 requirement has been put out of scope. 70 tests remain.
Tests
0 explicit tests.
All Commands must implement execute/redo/undo/canexecute/canundo properly. Usual sequence: canExecute() ? execute()->redo() and later: canUndo()?undo();
All Commands should leave the model in a valid UCM state. To verify this, the top level class of our seg.jUCMNav package shall include two methods: testPreConditions(), testPostConditions(). These methods shall be used in JUnit tests but also in our debug build using assertions. If they aren’t overwritten, these methods should fail so that we know we have to create them. This will test our model manipulation layer extensively; higher level tests won’t have to worry about these details but since they will be executed everytime a command is executed (in debug mode or in JUnit tests), they will be tested VERY often.
testPreConditions(): will check the model to see if it is valid to call redo(). This can involve calling canExecute() but its main goal is to check that if a redo has already been called, followed by undo, the model is back in its initial state. Should verify that newly created elements are not in the model, etc. Should be the first line executed in redo() and last in undo().
testPostConditions(): will check the model to see if it is valid after the execution of the command. This usually involves checking to see if the newly created elements are actually in the model, that removed ones are no longer in it, that
Path Nodes? have appropriate in/out connections. Should be the last line executed in redo() and first in undo().
2 explicit tests.
Requirement concerns both
Component Element? and
Component REf?
- Creation scenario: Component Ref? must be in palette.
When put on content pane, must be added to the model.
Must always be linked to a Component Element?
- Edition scenarios: Properties view must show x,y,id,name,width,height, compDef:EObjectPropertySource.addPropertyToDescriptor(Collection descriptors, EAttribute attr, EClass c) must modify descriptors.
X,y,width,height
Map And Path Graph XYLayout Edit Policy?.createChangeConstraintCommand(
Edit Part? child, Object constraint) shall create a command. If fixed should not be able to move or resize.
2 explicit tests
- When a component is moved inside another, parent is set.
- Properties view must show parent EObject Property Source?.addPropertyToDescriptor(Collection descriptors, EAttribute attr, EClass c) must modify descriptors. Should see dropdown of possible componentrefs.
2 explicit tests
- When a component is moved outside its parent, parent is unset.
- Properties view must show parent EObject Property Source?.addPropertyToDescriptor(Collection descriptors, EAttribute attr, EClass c) must modify descriptors. Should have a none option in the componentrefs dropdown list.
2 explicit tests.
- When a Path Node? is moved inside a Component Ref?, parent is set.
- Properties view must show parent EObject Property Source?.addPropertyToDescriptor(Collection descriptors, EAttribute attr, EClass c) must modify descriptors. Should see dropdown of possible componentrefs.
2 explicit tests.
- When a Path Node? is moved outside its parent, parent is unset.
- Properties view must show parent EObject Property Source?.addPropertyToDescriptor(Collection descriptors, EAttribute attr, EClass c) must modify descriptors. Should have a none option in the componentrefs dropdown list.
3 explicit tests.
- When end and start/wait/timer are selected, connect appears in the contextual menu.
- Connect element overlaps others, disconnect appears in contextual menu.
- Connect command moves two selected elements.
3 explicit tests.
- Appears in palette and can be inserted on path. Adds a second outgoing path.
- Appears in Path Node? contextual menu, adds a second path
- Appears in contextual meunu, when Empty Node? and Start Point? are selected; doesn’t add a path, removes the start point.
3 explicit tests.
- Appears in palette and can be inserted on path. Adds a second incoming path.
- Appears in Path Node? contextual menu, adds a second path
- Appears in contextual meunu, when Empty Node? and End Point? are selected; doesn’t add a path, removes the end point.
5 explicit tests.
changed text; May 30th
- Can delete any Path Node? that have exactly 1 input, 1 output at any time.
- When deleting the last input/output of a stub/fork/join, stub/fork/join transforedm to empty node.
- Can delete componentrefs at any time, can delete components if they have no references.
- For all Path Nodes? that have multiple inputs or outputs, deleting all elements on the optional inputs or outputs removes the optional paths.
- Deletion of completely selected paths is possible.
2 explicit tests.
- Appears in palette and can be inserted on path.
- Is oriented properly; not only the direction but the angle. this test must also be able to orient end points properly.
2 explicit tests.
- Appears in palette and can be inserted on path. Replaces Empty Node? if placed on one.
- Can consume start/end points; when dragged on them, they are linked.
2 explicit tests.
- Appears in palette and can be inserted on path.
- To be used as test subject for edit/movement of Path Nodes?.
Properties view must show x,y,id,name
EObject Property Source?.addPropertyToDescriptor(Collection descriptors, EAttribute attr, EClass c) must modify descriptors.
X,y
Map And Path Graph XYLayout Edit Policy?.createChangeConstraintCommand(
Edit Part? child, Object constraint) shall create a command.
3 explicit tests
- Path tool exists in palette and can be inserted onto path
- Start/End points can be merged.
- Can have guard condition
3 explicit tests.
- Appears in palette and can be inserted on path. Adds a second outgoing path.
- Appears in Path Node? contextual menu, adds a second path
- Appears in contextual meunu, when Empty Node? and Start Point? are selected; doesn’t add a path.
4 explicit tests.
- Appears in palette and can be inserted on path. Adds a second incoming path.
- Appears in Path Node? contextual menu, adds a second path
- Appears in contextual meunu, when Empty Node? and End Point? are selected; doesn’t add a path, removes the end point.
- Can have guard condition
2 explicit tests.
- Responsibility tool exists in palette and can be inserted into diagram
- Must always be linked to Responsibility. Properties view should show Responsibility dropdown.3)
2 explicit test.
- Path tool exists in palette and can be inserted onto path.
- Can have guard conditions
1 explicit test.
- Properties view shows workload attribute
2 explicit tests.
- Appears in palette and can be inserted on path. Replaces Empty Node? if placed on one.
- Can consume start/end points; when dragged on them, they are linked.
6 explicit tests.
- Must be able to create plugin.
- creates a new map
- positions editor at a new navigationlocation
- from contextual menu
- from views
- must be able to view plugin
- double click in editor
- from views
- positions editor at a new navigationlocation
- add plug-in
- if static and has no plug-ins, must be able to select maps from a list of possibilities
- if dynamic, should be able to add a map from a list of possibilities to a list of plugins
- during execution, stub binding conditions are examined to know which plug-in to be used
- remove plugin
- inverse of previous operations
- rename plugin
- a plugin is just another map.
- bind plugin
- wizard or property page
- activated by contextual menu on stub
- select a plugin
- match stub inputs with plugin start points
- match stub outputs with plugin end points
- numbers do not need to match
2 explicit tests.
- Timer appears in palette and can be inserted into diagram
- Contextual menu allows for the creation of a timeout path.
2 explicit tests
- Wait appears in palette and can be inserted onto path
- can have guard condition
2 explicit test
- Appears in file/export
- Appears in contextual menu of a diagram in package explorer
1 explicit test
- help about exists
1 implicit
Daniel finds it sufficient.
1 explicit test
- online help exists
1 implicit
Daniel finds it sufficient.
1 explicit test
- top level model element is URNSpec
1 explicit test
- top level model element is URNSpec
0 explicit tests
Supported by framework; implicit if
Req Save is done.
No longer in scope
1 explicit test
- UCM Editor supports Team Support for Local History purposes.
0 explicit tests.
0 explicit tests.
0 explicit tests. See
Req Elem Delete
0 explicit tests.
0 explicit tests.
0 explicit tests.
0 explicit tests.
1 explicit test
- Navigation Location implemented for all diagrams in one UCM
4 explicit tests
- Outline view is implemented properly
- Explorer is implemented properly (remember to be able to rename map)
- Responsibilities view is implemented properly
- Description view is implemented properly
2 explicit tests
- Contextual menu on Component Ref?/PathNode shows show/hide label
- Properties view must show label EObject Property Source?.addPropertyToDescriptor(Collection descriptors, EAttribute attr, EClass c) must modify descriptors.
0 explicit tests.
0 explicit tests.
0 explicit tests.
If it builds, it runs.
Categories
Palette tests
- Req Comp 1?
- Req Elem And Fork 1?
- Req Elem And Join 1?
- Req Elem Direction Arrow 1?
- Req Elem Dynamic Stub 1?
- Req Elem Empty Point 1?
- Req Elem End Point 1?
- Req Elem Or Fork 1?
- Req Elem Or Join 1?
- Req Elem Responsibility 1?
- Req Elem Start Point 1?
- Req Elem Static Stub 1?
- Req Elem Timer 1?
- Req Elem Wait 1?
Properties tests
- Req Comp 2?
- Req Comp Comp Bind 2?
- Req Comp Comp Unbind 2?
- Req Comp Path Bind 2?
- Req Comp Path Unbind 2?
- Req Elem Empty Point 2?
- Req Elem End Point 3?
- Req Elem Or Join 4?
- Req Elem Responsibility 2?
- Req Elem Start Point 2?
- Req Elem Start Point Attributes
- Req Elem Wait 2?
- Req Labels 2?
Behaviour tests
- Req Comp Comp Bind 1?
- Req Comp Comp Unbind 1?
- Req Comp Path Bind 1?
- Req Comp Path Unbind 1?
- Req Connections 3?
- Req Elem Delete 1?
- Req Elem Delete 2?
- Req Elem Delete 3?
- Req Elem Delete 4?
- Req Elem Delete 5?
- Req Elem Direction Arrow 2?
- Req Elem Dynamic Stub 2?
- Req Elem End Point 2?
- Req Elem Static Stub 2?
- Req Labels 1?
Contextual Menu tests
- Req Connections 1?
- Req Connections 2?
- Req Elem And Fork 2?
- Req Elem And Fork 3?
- Req Elem And Join 2?
- Req Elem And Join 3?
- Req Elem Or Fork 2?
- Req Elem Or Fork 3?
- Req Elem Or Join 2?
- Req Elem Or Join 3?
- Req Elem Timer 2?
- Req Export Bitmap 2?
Stub action tests
- Req Elem Stub Actions 1?
- Req Elem Stub Actions 2?
- Req Elem Stub Actions 3?
- Req Elem Stub Actions 4?
- Req Elem Stub Actions 5?
- Req Elem Stub Actions 6?
General non-editor tests
- Req Export Bitmap 1?
- Req Help About 1?
- Req Help On Line 1?
- Req Open 1?
- Req Save 1?
- Req Save Backup 1? no longer in scope
- Req Browse History 1?
- Req Browse Model 1?
- Req Browse Model 2?
- Req Browse Model 3?
- Req Browse Model 4?
(jkealey: changed categories, June 1st)