I have developed eclipse ui plugins . I want to write test cases. and i also want to know these test cases are compatible with automation testing of plugins with ant runner.

please suggest:
1. How to invoke the plugin with test case
2. Test cases for plugin automated test using ant