getgauge / gauge

Light weight cross-platform test automation
https://gauge.org
Apache License 2.0
2.99k stars 342 forks source link

Table in scenario not registering variables if table also in spec #2317

Open Flintols opened 1 year ago

Flintols commented 1 year ago

Describe the bug Some of our tests have a table in the scenario as well as in the spec. I tried to run one of these scenarios by running the spec via the gauge run command, and it gave me an error when it did the pre-run check, saying it did not recognize the variable in the scenario. When I run just the scenario, it works as desired.

To Reproduce Steps (or project) to reproduce the behavior:

  1. Initialize a gauge project
  2. Run the gauge command
  3. See error

[Gauge] Failed to execute Specification Name Of Spec : Accessing an invalid parameter (variable_name)

Expected behavior run using the defined variable in the scenario table

Screenshots scenario_error

Versions: Gauge version: 1.1.7 Commit Hash: 5d86b72

Plugins

html-report (4.1.4) python (0.3.15) screenshot (0.1.0) spectacle (0.1.4)

Additional context

ScenarioStep spec_table

Flintols commented 1 year ago

to be clear: the defined parameters in the spec table are not being used in this particular scenario, the new table is defining those. It seems that if I use the firing_type (from spec) instead of firing_mode (from scenario) it allows it to run, but is not what was intended to run.