0

Version of Xray

6.5.0 enter image description here

Feature File Being Imported - Simplified Version

Feature: Something Something CC AllProducts

Scenario: Something With Three Products
    Given billing something is xyz 
    When I make a something something transaction
    Then the database values are xyz

Response

{
    "testIssues": [],
    "preConditionIssues": [],
    "message": "Error parsing feature file\n"
}

Am I missing tags?

Documentation Used

https://docs.getxray.app/display/XRAY500/Importing+Cucumber+Tests+-+REST

Original Feature File (Redacted)

Feature: xxx CC AllProducts

Background:
    Given billing xxx is xxxx
    And xxx method is ttt
    And machine details are
        | MachineId | ActorId    | HwSerial         |
        | 11111     | 1111       | 1111             |

@research
Scenario Outline: TTTTT With Three Products
    Given I have the products
        | ProductCode | ProductValue | UnitCode | QuantityValue |
        | 0           | 100          | 1        | 2             |
        | 1           | 200          | 1        | 1             |
    And generated <CardType> card
    When I make a allProducts WWWWW transaction
    Then the database values are
        | WWW     | QQQ     | YYYY        | QQRR    | BBBB               |
        | 400     | 400     | 1           | <IsEmv> | 2                  |

Examples:
    | CardType | IsEmv  |
    | CON      | True   |
    | CLS      | True   |

When this failed parsing, my colleague and I tried to strip it down to the most basic elements, but, as I mentioned, it failed, too.

Using version 2.0 of the API.

Request Sent From Postman

curl --location 'https://jira.MYCOMPANY.com/rest/raven/2.0/import/feature?projectKey=NCS' \
--header 'Authorization: Basic YWRpajpEZWU4MTg4OTE5OSEh' \
--header 'Cookie: JSESSIONID=1A0E4F9D64EA77D468285A3DE2F26AF3; atlassian.xsrf.token=BFS8-LR8B-Z1EU-6YVL_3c474e4ccb370815dd28576ffde8fa3f390cb5a2_lin' \
--form 'file=@"/D:/adij/Downloads/CC_MultiVend_AllProduct.feature"'
Guy
  • 666
  • 1
  • 10
  • 34
  • 1. you are using Xray on Jira server/datacenter right (not Xray cloud)? 2. if you're using Xray on Jira server/datacenter, which Xray version do you have installed? 3. Are you submitting the .feature file or .zip with the .feature file? – Sérgio Apr 18 '23 at 13:24
  • 1. Yes, Xray on a regular Jira server. 2. please help me find that info 3. Just a .feature file (one) – Guy Apr 18 '23 at 13:26
  • Your .feature file looks fine. I tried it myself. curl -H "Content-Type: multipart/form-data" -u username:password -F "file=@a.feature" "https://myserver/rest/raven/2.0/import/feature?projectKey=CALC" – Sérgio Apr 18 '23 at 13:28
  • 2. you need to ask your Jira admin to get that information from Jira administration – Sérgio Apr 18 '23 at 13:31
  • Version 6.5.0 of Xray – Guy Apr 19 '23 at 06:42
  • Ok, so you have a recent version of Xray. I used the "Original Feature File (Redacted)" that you provided and the `curl` command I shared, and it worked so pershaps we're not using the same .feature file or there are some strange characters on it not visible to the eye. Can you try the a.feature file that I used? (https://gist.github.com/bitcoder/4eb6124eaacb5f13769fccba34e1f92a) and my curl command? If that still doesn't work out, I would recommend reaching out to Xray support team (https://jira.getxray.app/servicedesk/customer/portal/2) so they can diagnose this with you in more detail. – Sérgio Apr 19 '23 at 09:22
  • Thank you, Sérgio. I'll mark this resolved, then. – Guy Apr 20 '23 at 09:03

1 Answers1

0

Please see Sérgio's comments to the original post.

Guy
  • 666
  • 1
  • 10
  • 34