Proposal for integration tests infrastructure
ncoghlan at redhat.com
Tue Oct 28 07:08:22 UTC 2014
On 10/22/2014 09:43 PM, Honza Horak wrote:
> Fedora lacks integration testing (unit testing done during build is not
> enough). Taskotron will be able to fill some gaps in the future, so
> maintainers will be able to set-up various tasks after their component
> is built. But even before this works we can benefit from having the
> tests already available (and run them manually if needed).
> Hereby, I'd like to get ideas and figure out answers for how and where
> to keep the tests. A similar discussion already took place before, which
> I'd like to continue in:
> And some short discussion already took place here as well:
It's worth clarifying your scope here, as "integration tests" means
different things to different people, and the complexity varies wildly
depending on *what* you're trying to test.
If you're just looking at tests of individual packages beyond what folks
have specified in their RPM %check macro, then this is exactly the case
that Taskotron is designed to cover.
If you're looking at more complex cases like multihost testing, bare
metal testing across multiple architectures, or installer integration
testing, then that's what Beaker was built to handle (and has already
been handling for RHEL for several years).
That level is where you start to cross the line into true system level
acceptance tests and you often *want* those maintained independently of
the individual components in order to catch regressions in behaviour
other services are relying on.
> Some high level requirements:
> * tests will be written by maintainers or broader community, not a
> dedicated team
> * tests will be easy to run on anybody's computer (but might be
> potentially destructive; some secure environment will not be part of tests)
> * tests will be run automatically after related components get built
> (probably by Taskotron)
> Where to keep tests?
> a/ in current dist-git for related components (problem with sharing
> parts of code, problem where to keep tests related for more components)
> b/ in separate git with similar functionality as dist-git (needs new
> infrastructure, components are not directly connected with tests, won't
> make mess in current dist-git)
> c/ in current dist-git but as ordinary components (no new infrastructure
> needed but components are not directly connected with tests)
Note that any or all of the above may be appropriate, depending on the
exact nature of the specific tests.
For example, there are already some public Beaker installer tests at
https://bitbucket.org/fedoraqa/fedora-beaker-tests for execution on
> How to deliver tests?
> a/ just use them directly from git (we need to keep some metadata for
> dependencies anyway)
> b/ package them as RPMs (we can keep metadata there; e.g. Taskotron will
> run only tests that have "Provides: ci-tests(mariadb)" after mariadb is
> built; we also might automate packaging tests to RPMs)
Our experience with Beaker suggests that you want to support both -
running directly from Git tends to be better for test development, while
using RPMs tends to be better for dependency management and sharing test
> Which framework to use?
> People have no time to learn new things, so we should let them to write
> the tests in any language and just define some conventions how to run them.
Taskotron already covers this pretty well (even if invoking Beaker
tests, it would make more sense to do that via Taskotron rather than
Red Hat Hosted & Shared Services
Software Engineering & Development, Brisbane
HSS Provisioning Architect
More information about the env-and-stacks