|
Re: Filling a tree with test data? [message #1792046 is a reply to message #1792032] |
Tue, 10 July 2018 13:33   |
Eclipse User |
|
|
|
Hi Christian.
May I suggest that perhaps you're going about things the wrong way. Rather than use SWTBot to "fill in data values", create your part of smaller independent pieces that can be tested individually. What is this tree supposed to show? Use a JFace TreeViewer with a Content Provider and Label Provider, and test those components. Test your model supplier that is used by the content provider. Test your contribution object to the MPart.
Brian.
|
|
|
Re: Filling a tree with test data? [message #1792054 is a reply to message #1792046] |
Tue, 10 July 2018 14:47   |
Patrick Tasse Messages: 82 Registered: July 2009 |
Member |
|
|
Hi Christian,
To add to what Brian has said, I am assuming that the tree is filled by the application, so it is up to the application to fill the tree by itself. With SWTBot you are simulating the steps that a user would do, like interacting with the filter text and verifying that the application reacts accordingly by filtering out elements in the tree.
Depending on how your application finds the data used to fill the tree, you might use your test setup to provide data to the application, perhaps by creating or copying some configuration or database file, etc. Or perhaps in your application the user must perform some actions before the tree is filled with data, then you can use SWTBot to simulate those actions (note that if those actions include interacting with a native file dialog, this is not currently supported by SWTBot).
Patrick
|
|
|
|
Powered by
FUDForum. Page generated in 0.02891 seconds