Import options¶
The import endpoints has multiple options to give which can affect the way your reports are being processed.
Default API variable values¶
curl \
-X POST \
-H "x-api-key:<API_KEY>" \
-F "file[]=@path/to/testresult" \
-F "tag[]=TagName" \
-F "date=now" \
-F "smart=true" \
-F "process_async=true" \
-F "merge_containers=false" \
-F "suppress_files_moved=false" \
-F "suppress_notifications=false" \
-F "ignore_unspecified_formatter=false" \
-F "ignore_empty_report=false" \
-F "ignore_empty_import=false" \
-F "ignore_max_files_limit=false" \
-F "ignore_old_report_date=false" \
"https://app.calliope.pro/api/v2/profile/<profile_id>/import"
Metadata options¶
None of the metadata options have any effect on your results. It's all intended to be able to give some extra background information to your report.
date=
¶
Set a date to the report. date
is separate from created at
and updated at
. Date represents the time when the test was executed.
- type:
String
now
will set the the date to the moment the report is saved on our servers.DateTime string
((see conversion method)[https://apidock.com/rails/v6.1.3.1/String/to_datetime])
- default:
Null
/ Automatic date detection
Automatic date detection means we will try to detect the date from the uploaded report files. For example a JUnit report containing a
timestamp="2022-02-002T12:30:45"
attribute inside the<testsuite>
element.
tag[]=TagName
¶
Add a list of tags to your report.
- type:
Array
withString
- default: Null
Add multiple tags by setting multiple tag[]
values:
curl \
-X POST \
-H "x-api-key:<API_KEY>" \
-F "file[]=@path/to/testresult" \
-F "tag[]=Ubuntu" \
-F "tag[]=Ubuntu:20" \
-F "tag[]=Build:1.145" \
-F "tag[]=env:test" \
-F "tag[]=Galaxy S10" \
"https://app.calliope.pro/api/v2/profile/<profile_id>/import"
Formatter endpoints
It is recommended to add the formatter to the endpoint to obtain the best interpreted results. More information about the recommended formatters here.
os
, platform
, build
[DEPRECATED]¶
Deprecated: This feature has been replaced by tags. Instead of os=linux
we recommend
using tag[]=os:linux
.
Adds a tag to the report with the content of the parameter.
- type:
String
- default: Null
Functional options¶
smart
¶
- type:
Boolean
- default:
true
Some formatters have a so called smart
-option. Go to
the formatter documentation to find out what this means for you.
In general, when smart
is enabled, the system will try to make the structure of your output prettier by grouping it or
sorting it.
For example, the JSON of Fink Link checker is one long list of results for every
page that was visited. With smart
enabled, we will group the tests by URL. So:
https://test.com/products/product1
https://test.com/products/product2
https://test.com/products/product2/details
Becomes:
https://test.com
/products
/product1
results/product2
- Results
/details
results
process_async
¶
- type:
Boolean
- default:
true
Temporarily fallback option to allow a-sync API responses: More information.
merge_containers
¶
- type:
Boolean
- default:
false
(true for some formatters)
Some formatters have merge_containers
on true
by default. Go to
the formatter documentation to find out if this is the case for you.
When enabled, this option will trigger a post-processing function that will merge any containers with the same title
, classification
& description
. The means that the following:
Some Feature
Scenario Outline 1
Secnario 1
Scenario Outline 2
Some Feature
Scenario Outline 1
Secnario 2
Becomes:
Some Feature
Scenario Outline 1
Secnario 1
Secnario 2
Scenario Outline 2
This functionality can be very useful when you run your test Asynchronous and generate multiple result files in your pipeline.
Warning
This will also merge results together. Multiple result with the same name, will be uniquefied by adding (1)
, (2)
after the title.
Suppression options¶
suppress_files_moved
¶
- type:
Boolean
- default:
false
When multiple files are uploaded using the file[]
parameter, and some of those files are attachments,
a files moved warning will be generated.
Setting suppress_files_moved
to true will suppress and hide this warning.
suppress_notifications
¶
- type:
Boolean
- default:
false
After processing your import, we will automatically trigger the event to inform users that are following the profile
you're uploading to. Setting suppress_notifications
to true will stop this event from triggering.
ignore_unspecified_formatter
¶
- type:
Boolean
- default:
false
When the /profile/{profileId}/import
endpoint is used, without specifying a formatter, it will generate
a unspecified formatter warning.
ignore_empty_report
¶
- type:
Boolean
- default:
false
When one or multiple files are uploaded empty, this can generate
an import_file_resulted_in_empty_report. Setting
this option to true
will suppress this warning.
ignore_empty_import
¶
- type:
Boolean
- default:
false
If, after importing all your files, there are no results, this is considered a critical error. To ignore this you can
set ignore_empty_import
to true
and the import will be considered a success, even though it's empty.
ignore_max_files_limit
¶
- type:
Boolean
- default:
false
If your (unzipped) import contains more than 50 files, we will give a warning about this costing a lot of processing
time. When possible, we ask you to move any non-report files from files[]
to attachments[]
.
With ignore_max_files_limit
set to true
the warning will be ignored.
ignore_old_report_date
¶
- type:
Boolean
- default:
false
This is a notice to inform you that the report you uploaded has a date which is more than a day ago. It is not an issue,
but it is just a notice that helps you understand why the date of the report might be different than you would expect.
With ignore_old_report_date
set to true
the notice will be ignored.