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

Support for running tests in series #723

Closed
mikeblum opened this issue Jul 25, 2018 · 2 comments
Closed

Support for running tests in series #723

mikeblum opened this issue Jul 25, 2018 · 2 comments
Labels

Comments

@mikeblum
Copy link

In an effort to modularize and re-use code / create atomic testing situations I've broken out our performance tests into separate files:

├── config.json
├── company
│   ├── auth.js
│   ├── context.js
│   ├── company.js
│   ├── process.js
│   └── utils.js
├── run_tests.sh
└── scenarios
    ├── test_dashboards.js
    ├── test_login_client_credentials.js
    ├── test_login_password.js
    ├── test_processes.js
    ├── test_roles.js
    └── test_users.js

and the shellscript's job is to declare any ENVIRONMENT_VARIABLES and run the JS test ex.

k6 run \
    -e TEST_USERNAME=user@example.com \
    -c config.json  \
    scenarios/test_dashboards.js

It would be a useful feature to be able to run these tests in series by passing in the root tdir that holds all of the tests. Something like:

k6 run --test-dir=scenarios

Some potential hang-ups would be the metrics and deeply nested test directories.

@na-- na-- added the feature label Jul 25, 2018
@na--
Copy link
Member

na-- commented Jul 11, 2019

Something like this would be possible after #1007 is done and merged, by just having different executors for each scenario. Controlling whether the scenario execution would be in series or in parallel can be done via the startTime option for each executor.

Not sure if I should leave this issue open after the PR is merged though, because while running multiple load testing scenarios in a single k6 run will be possible, there probably will be some room for improvement of the UX of using that feature...

@na--
Copy link
Member

na-- commented Jan 21, 2021

So, #1007 was released in k6 v0.27.0, and it indeed introduced scenarios. They are not perfect, but the missing features to have proper "test suites" (as well as the obstacles to implement them) are covered in #1342, so please follow that issue for updates.

@na-- na-- closed this as completed Jan 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants