junit.go ×10

Frontier kind: Code frontier

unlabeled · c_7e8ddec8f861

13 tests · 70 LOC · 2 files · introduces 0 tests · 42 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
10 ranges42 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
20 ranges70 lines · 2 files · Browse complete extent
All tests (intent)
13 testsBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Introduced files, introduced tests, and structurally relevant concept specializationsummary.go ×1 · 2 introduced LOCsummary.go ×1testrunner.go ×6 · 30 introduced LOCtestrunner.go ×6TestRenderSummaryFromReports_JSON · 0 introduced LOCTestRenderSummaryFromRep…TestNewSummaryFromReports_KeepsFailureAndAlertRows · 0 introduced LOCTestNewSummaryFromReport…TestMergeReports_MissingRerun · 0 introduced LOCTestMergeReports_Missing…TestMergeReports_MultipleReports · 0 introduced LOCTestMergeReports_Multipl…TestRenderSummaryFromReports_Markdown_RendersTrimmedFailureBody · 0 introduced LOCTestRenderSummaryFromRep…TestNewSummaryFromReports_RendersAssertionFailureRow · 0 introduced LOCTestNewSummaryFromReport…TestNewSummaryFromReports_RendersTrimmedFailureBodyRow · 0 introduced LOCTestNewSummaryFromReport…junit.go ×1 · 2 introduced LOCjunit.go ×1junit.go ×2 · 5 introduced LOCjunit.go ×2TestMergeReports_IterationSuffixPreserved · 0 introduced LOCTestMergeReports_Iterati…junit.go ×4 · 18 introduced LOCjunit.go ×4TestMergeReports_PreservesOriginalFailureDataWhenExtractionFindsNothing · 0 introduced LOCTestMergeReports_Preserv…junit.go ×1 · 1 introduced LOCjunit.go ×1junit.go ×1 · 2 introduced LOCjunit.go ×1junit.go ×1 · 2 introduced LOCjunit.go ×1junit.go ×1 · 3 introduced LOCjunit.go ×1log.go ×3 · 5 introduced LOClog.go ×3log.go ×4 · 15 introduced LOClog.go ×4junit.go ×3 · 8 introduced LOCjunit.go ×3TestOperatorServiceMetadata, TestWorkflowServiceMetadata · 0 introduced LOCTestOperatorServiceMetad…go.temporal.io/server/tools/testrunner/junit.go · 369 LOCtestrunner/junit.gogo.temporal.io/server/tools/testrunner/log.go · 444 LOCtestrunner/log.gogo.temporal.io/server/tools/testrunner/summary.go · 127 LOCtestrunner/summary.gogo.temporal.io/server/tools/testrunner/testrunner.go · 480 LOCtestrunner/testrunner.goTestOperatorServiceMetadata · introduced test · go.temporal.io/server/common/api/TestOperatorServiceMetadataTestOperatorServiceMetad…TestWorkflowServiceMetadata · introduced test · go.temporal.io/server/common/api/TestWorkflowServiceMetadataTestWorkflowServiceMetad…TestMergeReports_IterationSuffixPreserved · introduced test · go.temporal.io/server/tools/testrunner/TestMergeReports_IterationSuffixPreservedTestMergeReports_Iterati…TestMergeReports_MissingRerun · introduced test · go.temporal.io/server/tools/testrunner/TestMergeReports_MissingRerunTestMergeReports_Missing…TestMergeReports_MultipleReports · introduced test · go.temporal.io/server/tools/testrunner/TestMergeReports_MultipleReportsTestMergeReports_Multipl…TestMergeReports_PreservesAlertFailureMessage · introduced test · go.temporal.io/server/tools/testrunner/TestMergeReports_PreservesAlertFailureMessageTestMergeReports_Preserv…TestMergeReports_PreservesOriginalFailureDataWhenExtractionFindsNothing · introduced test · go.temporal.io/server/tools/testrunner/TestMergeReports_PreservesOriginalFailureDataWhenExtractionFindsNothingTestMergeReports_Preserv…TestMergeReports_SingleReport · introduced test · go.temporal.io/server/tools/testrunner/TestMergeReports_SingleReportTestMergeReports_SingleR…TestNewSummaryFromReports_KeepsFailureAndAlertRows · introduced test · go.temporal.io/server/tools/testrunner/TestNewSummaryFromReports_KeepsFailureAndAlertRowsTestNewSummaryFromReport…TestNewSummaryFromReports_RendersAssertionFailureRow · introduced test · go.temporal.io/server/tools/testrunner/TestNewSummaryFromReports_RendersAssertionFailureRowTestNewSummaryFromReport…TestNewSummaryFromReports_RendersTrimmedFailureBodyRow · introduced test · go.temporal.io/server/tools/testrunner/TestNewSummaryFromReports_RendersTrimmedFailureBodyRowTestNewSummaryFromReport…TestRenderSummaryFromReports_JSON · introduced test · go.temporal.io/server/tools/testrunner/TestRenderSummaryFromReports_JSONTestRenderSummaryFromRep…TestRenderSummaryFromReports_Markdown_RendersFailureRows · introduced test · go.temporal.io/server/tools/testrunner/TestRenderSummaryFromReports_Markdown_RendersFailureRowsTestRenderSummaryFromRep…TestRenderSummaryFromReports_Markdown_RendersTrimmedFailureBody · introduced test · go.temporal.io/server/tools/testrunner/TestRenderSummaryFromReports_Markdown_RendersTrimmedFailureBodyTestRenderSummaryFromRep…TestWriteCurrentReport · introduced test · go.temporal.io/server/tools/testrunner/TestWriteCurrentReportTestWriteCurrentReportFocused concept · junit.go ×10 · 42 introduced LOCjunit.go ×10

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

No tests are introduced at this concept. Its intent tests are introduced by other concepts.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

1 file ranked by introduced lines: 42 introduced LOC across 10 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/tools/testrunner/junit.go 42 introduced LOC · 10 ranges

Open complete file

255 }
256
257 > func mergeReports(reports []*junitReport) (*junitReport, error) { junit.go
258 > if len(reports) == 0 {
259 return nil, errors.New("no reports to merge")
260 }
261
262 > var reportingErrs []error junit.go
263 > var combined junit.Testsuites
264 > combined.XMLName = reports[0].XMLName
265 > combined.Name = reports[0].Name
266 >
267 > for i, report := range reports {
268 > combined.Tests += report.Tests
269 > combined.Errors += report.Errors
270 > combined.Failures += report.Failures
271 > combined.Skipped += report.Skipped
272 > combined.Disabled += report.Disabled
273 > combined.Time += report.Time
274 >
275 > // If the report is for a retry ...
276 > var suffix string
277 > if i > 0 {
278 suffix = fmt.Sprintf(" (retry %d)", i)
279 if i == len(reports)-1 {
295 }
296
297 > for _, suite := range report.Suites { junit.go
298 > if len(suite.Testcases) == 0 {
299 continue
300 }
301
302 > newSuite := suite // shallow copy junit.go
303 > newSuite.Name += suffix
304 > newSuite.Testcases = make([]junit.Testcase, 0, len(suite.Testcases))
305 >
306 > // Sort test cases by name.
307 > slices.SortFunc(suite.Testcases, func(a, b junit.Testcase) int {
308 return strings.Compare(a.Name, b.Name)
309 })
310
311 // Collect test cases.
312 > for j := range len(suite.Testcases) { junit.go
313 > testCase := suite.Testcases[j]
314 > // Check if this is a parent test case (ie prefix of next subtest).
315 > // Use testCase.Name+"/" to avoid matching iteration suffixes like #01.
316 > if j != len(suite.Testcases)-1 && strings.HasPrefix(suite.Testcases[j+1].Name, testCase.Name+"/") {
317 // Discard test case parents since they provide no value.
318 continue
320
321 // Parse failure details from Failure.Data, if present.
322 > if testCase.Failure != nil && testCase.Failure.Data != "" { junit.go
323 > if details := parseFailureDetails(testCase.Failure.Data); details != noFailureDetails {
324 testCase.Failure.Data = details
325 }
327
328 // Failure.Type carries the canonical kind in merged JUnit.
329 > if testCase.Failure != nil { junit.go
330 > if suite.Name == alertsSuiteName {
331 if testCase.Failure.Type == "" {
332 testCase.Failure.Type = testCase.Failure.Message
336 }
337 }
338 > testCase.Name += suffix junit.go
339 > newSuite.Testcases = append(newSuite.Testcases, testCase)
340 }
341 > combined.Suites = append(combined.Suites, newSuite) junit.go
342 }
343 }
344
345 > return &junitReport{ junit.go
346 > Testsuites: combined,
347 > reportingErrs: reportingErrs,
348 > }, nil
349 }
350