Mediaclip is a software development company headquartered in Montreal, Canada. Mediaclip develops and distributes software for e-commerce product personalization by enabling content owners to deliver a rich user experience that increases sales and customer loyalty. Mediaclip customers typically embed their solutions into their websites and apps and white label them, for instance, photo books, calendars, posters, and more.
The development team was given a new challenge and started work on a .NET Core AngularJS web application. At the start of development, the team took the usual approach by writing specifications in regular documents and used SoapUI, NUnit, Protractor/Selenium to test APIs, C# unit tests, and UI, respectively. All other tests were carried out manually.
Testlink served as the test management tool to keep an overview of the testing activities. Every team member tried to contribute with their part; however, the tests tended to be very differently written based on everyone’s style. Also, testing different API scenarios were challenging to do in an easy-to-understand and readable way. Finally, working on the application had its challenges too, due to the method in which requirements were defined and documented.
It was clear that the current workflow, both in development and testing, needs to change for a smoother and more efficient way to work. To tackle this, the team introduced Test Driven Development (TDD) to help bring the size of the implementation chunks down and Behavior Driven Development (BDD) to help with the readability and speed of the tests. For BDD, SpecFlow got selected.
The team introduced Test-Driven Development (TDD) to help bring the size of the implementation chunks down and Behavior Driven Development (BDD) to help with the readability and speed of the tests. For BDD, SpecFlow got selected.
During the implementation of SpecFlow, the team of about ten developers swiftly became familiar with Gherkin language, credit to its simplicity, and created their first few automated BDD scenarios in the first two sprints. After that, the TDD and BDD solutions kept growing at a good pace.
There were, however, some challenges along the way that took much longer to solve. Some of them are still an ongoing concern and provide room for optimization:
Deploying the application and the APIs to a properly configured test environment in the build process became an additional requirement to the team as testing shifted closer to development. Some of the more sophisticated BDD tests needed multiple components running at the same time.
The tests (BDD scenarios) were modifying the application. They created DB records, changed the state of some configuration data. The team had to agree on a concept to deal with this and make sure tests do not step on each other’s toes when they run and that the .Net Core application is in a similar starting state each time a test run is triggered.
A test takes time to execute. Even if this is just a few seconds per test, it adds up as the suite of tests grows. Feedback becomes slower the more extensive the suite becomes. This is a balancing act that the team needs to manage carefully.
Keeping tests small in scope makes them much easier to maintain and quicker to run but creates many steps and step bindings. Writing them in a re-usable way took some practice. The next level of re-use was to string these steps together into larger tests which also influenced how the team had written the steps.
A well-architected and current test code is as essential as the application code. If you do not treat it this way, it can quickly become a burden. Users lose trust in the results, and the feedback they are supposed to provide becomes meaningless.
I can trust that the information in the SpecFlow files is correct and up to date.
A portfolio of roughly 300 easy-to-understand SpecFlow tests is what the team takes great pride in. It helps them test their applications faster and more efficiently. Incorporating both TDD and BDD with SpecFlow, Mediaclip was able to shift their testing activities much closer to development. Their feedback cycles have been significantly reduced, their software quality improved and their confidence to release changes to production is higher than ever.
Learn more about Specflow and its benefits for development.
Mediaclip is the premier developer of white-label software for the creation of a wide range of personalized products. It enables printers, retailers, and content owners to deliver a rich user experience that increases sales and customer loyalty. Its solutions are currently integrated into hundreds of websites worldwide.