cernbox / smashbox

main test suite
GNU Affero General Public License v3.0
22 stars 35 forks source link

Ability to call one or more smashbox tests from within a smashbox test #8

Open jnfrmarks opened 9 years ago

jnfrmarks commented 9 years ago

I'd like to be able to call one or more smashbox tests from within a smashbox test to allow for concurrent runs. Is this possible?

@PVince81

PVince81 commented 9 years ago

Basically it's about having super-testsets or multi-level testsets. A testset that lets you specify a test file with other parameters like "apps to enable" and other config settings.

moscicki commented 9 years ago

I am not really sure if I understand what you would like to achieve. Do you want to make dependencies between the tests? Is smash -a option to run over all test tests not enough? Do you need a driver around smash so that you can call it multiple times?

Could you please illustrate an example of what you want?

jnfrmarks commented 9 years ago

I think what I want is "collections". I want to be able to run multiple tests at the same time, for instance test_shareGroup and test_shareDir.

moscicki commented 9 years ago

A quick workaround: try to specify

smash test_share*.py
PVince81 commented 9 years ago

This is more about providing a super-testset that looks like this:

[
    {
        testsToRun: ['test_upload.py', 'test_whatever.py'],
         appsToEnable: ['files_encryption'],
         someExpectedResult: ...
    },
    {
         testsToRun: ['test_upload.py', 'test_whatever.py'],
         appsToEnable: ['files_encryption', 'files_versions'],
         someExpectedResult: ...
     },
]

and that could for example be in a supertest called "test_dosensiblestuffwithencryption".

Basically having one test be able to run other tests. Maybe add a utility function "run_subtest('test_upload')" that makes it possible to run a test within a worker.

nickvergessen commented 9 years ago

It is possible to run bin/smash lib/oc-tests/ (so specifying a directory) which should be enough logic. Just group the tests in suitable test-folders ;)

PVince81 commented 9 years ago

And then write shell scripts to run the command on the same folder multiple times with different configs/cases ?  (With encryption, without encryption, etc).