CDD Common Problems

Revision as of 01:21, 15 April 2008 by Mogh (Talk | contribs)

Problem: 'My system suddenly has the wrong root class / doesn't compile anymore because it doesn't find the strange wrong root class'

  • This issue arises if EiffelStudio crashes / is killed during the (foreground) debugging of a test case (via the corresponding button in the testing tool). On Windows, crashes should no happen, but there is an issue on Linux with the foreground debugging of test cases we haven't been able to solve. If you are debugging a test case that passes, OR you are debugging a test case that fails, but you press "Continue" after the exception occured (instead of "Stop", to end the execution immediately), EiffelStudio will crash.
  • Solution: You have to manually set the root class of the system back to the correct class (via Project Settings, or by directly editing the .ecf file)
  • Prevention: On Linux, use test case debugging ONLY for FAILING test cases, and after exception occured, STOP the execution (with the "Stop" button)!

Problem: 'My test cases time out'

  • CDD automatically aborts test cases that run longer than a given period of time. The default value (which is a few seconds) can be changed by setting the environment variable 'CDD_TESTER_TIMEOUT'. On Linux '"export CDD_TESTER_TIMEOUT=120"' sets the timeout to 120 seconds. On Windows the same thing is acomplished with '"set CDD_TESTER_TIMEOUT=120"'.

Problem: Installing EiffelStudio reports error codes like '2908' and '2909'

  • This seems to be a rare problem. The following might help

<< I finally found the solution. Have a look at the following URLs: - -

I believe you should have the same issue. In my case, I think it is because I had just installed the .NET 3.0 runtime which is part of the Windows Update.

If you rename the `Components' registry key, assuming that like me you only have one child key, the installation should progress fine. >>

This often happens when uninstalling and then reinstalling EiffelStudio although it is clearly not a bug in our installer.

Problem: 'I cannot see the testing window.'

  • Make it visible via 'View -> Tools -> CDD Output'

Problem: 'Is there some kind of CDD log window?'

  • Yes there is it is called 'CDD Output'. If you don't see this window, you can make it visible via '"View -> Tools -> CDD Output"'

Problem: 'I am getting a duplicate class error' or 'I am trying to use CDD on an existing project but it doesn't work'

  • If you have a look at the 'CDD output' window you will probably find the error message:
Error code: VSCN
Configuration error: cluster has two classes with the same name.
What to do: if both classes are needed, change name of one of them.

Cluster name: erl_g_tests
First file: "/home/aleitner/src/erl_g/src/erl_g/cdd_tests/erl_g/cdd_interpreter.e"
Second file: "/home/aleitner/src/erl_g/library/cdd_tests/erl_g_library/cdd_interpreter.e"

To fix this go to the project settings, to your active target, Groups -> Clusters and then select your root cluster. Open the Advanced tree-item and click on the value part of the Exclude Rules. Now add rule '/cdd_tests$' and click 'OK'.

Alternatively you can open your ecf file with a text editor. You will find a stance that looks like this:


Edit edit to make it looks like the following:


Problem: 'I have written or extracted a test case. How can I execute it?'

  • All tests are executed in the background right after compiling automatically. You can choose to enable or disable background testing via the 'Enable/Disable automatic background execution of tests'.
Enable testing.png

Problem: 'The environment is unstable when using the .Net backend.' Solution: CDD does currently not support the .Net backend. Please use the C backend.

Problem: 'How to disable the CDD extension in EiffelStudio' Solution: Make sure the push-buttons for Extraction and Execution are not pressed. The buttons are shown in the below picture.

Enable exec and extract.png

Problem: 'My extracted test cases get overwritten in the SVN Repository, because my colleagues commit their extracted test cases which have the same name.'

  • Solution: Define a new environment variable "CDD_TESTER_ID". The value of the variable will be used as suffix for all extracted test class names. So if all members of the project define a unique "CDD_TESTER_ID", the individually extracted test cases can be commited to the svn without collisions.
  • ATTENTION: The value of CDD_TESTER_ID has to conform to a valid Eiffel class name, e.g. it has to consist of (uppercase) letters and '_' only!
  • EXAMPLE: You define CDD_TESTER_ID and set it to value "MARKUS". Each time a new test case gets exracted for a class ROOT_CLASS, the generated class name for the test case will be CDD_TEST_ROOT_CLASS_xyz_MARKUS. Likewise it will get stored in a file called cdd_test_root_class_xyz_markus.e