How to run the EDNA test suites

From EdnaWiki
Jump to: navigation, search

There are two (at least...) ways of running the EDNA test suites:

  • From inside eclipse
  • From the command line

Running the test suites from the command line

Make sure the EDNA_HOME and EDNA_SITE environment variables are set. The three different test suites (kernel, plugin unit and plugin execute) can then be executed with the following commands:

  $EDNA_HOME/prototype/bin/edna-prototype --testsuite-src

  $EDNA_HOME/prototype/bin/edna-prototype --testsuite-plugin-unit

  $EDNA_HOME/prototype/bin/edna-prototype --testSuite-plugin-execute

At the end of each test suite the number of successful and/or failed tests is displayed.

Running the test suites from inside eclipse

After having setup eclipse for EDNA (see How to set up eclipse for EDNA developments) and having setup up an EDNA configuration file (see How to set up the EDNA configuration file) follow these instructions:

  1. Open the Pydev perspective
  2. Click on "Run" -> "Run Configurations..." (You can also access the run configurations by clicking on the small arrow next to the green icon with a triangle)
  3. In the "Run Configurations" window, right-click on "Python Run" and choose "New..."
  4. In the panel to the right:
    1. Type in a name, for example "EDNA Prototype Kernel Testsuite" or "EDTestSuiteSrc"
    2. Click on the "Browse..." button next to the "Project" field and choose your project, for example "edna" or "edna-HEAD"
    3. Click on the "Browse" button next to the "Main Module" and select prototype->tests->testsuite->EDTestSuiteSrc.py, then click on "OK"
    4. Select the "Arguments" tab below the name field
    5. In the "program arguments" field enter "--verbose --DEBUG"
    6. Important! In the "Workin directory" part, choose "Other:" and use the "File System..." button to browse to a temporary directory on your file system, for example /tmp/edna.
    7. Select the "Interpreter" tab
    8. Select your Python interpreter by clicking in the button with the two arrows next to the field
    9. Select the "Environment" tab
    10. Click on the "New..." button
    11. In the "Name:" field write "EDNA_HOME"
    12. In the "Value:" field write "${project_loc}"
    13. Click on "OK"
    14. Click on the "New..." button again
    15. In the "Name:" field write "EDNA_SITE"
    16. In the "Value:" field write the name of your site for the EDNA configuration, for example "ESRF"
    17. Click on "OK"
  5. Now you can click on the "Run" button and the unit test should start