I appreciate all your comments Chuck. AS you suggested I looked at Test 
Factory gem and you were right, it gives good nice view of how objects can 
be like.
=> I feel like I get the Object usage knowing I'll need practice to master 
it.

I am still undecided on whether or not I will continue with Cucumber or 
switch to RSpec.
=> I think I will trust you guys on that one). Even if as a none technical 
guy, Cucumber was of a great help to get started (Even though I had to 
rewrite several times certain steps to finally get to an acceptable level 
of abstraction, that is the learning curve)

Thanks for all your good advice and enlightening me on new tools, it helps!



On Friday, December 8, 2017 at 12:21:08 PM UTC-5, Chuck van der Linden 
wrote:
>
> On Thursday, December 7, 2017 at 12:19:51 PM UTC-8, Jeff Fagot wrote:
>>
>>
>> So now, I would turn my question in a different angle: why is my Browser 
>> instance @b declared in my *** ENVR.RB *** file known to my *** STEPDEF.RB 
>> *** file?
>> Does it mean that Modules or Class are segregated from the "rest of the 
>> world" (== ENVR, STEPDEFS...) and that the "rest of the world" can be seen 
>> as a unique big Class?
>>
>> Thanks for helping me thru the process of sorting things out!
>>
>> Titus thanks for the advice on BDD, when I started I did not know about 
>> RSpec and spec_helper, but I will definitely take your advice !
>>
>>>
>>>>>
> I second what Titus said about BDD..  while you can build a test framework 
> from cucumber, if you are not also using it for BDD then you are really not 
> getting the full benefit from cucumber, and in a lot of cases you would be 
> better off with using rspec as a test framework.  You can create re-usable 
> test helper methods that work much the same way as the reusable steps in 
> cucumber.   Writing proper tests in gherkin is a bit of an art, and if you 
> are not using the feature files to drive shared understanding of what the 
> product is supposed to do, then that is mostly just additional overhead, 
> and the same test steps could be expressed directly in the code for your 
> tests. .
>
> As to why things defined in env.rb are available in steps, (as well as 
> things defined in steps usable in other steps), well that's part of the 
> magic of the cucumber 'world'.   It's part of the design in order to make 
> it easy to pass data between steps, create common objects that are used by 
> steps etc.  You can for example make a 'my_account' variable in a given 
> step that establishes the account balance, and then later use the same 
> variable in another step that modifies the balance with a deposit or 
> withdrawal.    For more details I would strongly recommend reading 'The 
> Cucumber Book", it's the best way I know of to get off to a good start with 
> Cucumber and avoid a lot of the more common pitfalls I see testers fall 
> into when they first encounter Cucumber. 
>

-- 
-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

--- 
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 watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to