I'm looking to test a software product with Behave. To start with, I will attempt to install the software package, and then perform tests on it. Clearly, if the package doesn't install, then there's no point doing all the other tests (and I do have to test the packaging, as much as the software). Is there a way to either make all other tests dependent on the first ones, or else auto-fail all the others if one of the first tests fails?
I'm aware of the --stop
option, but if my package installs, I want to run all further tests, and if some fail, then I want the rest to continue to run, so I can't use the --stop
option, and I see the Behave devs don't want that functionality to be "programmable" in the tests.
I'm also aware that tests shouldn't depend on each other. I'm slightly at a loss how to approach the problem without some amount of this though. I'm happy to make each test isolated from the others by setting up all the things I need to perform the test first, but it's a bit impractical to make the installation part of that plan.
Likewise, I could put all my tests into a single scenario and use the background to do the installation. This also is rather impractical(!).
Is there a way to put tests in a hierarchy, or some other map of dependencies? Or is there a completely different way to approach a problem such as this?