What is inside the file CI uploads?
The problem
A CI job uploads one file, and a reviewer who was not there has to understand the run from it. That file is the .prototrace. You need to know what is in it and how to open each part.
Do it
1. Download an archive
Download l4-artifacts.prototrace. It is a zip file.
2. Open it in the viewer
Drop it on the viewer. You see the operations, each recorded step, and the state: what existed during the run and how it changed. The viewer reads the file locally in your browser, so nothing is uploaded.
3. Open it with an archive tool
Rename the copy to .zip if your tool needs it. Look for these entries:
| Entry | What it is |
|---|---|
spans.json | the operations: setup, execution, teardown, every request, check and release |
state.json | what existed and changed: clients, contexts, resources and tracked values |
sources/ | the source files the recording touched, so the trace can name a line |
resources/ | the attachments and the run artifacts, including the reports |
manifest.json | the map of the entries above |
The JSON report is at resources/run/JsonReportSink/run-artifact-1/report.json. An attachment sits under resources/<test id>/ and holds the exact bytes the test checked.
4. Find the reports locally
A local run also writes the files next to the archive:
| Output | Default path |
|---|---|
| Trace archive | TestResults/prototest-{runId}.prototrace, one archive per run |
| JSON report | TestResults/Northstar.ProtoTest/report.json |
| HTML report | TestResults/Northstar.ProtoTest/report.html |
Open report.html in a browser for the readable version of the report.
What happened
The sample configures both report sinks in one place:
1.ConfigureTracing(trace =>2{3trace.ActivitySources.Add("Northstar.Domain");4})5.AddSink<JsonReportSink>(sink => sink.OutputPath = Path.Combine(6"TestResults", "Northstar.ProtoTest", "report.json"))7.AddSink<HtmlReportSink>(sink =>8{9sink.OutputPath = Path.Combine("TestResults", "Northstar.ProtoTest", "report.html");10sink.Title = "Northstar Learning demo";11});
- The application's own operations
The domain activity source is captured into the trace, one archive per run, so a rerun never overwrites the last run.
- Both sinks copied into the archive
The JSON and HTML reports are written beside the trace and copied into resources/, so one upload carries all three.
samples/Northstar.ProtoTest/Setup.cs. The sink paths below TestResults/Northstar.ProtoTest/ are the local default.A sink writes a report at the end of the run. Both files are also copied into the archive, so one artifact carries the story and the report. The viewer draws the story. The reports are plain files in the same zip.
Check yourself
A CI job uploads one archive. Where does the reviewer walk the operations, and where do they read the JSON report?
The viewer walks the operations and the state. The JSON report sits inside the same file at resources/run/JsonReportSink/run-artifact-1/report.json. One upload carries both.
Remember
- A
.prototraceholds the operations, the state, the source files, the attachments and the reports. - Both reports are written at the end of the run and copied into the archive.
- The viewer draws the execution story. The reports are files inside the same archive.
Go deeper
- Reporting: the JSON and HTML sinks, and what each report section holds.
- Workbook as attachment: one journey keeps a downloaded workbook as evidence.