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

Verbose output does not report dynamic parameters correctly #1767

Closed
eludba opened this issue Sep 29, 2020 · 2 comments · Fixed by #1771
Closed

Verbose output does not report dynamic parameters correctly #1767

eludba opened this issue Sep 29, 2020 · 2 comments · Fixed by #1771
Labels

Comments

@eludba
Copy link

eludba commented Sep 29, 2020

Describe the bug

Verbose output does not report the correct parameters used for steps when using dynamic parameters. Dynamic parameters appear in the wrong order or are skipped entirely.

What command(s) did you run when you found the bug?

gauge run specs/gauge_test.spec --verbose 

specs/gauge_test.spec:

# Minimal Example to reproduce error

| index | test_value    |
|-------|---------------|
| 0     | orange        |


## Test
* Step with "a" and "b" and "c"
* Step with <test_value> and "b" and "c"
* Step with "a" and <test_value> and "c"
* Step with "a" and "b" and <test_value>

step_impl/gauge_test.py:

from getgauge.python import step

@step("Step with <a> and <b> and <c>")
def step_test(a, b, c):
    print('Expect: Step with "%s" and "%s" and "%s"' % (a,b,c))

Output, stack trace or logs related to the bug

Python: 3.6.9
# Minimal Example to reproduce error

   |index|test_value|
   |-----|----------|
   |0    |orange    |
  ## Test
Expect: Step with "a" and "b" and "c"
      * Step with "a" and "b" and "c"    ...[PASS]
Expect: Step with "orange" and "b" and "c"
      * Step with "orange" and "b" and "c"       ...[PASS]
Expect: Step with "a" and "orange" and "c"
      * Step with "a" and "c" and "orange"       ...[PASS]
Expect: Step with "a" and "b" and "orange"
      * Step with "a" and "b" and "a"    ...[PASS]

Versions

Gauge (Output of gauge -v)

Gauge version: 1.1.4
Commit Hash: c982558

Plugins
-------
html-report (4.0.12)
python (0.3.11)
screenshot (0.0.1)

Node.js/Java/Python/.Net/Ruby version

Python 3.6.9

Operating System information

Ubuntu 18.04.5 LTS

@sriv
Copy link
Member

sriv commented Sep 30, 2020

Thanks for reporting. I can see this in javascript as well.

@sriv sriv added the bug label Sep 30, 2020
@sriv
Copy link
Member

sriv commented Sep 30, 2020

Dev Notes

Suspect the culprit is formatter.FormatStepsWithResolvedArgs

BugDiver pushed a commit that referenced this issue Oct 8, 2020
Signed-off-by: sriv <srikanth.ddit@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

2 participants