[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[swtbot-dev] Proposal for a test recorder for SWTBot

Hi all,

In the context of JBoss Tools, we spend a lot of time writing tests. We mainly rely on SWTBot for that, and we find out that a recorder for SWTBot that would take as input user actions and generate the Java code for that would be very helpful to save us time, and also to get higher quality reports (people reporting bugs could directly use this tool to report a test-case).
So we've worked on a simple-but-yet-efficient recorder for SWTBot, together with Rastislav Wagner (JBoss Tools team too).

Since the JBoss Tools team also has its specific test framework (called RedDeer), we made this generic and extensible enough to provide the ability to plug another framework that SWTBot into it. So by default, the generator would generate code conforming to SWTBot API, but one can easily install the RedDeer support and then choose to generate code that targets the RedDeer API; and it's the same for any API.
The implementation just looks at Events and find a matching rule to generate code for each Event. Support of (1 operation == N events) will probably come later. It's pretty easy to contribute support for new UI actions, it's just a matter of providing a new class.

This is in a very early state, but already supports the most common UI stuff. You can see a demo of the generator in action here: https://vimeo.com/55953990

The contribution is currently there https://git.eclipse.org/r/#/c/9301/ . I'd really like to integrate it into SWTBot soon to gather some usage, feedback, and contributions. But before I check this into codebase, I'd like to hear some feedback from this mailing-list.
Mickael Istria
Eclipse developer at JBoss, by Red Hat
My blog - My Tweets