Thanks for all your information they are very helpful. I do understand the concept of Cucumber.
I'm working directly with a Developer, I personally have not come up with this idea but my Developer has asked me about writing the script this way and I have explained to him about Page Object but I also want to get an outside opinion just to be a supporting evidence that this is not the way to use Cucumber. On Friday, 8 December 2017 17:47:10 UTC, Chuck van der Linden wrote: > > one other thing (see below > > On Friday, December 8, 2017 at 1:54:15 AM UTC-8, 江南 wrote: >> >> Thanks for your suggestion. >> >> I'm testing a website and I have various data to test but I don't want to >> create duplicate steps in different feature files so I want to do is put >> the test steps e.g. Login page in one feature file and Account page in >> another then pull the input data from a spreadsheet. >> I think this way will make easier to maintain the feature file that is >> all. >> >> Dangit, hit send too quickly on prior response. I also meant to add this > regarding spreadsheet use with cucumber. > > If you are working with cucumber but want to pull in data from a > spreadsheet, that is most often a sign that cucumber may not be the right > tool for you. When using cucumber your test data should be defined in > the feature files. There are a number of ways that cucumber supports > this, from steps that can take a table to process, to using scenario > outlines where the scenario is defined with replaceable parameters that are > pulled from a table of 'examples' and the scenario is repeated for each > row in the table. > > Putting test data in a spreadsheet obscures it from view, making it harder > to understand what tests are doing when reading feature files, which > defeats the main purpose (common understanding) of using feature files in > the first place. If 'it doesn't matter because nobody else reads the > feature files' then you should not be using cucumber, use instead rspec and > just code the test steps directly in code, not in a feature file. Then if > you want to have data files in spreadsheets, you can just make use of some > of the common gems for reading and writing common spreadsheet format files. > > Cucumber is a great tool, but it is also primarily a collaboration tool, > not a test tool. Yes testing is a part of what cucumber does, but that is > not its primary purpose. Suggested reading: > https://cucumber.io/blog/2014/03/03/the-worlds-most-misunderstood-collaboration-tool > -- -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. [email protected] http://groups.google.com/group/watir-general [email protected] --- You received this message because you are subscribed to the Google Groups "Watir General" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
