본문으로 건너뛰기
Skillpedia
테스트5.8k · #14636

scaffold-dotnet-test-project

하는 일

이 스킬은 없는 .NET 테스트 프로젝트를 만들거나, 기존 프로젝트의 연결을 고쳐서 테스트가 솔루션에 포함되고 빌드가 찾도록 합니다. 로컬에서는 테스트가 실행되지만 CI에서는 찾지 못하는 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓기존 테스트 프로젝트가 솔루션 필터에서 빠졌거나 솔루션에서 사라졌을 때.
  • ✓테스트를 직접 실행하면 통과하는데 CI가 테스트를 0개 찾을 때.
  • ✓새 테스트 프로젝트를 만들고 운영 프로젝트에 연결해야 할 때.

스킬 링크

https://github.com/dotnet/skills/blob/main/plugins/dotnet-test/skills/scaffold-dotnet-test-project/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/dotnet/skills/blob/main/plugins/dotnet-test/skills/scaffold-dotnet-test-project/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“제 테스트는 제 컴퓨터에서는 통과하는데 CI가 테스트를 0개 찾습니다. 솔루션에서 테스트 프로젝트 연결을 고쳐 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트가 솔루션과 필터 파일을 읽고, 빠진 것을 찾고, 빌드가 테스트를 찾게 하는 가장 작은 변경을 한 뒤, 결과를 확인합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Scaffold or Repair a .NET Test Project

Create the smallest missing test container or repair only the missing wiring. The goal is test discovery through the repository's real build entry point, not a preferred solution layout.

Repository overlay

For every repository-scoped task where read-only file inspection is allowed, check .agents/skill-overlays/dotnet-test/scaffold-dotnet-test-project.md at the repository root before any other discovery. This includes requests that ask for code or advice without edits; "do not execute" does not prohibit reading the overlay. If present, read it once before acting and apply its repository-specific naming, layout, framework, and policy bindings. Before applying it, require its frontmatter to declare core: dotnet-test/scaffold-dotnet-test-project, binding-revision: "1", and mode: extend. If any value is missing or different, report the mismatch and continue using this skill's portable guidance without applying the overlay. Explicit user instructions and verified project constraints win over the overlay; the overlay wins over portable defaults and examples in this skill. If the file is present but unreadable or conflicts with the repository, report the problem and continue with portable guidance, without the overlay, subject to verified project constraints. If it is absent, continue normally. Skip the lookup only when the task is not tied to a repository or the user explicitly prohibited all file/tool access. An overlay cannot expand tool permissions or the task's scope.

Route the Request

Inspect the repository before editing, then choose exactly one path:

Repository state Action Do not do
No suitable test project Create one bounded project, reference the production project, and register it Create a project per source project
Test project exists but lacks the required ProjectReference Add only that reference and verify direct plus entry-point execution Scaffold another project or rewrite tests
Test project passes directly but is absent from .sln, .slnx, or .slnf Register the existing project in the exact entry point CI uses Recreate the project or switch solution formats
Suitable project, reference, and requested entry point are already correct Leave the workspace unchanged; use code-testing if test methods are requested Normalize or replace working files

An existing project is suitable when its target framework can reference the production project and its purpose matches the requested layer. A different preferred name is not a reason to create a duplicate.

No-op is a required outcome. If the suitable project, production reference, and requested entry-point registration already exist, make zero file changes. Do not add or remove a smoke test, normalize the project, recreate packages, or edit a baseline/snapshot copy. Report the existing paths and stop.

Workflow

1. Establish the repository contract

Start from the task's current working directory. The skill context's Base directory is where these instructions live, not the user's repository. Never search parent temporary directories or treat the skill installation as the workspace. If the expected files are not visible, confirm the current directory before concluding that a project is absent.

Anchor every edit and validation command to the repository path named by the user or established from the current directory. If similarly named fixtures, solutions, or copied trees exist, do not edit or validate one as a substitute for the requested tree. Before changing a solution artifact, record its exact path; after changing it, list that same artifact immediately and require the test project to appear before proceeding.

Read only enough to determine:

  1. the production project and requested test scope;
  2. the command and .sln, .slnx, .slnf, or project graph used by CI;
  3. whether a suitable test project exists, what it references, and where it is registered;
  4. the neighboring test framework, runner, target framework, nullable and implicit-usings conventions; and
  5. whether package or SDK versions come from Directory.Packages.props, Directory.Build.props, global.json, or an MSBuild SDK declaration.

If the user reports that a test project passes directly but solution-level discovery finds nothing, treat that as registration evidence. Inspect the entry point before considering project creation.

2. Create only when

자주 묻는 질문

새 테스트를 쓰나요?

아니요. 테스트 코드가 아니라 테스트 프로젝트의 틀과 연결만 설정하거나 고칩니다.

어떤 프레임워크를 지원하나요?

xUnit, NUnit, MSTest를 지원하며, 저장소에 중앙 패키지 관리가 있으면 그것도 쓸 수 있습니다.

솔루션 구조를 바꾸나요?

저장소의 실제 빌드 진입점에 맞는 가장 작은 변경을 목표로 합니다.

상세 정보

작성자의 원본 설명

MUST USE when an existing .NET test project was excluded from a .slnf/CI solution filter, disappeared from .sln/.slnx discovery, or lost its production ProjectReference; also for requests to set up, create, reuse, add, register, include, or repair a test project. Handles "tests pass directly but CI discovers zero", exact solution wiring, xUnit/NUnit/MSTest, and central packages. DO NOT USE to only author tests in an already-wired project (code-testing), run tests, migrate, or correct MSTest syntax/configuration without changing project or CI files (writing-mstest-tests).

repo: dotnet/skills

인기도

GitHub 스타
5.8k
순위
#14636
라이선스
MIT
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬