ls1intum/artemis/write-tests

Claude Code and agent skill by ls1intum/artemis

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Write or debug Artemis JUnit and Vitest tests, including failures that differ between local runs and CI.

Install

npx vskill@latest install ls1intum/artemis/write-tests

SKILL.md

Write Artemis tests

Server tests

Server tests need Docker. They run against PostgreSQL through Testcontainers, locally and in CI.

bash
./gradlew test -x webapp # everything
./gradlew test --tests ExamIntegrationTest -x webapp # one class
./gradlew test --tests ExamIntegrationTest.testGetExamScore # one method
./gradlew test -DincludeTags='ArchitectureTest' -x webapp # architecture only, fast

Name tests *Test.java. Reuse the module's base class where one exists.

Read reference/server.md for base class selection, the admin naming rule that forces a different @ResourceLock, date comparison, and shared-spy flakiness.

In the admin module, naming a test `*IntegrationTest` forces it onto a batch base class carrying a shared `@ResourceLock`. A test that mutates global state and needs isolation must be named *Test and extend AbstractSpringIntegrationIndependentTest instead. Enforced by src/test/java/de/tum/cit/aet/artemis/admin/architecture/AdminTestArchitectureTest.java.

Client tests

Vitest, not Jest. Use vi.spyOn(), vi.fn(), vi.clearAllMocks().

bash
pnpm run vitest # watch
pnpm run vitest:run # single run, everything
pnpm exec vitest run <path/to/spec.ts> # single file
pnpm run vitest:coverage
pnpm run test-diff # only specs affected by the diff

`pnpm run vitest:run -- <path>` runs the entire suite. The path is swallowed. Use pnpm exec vitest run <path> for a single file.

Vitest is not the type check CI runs. CI runs a stricter spec tsc:

bash
pnpm run compile:tests

It enforces member visibility, which Vitest does not. A spec that reaches a private member as component.privateThing passes locally and fails in CI. Use bracket access, component['privateThing'], and run compile:tests before pushing.

Test a directive with `TestBed.createDirective`, not a throwaway host component. Keep a host only when the directive is structural or needs a template around it: something around or beside it, content Angular keeps rendering inside it, a static attribute its constructor reads, or an input that takes a TemplateRef or a component instance from the same template. Input bindings apply on the first detectChanges().

Read reference/client.md for the rest: the createDirective pattern and its limits, the monaco stub, zoneless test setup, model() versus input() plus output(), and why template errors need a build rather than a test run.

Both

Keep tests deterministic. Mock external services and WebSockets. CI enforces per-module coverage thresholds, so a new class with no test can fail the build even when nothing is broken.

For E2E tests, see skills/e2e-pr-check/SKILL.md. Do not add a Playwright test for behavior that a unit or integration test can cover.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
820
Repository forks
396
7-day trend score
0

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/ls1intum/artemis/write-tests/badge)](https://verified-skill.com/skills/ls1intum/artemis/write-tests)

Something wrong with this skill or its page? Tell us.