[Avocado-devel] RFC: Test Developers API

Ruda Moura rmoura at redhat.com
Wed Apr 1 14:17:58 UTC 2015


On Fri, Mar 27, 2015 at 12:39:44PM -0300, Ruda Moura wrote:

Here's what I think: I like the two ideas, so I vote on #2 and #4.

> 2. Export Test developers API in submodule avocado.api
> ------------------------------------------------------
> 
> In this case, avocado.api or avocado.testing or any better name,
> contains the whole API for test developers.
> The point here is to isolate the test API in a submodule.
> 
> It has a clear border for test developers.
> So it will contain Test classes and methods, 
> functions to run process, logging etc.
> 
> The Fabric project does it (see fabric.api).

Good:
* No big changes in avocado structure
* Easy to implement
* Clear interface : "Use this avocado.api (or say avocado.test_api)".

Bad:
* If you just import modules from the other parts,
  the documentation will not be immediately ready for sphinx/readthedocs.
  So it needs further work.


> 4. Test Developers: "Don't use avocado.app"
> -------------------------------------------
> 
> This is a different approach than the others above.
> In this case, we concentrate everything that isn't 
> for test developers under a new submodule avocado.app.
> 
> Everything related to plugins, parsing of command line,
> logging, and any stuff target to the application, goes to avocado.app.
> So the test developers can use everything else from avocado.
> 
> The potential problem here is cyclical dependences.

Good:
* Very clear border for test developers.

Bad:
* (Medium) Changes in avocado structure.

About the name "avocado.app":
I'm with Cleber, I prefer to move to "avocado.core" rather than "avocado.app".
And then to flat some submodules, say "avocado.cli.app" will become
"avocado.core.app" and not "avocado.core.cli.app".

That's it, both approaches are good enough for me.

-- 
Rudá Moura




More information about the Avocado-devel mailing list