-
Notifications
You must be signed in to change notification settings - Fork 144
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
feat: include a test from another file into a test suite #320
Comments
Proposal: executors/custom.yml
Testsuite.yml
venom run Testsuite.yml # will loads all custom executors from executors/ directory |
close #320 Signed-off-by: Yvonnick Esnault <[email protected]>
close #320 Signed-off-by: Yvonnick Esnault <[email protected]>
close #320 Signed-off-by: Yvonnick Esnault <[email protected]>
Hello @yesnault, Thanks for your reply. In your proposal, I'm not exactly sure to understand what will do this block:
|
example with a valid user defined executor: executor: customA
input:
myarg: {}
steps:
- script: echo "{{.input.myarg}}" > t.log
- script: echo "{\"hello\":\"{{.input.myarg}}\"}"
assertions:
- result.code ShouldEqual 0
output:
systemout: "{{.result.systemout}}"
systemoutjson.hello: "{{.result.systemoutjson.hello}}" Here, the executor is named A user defined executor is defined in four part:
Example of a valid testsuite, using a the executor customA`: name: testsuite with a user executor
testcases:
- name: testA
steps:
- type: customA
myarg: World
info:
- result of customA is {{.result.systemoutjson.hello}}
assertions:
- result.systemoutjson.hello ShouldContainSubstring World |
I understand and I see how to use it to meet my need: I will have to define a custom executor that run my common test suites. So when I want to reuse a test between several test suites, I just need to call my executor inside my test suite. Thanks for this improvement 👏 |
close #320 Signed-off-by: Yvonnick Esnault <[email protected]>
* feat: user defined executors close #320
Is your feature request related to a problem? Please describe.
When you want to re-use a test in several test suites, you have two possibilites:
Describe the solution you'd like
Be able to include a test inside a test suite at a specific location
Additional context
At the moment, I used a
common
directory where I put all my common tests in dedicated test suites. Then I use a symlink in each test directory where I want to use this test.The text was updated successfully, but these errors were encountered: