[TIP] network testing complexity
fuzzyman at voidspace.org.uk
Tue Apr 6 05:32:52 PDT 2010
On 06/04/2010 13:22, Alfredo Deza wrote:
> I am trying to test as much as I can in a small project of mine.
> However, the project has some network usage: pushes files from one
> spot to another with Mercurial via SSH.
> For now, I am creating a testing environment where I have some SSH
> keys enabled and I am able to test this specific functionality.
> However, I also have specific tests for all the methods/functions
> involved. I had a user complain about the network tests breaking
> (which is expected if he doesn't have a proper setup) but I find it very
> useful to have not only tests for methods/functions but also for the
> final output: did the file actually made it?
> Is this approach OK?
> I have had situations where a test for a specific method didn't picked
> up an error but the 'test_final_ouput.py' did (which made me correct
> the tests).
> Maybe I should not include them when distributing my project? Or would
> documentation explaining how to set everything up so tests can run
> correctly would be enough?
Having functional tests (end-to-end, integration tests, whatever you
want to call them) is a good thing - however ideally they should *still*
not rely on external resources. Really your test infrastructure should
setup the server your tests connect to locally. If these tests have
dependencies then you should document these.
> Alfredo Deza
> testing-in-python mailing list
> testing-in-python at lists.idyll.org
READ CAREFULLY. By accepting and reading this email you agree, on behalf of your employer, to release me from all obligations and waivers arising from any and all NON-NEGOTIATED agreements, licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap, confidentiality, non-disclosure, non-compete and acceptable use policies ("BOGUS AGREEMENTS") that I have entered into with your employer, its partners, licensors, agents and assigns, in perpetuity, without prejudice to my ongoing rights and privileges. You further represent that you have the authority to release me from any BOGUS AGREEMENTS on behalf of your employer.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the testing-in-python