본문으로 건너뛰기
cccskills
무료GitHub에 공개

testing

Running and writing tests for Internals Viewer. Use when running the test suite or a single test, adding a test project or test class, interpreting test failures, or deciding whether a failure is a real regression or an environmental one.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

danny-sg/internals-viewer스타 28(GitHub 28 + cccskills 0)

실행 점수 미검증

설치 방법 보기

포함된 파일(1)

  • SKILL.md4.3 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Testing

xUnit throughout, one test project per source project, all under src/Tests/. ImplicitUsings is on and there is a global using Xunit, so test files need no using block for the framework.

Running tests

dotnet test src/Tests/InternalsViewer.Internals.Tests -p:Platform=x64

InternalsViewer.UI.App.Tests targets net10.0-windows and references the app project, so it needs the MSIX opt-out as well — without it the reference build runs the app's packaging step, which fails on most machines:

dotnet test src/Tests/InternalsViewer.UI.App.Tests -p:Platform=x64 -p:EnableMsixTooling=false

A single class or method:

dotnet test src/Tests/InternalsViewer.Query.Tests --filter "FullyQualifiedName~XmlEventParserTests"
dotnet test src/Tests/InternalsViewer.Query.Tests --filter "FullyQualifiedName~XmlEventParserTests.Parses_File_Event"

Do not run the whole suite after a mechanical change such as a rename or a namespace move — build to confirm it compiles, batch the remaining work, and run the suite once at the end.

Test projects

ProjectCovers
InternalsViewer.Internals.TestsStorage engine internals. Split into UnitTests/ and IntegrationTests/, with shared helpers in Helpers/
InternalsViewer.Execution.TestsIterator/join integration plus access-path units. Links TestServiceHost, RequiresFileFact and TestDatabase.mdf from Internals.Tests rather than duplicating them
InternalsViewer.Query.TestsEvent parsing, plan parsing, callstack projection
InternalsViewer.Connection.BackupFile.TestsBackup file reading. Has its own RequiresFileFact/RequiresFileTheory
InternalsViewer.UI.App.TestsExtracted UI logic plus headless SkiaSharp pixel tests that render into an SKBitmap
InternalsViewer.Internals.Tests.VerificationToolConsole tool, not a test project

Conventions

  • Method names are Verb_Describes_Behaviour — Parses_File_Event, Can_Run_Simple_Query.
  • Test folders and namespaces mirror the source project's folders, so a test for Events\Locks\LockGrouper lives in Events\Locks. InternalsViewer.Internals.Tests, InternalsViewer.Execution.Tests and InternalsViewer.Query.Tests keep UnitTests\ and IntegrationTests\ roots with the mirror beneath each. A test with no single subject type, such as a whole-backup read or a columnstore probe, sits at the root of its project or split, or in the area folder.
  • The app project grants InternalsVisibleTo to its test project, so internal types are testable directly.

Tests that need external resources

Several tests are gated on resources that are not in the repo, and skip or fail rather than run:

  • RequiresConnectionStringFact / RequiresConnectionStringTheory — skips unless the named connection string is present in user secrets. ConnectionStringHelper reads it from there, not from an appsettings file.
  • RequiresFileFact — skips unless a data file is present. TestDatabase.mdf under IntegrationTests/Test Data/ is checked in; larger backup fixtures are not.
  • QueryRunnerTests.Can_Run_Simple_Query is a genuine integration test: it needs a live SQL Server and symbols in C:\Symbols. Without a server it fails after roughly a 15-second timeout. That is environmental, not a regression. Invalid_Query_Gives_IsSuccess_False passes trivially in the same case.

Baselines — failures that are already on main

Check against these before treating a red test as something you broke:

  • InternalsViewer.Internals.Tests — 14 unit failures on a clean main (DateTimeConverter locale sensitivity, allocation chain tests) plus 3 tests pinned to hardcoded values that have since changed. Baseline is roughly 600 of 617 passing with a lab server attached.
  • InternalsViewer.UI.App.Tests — DockLayoutSerializer.Round_Trips_A_Split_Layout fails on clean main. Baseline 88 of 89.

A "test host process crashed" abort has been seen once after all tests had already passed, and did not reproduce on rerun.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

ui

무료

Design language and guidance, and review for the Internals Viewer app

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

danny-sg/internals-viewer282026년 10월 24일 업데이트

danny-sg의 스킬 모두 보기

이 스킬의 문제 신고