Uploaded image for project: 'Xray for Jira'
  1. Xray for Jira
  2. XRAY-1183

As system, Cucumber Scenario and Scenario outlines can be imported by REST API

    XporterXMLWordPrintable

Details

    • Story
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • R2.1.0
    • Integration, REST_API
    • None
    • R2.1.0 S3
    • NOTRUN

    Description

      The REST API should provide an endpoint for submitting a Cucumber ".feature" file or a zip file containing multiple .feature files; the files in the zip file may be in folders/subfolders.

      Each ".feature" file will be processed as follows.
      The "Scenario" or "Scenario Outlines" should be imported to Tests, of the Test Type "Cucumber", with the respective Cucumber Type filled out.
      A Test will be uniquely identified by the name of the test case that follows the "Scenario/Scenario Outline" sections. Therefore, if a test is found with the same name, then it will be updated; otherwise, a new Test will be created in JIRA.

      The mapping from the Senario/Scenario Outline present in the .feature files to the Test issues in JIRA would be as follows:

      Scenario/Scenario Outline Test in JIRA
      name of the Scenario/Scenario Outline "Summary" field
      steps "Scenario" field
      tags of the Scenario/Scenario Outline labels

      The "Feature" section is not imported, since the feature itself should exist previously as a JIRA requirement issue (e.g. story).
      The exception is the tags before the "Feature: " section; if a requirement isue is found for the specified key, then a "Tests" link is created between the Test and the requirement issue.

      Below is an example of a .feature file containing a Scenario Outline.

      @REQ_CALC-889
      Feature: As a user, I can calculate the sum of 2 numbers
      
              @UI @core
      	Scenario Outline: Cucumber Test As a user, I can calculate the sum of 2 numbers
      		Given I have entered <input_1> into the calculator
      		And I have entered <input_2> into the calculator
      		When I press <button>
      		Then the result should be <output> on the screen
      	
      		  Examples:
      		    | input_1 | input_2 | button | output |
      		    | 20      | 30      | add    | 50     |
      		    | 2       | 5       | add    | 7      |
      		    | 0       | 40      | add    | 40     | 
      		    | 4       | 50      | add    | 54     | 
      

      The created/updated Test in JIRA can be seen in .

      Attachments

        1. c1.png
          c1.png
          80 kB
        2. c2.png
          c2.png
          9 kB

        Activity

          People

            pmmr Pedro Rodrigues
            smsf Sergio Freire
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 1 week Original Estimate - 1 week
                1w
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 week, 1 day, 1 hour
                1w 1d 1h