Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

writing-tests

Skill by JetBrains

Writing Tests is a skill with guidelines for writing JUnit 5 tests in the IntelliJ IDEA codebase. It covers fixtures, lifecycle hooks, and running code on the EDT. It is for developers contributing tests to IntelliJ.

  • Score 78
  • 21k stars
  • NOASSERTION
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install writing-tests

Built from the published package, never by AI.

git clone --depth 1 https://github.com/JetBrains/intellij-community /tmp/intellij-community && mkdir -p ~/.claude/skills && cp -r /tmp/intellij-community/.agents/skills/writing-tests ~/.claude/skills/writing-tests

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install writing-tests in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

This skill gives an AI assistant guidelines for writing tests in the IntelliJ IDEA codebase. It explains where a test should live, which module owns it, and why JUnit 5 with @TestApplication is preferred over JUnit 4 base classes. It also describes shared companion object fixtures, JUnit 5 lifecycle hooks, and the @TestDisposable, @RegistryKey and @SystemProperty annotations.

The skill also covers coroutine and UI test rules. It recommends timeoutRunBlocking as the coroutine boundary and Dispatchers.UI for Swing work, and it limits use of Dispatchers.EDT to cases that need model access. It points to showcase tests in community/platform/testFramework/junit5/test/showcase/ and to TESTING.md for running tests. It is intended for developers writing tests in that codebase.

Written from the project's SKILL.md and checked against it.

What it can do

  • Test placementExplains how to choose the test module that owns the production code under test.
  • JUnit 5 setupDescribes using JUnit 5 with @TestApplication instead of JUnit 4 base classes.
  • Shared fixturesShows companion object project and module fixtures shared between tests.
  • Lifecycle hooksShows JUnit 5 @BeforeAll, @AfterAll, @BeforeEach and @AfterEach usage.
  • Test disposablesCovers @TestDisposable for test-scoped disposables injected per test.
  • Registry and system propertiesCovers @RegistryKey and @SystemProperty for setting test values.
  • Coroutine and UI testsGives rules for timeoutRunBlocking, Dispatchers.UI and when Dispatchers.EDT is needed.

What you need

  • A checkout of the IntelliJ IDEA codebase with the community directory

Try asking

  • Write a JUnit 5 test for this class using @TestApplication and a project fixture.
  • Add a @TestDisposable and a @RegistryKey to this test method.
  • Convert this Swing label test to use timeoutRunBlocking and Dispatchers.UI.

Good to know

  • Do not use @RunInEdt, @RunMethodInEdt, runInEdtAndWait or runInEdtAndGet in new tests.
  • Do not add a JUnit @Timeout to tests that use timeoutRunBlocking.
  • Place build task io tests in intellij.idea.community.build.tasks.tests, not the build-scripts test module.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: .agents/skills/writing-tests/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md7 KB

Alternatives to writing-tests

All alternatives →
openclaw-github-repo-commandersickn33
94

Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.

AAA Skill 50k
gradiogradio-app
94

Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.

AAA Skill 44k
hig-components-menussickn33
94

Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.

AAA Skill 50k
fastapi-templateswshobson
94

Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.

AAA Skill 43k
appfunctionsandroid
94

Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.

AAA Skill 11k
agent-qa-authoringsickn33
94

Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.

AAA Skill 50k

Compare with openclaw-github-repo-commander, gradio or hig-components-menus

writing-tests: common questions

Which test framework should new IntelliJ tests use?

The skill recommends JUnit 5 with @TestApplication. It advises against extending LightJavaCodeInsightFixtureTestCase in new tests.

Where should a new IntelliJ test go?

The test should go in the test module associated with the production module it exercises. The skill advises checking the production module's .iml file and neighboring tests first.

How are coroutine tests run in this guidance?

Tests should use timeoutRunBlocking, which has a 10-second default timeout. Setup and assertions should stay off the UI thread, with only Swing operations moved into withContext(Dispatchers.UI).

How do I install writing-tests?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is writing-tests free?

The code is published under the NOASSERTION licence. The service it connects to may have its own pricing.

Is writing-tests safe to use?

It scores 78 of 100. Grades: maintenance A, licence F, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to writing-tests?

Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.

writing-tests Install

Add to stack

Loading.