I want to test a simple SWT GUI application with SWTBot. Unfortunatly, I have no idea how to start. There are several tutorials which describe the testing of an Eclipse plug-in but I could not find anything regarding my problem. I don't even know if it is possible.
相关问题
- SWT table: how to set/get “focused” row
- Get access to Angular service instance from JavaSc
- Port of the Rails app when running Cucumber tests
- Selenium View Mouse/Pointer
- What is a correct approach to manage test data usi
相关文章
- Web Test recorder does not allow me to record a te
- Factory_girl has_one relation with validates_prese
- What is the difference between `assert_frame_equal
- How best to use ViewerFilter on a TreeViewer?
- how to make gui test without displaying in FEST-SW
- How do I send cookies with request when testing Fl
- Unit test Angular 2 service subject
- Unit/Integration testing FTP access
Well it is very much possible. Follow the step as mentioned below.
<eclipsehome>/dropins
folderNow at this point you are ready to play with SWTBot.
For the demo purpose I have written a small Login dialog for you and it will look like this:
Code
Now create a JUnit test case (google for it if you are new to it) . Also add all the jar files present in SWTBot (the one you have downloaded) in your classpath.
Now first create a display (because application needs one). Also get the handle of container in which your widgets/controls are present. In my case it is the Shell.
SWTBot Code
Now all the SWTBot methods and variables are well defined in the source and the source is bundled within the SWTBot jars. So you can always go ahead and hack its source code.
Further Reading
Hope this will help.