-
Notifications
You must be signed in to change notification settings - Fork 344
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
Gauge validate does not work together with gauge_data_dir feature introduced in 1.4.0 #2244
Comments
+1 |
+1 |
Right now
|
@zabil
If something is unclear please feel free to ask me. I can also extend my example project to a more real life project for better reference. |
@BrudiBanani thanks for taking the time to explain this.
Agree
This is tricky as validations include parsing the csv and checking if dynamic parameters are right. To understand the use case better can you explain why you run validate outside run? Is it to quickly check if the specs don't have any parse errors? |
Thanks, i did not think about it.
I am using gauge in a big java maven project. Working together with a lot of people on it. It is best practice to ensure that a new version does not have negative impact on other tests (or the whole project) and therefore a part of our building process is the gauge validation (triggered by the gauge maven plugin). |
Hi guys, I am facing the same issue with validation when trying to use the environment specific input files. Do we have some ETA when this issue could be resolved? We also use validation as a separate step in our project to verify the specs. We need to enable this new environment specific input files functionality while keeping the validation functionality. |
No one is actively working on adding features to Gauge at the moment. However any pull request to add running |
Describe the bug
In Gauge v1.4.0 #2047 and #2057 were introduced, which brings the ability to use gauge_data_dir in properties, so that one is able to define environment specific .csv's for data driven executions.
When using
gauge run -e xxx
the spec parser seems to respect the used environment. Withgauge validate
always default environment is used. And there is no possibility to define it.To Reproduce
Steps (or project) to reproduce the behavior: (alternatively clone/fork/download this https://github.com/BrudiBanani/gauge_validate_behaviour_example)
gauge_data_dir=gauge_data/<env>
(<env>
resolves to test1 & test2)test.csv
file with dummy data (atleast one column with one entry). Leave test2 empty.table:test.csv
in example.spec before first scenariotags: test1
to example.spec andtags: test2
to example_2.specgauge validate
gauge run -e test1
gauge run -e test2
Logs
For 8.
For 9.
For 10.
Workaround
For 8. I can just place a dummy test.csv in my root directory or define a
gauge_data_dir
in default environment and place a dummy test.csv there. Thangauge validate
works again and i can built my project.Expected behavior
I would expect that
gauge validate
somehow respects all environments, so that I do not need to create dummy files like described in workaroundVersions:
Additional context
Another issue I have with this behaviour is that
gauge run
respects environments but not tags.For example:
gauge run -e test2 -t test2
also returns a parse error, because it seems like every .spec is parsed even I do not want to execute it. Please extend the specParser so thatgauge run
will just parse what gets executed.One last issue:
Please document exit codes. (Only documentation found "If either one of the user-created environment is not found, Gauge ends with a non-zero exit code.")
Executing step 10
gauge run -e test2
throws an exit code 2, which is not documented.From what I know gauge exits with 0 if all tests pass, with 1 if some test fails. And every other issue is exit code 2.
Thanks :)
The text was updated successfully, but these errors were encountered: