-
Notifications
You must be signed in to change notification settings - Fork 341
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
Specify a sequence of scenarios to execute in a configuration file. #1991
Comments
So far, we've been recommending that Gauge specs/scenarios remain independent and this sort of sequencing leads to temporal coupling. And it increases the complexity in executing a single scenario or even rerun all/failed tests. But this has been requested too many times, so I am going to consider this. (@zabil - thoughts?) My take is that
Alternatively, could we attempt to make gauge honour piping (like unix tools do) so one could do something like Thoughts? /cc @getgauge/core |
Preferably a json file. Maybe worth expanding the manifest.json to add something like execution groups roughly something like
I assume running in parallel should be disabled as it depends on the order?
If this can also be done on windows/powershell |
Did a quick check, and as long as gauge honours stdin, users should be able to pipe in/redirect list of specs/scenarios into gauge. The challenge though is that gauge does not honour order of scenarios, so this will still be viable only to control the order of execution of specs and not scenarios within the spec. @raweaver - would this approach work for you? I'll spend some more time once I know that this can be useful. |
@sriv @zabil Thank you for the responses and suggestions. We discussed the options and we feel that a sequence file passed to gauge as a command line argument would be our preferred solution. Also, controlling the order of specs (not scenarios) would be sufficient. It might be beneficial to structure the sequence file such that you could add support for specifying the scenario sequence in the future if desired. Thank you! |
fixes #1991 Signed-off-by: sriv <srikanth.ddit@gmail.com>
Hi all, anyone knows how to run a test case from another test case using gauge? |
Is your feature request related to a problem? Please describe.
No, the request is not related to a problem.
Describe the solution you'd like
We are using Gauge for automated system testing of embedded systems and we would like to run a specific scenario, to program the Device Under Test, before all of the other scenarios. We currently execute Gauge twice. Once to run the programming scenario then again to run the test suite.
We are currently using tags to group scenarios into test suites and we use tag expressions to run the suites. However, as the suites get large and we have more tests, we thought a configuration file would make it easier to visualize and control which scenarios run in which test suite.
We realize that Gauge appears to execute spec-by-spec. We aren't looking to run scenario 1 from spec A, then scenario 2 from spec B then scenario 3 from spec A. Maybe the configuration file is a YAML file where you specify a sequence of specs and then within each spec you specify which scenarios to execute. For example:
Then to execute Gauge, you might run:
Describe alternatives you've considered
We've considered using the BeforeSuite hook for the programming, but still felt that overall it would be nice to specify the complete set of scenarios to execute in a test suite.
We've considered using a script to feed the list of scenarios to Gauge using the --scenario option, but had concerns about the input buffer size on the command line.
Additional context
Nothing at this time.
The text was updated successfully, but these errors were encountered: