cornercorner
FeaturesPluginsDocs & SupportCommunityPartners

JUnit: Promo-F Use-cases

Authors
Marian Petras, Ondrej Rypacek, Started on: Nov/04 | Version: 2.0
Status
Working document, open for feedback
Document History
$Revision: 1.2 $ | $Date: 2004/11/23 12:20:31 $ | CVS

Introduction

This documents contains a list of usecases of JUnit support in NetBeans considered for Promotion-F.

Use-Cases considered for Promotion-F

Constraints:

All sources must be compilable after any changes. Actions on uncompilable sources are not guaranteed to work due to implementation constraints - the lack of partial compilation in particular.

Glossary:

test-class -- any class deriving from JUnit's TestCase
test-case -- one method in a test-class
tests -- any code involved in testing, test-cases and test-classes

Notes

Priorities: each use-case is assigned a priority from must have, should have, nice to have
Workflow type: in most cases, we indicate how the functionality is expected to be used. Whether while typing, programming or maintaining.
  • typing - users do this during source editing or actions that are direct part of editing. The functionality should be accessible very quickly (single click, shortcut) with no or just simple confirmation dialog. The mental focus of the programmer is at the level of methods and statements.
  • programming - users do this as a part of creating the code but not directly while typing. Their focus is at the level of classes and methods.
  • maintaining - users do this as a part of maintaining their code from the perspective of the whole program, packages or classes.



I) Creation/Update

a) Creating a test-case for a method

Notes: should have, programming
  • (i) user adds a new method to source
  • (ii) user wants to update the test-suite with a test-case for the new method
=> needs to do it quickly

b) Creating a test-class for a class

Notes: must have, programming
  • (i) user creates a new source class
  • (ii) wants to create a testSuite for the class containing test-cases for every method in the source class
=> needs to do it quickly

c) Updating a test-case for a method

Notes: nice to have, programming
  • (i) user changes a method (signature)
  • (ii) wants to update the test-case
=> needs to do it quickly

d) Updating a test-class for a class

Notes: must have, programming
  • (i) user changes a source class (adds/removes/changes methods)
  • (ii) wants to update the test-suite for the class
=> needs to do it quickly

e) Bulk test creation

Notes: should have, maintaining
  • (i) user has some source code (many classes)
  • (ii) wants to create tests for the classes
    Wants to select classes for test creation
    • manually
    • by filter (access rights, etc.)
    • combination
    Wants to select methods for test creation
    • manually
    • by filter (access rights, etc.)
    • combination

f) Bulk test update

Notes: should have, maintaining
- the same as e)

New test-class skeleton

Notes: must have, maintaining
  • (i) user wants to write some tests from the scratch
=> needs to create an empty test-class





II) Editing/Navigation in editor

Navigation between sources and tests.

a) Change of source, update of test

Notes: must have, typing
  • (i) user changes their source
  • (ii) wants to modify the test-case accordingly
=> needs to switch to the test code quickly

b) Writing tests, checking code

Notes: must have, typing
  • (i) user writes a tests
  • (ii) needs to review the tested code
=> needs to switch to the source code quickly

c) Notification of inconsistencies

Notes: nice to have, typing
  • (i) user changes their source
  • (ii) wants to not forget to update the tests accordingly
=> needs to be notified unobtrusively about the source-test *inconsistency*





III) Running

a) Changing source, running test-cases

Notes: must have, typing
  • (i) user changes their source
  • (ii) wants to test the changes
=> needs to run all *relevant* test-cases for the changed method quickly, review the results

b) Changing test-case, running test-case

Notes: must have, typing
  • (i) user changes their test
  • (ii) wants to test the changes
=> needs to run the test-case just modified quickly (i.e. where the cursor is)

c) Reviewing failed results, navigation to source

Notes: must have, typing
  • (i) user reviews test results
  • (ii) wants to review/modify tested source code
=> needs to navigate to the tested source code quickly

d) Reviewing failed results, navigation to tests

Notes: must have, typing
  • (i) user reviews test results
  • (ii) wants to review/modify the failed tests
=> needs to navigate to the tests quickly

f) Changing/writing tests, debugging tests

Notes: should have, programming
  • (i) user changes several tests (test-classes, test-cases)
  • (ii) wants to debug the tests
=> needs to run the debugger set up for tests

Companion
Projects:
MySQL Database Server   GlassFish Community: an Open Source Application Server   Open Solaris  Open JDK: an Open SourceJDK   Mobile & Embedded Community     Sponsored by 
Sponsored by Sun Microsystems