-
Notifications
You must be signed in to change notification settings - Fork 466
Allow k6 scenario to be defined within k6 test #1797
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
base: master
Are you sure you want to change the base?
Allow k6 scenario to be defined within k6 test #1797
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1797 +/- ##
==========================================
+ Coverage 89.84% 89.86% +0.03%
==========================================
Files 71 71
Lines 19597 19631 +34
==========================================
+ Hits 17604 17639 +35
+ Misses 1993 1992 -1 ☔ View full report in Codecov by Sentry. |
…fix/k6-scenario-within-k6-test
…fix/k6-scenario-within-k6-test
|
Hi, I have fixed up the tests and improved code coverage. All checks are now passing, thanks. |
|
Can someone please review this? Thanks |
|
Hi, are any maintainers able to review this PR please? |
set dev version to 0.0.1-DEV to allow local install
…fix/k6-scenario-within-k6-test
…enpearson84/taurus into fix/k6-scenario-within-k6-test
|
Any maintainers able to review this PR please? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed changes and tested changes in local environment.
Sync upstream changes
…fix/k6-scenario-within-k6-test
upstream changes to my branch
bzt/modules/k6.py
Outdated
|
|
||
| def startup(self): | ||
| cmdline = [self.k6.tool_name, "run", "--out", f"csv={self.kpi_file}"] | ||
| cmdline = [self.k6.tool_name, "run"] #, "--out", f"csv={self.kpi_file}"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change breaks Taurus' handling of K6 results when more than one scenario is executed in parallel.
In the previous version, Taurus managed the creation of files like kpi-1.csv, kpi-2.csv, etc. automatically.
With this change, we now have to manually configure this setup.
Error:
Child Process Error: Empty results, most likely xxx (K6Executor) failed. Actual reason for this can be found in logs under...
(but the execution was a success. However, due to this error status, the execution is considered a failure in the pipeline)
For a complex execution involving multiple scenarios running in parallel, this increases the complexity of the user's code for something that was previously managed internally.
Therefore, I’d like to understand the reasoning behind removing this default functionality, if possible. Thank you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah Im aware of this. However, this PR has been raised for over a year with no communication from the project maintainers at all so we have been using this Fork instead. We decided we dont need the results output to file as we output to an InfluxDB instead and we dont care about the overall Taurus result so this 'quick' fix works for us.
If this is going to be seriously considered for merging then Ill spend some more time looking at it but Im not sure the project maintainers are interested.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aldrichksb this has now been made optional. Disabled via the modifications -> disable block inside the scenarios block.
…fix/k6-scenario-within-k6-test
|
Just keeping this updated with main |
Allow for load scenario to be defined within the K6 script as well as in the Taurus yml file. Currently if no iterations is defined in the Taurus scenario then only 1 iteration is executed before the test ends. This change adds k6 its own get-load method to allow for infinite iterations.
Closes #1791