In Test Driven Development it happens you need to run Eclipse UI Tests and keep working at the same time. You can start tests but then you'll get Eclipse Workbench window annoying you especially if you have several JUnit Test Suites to run. Eclipse Workbench Window will pop up and grab input focus for each new suite and that's really annoying.
After fiddling with my linux I found several ways to solve this issue:
- Do not run tests at all, which is not acceptable for TDD;
- Run only Eclipse core tests without workbench window, which is not enough to make tests results reliable;
- Create new display and force test session to use it.
Firs option isn't reasonable at all. Second is good enough for non UI applications, but has no value for opposite ones. Third is not for none UI applications, but is the best for UI ones.
Fortunately, it is amazingly easy to create new display and redirect your tests execution to it.
You have couple options to consider for creating new display :
- start vncserver
- create virtual buffer using Xvfb
After you have created new display just pass display number as local environment variable in your command line like
DISPLAY=:N ${your-command-line-here}
and you'll never see your eclipse workbench window :) But if you need to follow tests for a while or just check what is going on from time to time you can use vncviewer or xwud for first or second option accordingly.
No comments:
Post a Comment