owncloud-archive / acceptance-testing

User stories and virtual machine configurations
9 stars 5 forks source link

Add proper cleanup #38

Open PVince81 opened 10 years ago

PVince81 commented 10 years ago

Currently after each scenario the next scenario runs with a "dirty" state from the previous one.

I search for documentation online but it seems the most common pattern is to connect directly to the DB and reset the data there. That would be one possible approach.

Another approach, which is probably more complex, is to create steps that will cleanup over the UI (for example delete a user after the creation test, etc).

We should probably look into direct DB access first as it might help accelerate some tests. For example "Given that user user1 exists" could directly add an entry for that (which seems to be the way how others do it)

Gomez commented 10 years ago

Yes, we should reset the DB after every Scenario. This could be done with a chef command and executed after every Scenario.