Test automation tools highlights

Test automation is necessary to produce high quality software. Good automated coverage allows development teams to make changes and respond to new requirements quickly and with confidence. They can support good development practices like ‘Test Driven Development’ and, by providing executable requirements to the developer, close the gap between requirements and implementation. This article will provide an overview of some tools and techniques we are currently using at Solidsoft Reply to deliver the full benefits of test automation to our customers.


Specflow  http://www.specflow.org

Specflow is a great tool we use to produce these executable requirements. It lets anyone describe how software should work in plain English and allows developers to easily bind that to their test code. Here’s an example of a test written in the ‘Gherkin’ language, the basic syntax for describing Specflow tests:


Scenario: I cannot set the Philadelphia’s weather to an invalid value
    Given I am logged into the Website with the default user
        And I have navigated to the Configuration page
        And I have set the "Weather" configuration item to "Overcast"
    When I have saved my configuration changes
    Then I should remain on the Configuration page
        And The error message "It’s always sunny" should be displayed

There are coded ‘steps’ that sit behind each of these sentences, but it isn’t important what those steps are or what technology they use. The benefit of Specflow is that the developer can map any kind of automation to human readable steps.


Specflow makes it easier to practice the principle of behavior-driven development (BDD). Refining the, now easy to read, executable requirements is now a task that can be shared between business and technical stakeholders. This helps to eliminate discrepancies between customer requirements and the software that is delivered.


Topshelf http://topshelf-project.com

Topshelf is a framework for hosting window services. It allows the developer to create and debug services as console applications. This is makes developing windows services easier, quicker and less error prone. Once it’s finished, Topshelf also makes it easy to install the application as a service.


The creation of services is simplified, allowing developers to create a simple console application that can be installed as a service using Topshelf. The reason for this is simple: It is far easier to debug a console application than a service. And once the application is tested and ready for production, Topshelf makes it easy to install the application as a service.



The ability to switch between processes and services can be useful for automated testing. Test automation can require tighter than usual control of an application’s components. Test may need these to run at very specific times or might need to stop and start them frequently to alter environments and configuration. In this case dealing with processes can be simpler and, particularly if test-time installation is required, quicker.


.NETs System.Diagnostic.Process class is typically the best tool for managing both remote and local processes. However, sometimes it’s necessary to use another solutions, such as Windows Management Instrumentation or Microsoft’s PsTools. For the purposes of my automated tests, I’ve found it useful to be able to interchangeably use these different strategies without changes to the test code. I’ve created a useful library at https://github.com/NathanLBCooper/ProcessHelpers to provide these different Process control strategies under common interfaces. I’ve also included an options to tightly couple the lifetime of the processes to their owning classes to make resource management easier and less error prone.

Written by Nathan Cooper at 18:00



Comments closed