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

unable to update Scenario Outlines on Jira #23

Open
BlacktoBlue opened this issue May 11, 2023 · 1 comment
Open

unable to update Scenario Outlines on Jira #23

BlacktoBlue opened this issue May 11, 2023 · 1 comment

Comments

@BlacktoBlue
Copy link

I have a test which is a Scenario outline:

e.g.

  Given there are <start> cucumbers
  When I eat <eat> cucumbers
  Then I should have <left> cucumbers

  Examples:
    | start | eat | left |
    |    12 |   5 |    7 |
    |    20 |   5 |   15  |

When I run that as part of a test suite I get the following error:

Uploaded results to JIRA XRAY Test Execution: xx-1234
Exception IndexError: list index out of range
Traceback (most recent call last):
  File "C:\Python310\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Python310\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "D:\git\testing\windows-application-framework\venv\Scripts\behave.exe\__main__.py", line 7, in <module>
  File "D:\git\testing\windows-application-framework\venv\lib\site-packages\behave\__main__.py", line 183, in main
    return run_behave(config)
  File "D:\git\testing\windows-application-framework\venv\lib\site-packages\behave\__main__.py", line 127, in run_behave
    failed = runner.run()
  File "D:\git\testing\windows-application-framework\venv\lib\site-packages\behave\runner.py", line 804, in run
    return self.run_with_paths()
  File "D:\git\testing\windows-application-framework\venv\lib\site-packages\behave\runner.py", line 824, in run_with_paths
    return self.run_model()
  File "D:\git\testing\windows-application-framework\venv\lib\site-packages\behave\runner.py", line 626, in run_model
    failed = feature.run(self)
  File "D:\git\testing\windows-application-framework\venv\lib\site-packages\behave\model.py", line 350, in run
    formatter.eof()
  File "D:\git\testing\windows-application-framework\venv\lib\site-packages\behave_xray\formatter.py", line 221, in eof
    self.collect_tests()
  File "D:\git\testing\windows-application-framework\venv\lib\site-packages\behave_xray\formatter.py", line 235, in collect_tests
    testcase.status = self._get_xray_status(tc_status.statuses[0].name)
IndexError: list index out of range
@fundakol
Copy link
Owner

I cannot reproduce. Here is my outline scenario:

@jira.testcase('JIRA-34')
Scenario Outline: Add two numbers: <first> and <second>
When I add <first> and <second>
Then result is <result>
Examples:
| first | second | result |
| 1 | 2 | 3 |
| 2 | 5 | 8 |

which worked with this command:
behave tests -f behave_xray:XrayCloudFormatter

Did I miss something?

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

No branches or pull requests

2 participants