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! :)