Filling a tree with test data? [message #1792032] |
Tue, 10 July 2018 06:54  |
Eclipse User |
|
|
|
Hi using eclipse 4.8 and the newest swtbot versions I try to write a test for a e4 rcp. having a part with a text and a tree I want to fill the tree with items (before the test). The test is writing something into text that acts as a filter. Dependent of the containing text only the items in the tree that contain the given text are shown. I don't know how to fill the tree using SWTBot. Have you any hints? Thanks! Christian
|
|
|
|
Re: Filling a tree with test data? [message #1792054 is a reply to message #1792046] |
Tue, 10 July 2018 10:47   |
Eclipse User |
|
|
|
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.03765 seconds