跳转到内容

Run tests

此内容尚不支持你的语言。

Ferris IDEA runs your tests with the project’s own test runner and reads its report into a tree of passed and failed tests. The test runner and the result tree are Works.

Run pytest tests from the editor
Editor with tests/test_tides.py: two test functions, test_average_of_two and test_average_of_one, each with a green run arrow in the gutter; the status bar shows Python 3.9 (.venv)
  1. Editor with tests/test_tides.py: two test functions, test_average_of_two and test_average_of_one, each with a green run arrow in the gutter; the status bar shows Python 3.9 (.venv)
  2. The Run tool window below shows the result tree Test Results › test_tides with both tests passed and their times, and beside it pytest's output ending with 2 passed and Process finished with exit code 0; the summary reads Tests passed: 2 of 2 tests

Real frames of the application · ferris-idea drive, then ferris-idea drive screenshot after each step (docs/site/scripts/record-tour.py) · main build of v1.6.0, 2026-12-04 · throwaway Python demo project with pytest in a virtual environment; theme Ferris IDEA Dark

Language Runner Report it reads
Rust cargo test Cargo’s test output
Python pytest JUnit XML (--junitxml)
JavaScript, TypeScript Vitest, Jest their JSON report
Go go test go test -json
Java, Kotlin JUnit through Maven or Gradle the JUnit XML of Surefire or Gradle
anything that writes TAP or JUnit XML your command set the report format in the configuration

Plain unittest for Python, Mocha, Node’s own test runner, NUnit and xUnit are not read.

  1. Open a test file. The gutter shows ▶ next to every test the runner knows: pytest test… functions and Test… classes, Vitest and Jest describe, it and test, Go TestXxx, Rust #[test] and #[tokio::test], JUnit methods and classes.
  2. Click ▶, or put the caret in the test and choose Run › Run Current File (⌃⇧R). Only that test runs.
  3. The Run tool window opens with the result tree beside the output.

Choose the detected test configuration in Run › Run… (⌃⌥R): cargo test, pytest, vitest, jest, go test, mvn test or gradle test. For your own command, create a configuration of kind Test with its report format and file (Run configurations).

The tree appears when the run ends; it does not fill while tests run.

  • Above the output, the summary: for example “Tests failed: 1, passed: 2 of 3 tests – 512 ms”.
  • Under Test Results, each suite and test with its status (passed, failed, error, ignored) and its time.
  • Select a test to see its message, details and output.
  • Double-click a test, or press ↩, to open it at its line. This works for pytest, Jest and Vitest; for JUnit, Go, Rust and TAP reports it is not available yet.

The toolbar:

Button What it does
Show Passed shows or hides passed tests
Rerun Failed Tests runs only the tests that failed, as a temporary configuration “Failed tests of name”; greyed, with the reason in its tooltip, when the runner cannot select tests
Sort in the runner’s order, alphabetically or by time
Expand All, Collapse All the whole tree
Test History the last ten runs of this configuration

Run › Rerun Tests (⌃⌘R) reruns every test tab.

Test history is kept beside your settings, never in the project, and holds only the tree, not the output. There is no export of results.

Put the caret in the test and choose Run › Debug Current File (⌃⇧D). For Jest the ▶ menu also has Debug. Debugging is described in Debug a program.

Ferris IDEA has no coverage runner: there is no “Run with Coverage” and no coverage in the editor gutter. If your build writes an LCOV or Cobertura report (for example coverage/lcov.info or coverage.xml), the project cockpit can show its line coverage as a tile in its Cockpit tool window.

  • The tree stays empty: the configuration has no report, or the report file is not where the configuration says. A detected configuration sets both; for your own, set kind Test, the format and the file.
  • pytest: “No module named pytest”: install pytest into the selected interpreter (Python).
  • Rerun Failed Tests is greyed: its tooltip names why, for example a runner that cannot pick single tests.
Keyboard of
ActionShortcut
Run › Debug Current File⌃⇧Dno shortcut
Run › Rerun Tests⌃⌘R or ⌥⇧RShiftAltR
Run › Run⌃⌥RAltShiftF10
Run › Run Current File⌃⇧RCtrlShiftF10

run_configuration with failed_only reruns the tests that failed last time. parse_test_report reads a report file in any of the formats above without running anything.

  • create_testchangesdry run by defaultwriteTest… of Generate for a Java or Kotlin class: its test class, the project's own (found by name as goto_test does) or a new one in the test root (src/test/<lang> beside src/main/<lang>, test/ beside src/, else beside the class) with the class's package.
  • goto_testreadsGo to Test for a workspace file: the tests of a source file, or the files a test file tests, by file names alone among the project's own files.
  • parse_test_reportreadsRead a test report (JUnit XML, TAP, cargo test output, Jest/Vitest JSON or go test -json output; detected unless given) into a result tree: suites, tests with status (passed, failed, error, skipped), duration, message, details, output, and totals.
  • run_configurationchangesdry run by defaultruntrusted-projectRun a configuration from .ferris-idea/run.toml, or a reference IDE configuration that idea_project lists (untranslated ones are refused with the reason), after its before-launch chain.
  • run_markersreadsdry run by defaultThe run markers (gutter ▶) of a file with 1-based line and the run configuration each starts: Java/Kotlin main and JUnit tests (single method via Maven or Gradle), Vitest/Jest describe/it/test, pytest, Go and Rust tests, and the main of Go programs, Rust binaries and examples, and Python scripts (kind main).