Hi Michael, and thanks for your effort!

Well, I am in fact already using the test suite derived from quickstart!

My problem is, that this approach will in fact run setup-app (from the test 
fixture setUp() method) for each (of the ~200 simple app.get()) test cases, 
which slows the whole thing done, even with the sqlite://:memory: 
database...

Nose features setUpModule() and setUpPackage() methods which would only run 
once for all test cases in the module.
The problem is that I couldn't get it to work properly using an persistent 
app attribute which is set in TestController.

I think I might create an app that demonstrates it... I'll push it 
somewhere and post here, maybe that helps ;)

Am Donnerstag, 27. September 2012 07:46:06 UTC+2 schrieb Michael Pedersen:
>
> Hi there, Moritz. I like the idea of this project *quite* a lot. I 
> don't have much by way of useful reply right now, but that's because I 
> haven't ever broken out the test cases to deal with the issues you're 
> dealing with. The closest I can get is to point out that a simple 
> quickstart has a minimal testing application (look under 
> myproject.tests to see it and trace it out). Since, by default, it 
> uses the sqlite :memory: database, it would probably be most helpful 
> in getting a speed up for you. 
>
> I hope it's at least a starting point for improvement, anyway. 
>
> On Tue, Sep 25, 2012 at 2:39 PM, Moritz Schlarb 
> <[email protected]<javascript:>> 
> wrote: 
> > Hi Group! 
> > 
> > I already asked this in the IRC channel, but while asking, the question 
> > seemed to better fit to the mailing list: 
> > 
> > Thanks to nose, I have written a test generator that takes a (very) 
> > nested data structure and yields test cases from it. 
> > The code is here: 
> > 
> https://github.com/moschlar/SAUCE/blob/develop/sauce/tests/functional/test_site.py
>  
> > Its purpose is at first for me to check if all types of pages at least 
> > get served without exceptions (regardless of *what* gets rendered in 
> > this case) and to check if authz works correctly for all the pages by 
> > specifying valid HTTP responses. 
> > 
> > It works quite well, except for the fact that its slow as hell! 
> > I suspect that it could be much fast, if the test fixture wouldn't have 
> > to be executed for each of these simple HTTP requests. I think I can 
> > safely assume that this won't have negative side effects in this case so 
> > I would like to take the application setUp and tearDown from 
> > sauce.tests.TestController and put them on the module level in the 
> > test_site module. 
> > 
> > A first try was unsuccessfull since I couldn't figure out how to get an 
> > app instance initialized that I could use there. 
> > 
> > My first try was to simply take the fixture methods and put them on 
> > module level in test_site.py, but that failed with 
> > ResourceClosedError: The transaction is closed 
> > in the setup-app part of the setUp method. 
> > 
> > Maybe anyone has a recipe for that or a running example that could 
> > inspire me! :D 
> > 
> > Thanks a lot, 
> > Moritz 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups "TurboGears" group. 
> > To post to this group, send email to 
> > [email protected]<javascript:>. 
>
> > To unsubscribe from this group, send email to 
> [email protected] <javascript:>. 
> > For more options, visit this group at 
> http://groups.google.com/group/turbogears?hl=en. 
> > 
>
>
>
> -- 
> Michael J. Pedersen 
> My Online Resume: http://www.icelus.org/ -- Google+ 
> http://plus.ly/pedersen 
> Google Talk: [email protected] <javascript:> -- Twitter: pedersentg 
>

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/turbogears/-/fJVoi9Oc4B4J.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en.

Reply via email to