k6-docs icon indicating copy to clipboard operation
k6-docs copied to clipboard

Update test life cycle document

Open MattDodsonEnglish opened this issue 3 years ago • 6 comments

  • [x] Use terminology that we decide on in https://github.com/grafana/k6-docs/issues/845
  • [x] Add handleSummary() stage
  • [ ] Create diagram of all stages

MattDodsonEnglish avatar Oct 25 '22 10:10 MattDodsonEnglish

As I mentioned in https://github.com/grafana/k6-docs/pull/936#discussion_r1050881130, I think the current terms we have adopted in https://k6.io/docs/using-k6/test-lifecycle/ are confusing, "VU code" and "VU stage" especially.

It is conflating the terms, "VU" has one meaning in every other context and another meaning in the "test lifecycle" document.

It's probably more accurate to say "test/VU initialization" stage instead of just an "init" stage, and a "test execution stage" instead of a "VU stage" :thinking:

na-- avatar Dec 16 '22 15:12 na--

We use Init so often that I'm hesitant to change it (I also think it's pretty self describing). But I completely agree with you that "VU code" is confusing. Even if "test execution stage" isn't the perfect term, it's a lot better.

MattDodsonEnglish avatar Dec 16 '22 15:12 MattDodsonEnglish

Something I just thought of is that we also need to be careful to not change these terms often, since they're critical in our support conversations, and they become the basis of third-party information too. I'm not opposed to changing a stage name, but ideally we can choose a name that we don't ever need to change again.

For example, here "default" stage is preserved on Youtube.

MattDodsonEnglish avatar Dec 16 '22 16:12 MattDodsonEnglish

To copy over the comment from the thread:

And https://k6.io/docs/using-k6/test-lifecycle/#the-vu-stage itself should probably be slightly expanded in another PR, to contain a mention (with a link here) about the same capability of scenarios.

And, this should probably be a separate issue and a bigger discussion, but "VU code" and "VU stage" in https://k6.io/docs/using-k6/test-lifecycle/ is probably more confusing than helpful thinking It is conflating the terms, "VU" has one meaning in every other context and another meaning in the "test lifecycle" document thinking

It's probably more accurate to say "test/VU initialization context" and "test execution context" thinking Again, though, this is a bigger discussion out of scope for this PR.

MattDodsonEnglish avatar Dec 16 '22 16:12 MattDodsonEnglish

@na--

Instead of Vu stage , what do you think of the iteration stage? All other names I could think of, like "test execution stage" seem too general.

And honestly, despite its flaws, I don't think VU stage is so bad. In my mental model, I don't really think of initializing behavior, like defining functions, as something that a simulated user does. Rather it seems like preparatory action to make a realistic Virtual User.

MattDodsonEnglish avatar Apr 17 '23 19:04 MattDodsonEnglish

:thinking: "iteration stage" seems better to me. Maybe we can even combine both and call it "VU iteration stage"? :thinking:

na-- avatar Apr 18 '23 06:04 na--