Feature file is replacement of Test Cases ?

39 views
Skip to first unread message

Ravisuriya

unread,
Jun 27, 2018, 4:24:54 AM6/27/18
to Behaviour Driven Development
Hello,

I'm Ravi and I practice Software Testing.
I'm learning about BDD. As well I'm exploring the libraries and for now I'm practicing using Cucumber.

I see we have the feature files that we can write using Cucumber.

Here are the few questions I have:

1) The feature files what we write, is that a replacement of test cases what we used to have?
2) What is the opinion of BDD on this feature file and the test cases? Are they same? The feature file is good enough and no need of test cases? If it is a replacement, how & why? If not a replacement, why?
3) Is the feature file, the other form of test cases? If yes, then when I referred the feature files available, they don't go in detail as the test cases do. Thereby the value of the test cases isn't really found in this feature file. What's the practitioners opinion on this?
4) How to use BDD and libraries as Cucumber in Software Automation, so that effective value can be seen out of it ?

Please do share your opinions. It helps me to figure out the path I should be taking as a practitioner to do testing of value for stakeholder.

George Dinwiddie

unread,
Jun 27, 2018, 8:25:46 AM6/27/18
to behaviordriv...@googlegroups.com
Ravisuriya,

On 6/27/18 2:00 AM, Ravisuriya wrote:
> Hello,
>
> I'm Ravi and I practice Software Testing.
> I'm learning about BDD. As well I'm exploring the libraries and for now I'm practicing using Cucumber.
>
> I see we have the feature files that we can write using Cucumber.
>
> Here are the few questions I have:
>
> 1) The feature files what we write, is that a replacement of test cases what we used to have?

You could think of the scenarios within the feature file as test cases.
They are illustrations of the expected behavior of the feature, and can
be executed to verify whether those expectations are met or not.

I don't know what kind of test cases you used to have. I've seen a wide
variety. Can you describe yours, or give an example?

> 2) What is the opinion of BDD on this feature file and the test cases? Are they same? The feature file is good enough and no need of test cases? If it is a replacement, how & why? If not a replacement, why?

I'm not sure I understand your questions, here. Perhaps it's because I
don't know about _your_ test cases.

I find that the scenarios in the feature file work well to verify that
the system works as expected, even in the face of adverse conditions.
That is, the scenarios provide this when you do a good job with them.
I've also seen some that I found pretty worthless.

> 3) Is the feature file, the other form of test cases? If yes, then when I referred the feature files available, they don't go in detail as the test cases do. Thereby the value of the test cases isn't really found in this feature file. What's the practitioners opinion on this?

What do you mean "the other form of test cases?" What sort of detail are
you expecting?

> 4) How to use BDD and libraries as Cucumber in Software Automation, so that effective value can be seen out of it ?

That's more than an email. Maybe start with The Cucumber Book.
https://pragprog.com/book/hwcuc2/the-cucumber-book-second-edition

>
> Please do share your opinions. It helps me to figure out the path I should be taking as a practitioner to do testing of value for stakeholder.
>

Hope this helps,
George

--
----------------------------------------------------------------------
* George Dinwiddie * http://blog.gdinwiddie.com
Software Development http://www.idiacomputing.com
Consultant and Coach http://www.agilemaryland.org
----------------------------------------------------------------------

Ravisuriya

unread,
Jul 2, 2018, 2:35:38 PM7/2/18
to Behaviour Driven Development

Hello George,

Thanks for writing. I was looking for the information and advice. Again, thanks for the time you have shared for me by writing this.

> 1) The feature files what we write, is that a replacement of test cases what we used to have?

You could think of the scenarios within the feature file as test cases. They are illustrations of the expected behavior of the feature, and can
be executed to verify whether those expectations are met or not.


Ravi: Hm. Yes. This is what I'm writing now to start with.

I don't know what kind of test cases you used to have. I've seen a wide variety. Can you describe yours, or give an example?

Ravi: I mean the test cases which we maintain in documents and test management tools. Can the test cases be written in feature file for performance, security and accessibility ?
I see just a functional tests and to an extent UI checks can be described briefly in the feature file.

Is there a limit on how big should a scenario be in the feature file?


> 2) What is the opinion of BDD on this feature file and the test cases? Are they same? The feature file is good enough and no need of test cases? If it is a replacement, how & why? If not a replacement, why?

I'm not sure I understand your questions, here. Perhaps it's because I don't know about _your_ test cases.

I find that the scenarios in the feature file work well to verify that the system works as expected, even in the face of adverse conditions.
That is, the scenarios provide this when you do a good job with them. I've also seen some that I found pretty worthless.


Ravi: Do the feature file what we write in BDD, does it replaces the test cases what we maintain excel sheets and test management tool?
I'm not sure about this. I understand, the test cases in the excel or test management tool should be there along with the feature file.

What's your opinion?

> 3) Is the feature file, the other form of test cases? If yes, then when I referred the feature files available, they don't go in detail as the test cases do. Thereby the value of the test cases isn't really found in this feature file. What's the practitioners opinion on this?

What do you mean "the other form of test cases?" What sort of detail are you expecting?


Ravi: When I say 'detail', at times I will have to write in detail saying this is UI changes to appear in UI. This is the state change to appear in the transition.
From the features files I referred on the web, did not go in detail and did not have such contents. They had just a scenario with a precondition and an action and then outcome at UI and functional level.

Is there any limit on number of lines written for a scenario in the feature file? If no, then what is a good scenario and how long it can go in the feature file?

> 4) How to use BDD and libraries as Cucumber in Software Automation, so that effective value can be seen out of it ?

That's more than an email. Maybe start with The Cucumber Book.
https://pragprog.com/book/hwcuc2/the-cucumber-book-second-edition

Ravi: I'm referring to it.

>
> Please do share your opinions. It helps me to figure out the path I should be taking as a practitioner to do testing of value for stakeholder.
>

Hope this helps,


Ravi: Yes, it did help me and gave me a hope that one practitioner is assisting me to do better and understand better! :)

Reply all
Reply to author
Forward
0 new messages