testing
Skill9.3k starsChanged 5 days agoApache-2.0View on GitHub
Write, change, run and review tests in Databasus. Covers how to name a test, which layer it belongs to, how to prepare data through the API, when a unit test or a fake is allowed, how to wait for a condition, and which tests to run before handing work over. Use when writing, changing, running or reviewing tests, when fixing a bug, and when choosing which test commands a change runs.
194 other projects use a version of this.
Trending
Quiet since July.thin dataabout the whole repository
Most recently taken up by
- ishandutta2007/Awesome-Claude-Skillstheir own version, first seen Nov 8, 2026
- steerlabs/opensteertheir own version, first seen Nov 8, 2026
- timmo001/notestheir own version, first seen Nov 8, 2026
- codewithmukesh/dotnet-claude-kittheir own version, first seen Nov 8, 2026
- kortix-ai/sunatheir own version, first seen Nov 8, 2026
- microsoft/VSSDK-Analyzerstheir own version, first seen Nov 8, 2026
Who's talking about RostislavDugin/postgresus
- @its-me-rhk.bsky.social“🗄️ Postgresus — Alat open-source untuk monitoring & backup database PostgreSQL dengan antarmuka web. ⚡ …”Bluesky · Oct 30, 2025 · 3 likes
- Dokploy/templates“Postgresus template seems outdated – project renamed to Databasus”GitHub · Jan 19, 2026 · 1 reactions
- truenas/apps“[App Request]: Postgresus / Databasus”GitHub · Dec 19, 2025 · 1 reactions
- @mariuskimmina.com“"Postgresus" is just peak project naming (and it also seems really awesome) github.com/RostislavDug...”Bluesky · Dec 6, 2025 · 1 likes
- @harungecit.dev“PostgreSQL kullanıyorsan ama yedekleme & izleme seni yoruyorsa: 💡 Postgresus tam sana göre! 🕒 Otomatik …”Bluesky · Oct 30, 2025 · 1 likes
The biggest 5 of 10 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 10
Talked about on GitHub and Bluesky (10 times).
On GitHub · 7
- Jan 19, 2026Postgresus template seems outdated – project renamed to Databasus — Dokploy/templates1 reaction
- Dec 19, 2025[App Request]: Postgresus / Databasus — truenas/apps1 reaction
- Jul 14, 2026fix: add Databasus template (Postgresus was renamed upstream) — Dokploy/templates0 reactions · 1 comment
- Dec 11, 2025Redirect to https://postgresus.com/storages/google-oauth instead of my hosted Postgresus domain — databasus/databasus0 reactions · 2 comments
- Dec 7, 2025Email Notifier Password can't be empty when creating — databasus/databasus0 reactions · 2 comments
2 more on GitHub
- Nov 17, 2025Databasus — community-scripts/DevScripts0 reactions · 6 comments
- Sep 14, 2025Update PostgreSQL badge in README — pgmq/pgmq0 reactions
On Bluesky · 3
- Oct 30, 2025🗄️ Postgresus — Alat open-source untuk monitoring & backup database PostgreSQL dengan antarmuka web. ⚡ Fitur utama: jadwal backup,… — @its-me-rhk.bsky.social3 likes and reposts
- Dec 6, 2025"Postgresus" is just peak project naming (and it also seems really awesome) github.com/RostislavDug... — @mariuskimmina.com1 likes and repost
- Oct 30, 2025PostgreSQL kullanıyorsan ama yedekleme & izleme seni yoruyorsa: 💡 Postgresus tam sana göre! 🕒 Otomatik yedekler ☁️ S3, Drive, NAS desteği… — @harungecit.dev1 likes and repost
Used with
Projects with it also use bundle-dependency-prs, update-library-template and 10 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.
MicrosoftSkillbundle-dependency-prs
Fix broken dependency update PRs and aggregate the ones that work into one PR.
Also in 7 projects that use this
MicrosoftSkillupdate-library-template
Merges the latest Library.Template into this repo (at position of HEAD) and resolves conflicts.
Also in 7 projects that use this
zetaloopSkillassign-copilot
Assigns a GitHub issue to the Copilot coding agent, optionally specifying a custom agent. Use this when asked to assign an issue to Copilot or delegate an issue to CCA.
Also in 3 projects that use this
NVIDIA-NeMoSkillbuild-and-dependency
Dev environment setup for Megatron Bridge — container-based development, uv package management, lockfile regeneration, adding dependencies, Slurm container usage, and common build pitfalls.
Also in 3 projects that use this
timmo001Skillchangeset-scope
Keep all scoped code work contained to the user-defined changeset. Use for implementation, fixes, diagnosis, refactoring, cleanup, and review when explicit instructions, named files, diffs, branches, pull requests, or injected work scopes define the boundary.
Also in 3 projects that use this
JetBrainsSkillmodule-dependencies
Add or modify IntelliJ module dependencies in `.iml` files.
Also in 3 projects that use this
Other versions194 projects use a version of this.
Word for word · 1
- databasus/databasus★ 9.3k100% same
Edited · 0
None found.
Wrote their own version · 193
- modelcontextprotocol/servers★ 92ksame name
- lobehub/lobe-chat★ 84ksame name
- lobehub/lobehub★ 84ksame name
- penpot/penpot★ 62ksame name
- meteor/meteor★ 45ksame name
- iOfficeAI/AionUi★ 34ksame name
- garrytan/gbrain★ 32ksame name
- OpenZeppelin/openzeppelin-contracts★ 27ksame name
- tursodatabase/turso★ 25ksame name
- redis/go-redis★ 22ksame name
183 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 repository25 other files it gives its agents.
- AGENTS.mdAGENTS.md
- backend/AGENTS.mdAGENTS.md
- frontend/AGENTS.mdAGENTS.md
- website/AGENTS.mdAGENTS.md
- backend/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- frontend/CLAUDE.mdCLAUDE.md
- website/CLAUDE.mdCLAUDE.md
- api-designSkill
- client-tool-bundlesSkill
- feature-sliced-designSkill
- frontend-designSkill
- frontend-localizationSkill
- git-commitsSkill
- how-to-communicateSkill
- mantine-comboboxSkill
- mantine-custom-componentsSkill
- mantine-formSkill
- openspec-apply-changeSkill
- openspec-archive-changeSkill
- openspec-exploreSkill
- openspec-proposeSkill
- openspec-sync-specsSkill
- openspec-update-changeSkill
- run-appSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. 0 are common, 8 are distinctive, and 6 are very specific to this project.
0
Common
Most of the 173 edited versions we read keep these.
8
Distinctive
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Test what a caller observes: an HTTP operation, an engine against a real server, or a screen.
- Distinctive: line 13
Never mock our own database, modules or services.
- Distinctive: line 15
Run every test you wrote or changed and see it pass.
- Very specific: line 65
Call operations through the client from apptest, which checks every response against the contract.
- Distinctive: line 66
Create data through the API.
- Distinctive: line 78
Use the real screen and domain APIs.
- Distinctive: line 82
Prefer user-event and accessible role/name queries.
- Very specific: line 90
Write a unit test without the application only for pure logic that has no HTTP entry point or is too slow to enumerate through HTTP.
- Very specific: line 97
Test a client of an external system against a real local substitute where one exists.
- Very specific: line 99
Write fakes as small hand-written structs.
- Very specific: line 103
Never wait for a fixed time.
- Distinctive: line 105
When the behavior depends on time, move the test clock.
- Very specific: line 110
Call testdb.Open(t) once per test.
- Distinctive: line 119
After you interrupt a run, remove only what that run left behind.
“Common” is measured: kept by at least 6 in 10 of the 173 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
Testing
docs/testing.md describes the kinds of tests, how they are isolated and how runs work. This skill says how to write one test.
The main rules
- Test what a caller observes: an HTTP operation, an engine against a real server, or a screen. Internal functions are covered through that surface.
- Never mock our own database, modules or services. A module's test builds the real modules it depends on.
- A bug fix starts with a test that reproduces the bug. Run it on the unfixed code and see it fail for the reason the bug describes, then fix the code and see it pass.
- Run every test you wrote or changed and see it pass. A package that only compiled has not passed; say so in the report.
Names
A test name has two parts: what is tested and the scenario.
- The Go function names what is tested, in Go style:
TestCreateStorage,TestRestoreBackup. - Each scenario is a sentence in
t.Run, even when the function has only one scenario. The sentence is lowercase, has no period and uses the present tense. It states the result first, then the condition, which starts withwhen,with,without,afterorbefore.
func TestDeleteStorage(t *testing.T) {
t.Parallel()
t.Run("deletes storage when no backup uses it", func(t *testing.T) {
t.Parallel()
// ...
})
t.Run("returns 409 when a backup is stored in it", func(t *testing.T) {
t.Parallel()
// ...
})
}A table test puts the sentence into the name field. In Vitest, describe names the component or page and it holds the sentence. Variables inside a test are named after the domain, such as createdStorage or secondMember. Never name them got, want, result or data. expectedStatus in a case table is fine.
Module API tests
A module's tests live in its root directory in package <module>_test and reach the module only through its HTTP operations.
func TestGetStorage(t *testing.T) {
t.Parallel()
t.Run("returns 404 when storage belongs to another workspace", func(t *testing.T) {
t.Parallel()
app := apptest.New(t)
owner := app.SignUp(t)
stranger := app.SignUp(t)
storage := owner.CreateLocalStorage(t, owner.CreateWorkspace(t))
response, err := stranger.Client.GetStorageWithResponse(t.Context(), storage.Id)
require.NoError(t, err)
require.Equal(t, http.StatusNotFound, response.StatusCode())
})
}- Call operations through the client from
apptest, which checks every response against the contract. Use a rawhttp.Clientonly for a request the contract cannot describe, such as malformed JSON. - Create data through the API. Direct SQL is allowed only for a state the API cannot create, for data the API does not return, and to clean up outside the test's own database.
- Extract a helper as soon as a second test repeats the same setup.
- Cover every operation for these cases:
- the successful case;
- invalid input;
- a request without a session;
- a request from a member of another workspace, or from a member whose role is too low;
- conflicts of state, such as deleting a storage that holds backups or creating a duplicate.
- A background job does not run on its own in the test application. Run its pass explicitly, and move the clock instead of waiting for the schedule.
Frontend screen tests
Use the real screen and domain APIs; replace only their HTTP boundary. Use the frontend test lifecycle and its existing renderer and typed response helpers instead of assembling substitute providers or mocking our services.
- Select happy-dom only for tests that need a document. Keep pure algorithms, API calls and architecture fixtures in node.
- Declare each request's explicit method and finite pathname. Do not hide dependencies behind blanket handlers or silence unexpected-request failures.
- Prefer user-event and accessible role/name queries. Select the locale, theme and router entry the scenario needs through the renderer; use the app-level wrapper for complete-app tests.
- Hold overlapping work with controlled responses and release each response explicitly. Advance fake clocks only for time-dependent behavior, and wait for an observable processing signal before asserting that no further request, state update or error occurs.
- Cover reset, stale success/error, unmount and setup-cleanup-setup when changing an asynchronous hook. Verify timer and listener cleanup and callbacks that use the latest options.
- Prove harness failures through an isolated runner, checking both nonzero exit and the intended diagnostic. Remove temporary files and terminate child processes on timeout or failure.
- Unmount before pending responses settle. Restore every global override and browser state the test changes; do not rely on the next test to repair them. A failed test receives the same cleanup.
Unit tests and fakes
Write a unit test without the application only for pure logic that has no HTTP entry point or is too slow to enumerate through HTTP. docs/testing.md lists examples.
A fake replaces only:
- an external system we cannot run locally, behind an interface in
Deps, such as a third-party HTTP API; - a failure that is unsafe to cause for real, such as a full disk or a connection cut in the middle of an upload.
Test a client of an external system against a real local substitute where one exists. Use Mailpit for SMTP, MinIO, Azurite and SFTP containers for storages, and an httptest.Server for HTTP APIs.
Write fakes as small hand-written structs. Do not use mock generators, testify/mock or testify/suite. Use require for what the rest of the test depends on and assert for independent fields.
Waiting
- Never wait for a fixed time. Wait for the condition with
testwait.Until, which allows two minutes. Only a test that exists to observe a long period of real time, or a container start-up wait, states a longer limit withtestwait.Within(limit). Never usetime.SleeporEventually. - For a negative check, such as "no notification was sent", first wait for a sign that the action was processed. Then watch the check's window.
- When the behavior depends on time, move the test clock.
- In Vitest, wait with
findBy*,waitForor, under fake timers or without a document,waitForConditionfromshared/lib/test/conditionWait. Never pass a time limit to one wait or one test; the shared limits only bound a hung test. A slow wait is a race to fix: assert what the screen keeps showing, not a state a poll can replace.
Isolation
- Call
testdb.Open(t)once per test. A helper that opens one database for several subtests makes that database shared again. - On a shared engine server, give every object a unique name: database, role, schema and replication slot.
- Take ports from
127.0.0.1:0and files fromt.TempDir(). Remove every container or process the test starts int.Cleanup. - Mark independent tests and their subtests with
t.Parallel(). A subtest stays sequential only with a stated reason, in//nolint:tparallel // <reason>on its test: a shared application, moving clock, source server, engine-version fixture or process environment setting, or a dependency on an earlier subtest.
Which tests to run
Check a change as docs/testing.md says, and include the command and its result in the report. While fixing a test it reported, repeat that test directly with the Go test command or pnpm test -t in frontend/. A race reported by CI is reproduced by adding -race to the Go test command, because local runs leave it out. docs/testing.md gives the full commands.
After you interrupt a run, remove only what that run left behind. Never prune Docker or stop the shared test PostgreSQL server, apart from its recovery after a crash.
Before handing the work over
- Each test names what it tests and describes its scenario in a sentence.
- New behavior is covered at the right layer.
- Data is prepared through the API. Direct SQL appears only where nothing else works.
- Nothing of ours is mocked, and no test sleeps.
- The tests you touched ran and passed, and the report shows the commands.
Does 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.

