Uploading feature files is useful if the source of truth for test cases are local feature files in Cypress and Xray is only used for tracking execution results.
You can enable the upload using the uploadFeatures setting and by making sure that feature file synchronization is enabled.
Tip
Don't forget to add tags to your backgrounds, scenarios and scenario outlines.
Uploads of untagged feature files will always be skipped as a precautionary measure.
Example
In the following scenario, the existing example will be extended by an additional step.
Feature: Example page redirection @TestName:CYP-129Scenario: Redirect by clicking Given the example pageWhen the link is clickedThen a redirect should occurAnd the test should fail
import{Given,Then,When}from"@badeball/cypress-cucumber-preprocessor";Given("the example page",function(){cy.visit("https://example.org");});When("the link is clicked",function(){// Intercept the click, since it unfortunately redirects to a http:// location// and causes Cypress to abort the execution.cy.intercept("GET","https://www.iana.org/domains/example",(request)=>{request.reply("link was clicked");}).as("redirect");cy.get("a").click();});Then("a redirect should occur",function(){cy.wait("@redirect").then((request)=>{expect(request.response.body).to.eq("link was clicked");});});Then("the test should fail",function(){expect(true).to.be.false;});
By default, Xray expects feature files to use English keywords.
If you want to use different languages, make sure to add the corresponding # language: header to your feature files, as described here.
Synchronization of local feature files based on the step definitions as managed in Xray is planned as a future feature (i.e. download of Xray step definitions to local feature files and then running them).