- Do you frequently copy-paste exisiting unit tests to test a recurrent specification?
- Do you frequently copy-paste existing documentation fragments to document a recurrent specification?
- Do you find it annoying to update both the corresponding unit tests AND documentation fragments when a specification evolves?
If you answered yes to any of the above questions, then DScribe is the right tool for you!
DScribe allows you to test and document recurring concerns consistently and with ease. You simply define joint templates to capture the structure to test and document a specification. Then, you use method-level Java annotations to invoke the templates.
To learn more about DScribe, visit the DScribe GitHub repository.
Creating and Invoking DScribe Templates
To learn how to create and invoke your own DScribe templates, visit DScribe's README.
Running DScribe in Eclipse
To generate unit tests and documentation for a production class(es):
- Select the target class(es) in Eclipse's
Project Explorer
view.- To select one class, simply click on it with your mouse.
- To select multiple classes, hold down the
Ctrl key
and click on each class one by one.
- Perform a
Right
click. The Eclipse dropdown menu will appear. - Click the
Run DScribe
command in the dropdown menu (see screenshot).
Once DScribe terminates, a message dialog will appear to display the execution results. If DScribe runs successfully, the generated documentation and unit tests will be added to the production class and its corresponding test class, respectively.
Publications
- Mathieu Nassif, Alexa Hernandez, Ashvitha Sridharan, and Martin P. Robillard. Generating Unit Tests for Documentation. To appear in IEEE Transactions on Software Engineering, 12 pages, 2021.
DScribe is distributed under the terms of the Apache License v 2.0. To install the DScribe Eclipse plugin, follow the steps below.
System requirements: Eclipse 3.4, JavaSE 14. DScribe is currently tested on Windows only.
To install DScribe:
- From the Eclipse menu bar, select
Help > Install New Software
. - Click the
Add
button. This Add Repository window will appear. - For the name, enter DScribe. For the Location, enter https://www.cs.mcgill.ca/~martin/DScribeUpdateSite. Click
Add
. - Select the new
DScribe
entry in the list and clickNext
twice. - Select that you accept the terms of the license agreement and click
Finish
. - Restart your workspace.
For any questions, concerns, or suggestions, please free feel to contact Alexa Hernandez.