Skip to content

Implement a minimal coverage strategy and make it the default #96

@swankjesse

Description

@swankjesse

Today if you use a lot of Burst, you end up running a lot of tests!

Cartesian Product

A test with N,M parameters runs NxM tests. For example, a test with 3 sizes & 4 sodas runs 12 tests:

Small Medium Large
Pepsi
Coke
Dr Pepper
Root Beer

Adding a choice of 3 distributions triples the number of tests to 36. With Cartesian product strategy, the number of tests multiply.

Minimal Coverage

I’d like to build a new coverage strategy that runs each option at least once.

A test with N,M parameters would run N+M-1 tests. The test above would run 6 tests:

Small Medium Large
Pepsi
Coke
Dr Pepper
Root Beer

Adding a choice of 3 distributions adds only 2 more tests. (All existing tests get distribution=Can, plus Pepsi_Medium_Bottle, Pepsi_Medium_Fountain).

API

I think we express it like this:

@Burst(strategy = CartesianProduct)
class DrinkSodaTest { ... }
@Burst(strategy = MinimalCoverage)
class DrinkSodaTest { ... }

Once implemented I’d also like to explore making this option the default. I’d like to encourage people to Use More Burst and the Cartesian product strategy makes it expensive to do so.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions