Hello, I am posting here because I am using RSpec, even if this question is probably broader than the framework I am using...
*A little background*: Basically I am a manual tester of web applications who is trying to make his way toward automation using RSpec with WATIR gem. I feel like BDD is the natural path coming from manual testing. I must confess that I had initially started using Cucumber but after being advised to avoid that "overhead" and "simply" use RSpec (which is compatible with Cucumber), so I did but not without questioning myself... Also I am barely starting with Page-Object and still have nothing to manage my data... (I have only wrote a couple of simple scenarios so far) *Here is my problem*: I usually tend to create integration/End-to-End tests (Always dependent on data state). So when I go to write my _specs, they always starts by a specific state, then I try to DRY them up as follow: 1. Create sort of "Unit Test" Scenarios 2. Make my Unitary Scenarios functions of variable, so I can re-use the same for all(as much as possible) cases Now I am wondering what to do? or maybe how to structure myself? *QUESTIONS:* 1. Should I turn what I call Unitary Scenario/Test into actual Function/Module? To then be used into true integration test specifications? OR 2. Should I have Unit Tests and Integration Tests _specs either into different files or "tagged" 3. Maybe a mix of both? How to mediate to 'data state' related issues?? For example, if I am writing 2 tests : 1 for ADD, 1 For DELETE an element. Each test needs to be in the opposite state of the other. So my only chance to test them both is either run them dependently from one another or to create data specific for each test (which I cannot always afford, which is why I do more of what I call integration where I make weird scenarios accumulating this sort of dependency tests). I would appreciate any insights. Also if someone could share some project examples that would enlighten me, it would be much appreciated. Thanks for sharing your experience! Jeff -- You received this message because you are subscribed to the Google Groups "rspec" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/rspec/cc503083-5058-4287-916a-0d39659f05ae%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
