Lesser known tips on BDD testing using Squish

Lesser known tips on BDD testing using Squish

Behavior-Driven Development (BDD) is an extension of the Test-Driven Development approach which puts the definition of acceptance criteria at the beginning of the development process as opposed to writing tests after the software has been developed. With possible cycles of code changes done after testing.

Behavior Driven Tests are built out of a set of Feature files, which describe product features through the expected application behavior in one or many Scenarios. Each Scenario is built out of a sequence of steps which represent actions or verifications that need to be tested for that Scenario.

Some lesser know tip on BDD testing using Squish:

1) Breakpoints in the feature file

When doing BDD testing with the Squish GUI Tester, you can suspend execution using breakpoints not just inside steps (steps.js, steps.py, etc.) which implement your BDD steps, but also in the feature file.

As a developer you want to be able to put breakpoints in feature files so you can debug a feature/scenario/step. It’s possible to do so in Squish. It’s not so obvious since most users think it’s just a text file, but in Squish IDE you can put a breakpoint on any of the steps in the feature file and single step through.

2) Recording missing steps

When recording a BDD scenario, did  you miss some steps? You can record these steps easily.

In the Squish IDE, right click on the scenario missing the implementation.

From the context menu select the option “Record Missing Steps”.

Squish will first execute all the steps which have been implemented until it comes across the step which is missing implementation and start recording.

You can read up more on BDD testing in the Squish documentation for each edition at the links below:

 

0 Comments

Leave a reply

Your email address will not be published. Required fields are marked *

*