Search code examples
restimportjira-xrayfeature-file

XRay REST API Feature File Import Fails Parsing


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"'

Solution

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