# Supported Upload Formats and Samples
Teamscale supports a variety of external formats (e.g., test coverage) that can be uploaded and will then included in the analysis (e.g., during Test Gap Analysis).
- Supported Formats for Upload
- Example for XML File Format of Lauterbach Trace32 Coverage Report
- Example for JSON File Format for Teamscale Generic Findings
- Example for JSON File Format for Teamscale Non-Code Metrics
- Example File for Teamscale Simple Coverage
- Example file for Teamscale CSV Issues
- Example file for Teamscale CSV Spec Items
# Supported Formats for Upload
This guide lists the report formats that Teamscale understands and gives some short hints on how to generate them. For an overview over how reports can be uploaded to Teamscale, take a look at how to upload external analysis results to Teamscale.
Language-specific Coverage Tool Recommendations
If want to setup a coverage tool, take a look at the language-specific coverage tools listing page.
Report Format | Parameter Value | Remark |
---|---|---|
Astree | ASTREE | Astree findings report format for C/C++ from AbsInt. This is an XML format. |
Bullseye | BULLSEYE | Bullseye (C++) coverage report format. |
Clang | CLANG | Clang (C, C++, Objective C/C++) findings format. |
Clover | CLOVER | Clover is a test coverage format. Teamscale supports the upload of the XML report format of Clover. |
Cobertura | COBERTURA | Cobertura is a format for Java test coverage. This is an XML format. |
Cppcheck | CPPCHECK | Cppcheck (static analysis for C/C++) results in XML format. |
FindBugs & SpotBugs | FINDBUGS | FindBugs & SpotBugs are static code analyzers for Java. SpotBugs is the successor fork of the unmaintained FindBugs project. Teamscale supports the old findings from FindBugs (some were not migrated to SpotBugs) as well as the new ones. For FindBugs findings which were migrated to SpotBugs, Teamscale shows the new finding message from SpotBugs. This is an XML format. |
FxCop | FXCOP | .NET findings report format. |
Gcov | GCOV | Gcov is a profiling tool for code compiled with gcc. It comes with the gnu compiler collection. The reports are plaintext containing an annotated version of the source files. The reports usually have the .gcov file extension and contain plain text. |
Go Cover | GOLANG_COVERAGE | Go Cover is a coverage format for Go. |
JUnit | JUNIT | JUnit (Java unit tests) format for test results |
JaCoCo | JACOCO | JaCoCo (Java Code Coverage) xml report format. Teamscale needs the XML files exported from JaCoCo, as the JaCoCo-internal trace files (.exec ) cannot be parsed. |
JetBrains dotCover | DOT_COVER | dotCover is a coverage format for .NET. Teamscale requires the detailed XML format variant, which includes statement-by-statement coverage. In ReSharper, use Export to Detailed XML to generate the detailed variant. To determine which variant a .xml file is in, look for <File> elements below <Type> and <Statement> elements below <Method> etc.; <File> and <Statement> are included only in the detailed XML variant. |
jQAssistant | JQASSISTANT | jQAssistant is a quality assurance tool which allows to check for architecture and design rules. Teamscale supports the upload of jQAssistant's XML reports. |
JSON Compilation Database | COMPILATION_DATABASE | A compilation database containing include paths and preprocessor defined to increase analysis precision. LLVM Coverage format |
Lauterbach Trace32 | LAUTERBACH_TRACE32 | The Lauterbach Trace32 Software allows recording trace based coverage on hardware for various chip families. For more information about collecting coverage see the Application Note for Trace-Based Code Coverage or watch the Coverage Tutorial videos. Teamscale parses the coverage information from the mixed source/object code view in the coverage XML files for individual functions (i.e. func-*.xml files) generated by the Trace32 software. The XML files with coverage for individual functions can be imported into Teamscale. When uploading the XML files via the REST API to Teamscale import all func-*.xml files in one upload session. The coverage is converted into line coverage. Source lines of code in the report which are not fully covered but have corresponding object code which is exectued are marked as partially covered in Teamscale. See example XML report. |
Lcov | LCOV | Lcov is a frontend for gcov from the Linux Test Project (LTP). The format is plaintext containing lines that start, for example, with TN: , BRDA: , BRF: . The file ends with end_of_record . |
LLVM Coverage | LLVM | LLVM Coverage format |
Microsoft Coverage | MS_COVERAGE | MS Coverage report format (CQSE Coverage Merger). Deprecated, use VS_COVERAGE instead. |
Microsoft Test | MS_TEST | MS Test format for test results. Teamscale will process the .trx files (XML format) |
NUnit | NUNIT | NUnit (.Net unit tests) format for test results. NUnit version 2 and 3 are supported. |
OpenCover | OPEN_COVER | OpenCover is a .NET coverage format (Windows only). Teamscale supports the upload of the XML report format. |
PC-Lint | PCLINT | PClint (C/C++) coverage report format. |
Pylint | PYLINT | Pylint (static analysis for Python) findings format. |
Roslyn | ROSLYN | The Roslyn (Microsoft .NET) compiler platform reports problems with the compiled C# or Visual Basic .NET code based on a set of configurable rules. The result file can be directly imported into Teamscale as external findings. |
SpCop | SPCOP | SpCop (Sharepoint Code Analysis) findings report format. |
SAP Code Inspector | SAP_CODE_INSPECTOR | The SAP Code Inspector format is a Teamscale-specific JSON findings report uploadable directly through Teamscale's Web UI. The JSON report is a list of inspector finding data objects. |
Simulink Model Advisor | MODEL_ADVISOR | Simulink Model Advisor generates HTML reports when it runs checks on models in Matlab. |
Testwell CTC++ | CTC | CTC coverage is a coverage format from for C/C++. This is an XML format with ctc_xml_report as root node. |
Teamscale Generic Findings | GENERIC_FINDINGS | A canonical file format for uploadings external findings to Teamscale. See example |
Teamscale Issue CSV | ISSUE_CSV | A Teamscale-specific CSV report for uploading issues into Teamscale. |
Teamscale Spec Item CSV | REQUIREMENTS_CSV | A Teamscale-specific CSV report for uploading spec items into Teamscale. |
Teamscale Custom Artifacts Metrics | GENERIC_NON_CODE | A canonical file format for uploading non-code metrics to Teamscale. See example |
Teamscale Simple Coverage | SIMPLE | A Teamscale-specific coverage format that has a very simple syntax designed for easy testing. See example |
Teamscale Compact Coverage | TEAMSCALE_COMPACT_COVERAGE | A Teamscale-specific coverage format to reduce the amount of data uploaded to and processed by the Teamscale instance. See reference and example |
Testwise Coverage | TESTWISE_COVERAGE | A Teamscale-specific coverage format that allows to express coverage information on a per test level. See reference and example |
Visual Studio Coverage | VS_COVERAGE | MS Coverage report format (Visual Studio Coverage Merger). Generated by the MSTest Coverage Collector or Microsoft Performance Tool in Visual Studio. The resulting .coverage binary files have to be converted to XML before uploading them to Teamscale. |
XR.Baboon | XR_BABOON | XR.Baboon was originally intended as a code coverage format for C# on .NET/Mono, but was later extended to support C and C++ as well. |
XUnit | XUNIT | XUnit (.NET unit tests) format for test results. |
Xcode Test Coverage | XCODE | Line coverage data in txt format from Xcode (xccov ). Details on how to create a corresponding report can be found in the article on XCode Test Coverage |
# Example for XML File Format of Lauterbach Trace32 Coverage Report
<?xml version="1.0" encoding="iso-8859-1" standalone="no" ?>
<?xml-stylesheet type="text/xsl" href="t32transform.xsl"?>
<TRACE32 file="C:\T32\demo\t32cast\eca\mcdc\coverage\coverage\func-p-8000988-8000a0f.xml">
<coverage>
<COVerage.EXPORT.ListLine ts="1618396955" t32ver="S.2021.04.000134317MXD" t32pv="ARM" cpu="RM57L843-ZWT"
metric="mcdc">
...
</COVerage.EXPORT.ListLine>
</coverage>
<marker>
<BookMark.EXPORT ts="1618396955" t32ver="S.2021.04.000134317MXD" t32pv="ARM" cpu="RM57L843-ZWT">
</BookMark.EXPORT>
</marker>
<listing>
<List.EXPORT ts="1618396955" t32ver="S.2021.04.000134317MXD" t32pv="ARM" order="source">
...
</List.EXPORT>
</listing>
</TRACE32>
# Example for JSON File Format for Teamscale Generic Findings
[
{
"path": "com/acme/Foo.java",
"findings": [
{
"findingTypeId": "myfinding-1",
"message": "Invalid construct",
"startLine": 14,
"endLine": 14
}
]
},
{
"path": "com/acme/Foo2.java",
"findings": [
{
"findingTypeId": "myfinding-2",
"message": "Range not defined",
"startLine": 12,
"endLine": 44,
"assessment": "RED"
},
{
"findingTypeId": "myfinding-3",
"message": "Finding with offsets",
"startOffset": 1234,
"endOffset": 2345
}
]
}
]
# Example for JSON File Format for Teamscale Non-Code Metrics
[
{
"path": "metric1/value1",
"count": 15
},
{
"path": "metric1/value2",
"count": 42,
"content": "some text",
"assessment": {
"RED": 5,
"YELLOW": 3,
"GREEN": 1
},
"time": 3.145
}
]
# Example File for Teamscale Simple Coverage
com/acme/Foo.java
5
7
9-12
com/acme/Foo2.java
45
46
47
48-50
51-55
# Example file for Teamscale CSV Issues
id,subject,assignee,author,description,created,updated,status,closed,url,parent
1,Broken Navigation,Bob,Bob,Broken Navigation,1,1,OPEN,false,,
# Example file for Teamscale CSV Spec Items
id,subject,assignee,author,description,created,updated,status,closed,url,additional_assignees,linkRoles,linkedRequirements,type,typeAbbreviation,parent,optOne,optTwo
1,Add included classes in renaming,Bob,Bob,Adding support for CSS function radial-gradient,1,1,closed,true,,,,,System Requirement,SR,3,An optional Field,Another optional field