July 3, 2017
Automated Integration Testing Of Your OpenFin App
Automated Integration Testing of Your OpenFin App
Integration tests allow developers to automate typical user experiences for the purposes of validating functionality & protecting against regressions. We can use some of these same tools to drive our OpenFin applications and make our development a little more agile.
How
Selenium is the tool of choice for many web developers. In Selenium 2.0, browser automation is powered by the WebDriver API – a set of language bindings capable of communicating with a browser driver. Drivers are available for all major browsers. In the case of OpenFin, since the runtime is built on top of Chromium, we’ll be using ChromeDriver.
As for language bindings, in our latest webinar we highlighted WebDriverIO. WebDriverIO is a javascript library that comes with several hooks & features that make automating testing simple and efficient.
In our tests, we’ll write instructions in javascript which WebDriverIO will translate to the WebDriver protocol. These instructions are passed along to ChromeDriver which can be configured to point to a specific installation of Chrome or a Chromium based application – in our case the OpenFin RVM. The instructions execute specific actions on the app, then WebDriverIO takes response information and checks it according to assertions we have written.
In order to enable this communication, we’ll have to pass along the appropriate port information when launching our application. Code to accomplish this is available in our latest webinar repository here. If you’re looking for non-WebDriverIO examples, be sure to check out our Hello OpenFin Selenium Example as well.
Benefits
Agile development is all about making small changes to evolve while keeping a pulse on your product and making informed decisions. Automated integration tests make for powerful feedback loops that allow developers to move fast without fear of breaking the unknown. Well composed tests can do this while clearly explaining application functionality to anyone looking to dive in.
For a live walk through of the repository, check out the video below of our latest webinar.
Enjoyed this post? Share it!
Related Posts
All Posts ->Featured
From Knowledge to Action: OpenFin Notification Center Fuels Productivity Across the Desktop
Tutorial
Featured
Implementing FDC3 standards on OpenFin!
Tutorial