-
Notifications
You must be signed in to change notification settings - Fork 345
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 list --scenarios may not be returning all scenarios #2312
Comments
Thanks for the detailed report @menty666 I tried to replicate this on gauge-tests (https://github.com/getgauge/gauge-tests). Here's what I saw:
Ignoring Now running your script:
The line count is 116, ignoring Looking at the diff: diff --git a/scenarios.txt b/scenarios.txt
index f2cfff9..814faf5 100644
--- a/scenarios.txt
+++ b/scenarios.txt
@@ -1,5 +1,7 @@
All level Execution hooks
AND aggregation of hooks
+AND aggregation of hooks
+AND aggregation of hooks
basic context execution
Basic spec with multiple scenarios, passing
Basic spec with one scenario, passing
@@ -7,6 +9,7 @@ Capture screenshot using custom screenshot grabber during test execution
Concept calling itself
Concept execution failure
Context steps should appear for all scenarios
+Context steps should appear for all scenarios
Continue execution on any error/exception in "Continue on Failure" step
Continue execution only for mentioned error/exception in "Continue on Failure" step
Continue on failure in a concept step
@@ -18,6 +21,7 @@ Datatable driven parallel execution with hook failure
Datatable execution with row number
Datatable execution with row range
Duplicate concept definition
+Duplicate concept definition
Duplicate step implementation should atleast give a warning
Execute a spec from a folder which is not specs
Execute a spec in a sub folder
@@ -49,8 +53,12 @@ Nested Concept execution
Nested Concept execution with data table
Normal context step - with no cof fails then tear down steps are expected to execute
OR aggregation of hooks
+OR aggregation of hooks
+OR aggregation of hooks
Passing tagged execution
Passing teardown execution
+Passing teardown execution
+Passing teardown execution
Repeat last run with a failure
Repeat last run with log level debuging
Repeat last run with rerun failed specs after correcting failure
@@ -67,12 +75,12 @@ Scenario and step level hooks
Scenario data store refreshes after every scenario run
Scenario execution by specifying line number
Scenario in concepts
-Scenario with no heading
Scenarios with context and teardown having Unused data table value
Scenarios with context Using data table value
Scenarios with teardown Using data table value
Scenarios with Unused data table value
Scenarios with Using data table values
+Scenario with no heading
Screenshot using custom logic
Setting multiple values for package_to_scane env
Setting single value for package_to_scane env
@@ -82,9 +90,11 @@ Simple Datatable With special characters
Skip spec if all scenarios are skipped
Spec data store persists data between scenario runs
Spec execution with unimplemented step in context step
+Spec execution with unimplemented step in context step
Spec execution with unimplemented step in context step and scenario
Spec execution with unimplemented step in context step, scenario and tear down
Spec execution with unimplemented step in scenarios
+Spec execution with unimplemented step in scenarios
Spec fails if it has even one scenario failing irrespective of the passing and skipped scenarios in it
Spec run using fail safe does not fail if irrespective of the passing and skipped scenarios in it
Spec should be skipped if it has all scenarios with unimplemented steps
@@ -96,8 +106,8 @@ Suite and Spec Level Hooks
Suite data store persists data between spec runs
Tagged expression
Tagged expression with ! operator
-Tagged expression with (!&|) operator
Tagged expression with & operator
+Tagged expression with (!&|) operator
Tagged expression with | operator
Test concept failure Path
Unimplemented teardown execution So the extra lines are duplicates (or order is mixed up). The duplicate lines are these:
these seem to arise because the same scenario name is used in different specs, and This brings a question - in case two specifications have same scenarios, how could it be best shown in the console output? |
Thank you for having a look! It's definitely a real use case, though. Despite asking them not to for reporting reasons, we have Test Developers that will use the same scenario name in multiple files. i.e. SomeProcess_Desktop.spec They might both contain a test scenario named In that case, if we're looking for the total number of scenarios, and used the |
Describe the bug
I tried to use
gauge list --scenarios
to list all the scenarios, trying to get a count of how many existed in our project. It gave me 242 scenarios.We used a powershell script to sweep the directory and get the list, and it yields what may be the real count, at 355. In other words, the command line tool may be missing some scenarios.
To Reproduce
Steps (or project) to reproduce the behavior:
gauge list --scenarios
.Expected behavior
The counts between the two methods should match
Screenshots
N/A
Versions:
The text was updated successfully, but these errors were encountered: