integration-tests
Skill1 starsChanged 7 days agoMITView on GitHub
How integration tests run against a real SQLite database - a private in-memory database per repository test, and a per-test application host with its own database for presentation tests. Use when testing the repository, migrations, startup wiring or a real request through the presentation layer.
15 other projects use a version of this.
Adopted by
Most recently taken up by
- microsoft/vscodetheir own version, first seen Nov 2, 2026
- lucasnscr/issue-to-pr-aitheir own version, first seen Oct 25, 2026
- NeuralInverse/neuralinversetheir own version, first seen Oct 8, 2026
- zwave-js/zwave-jstheir own version, first seen Oct 8, 2026
- genlayerlabs/genlayer-studiotheir own version, first seen Oct 8, 2026
- OpenCortexIDE/cortexidetheir own version, first seen Oct 8, 2026
Used with
Projects with it also use add-policy, tool-rename-deprecation and 2 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
OpenCortexIDESkilladd-policy
Use when adding, modifying, or reviewing VS Code configuration policies. Covers the full policy lifecycle from registration to export to platform-specific artifacts. Run on ANY change that adds a `policy:` field to a configuration property.
Also in 4 projects that use this
gitpod-ioSkilltool-rename-deprecation
Ensure renamed built-in tool references preserve backward compatibility. Use when renaming a toolReferenceName, tool set referenceName, or any tool identifier. Run on ANY change to tool registration code. Covers legacyToolReferenceFullNames for tools and legacyFullNames for tool sets.
Also in 4 projects that use this
gitpod-ioSkillhygiene
Use when making code changes to ensure they pass VS Code's hygiene checks. Covers the pre-commit hook, unicode restrictions, string quoting rules, copyright headers, indentation, formatting, ESLint, and stylelint. Run the hygiene check before declaring work complete.
Also in 4 projects that use this
- +1 more from gitpod-io
Other versions15 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 15
- microsoft/vscode★ 195ksame name
- remsky/Kokoro-FastAPI★ 5.7ksame name
- posit-dev/positron★ 4.3ksame name
- zwave-js/zwave-js★ 894same name
- NeuralInverse/neuralinverse★ 221same name
- genlayerlabs/genlayer-studio★ 180same name
- OpenCortexIDE/cortexide★ 175same name
- HexamindOrganisation/hexgate★ 23same name
- cpkt9762/opencode-vscode-ide★ 17same name
- sohei56/maul-team★ 17same name
5 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository40 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- add-a-use-caseSkill
- api-conventionsSkill
- branches-and-pull-requestsSkill
- cancellationSkill
- ci-for-your-solutionSkill
- ci-pipelineSkill
- clean-architecture-layersSkill
- configuration-and-environmentsSkill
- coverageSkill
- csharp-house-styleSkill
- data-access-ef-coreSkill
- database-migrationsSkill
- docker-and-composeSkill
- docs-and-voiceSkill
- errors-and-exceptionsSkill
- expose-a-use-caseSkill
- family-syncSkill
- health-checksSkill
- json-serializationSkill
- mapping-with-mapperlySkill
- mcp-inspectorSkill
- mediatorSkill
- optional-token-authSkill
- packages-and-dependenciesSkill
- pagingSkill
- presentation-integration-testsSkill
- releasesSkill
- sample-dataSkill
- security-findingsSkill
- serilogSkill
- telemetrySkill
- template-authoringSkill
- test-designSkill
- time-providerSkill
- unit-testsSkill
- validationSkill
- writing-a-skillSkill
- xml-docs-and-openapiSkill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.
0
Common
Most of the 14 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 62
Use the EF Core InMemory provider.
- Very specific: line 64
Write to movie-reviews.db or any file.
“Common” is measured: kept by at least 6 in 10 of the 14 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Integration tests
The rule
Integration tests use the real database engine, built from the real migrations, and every test gets its own database. No test can see another test's changes, and nothing is written to disk.
| Project | Fixture | Database |
tests/Infrastructure.Tests.Integration | MovieReviewsTestDatabase | Data Source=:memory: held open for one test, with the hand-written test data (sample-data) and a FakeTimeProvider fixed at 2009-12-31 23:51:01 UTC |
tests/Presentation.Tests.Integration | The presentation layer's application host (a WebApplicationFactory<Program> in web templates, the Handler itself in Lambda) | Data Source=Tests-{Guid};Mode=Memory;Cache=Shared with sample data on |
Steps
- Repository tests: make the test class
sealedandIDisposable, createprivate readonly MovieReviewsTestDatabase database = new();and dispose it. Usethis.database.Repository, andthis.database.Contextto find known rows. - Find rows by their known values, not by position.
- For time-dependent results, assert against
this.database.TimeProvider. - Presentation tests: create a new application host per test class instance, pass settings in through its constructor, and make real requests (in Lambda, real calls to the handler). Assert the status code, then the body.
- Override settings in memory through the host's constructor, never by editing appsettings files or leaving environment variables set.
- The details of this template's application host are in
presentation-integration-tests.
Example
// tests/Infrastructure.Tests.Integration/Databases/MovieReviews/EntityFrameworkMovieReviewsRepositoryTests.cs
public sealed class EntityFrameworkMovieReviewsRepositoryTests : IDisposable
{
private readonly MovieReviewsTestDatabase database = new();
public void Dispose()
{
this.database.Dispose();
}
[Fact]
public async Task GetAuthorById_ShouldReturn_Author()
{
// Arrange
var repository = this.database.Repository;
using var tokenSource = new CancellationTokenSource();
var token = tokenSource.Token;
var author = this.database.Context.Authors.First(a => a.FirstName == "One");
// Act
var result = await repository.GetAuthorById(author.Id, token);
// Assert
_ = result.ShouldNotBeNull();
result.Reviews.Count.ShouldBe(3);
}
}Don't
- Use the EF Core InMemory provider. It isn't relational and lets through queries SQLite rejects.
- Share one database across tests with
IClassFixtureorICollectionFixture. - Write to
movie-reviews.dbor any file. - Depend on test order.
Check
dotnet test tests/Infrastructure.Tests.Integration
dotnet test tests/Presentation.Tests.IntegrationDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

