To take advantage of the Test Gap analysis, you have to upload test coverage information to Teamscale.
The source code version must be provided for both the coverage information and the source mapping. Whenever you build your application, new mapping files are generated and Teamscale needs to know which mapping files to use when you upload coverage. Thus, during the upload of the mapping files, you must provide a version string (any unique string will do, e.g., a revision number). You must provide the exact same version string again when uploading coverage files that belong to those mapping files.
Please note that errors in the source maps can lead to subtle misalignment of the covered lines and thus to wrong coverage results. Please make absolutely sure that source maps are configured correctly for your entire build pipeline and that they correctly map back to your source files. Some minification/bundling tools are known to e.g., produce off-by-one source maps.
# Uploading Source Maps
The following is an example of how to upload source map files using curl:
branch:timestamp must be the branch name and commit timestamp in milliseconds of the commit which was processed by the build to generate the mapping file.
# Uploading Coverage files
The following is an example of how to upload Istanbul coverage files using curl:
curl --request POST \ --user bob:e434mikm35d \ --form "report=@./coverage.json" \ localhost:8080/api/projects/PROJECTID/external-analysis/istanbul-test-coverage?message=myMessage&partition=myPartition&version=version