copilot-setting: Instructions file for GitHub Copilot

.github/instructions/testing.instructions.md

copilot-setting testing.instructions.md is an instructions file for GitHub Copilot from zexion7873/copilot-setting. It costs 514 tokens per session, scanned A, original, MIT.

Testing rules for Java 8 projects using JUnit 4, Mockito, and Spring Test 3.2.

In plain words
What is it for?
Use them to write unit and integration tests with JUnit 4 annotations, Mockito, Spring XML contexts, Arrange–Act–Assert structure, and automatic test transaction rollback.
Why use it?
They keep tests compatible with the project and encourage isolated tests that check one behavior without depending on order or external services.

Instructions file for GitHub Copilot

Written for GitHub Copilot: a Copilot instructions file.

This is zexion7873/copilot-setting's own configuration. It tells GitHub Copilot how to work on copilot-setting itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything copilot-setting configures →

Reuse

Borrowing it

Nothing to install: this file belongs to zexion7873/copilot-setting. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/zexion7873/copilot-setting/main/.github/instructions/testing.instructions.md
Clone the repo
git clone --depth 1 https://github.com/zexion7873/copilot-setting

Made for: GitHub Copilot.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for copilot-setting testing.instructions.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/zexion7873/copilot-setting/testing/github.svg)](https://agentmods.dev/instructions/zexion7873/copilot-setting/testing)
Your own site
<a href="https://agentmods.dev/instructions/zexion7873/copilot-setting/testing"><img src="https://agentmods.dev/badge/instructions/zexion7873/copilot-setting/testing/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for copilot-setting testing.instructions.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/zexion7873/copilot-setting/testing"><img src="https://agentmods.dev/badge/instructions/zexion7873/copilot-setting/testing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 514 This file is loaded in full into every session.
When invoked 514 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00514 $0.00514
Opus 5.5 $0.00206 $0.00206
Sonnet 5.5 $0.00103 $0.00103
Haiku 4.5 $0.00051 $0.00051

Measured 1mo ago against content hash 273a34ed6fe3, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

copilot-setting testing.instructions.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.github/instructions/testing.instructions.md · 33 lines

What it actually says

Testing Conventions

Java 8 language rules apply: instructions/java.instructions.md.

Framework Boundary (JUnit 5 / Spring Boot Forbidden)

  • JUnit 4 — org.junit.Test, @Before / @After, Assert.assertEquals. No org.junit.jupiter.* / @BeforeEach / @ExtendWith
  • Spring Test 3.2 — @RunWith(SpringJUnit4ClassRunner.class) + @ContextConfiguration. No @SpringBootTest / @WebMvcTest / @ExtendWith(SpringExtension.class)
  • Mockito — @RunWith(MockitoJUnitRunner.class) or MockitoAnnotations.initMocks(this). No @ExtendWith(MockitoExtension.class)
  • Assertions: Assert.* or Hamcrest assertThat; AssertJ only if already on the classpath

Structure

  • One behavior per test; name methodName_condition_expectedResult; Arrange–Act–Assert, visually separated
  • No interdependence (isolated, any order); no logic (loops / conditionals) inside a test

Integration Tests

  • @ContextConfiguration against a test-scoped XML context, not production beans
  • Test-class @Transactional auto-rollback is sanctioned — test-only; does NOT violate the production <tx:advice>-only rule (instructions/spring-hibernate.instructions.md)

Data & Mocks

  • Mock collaborators at the layer boundary (DAO in service tests); no shared mutable static fixtures
  • Never hit a real external service — stub at the boundary
  • Deterministic: no new Date() / unseeded random — inject a fixed clock or seed
  • Never Thread.sleep() to wait for async — flaky and slow; await a condition or inject a synchronous executor
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago Changed · +3 lines · +85 tokens per session 273a34ed6fe3
  2. 1mo ago Changed · -12 lines · -180 tokens per session 53de4dc65fb3
  3. 2mo ago First seen · 42 lines · 609 tokens per session scan A 64149ce265d6

Subscribe to this mod's changes

copilot-setting testing.instructions.md is an instructions file published in the GitHub repository zexion7873/copilot-setting (1 stars, last pushed 1mo ago), licensed MIT. It adds 514 tokens to every session, about $0.0021 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

copilot-setting testing.instructions.md compared with instructions from other repositories

copilot-setting testing.instructions.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
copilot-setting testing.instructions.mdzexion7873/copilot-settingInstructions file11mo agoMITA514GitHub Copilot
ai-agent-rules-generator copilot.instructions.mdsavedpixel/ai-agent-rules-generatorInstructions file86mo agoMITA3,431GitHub Copilot
ai-agent-rules-generator agent-observations.instructions.mdsavedpixel/ai-agent-rules-generatorInstructions file86mo agoMITA1,787GitHub Copilot
ai-agent-rules-generator doc-sync.instructions.mdsavedpixel/ai-agent-rules-generatorInstructions file86mo agoMITA1,652GitHub Copilot
ai-agent-rules-generator devtools.instructions.mdsavedpixel/ai-agent-rules-generatorInstructions file86mo agoMITA399GitHub Copilot
ai-agent-rules-generator ratelimitting.instructions.mdsavedpixel/ai-agent-rules-generatorInstructions file86mo agoMITA522GitHub Copilot
ai-agent-rules-generator ui-design.instructions.mdsavedpixel/ai-agent-rules-generatorInstructions file86mo agoMITA701GitHub Copilot