Skip to content
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

Getting error when I provide the table at the scenario & step level #258

Open
balaji2711 opened this issue Jun 24, 2022 · 9 comments
Open

Comments

@balaji2711
Copy link

Getting error when I provide the table at the scenario & step level

Gauge version: 1.4.3
IDE: VS code

  1. Create a spec file.
  2. Provide the table at the scenario & step level
  3. Observe the spec file.

Actual result: Getting the message as 'Dynamic parameter could not be resolved' and Dynamic parameter could not be resolved. PFA for the screen-shot
Expected result: It should not be thrown any error message.

The same works fine when I provide the table at the feature level.

image

@sriv
Copy link
Member

sriv commented Jun 24, 2022

for table driven scenario see https://docs.gauge.org/writing-specifications.html?os=linux&language=javascript&ide=vscode

you need to set allow_scenario_datatable=true in your properties file or via environment vars. Steps can only take table as parameters.

@balaji2711
Copy link
Author

Yes. Already I had gone through the gauge documentation and enabled that flag as well in the properties file.
Thanks for sharing the information 👍

PFA for the screenshot of a properties file
image

@sriv
Copy link
Member

sriv commented Jun 24, 2022

can you share a sample project for us to investigate?

@balaji2711
Copy link
Author

balaji2711 commented Jun 24, 2022

I reinstalled the gauge extension in VS code and now I can provide the table at the scenario level not at the step level.

One more issue, have observed in the generated gauge report -
The total executed scenarios are 3 and passed are 3 but in the report, passed count shows as 2 -

image

Spec file for your reference -

Login Specification

  • When I navigated to Login Page

Login to the demo application

tags: sanity

  • When I login as "standard_user" using "secret_sauce"
  • Then login should be successful

Login to the demo application with examples

tags: sanity

username password
standard_user secret_sauce
performance_glitch_user secret_sauce
  • When I login as using
  • Then login should be successful

@sriv
Copy link
Member

sriv commented Jun 24, 2022

possibly because of getgauge/gauge#1299

@balaji2711
Copy link
Author

Ok, Thanks for the update.

@balaji2711
Copy link
Author

balaji2711 commented Jun 27, 2022

Hi @sriv, I'm getting an error message when I provide the table at the step level. Already the below flag is enabled in default.properties file -

Enable scenario datatable

allow_scenario_datatable = true

image

@sriv
Copy link
Member

sriv commented Jun 27, 2022

Scenario is the H2 header starting with ##. Scenario datatable has to be under it. You seem to have placed it as a step parameter

@balaji2711
Copy link
Author

balaji2711 commented Jun 27, 2022

Ok, Got it, Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants