Skip to main content

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:

EntryWhat it is
spans.jsonthe operations: setup, execution, teardown, every request, check and release
state.jsonwhat 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.jsonthe 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:

OutputDefault path
Trace archiveTestResults/prototest-{runId}.prototrace, one archive per run
JSON reportTestResults/Northstar.ProtoTest/report.json
HTML reportTestResults/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:

Setup.cs2 notes
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});
  1. 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.

  2. 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.

From 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?

Verify
Open l4-artifacts.prototrace twice: once in the viewer, once with an archive tool.

Remember​

  • A .prototrace holds 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​