API for Import Test Cases

Import Test Cases from Excel

POST /rest/import/testcase

Description

Import test cases from multiple sheets of an Excel file.

Request

Content-Type: application/json

Parameters

Name

Located in

Required

Description

Default

Schema

Name

Located in

Required

Description

Default

Schema

fileToImport

body

Yes

File that is being import.

-

file

entityType

body

No

Entity type - Test Case

Test Case

string

headerRow

body

No

The row of the file that is to be considered as header.

-

integer

fieldMap

body

Yes

The map that was created and saved on the QMetry UI to map the fields of QMetry and excel.

Mention the Map name without quotes.

When the Entity Key is mapped in the saved map, test cases will be re-imported.

-

string

importType

body

No

Type of file being imported xlsx or csv

-

string

sheetIDs

body

Yes

Sheet number in the excel file that is being imported. In case of multiple sheets, enter comma separated sheet numbers e.g. 0,1,2

-

string

folderPath

body

Yes

Destination folder path to import the entities. If folder paths are mapped in excel sheet, then the test cases will be imported as per the path under respective excel sheet folders.

If the folder path is not available, then new folders would be created using folder path inside destination.

-

string

projectID

body

Yes

Project ID in which the test cases are being imported.

Project id can be fetched using List Project API.

-

integer

createFolderWithSheetName

body

No

false : Folders will not be created with the sheet name.

true : Folders will be created with the sheet name.

-

boolean

tcStepOption

body

No

Select Test Case Step option: single/multiple

-

string

isImportWithWarning

body

No

false : Test Case Import will be failed if the result file contains test case summary with more than 255 characters.

true : Test Cases can be imported by ignoring the warning about summary length. If the test case summary is longer, it will be truncated to 255 characters.

false

boolean

 

Response

Content-Type: application/json

Status Code

Reason

Response Model

Status Code

Reason

Response Model

200

Test cases created successfully

-

400

Invalid json object or mandatory fields missing

-

401

Unauthorised or session expired

-

403

Forbidden

-

404

Not Found

-

500

Returned when server connection times out

-