Forum Discussion

RLRE's avatar
RLRE
Occasional Contributor
2 years ago

TestComplete Gherkin Autocompletition. Making sure that I don't define 2 steps for the same purpouse

Hello Community!

We work with BDD in our project. More precisely, we use Gherkin in TestComplete to define, align and automate scenarios.

We want to avoid defining multiple steps for the same purpose because this may rise in unintentionally doubling code. 

Example: Assume, the following steps have the same meaning:

 

When I type "Hugo" in the field "name"
When I type "Hugo" in field "name"
When I type "Hugo" field "name"
When I type "Hugo" on the field "name"
When I type "Hugo" on "name"

 

Despite the fact, that you may encounter a situation, in which those sentences means different things. In our case, they don't. 

Simply assume all this steps mean the same: Type something in a field.

Instead of having different variants of the same step, it might be useful to get a hint from TestComplete that such a similar step already exists.

That's why I was thinking about some kind of autocompletion for Gherkin.

There may be a better way to avoid doubling steps, unless of course you know all the steps inside out, which will not be the case for all contributors in our project.

Is there an extension or even a configuration setting in TetsComplete for autocompletition in Gherkin?

Our alternatives so far are:

- Work with Pull requests to review each others feature files // this may be to late

- Create and keep a list (outside TestComplete) of existing steps with their meaning. // Update effort is high, I think.
I.e. none of the current ideas is satisfactory.
Maybe your ideas are better.
Thanks for that!

Regards, RLRE