Closed jacek99 closed 12 years ago
See this discussion: http://www.ruby-forum.com/topic/174879
The proposed solution is putting initialization in some kind of env.py file. AFAICS this is not implemented in freshen right now but could be easily done using nose's begin() hook in the nose plug-in. Maybe I'll be able to propose a patch. Am I overlooking something here? Is there already a way to do something like env.rb or at_exit in cucumber?
See commit comment for further info.
I'm not entirely happy with the solution provided in my two patches. While it works just fine for me it's probably not the best solution for everyone.
Due to the way that nose/freshen detects feature files from arbitrary locations, it is difficult to define a canonical location for the support package. I imagine that this was one of the reasons why Roman introduced step file locations into the feature files, too?
I tend to agree with the OP that hooks (BeforeAll, AfterAll, BeforeFeature, AfterFeature) would provide a much cleaner and probably more intuitive solution although this would mean that we'd have to depart from cucumber's approach.
Roman, do you want to comment on this before I invest more time?
I guess my comment on #30 should have been posted here for better effect.
Just to reiterate, I suggest we break away from cucumber
and go with the hooks approach.
Yes, please....would help us a lot on complex test cases
Just FWIW I do not like this implementation of environment setup/teardown. Executing code at the top level of support.env through import is really nasty.
l would prefer an approach like lettuce's @before.all/@before.feature etc. which are much clearer.
Hi, are there any updates on this? This is killing us in production right now...we have 7,000 BDDs in Freshen and the build is taking 2.5 hours to run...much of that spent in the endless Background sections which could have been easily reusable across the entire .feature file.
Please help with a new release, if possible....
I am sorry to say but we are in the process of abandoning Freshen due to total lack of progress on this project. It is sad, it has served us well, but the myriad of bugs (especially in parsing) leaves us no choice.
We have cases where we need to start up a mock (written in Flask). we would like to do it once at the beginning of all the test runs and then just shut it down at the end.
Right now we are forced to start/stop at the beginning of every scenario, since we can only use @After, @Before. This slows down the test run considerably