Running Spectron Tests in Visual Studio Team Services Build

Having end-to-end tests and running them locally can definitely be beneficial, but one of the main reasons to have them is to run them automatically during a nightly build. Getting these tests to run in Visual Studio Team Services isn’t trivial. Here’s some tips on how to get them going. Setting up build definitions When…

Top NPM Packages for Spectron Testing

Spectron is a great tool for testing your Electron applications. However, some help is needed to get the full use out of it. This post will go through all of the npm packages I’ve found useful in my Spectron testing. Jasmine Reporters The default reporter for Spectron is to just log out to the terminal.…

Introducing the Spectron Command Line Tool

After some Spectron experience there tends to be some things that can get repetitive when creating Spectron tests. I figured creating a tool to do just that would be handy to have. So I created the spectron-cli npm package. Granted, this command line tool doesn’t do all that much. Currently, it only has two commands to…

Spectron Tip: Getting Selectors From Chrome Dev Tools

If you’re using Spectron (or even Protractor) for automating your applications probably the most time consuming thing is to figure out exactly what selectors you need in order to interact with your application. Whether to click on a button or to test if the text of a dialog is what you expect, you need a…

Creating Page Files for Spectron Tests

Now that we’ve got Spectron working, let’s add some more to it to help with our testing. One way of doing end-to-end testing is to have a separate file that contains our page objects and any helper functions specific to that page. This will help the readability and maintainability of our tests. The latest code…