Uploading Test Data
Upload Example Using cURL
In the following, we provide an example of how to push your Test data into Logilica for storage and built-in analytics.
The cURL POST command is below. Note, that the POST command includes the example API token lgca_UeRxFs_3RYRJEJtdYp7j7Wa6DirG5NjiYslsb
and the example workspace myworkspace
. The command URL also includes a placeholder for the repoID to associate the uploaded issues with.
curl --location --request POST 'https://logilica.io/api/import/v1/coverage/<repoID>/test_run/create' \
--header 'X-lgca-token: lgca_UeRxFs_3RYRJEJtdYp7j7Wa6DirG5NjiYslsb' \
--header 'x-lgca-domain: myworkspace' \
--header 'Content-Type: application/json' \
--data-raw '[
{
"id": "123",
"testID": "test1",
"commitHash": "8c39c46e512541fd9431fad3109cfab1816cfdbb",
"branch": "master",
"name": "Test Run 1",
"outcome": "success",
"outcomeCategory": "Pass",
"duration": 1234567890,
"timestamp": 1738813508,
"additionalFields": [
{
"key": "type",
"value": "unit"
},
{
"key": "foor",
"value": "bar"
}
],
"pullRequest": "1357"
},
{
"id": "456",
"testID": "test2",
"commitHash": "qdbjtecjed35b9d5d5bb2854e908c5a29edfcd61",
"branch": "master",
"name": "Test Run 2",
"outcome": "failed",
"outcomeCategory": "Failure",
"duration": 1234567890,
"timestamp": 1738813508,
"additionalFields": [
{
"key": "type",
"value": "integration"
}
],
"pullRequest": "2468"
}
]'
API Schema for Importing Test Data
Questions?
If you have any questions or run into issues, please contact us at support@logilica.com.
Last updated