---
title: "[Xray Server] How to import feature files and associate to Test Sets"
canonical: "https://docs.getxray.app/space/ProductKB/46269017/%5BXray%20Server%5D%20How%20to%20import%20feature%20files%20and%20associate%20to%20Test%20Sets"
format: markdown
---
# Step-by-step guide

1 - Create a JSON file where you will define the key of the Test Set you want to link:

![image](media://62444403-4b27-4bbe-ac07-4fe6ce0f3264)

  
In this file, you can find:

- the project Id;
- the "Test Sets association with a Test" custom field Id
- And the Test Set key.

2 - Then, go to Jenkins > Build > Choose the "Execute Windows batch command" option  
3- Use this curl command

```
curl -H "Content-Type: multipart/form-data" -u user:password -F "file=@<featurefilename>.feature" -F "testInfo=@<jsonfilename>.json" "http://<serverURL>/rest/raven/1.0/import/feature?projectKey=<projectKey>"
```

  
`Please note:`

- Change the user and password;
- Change the feature file name
- Change the JSON filename
- Change the URL from your server
- Change the project key
- And finally, note that you should save both of these files on the same workspace folder


# Link for related documentation


[*Importing Cucumber Tests - REST*](https://getxraydocs.atlassian.net/wiki/spaces/XRAY/pages/301698724)

[*Integration with Jenkins*](https://getxraydocs.atlassian.net/wiki/spaces/XRAY/pages/301501616)