Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] suite_setup and suite_teardown #47

Open
beccasaurus opened this issue Apr 20, 2019 · 0 comments
Open

[Feature Request] suite_setup and suite_teardown #47

beccasaurus opened this issue Apr 20, 2019 · 0 comments
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. sample type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@beccasaurus
Copy link

beccasaurus commented Apr 20, 2019

Some tests require multiple resources to exist.

Take the case of: creating a Job (job_service.CreateJob)

To be able to create a Job, you need:

  1. A "tenant"
  2. A "company"

So this means that, if I have 10 Job tests and I setup/teardown these sources for each test case, the suite makes 20x create API requests and 20x delete API requests (40x requests)

If we had suite_setup (or something similarly named) which ran before the whole suite, we could reduce this to 2x create calls and 2x delete calls (4x API calls = 1 order of magnitude fewer)

test:
  suites:
  - name: Manage Cars

     suiteSetup:
     - # create a dealership which is shared by all test cases
     - # uuid: dealership_id
     - # call: something to create dealership resource

     suiteTeardown:
     - # delete the dealership

     cases:
     - name: Create Car
        spec:
        - call:
             sample: create_car
             params:
               dealership: dealership_id
               make: Chevrolet
               model: Colorado
@vchudnov-g vchudnov-g added priority: p2 Moderately-important priority. Fix may not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. labels Nov 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. sample type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

2 participants