SED-4885 Creating plan samples for RPA - #32
Conversation
…bout throughput measurements
david-stephan
left a comment
There was a problem hiding this comment.
Overall good, but took me quite some time to go through it, added several comments. Note, I skipped all keywords and stopped checking the YAML at some points.
| | `Demo_Google-search.json` | A sequence calling an Echo keyword and asserting on its output | | ||
| | `Demo_Data-driven.json` | A data-driven plan iterating over a data source | | ||
|
|
||
| Plans built in the Step plan editor are stored serialized as JSON, and these two files are |
There was a problem hiding this comment.
I'm not sure how the plan are stored in DB are relevant, I would just say that this is the format used for import/export and not meant for authoring
There was a problem hiding this comment.
Totally agree. Will be changed
| @@ -0,0 +1,67 @@ | |||
| # A standalone YAML plan: the same tree you would write inside an automation | |||
There was a problem hiding this comment.
The wording is not very clear for me. Not perfect either, but another propostion:
==============================================================================
STANDALONE PLAN
This file represents a single, self-contained Step plan.
Usage:
• Upload directly: Import into the Step UI via "Add plan" > "Create from YAML".
• Convert/add to a package: Move the contents under a plans: list entry inside
an automation package manifest.
This file is a syntax illustration, not a runnable plan - the keywords it
calls do not exist. For plans you can execute, see ../rpa/
==============================================================================
There was a problem hiding this comment.
Agree with your suggestion. Will be changed
| keyword: "Submit Record" | ||
| inputs: | ||
| - literalInput: "abc" # static | ||
| - numericInput: 777 # static number |
There was a problem hiding this comment.
This is still a string not sure the comment is correct/clear:
There was a problem hiding this comment.
To be discussed
|
|
||
| ## What these samples teach | ||
|
|
||
| The controls are the vocabulary; these are the ideas that decide whether a plan is any good. |
There was a problem hiding this comment.
I would write "The controls provide the vocabulary; the following principles determine whether a plan is well-designed:"
| is the reason to use a plan at all instead of one large script. | ||
|
|
||
| 6. **Values come from outside the plan.** The same bot serves a person on demand | ||
| (execution parameters) and a nightly `schedules` entry, with credentials held in |
There was a problem hiding this comment.
not sure it's clear what we means with (execution parameters) a concrete example would help; also not sure that the distinction between on-demand run and scehduled ones belongs to *Values come from outside the plan.
| It governs whether one failing cleanup step stops the **remaining** cleanup steps — the same | ||
| "keep going" semantics as on a sequence, applied to the cleanup list. Without it, a failing |
There was a problem hiding this comment.
"same "keep going" semantics as on a sequence", I have the feeling we did not mention continueOnError for sequence before, so that's a bit confusing
| session. | ||
|
|
||
| Put a `sequence` inside the session and use **its** `before` / `after` instead. Those steps | ||
| run within the session's token, and `after` still runs when the body fails — so cleanup is |
There was a problem hiding this comment.
"token" is probably not required, it just runs outside of the session. I guess all this is (and some other sections of this PR) comes from claude trying something, figuring it out it's not working as expecting and documenting it as such. While this is good as other user will fall in the same traps, I feel the wording around this a bit unnatural.
There was a problem hiding this comment.
This is exactly the case and I had to perform several iterations to remove such "logs". To be fixed
| | Mechanism | Returns outputs? | Use it when | | ||
| |-----------|------------------|-------------| | ||
| | **Composite keyword** | Yes, via `return` | The thing you are reusing is a *step* inside someone else's plan. **Reach for this first** | | ||
| | `callPlan` | No — it produces its own report branch | The thing you are reusing is a whole bot in its own right, with its own schedule | |
There was a problem hiding this comment.
I don't get " own right, with its own schedule"
There was a problem hiding this comment.
Don't get it neither ;) To be fixed
|
|
||
| ## `forEach threads` vs `testSet threads` | ||
|
|
||
| - `threads` on a **loop** parallelises **rows** of one bot. |
There was a problem hiding this comment.
would say "row processing" or something
|
|
||
| ## A plan that is called is still a plan | ||
|
|
||
| `Shared - Archive processed records` exists to be called by plan B, but nothing marks it as |
There was a problem hiding this comment.
this might also be confusing for readers. Are seems to be more an artefact of "this is a sample, it should not fail". In real life, if I define such a shared plan, nothing say it has to run standalone too and ahve default values.
There was a problem hiding this comment.
Agree. We should clearly mark this as an requirement for this sample or mark this plan as expected to fail
| |--------|-----------|----------|----------|-------| | ||
| | [rpa-selenium](rpa-selenium/) | selenium | java | keyword-driven | intermediate | | ||
|
|
||
| > The sample above is a complete RPA project. For focused examples of the **plan** itself — |
There was a problem hiding this comment.
" of the plan itself" sounds weird, especially singular in this context.
| children: | ||
|
|
||
| # ------------------------------------------------------------- | ||
| # THE ITERATION IS THE UNIT THE LOAD NUMBERS ARE COUNTED IN. |
There was a problem hiding this comment.
I don't understand this sentence and honestly not much of the paragraph until the line 65. This sample also only introduce number of users and iterations stated the more complex "knobs" will be in the 2nd sample, but ere we already talk about pacing and throughput.
| # assert the response times would look excellent | ||
| # and mean nothing. | ||
| # | ||
| # This runs once per iteration, so a failure at |
There was a problem hiding this comment.
I find speaking about iteration here is confusing it runs for every Checkout keyword execution. I would also add that all keyword response should be asserted, not just the final one in the workflow.
| # THE SLA, EXPRESSED IN THE PLAN. | ||
| # | ||
| # `performanceAssert` compares an aggregate of a measurement against a | ||
| # threshold once the load is over. It turns a load test from "here are |
There was a problem hiding this comment.
once the "test" is over ?
| # TWO RULES ABOUT WHERE IT GOES, both easy to get wrong: | ||
| # | ||
| # 1. A `performanceAssert` MUST live in an `after` or `afterThread` | ||
| # block. As an ordinary child - of the thread group, of a testCase, |
There was a problem hiding this comment.
Writing down the error you will get if you miss place it feels quite redundant.
| continueOnError: true | ||
| steps: | ||
| # "Purchase journey" is created by the keyword with | ||
| # startMeasure/stopMeasure, so - unlike an instrumented sequence - |
There was a problem hiding this comment.
not sure it's worth repeating the limitation here
| expectedValue: 250 | ||
|
|
||
| # ========================================================================= | ||
| # C. Measuring the failures, not just the successes. |
There was a problem hiding this comment.
What's the added value compared to the sample 01 ?
| virtual user. | ||
| 2. **`measurementName` must name a keyword or custom measurement**, never an `instrumentNode` one — | ||
| that fails with `No measurement is matching the defined filters.`, the same message a misspelled | ||
| name gives. For an SLA on a multi-step transaction, emit a custom measurement — see |
There was a problem hiding this comment.
I only checked the sample 01 and 05 at the time of writing this, but composite keyword could be used instead
| | Instrumented node | the node's `nodeName` | `instrumentNode: true` | **no** — dashboards only | | ||
| | Custom | whatever the keyword chooses | `output.startMeasure(...)` in the keyword | **yes** | | ||
|
|
||
| Custom measurements are the only way to time something **smaller** than a keyword call (two page |
There was a problem hiding this comment.
this paragraph is quite hard to read/understand, custom keyword measurement is to measure part of the keyword execution...
Also written somewhere else "For an SLA on a multi-step transaction, wrap it in a custom measurement" sound wrong, You basically have to create a keyword containing the multi steps first. If it contains only these multisteps you're done, if it contains more than you need a custom measurement to only measure what you need.
|
|
||
| ### Measure the failures, not just the successes | ||
|
|
||
| An average over successful calls only is the most misleading number in load testing — when a system |
There was a problem hiding this comment.
This sentence is confusing and I saw the same pattern in the automation package YAML (probably in sample 01 too).
What would be incorrect is to have 1. no functional assertion and 2. rely only on response times without considering failure and success rate.
I see that Performance assert doesn't support rate and doesn't support check on the status at all, but what is formulated here sounds even more confusing than being transparent about it. Using the COUNT in performance assert given that it includes all statuses don't help to automatically assert the test results.
No description provided.