How to manage different test cases with Feature file in Specflow

651 views
Skip to first unread message

Arpan Buch

unread,
Nov 18, 2014, 1:05:08 AM11/18/14
to spec...@googlegroups.com

How to manage and club different test cases in Specflow.

We have manual testers who just write off their test cases in MTM and tfs sprint wise.

We have to take the tests from there and we automate the stories in Specflow(BDD form).

1) The manual testers do not write all the test cases in a single story. They usually create different stories for same feature. So during automation, how should our feature files be?.

2) Currently i can say we are just unit testing the methods but how will we be handling the high end scenarios for system testing. how to handle a full process say "When I add a product to cart" this actually means the customer is already in product description page and is adding a product to cart after selecting a quantity. We currently have built scenarios like "I am at product page" and "I select a quantity" and "I add a product to cart"

3) Also there is Smoke test cases to be run. So how can we select or identify test cases which would run with Smoke tests. How will be our Smoke feature file be like ?? How to reuse the other methods ? we will not be writing same test cases for smoke , we just want to reuse the other test methods for smoke as well.

I am completely new to this thing so in case i you are not clear with what i have written , please put it in comment and i will edit it.

Please help me in managing my test cases , feature files and scenarios.

Claudio Klingler

unread,
Nov 25, 2014, 11:08:08 AM11/25/14
to spec...@googlegroups.com
Hi

Question 1:

Currently, you are doing the same work twice. Your manual testers write the stories (in their own free language) and you do it another time in another language, the feature language. Both are human readable and I assume that the manual testers should be able to write their stories in the feature language as well. If you don't, how do you manage the changes in the stories at a later point of time?

Question 2:

I think you can only manage this by adding more powerful steps to your feature language. The higher you level of testing is, the more powerful your steps have to be in order to keep your feature files short, readable and error-free. Define a step like:

When I add the 5 items product XY to card ZZ

This step may select itself the product description page and do the subsequent steps itself)

Question 3:

Use tags to mark features or scenarios as smoke tests like: @SmokeTest. SpecFlow allows to selectively execute steps that have certain tags. But: If you have automated test, why don't you execute all the tests as "smoke tests"? :-)


Reply all
Reply to author
Forward
0 new messages