Release of DukeScript Selenium
Last week we blogged about how you can use Selenium to do integration tests for DukeScript applications. We’ve been working on improving the webdriver to support as much useful functionality as possible. Today we’re proud to announce the first official public release (0.5.9).
You can get the project on Maven Central:
With DukeScript Selenium you can perform a variety of different test scenarios:
White-Box Tests
White-box tests are tests that require programming skills, internal knowledge of the system, and access to all parts. It’s often hard to achieve that with integration testing frameworks, as most of them only give you access to the view.
But white-box tests of the UI are important, because you need to make sure, that your bindings work correctly. Otherwise you’ll get in trouble when refactoring the viewmodel. With DukeScript Selenium, you have access to the UI, as well as the viewmodel. So you can unit test the effect of changes to the viewmodel in the view.
Here’s an example:
This type of tests will make you confident that refactorings in the viewmodel won’t break your view.
Gray-box Tests
Gray-box tests are typically integration tests written by developers. The developers need to test a certain behaviour of the application, for example a user story. They have internal knowledge of how the app works, for example, what attributes a dom element must have after a button was clicked.
That’s the most typical usecase for Selenium, so it’s very well supported by DukeScript Selenium:
Black-box Testing
And finally there’s black-box testing, where tests are typically created by non-programmers. Their purpose is to make sure the application behaves as specified. Other than gray-box tests, the black-box tests can make sure that developers don’t workaround their own bugs.
To support black-box tests in DukeScript, we can use JBehave. These tests require the developers to define Test Steps. After that, non-programmers can combine thes setps into user stories and test them. We’ve described integration of DukeScript with JBehave in one of our latest blogs.
This is what a test looks like:
So with this little announcement I’d like to wish all of you Happy Holidays and thank you for supporting DukeScript!