Skip to end of metadata
Go to start of metadata

Integration Testing: Eclipse Plugin JUnit Test

Testing code in the context of the eclipse environment as a JUnit test can be very slow. Execution time can be significantly reduced by only using the necessary plugins in "headless mode". Just follow these simple instructions:

  1. In Project Explorer, right click the test class, choose "Run as" (or "Debug as", as needed) and choose "Run configurations" or use the menu in the toolbar for "Run as"/"Debug as" to access the "Run Configurations".
  2. Right click JUnit Plugin Test and click "New"
  3. Choose the Tab "Plug-Ins" and select "plugins selected below" from the drop-down menu "Launch with:"
  4. Click "Deselect all"

  5. Choose the test project needed for your test and click "Add required plugins".
  6. Click Tab "Main" and choose "Run an application"
  7. From the dropdown menu beside "Run an application" choose "No application"
  8. Hit run and enjoy pure speed (sort of).


Note: For tests involving the models repository  the position of this repository must be defined in the configuration. First, make sure to checkout the KIELER models repository located here. Afterwards, in the "Run Configurations" menu, choose the tab "Environment" and click on "New...". Add an environment variable with the name "models_repository" and the path to the checked out models repository as the value. Click "Apply" and you are set for testing.

  • No labels