0

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.

AlSki
  • 6,868
  • 1
  • 26
  • 39
Arpan Buch
  • 1,380
  • 5
  • 19
  • 41
  • You can use selenium web driver to make your test cases automated. For ex. as per your given 2nd scenario of product add to cart, Right now you are doing that manually but once you create automated script of add to cart then in future any time for same function testing you will just need to run that script which will save your time and effort also.. – Helping Hands Nov 18 '14 at 06:04
  • @Quality-Expert the problem with that is that when your site changes your script is invalid and you need to change every script. With SpecFlow you can simply edit the steps that are affected and all tests that use those steps will be fixed. – Sam Holder Nov 18 '14 at 19:50

1 Answers1

1
  1. You could create a feature file and have your various stories as scenarios. If a story can be broken down into various tests, you could have a feature file per story. It depends on your context and the level of abstraction and detail you are trying to achieve with your tests. I usually try to have very focused feature files that concentrate on testing one concepts. If I end up with too many scenarios in one feature I look for groupings that can be moved to another feature file and duplication that can be combined into a generic scenarios, steps or data driven tests.

  2. "High end scenarios" would include the automation of the scenarios above in the UI. If you are wondering how to automate the scenarios it depends on your UI. If you have a web UI, Selenium Webdriver, as Quality Expert recommended, is a good choice. To keep your tests maintainable you should research Page Objects.

  3. Many test runners that SpecFlow supports provide a means of categorizing tests and allowing you to run tests by category. To use this functionality you can add tags to your features or scenarios to categorize your tests. You could add @Smoke to the features and scenarios that compromise your smoke tests. Then in your script to run the tests you would use the command line arguments for your test runner to run only tests marked with Smoke.

    Your smoke feature file will be similar to your other tests. If you reuse steps that you have already written in SpecFlow it will automatically bind and reuse the step's method. As long as your smoke tests is are written in a similar manner as your other test, you should be able to easily reuse your step methods.

Community
  • 1
  • 1
  • A) I am already using the page object pattern with the use of page factory. B) use i do use the tags for smoke still am not sure about the code coverage part C) i have set up the selenium with specflow which gives me more modular form in GIVEN WHEN THEN form. I am still not sure going forward how should our approach be in managing the test cases , feature files. – Arpan Buch Nov 19 '14 at 10:24