-
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
Dynamic Test Case Generation #583
Comments
Hello, I think it can match your use case "This way when we add more endpoints, we can add to the array of endpoints to test." without having to generate testcases. Also you are talking about the verbosity, can you explain what you would like to see ? |
Hello, I believe you are right, it will match our use case to generate multiple tests over the range. So that part is good. The one thing we would like to see or if there is a way to do it, is to print out the name of the Ranged test (without the range=X) in the text (with the 0 verbose case). So for example:
Maybe a configuration value or if name is detected print it out? |
with the fix, it's now: without range and all success
without range and some errors:
with range and all ok
with range and some errors: ❯ venom run verbose-range.yml
[trac] writing venom.82.log
• Ranged Test Generation (verbose-range.yml)
• Testing-Array-of-Services
• service1 Exists (range=0) FAIL
Testcase "Testing Array of Services", step #0-0: Assertion "result.code ShouldEqual 0" failed. expected: 0 got: 1 (verbose-range.yml:0)
• service2 Exists (range=1) FAIL
Testcase "Testing Array of Services", step #0-1: Assertion "result.code ShouldEqual 0" failed. expected: 0 got: 1 (verbose-range.yml:0)
• service3 Exists (range=2) FAIL
Testcase "Testing Array of Services", step #0-2: Assertion "result.code ShouldEqual 0" failed. expected: 0 got: 1 (verbose-range.yml:0)
final status: FAIL |
Looks really good! Can't wait for it to be in! |
We are working on transitioning from our current Mocha implementation of tests to venom, and one of the things we perform is a
for each
loop with our endpoints that then performs a test case. This way when we add more endpoints, we can add to the array of endpoints to test.We tried some functionality with Venom, but saw that if we are using a ranged value in a single step will only print the name of the test case and it's status (with a ranged=X) if the verbosity is set to > 1. Setting it to 0 will not print the step at all, and only print the testcase status.
Is there a way that we can generate test cases off a range so we can write one test case but it is created via a range? Or maybe be able to print out the steps of a test case in 0 Verbosity if it is a range (and without the range=X).
Thank you!
The text was updated successfully, but these errors were encountered: