Difference between revisions of "CddBranch"
(→Step 1: Enable CDD-Testing) |
(→Step 2: Enable CDD-Testing) |
||
Line 37: | Line 37: | ||
You will notice that for every exception that occurs a new test case shows up in the testing window. Test cases are automatically executed on each compilation to see whether you fixed that particular bug or not. A test case can be in one of three states: | You will notice that for every exception that occurs a new test case shows up in the testing window. Test cases are automatically executed on each compilation to see whether you fixed that particular bug or not. A test case can be in one of three states: | ||
− | * "F" | + | * "F" for failing - last time the test case was executed the original problem was reproduced |
− | * " | + | * "OK" for passing - last time the test case was executed the original problem appeared fixed |
− | * "INV" | + | * "INV" for invalid - the test case is out of date (it can no longer run your program in the expected way) |
[[Image:test_case_states.png]] | [[Image:test_case_states.png]] |
Revision as of 11:28, 3 November 2006
Contents
Summary
CDD is an extension to EiffelStudio that provides support for both automatic test case extraction and test execution. It is undistruptive to the development process of the user. The tool is in its earlys stages. Feedback and bug reports are very much appreciated. Please send them to mailto:andreas.leitner@inf.ethz.ch .
Installation
Requirements
- ISE Eiffel 5.7 (below version is recommended, other versions may or may not work)
CDD-Extension
- Linux: http://se.ethz.ch/people/leitner/cdd/cdd_linux_x86_0_1_0.tgz
- Windows: http://se.ethz.ch/people/leitner/cdd/cdd_win32_0_1_0.tgz
- Installation instructions
- Download the zip if you use Windows, the tgz if you use Linux
- Extract it over your installation of EiffelStudio. (You have done it right when you are overwriting a few files in the process.)
- You are ready to go. Just start EiffelStudio the way you are used to. You will notice a two new windows, one on the left and one on the bottom. Both are titeled "Testing". If they do not appear on your installation, make sure Testing is enabled via the menu path "View->Tool->Testing"
How to Use
Step 1: Show Testing Window
First you need to make sure the testing windows are all properly displayed. You can make them appear by following the menu "View->Tools->Testing":
Step 2: Enable CDD-Testing
To enable CDD-testing for your project, open your project and then enable CDD-testing, by clicking on the half-black / half-white button in the testing window. You can disable testing again at any time by pressing this button again.
Make sure you also have assertion checking enabled (the more the better cdd will work). Now continue developing your project as usual. You will notice that for every exception that occurs a new test case shows up in the testing window. Test cases are automatically executed on each compilation to see whether you fixed that particular bug or not. A test case can be in one of three states:
- "F" for failing - last time the test case was executed the original problem was reproduced
- "OK" for passing - last time the test case was executed the original problem appeared fixed
- "INV" for invalid - the test case is out of date (it can no longer run your program in the expected way)
You can now delete test cases with the delete button and debug test cases with the debug button as shown below:
How Test Cases Are Extracted
How to modify test cases by hand
Re-extracting test cases
Release Notes
- CDD can be quite fragile, if there you encounter problems you can do the following:
- Look into the testing-log-window (bottom half of screen) and see what went wrong
- Remove the directory EIFGENs/cdd_tester from your projects directory.
- Disable precompiles if having problems
- Have a look at the test cases (you can just pick&drop them into the editor)
- Make sure your root cluster is not recursive.
- Do enable assertion checking!
Source Code
The source can be found on the cdd branch of the EiffelStudio svn repository (https://origo.ethz.ch/eiffelsoftware/es/branches/cdd/es). After compiling it you need to do the following to create a delivery
- Take an existing delivery (5.7 final should be fine)
- Copy the resulting executable ec.exe resp. ec to $ISE_EIFFEL/studio/spec/$ISE_PLATFORM/bin/
- Copy the the file Delivery/eifinit/studio/default.xml to $ISE_EIFFEL/eifinit/studio/default.xml
- Copy the directory Src/library/cdd to $ISE_EIFFEL/library/cdd