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

Setup and teardown for cloud execution #539

Closed
robingustafsson opened this issue Mar 16, 2018 · 2 comments
Closed

Setup and teardown for cloud execution #539

robingustafsson opened this issue Mar 16, 2018 · 2 comments
Assignees
Milestone

Comments

@robingustafsson
Copy link
Member

#457 implements setup & teardown lifecycle hooks for tests. However, it doesn't implement the necessary hooks for the feature to work with cloud/distributed execution, namely:

  • We need to be able to run only the setup function (and pause) and then distribute the result/return of the setup function to all nodes' export default function:

    export default function(setupData) {
        http.get(`https://${setupData.featureBranchSubdomain}.example.com/`);
    }
  • We need to be able to extract the data returned by the setup() call from the node where it was run, and pass it to all other nodes' export default function. Maybe through the REST API? So, you could start k6 with something like:

    1. run k6 cloud --run-setup-then-pause script.js
    2. extract the setupData
    3. pass it to all nodes (k6 run --setup-data "..." or via REST API), and then unpause all nodes to begin execution

The intent is to merge #457 first to make it available in k6 for local execution and then implement what's outlined in this issue to gain the necessary cloud/distributed execution support.

@robingustafsson
Copy link
Member Author

Also, as noted by @na-- in #457 the setup and teardown function timeouts (hardcoded to 10s for now) should be made configurable.

na-- added a commit that referenced this issue Apr 25, 2018
This fixes #576, though we should add some upper limits when implementing #539
@na-- na-- self-assigned this May 9, 2018
na-- added a commit that referenced this issue May 17, 2018
This would hopefully be enough for fully implementing #539 in the backend
@na--
Copy link
Member

na-- commented May 18, 2018

Closing this because #629 should be sufficient to implement the rest of the needed changes outside of k6 itself.

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

No branches or pull requests

2 participants