Gáspár Nagy on software

coach, trainer and bdd addict, creator of SpecFlow

SpecFlow Tips: Collect more information on error (part 1)

by Gáspár on April 1, 2016

When BDD scenarios are turned into executable automated tests, they usually automate the application together with its dependencies (e.g. end-to-end with browser automation or headless with controller-layer automation). This ensures that the application works as a whole, but unfortunately it also makes the analysis of a failing test harder. So many things can go wrong, especially if you run these tests on a build server, where the monitoring of the different actions is limited. Because of this, providing more information on the context where the error has happened (screenshot, log, last transaction, etc.) is really helpful. In this post I show you how this can be done.

[read more…]

BDD Addict Newsletter March 2016

by Gáspár on March 7, 2016

Dear BDD Addicts,

bddaddict-newsletter Welcome to the second BDD Addict newsletter. My plan is to collect interesting posts, articles and events about behavior driven development, SpecFlow, Cucumber moreover also test automation and agile testing. I’m following many channels, but surely not all. So if you have seen something that fed your addiction, just send me the link with a few comments to bddaddict@specsolutions.eu.

How do you know that you are already a BDD addict? I don’t know, but google assistant recently started to advertise me the rates for DB Base Metals Double Long (currently at $4.52)… do you also have that? Yeah, this is BDD at The New York Stock Exchange (Arca)…

So while waiting for BDD to prosper, your dose for March 2016 contains the following topics:

  • [Watch] TDD – Eat it raw! (Kevlin Henney)
  • [Background] Why Cucumber? (Aslak Hellesøy)
  • [Learn:SpecFlow] How to structure test automation code with the driver pattern (David Leitner)
  • [Learn:SpecFlow] Feature file backgrounds (Gaspar Nagy)
  • [Process] Given/When/Then — How to phrase them? (Liz Keogh)
  • [Process] Climbing up and down inside the Test Pyramid (Konstantin Kudryashov, Mathias Verraes)
  • [Event] Agilia Conference 2016

Read the full newsletter…

BDD Addict Newsletter March 2016

Subscribe to it at http://specsolutions.eu/bddaddict so that you never miss it! (Did you get the February issue?)

SpecFlow Tips: Put your hooks in order

by Gáspár on March 1, 2016

SpecFlow hooks (or events) are extension points where you can insert custom automation logic into the scenario execution before or after different sections, for example before any scenario execution. These can be used to perform custom preparation or cleanup logic, e.g. resetting the database. In bigger projects, you might need to have multiple hooks of the same kind. These run in an arbitrary order by default, which can be problematic in some cases. Hook ordering is a new feature in SpecFlow v2 that can help you in this situation. In the current “SpecFlow Tips” post, I am showing you how.

[read more…]

Integrating SpecFlow with Microsoft Test Manager (MTM)

by Gáspár on February 25, 2016

Many teams that are currently in a transformation process towards using agile and bdd have to face the problem that the new specification artefacts and reports have to be integrated into the existing tool chain. In the case of SpecFlow, many of such teams use Microsoft Test Manager (MTM, part of Team Foundation Server / Visual Studio Team Services). As the manual test activities (especially exploratory testing) also play an important role in agile testing and BDD, MTM might still have its place in the new tool chain. Also MTM has an important feature that it allows to run automated tests on different virtual lab environments (e.g. on different operating systems). As the structure of test cases in MTM are somewhat similar to the structure of Gherkin scenarios (title, tags, steps), it is an obvious idea to try integrating SpecFlow to MTM. I have worked on a prototype to test  this idea that I would like to present in this post.

[read more…]

Running SpecFlow scenarios in parallel with xUnit v2

by Gáspár on February 23, 2016

As mentioned earlier, one of the key new features of SpecFlow v2 is that you can run your tests in parallel within this same AppDomain. This is currently possible with NUnit v3 and xUnit v2. This post shows a step-by-step guidance about how this can be done.

[read more…]