Coverage
Fileplugin.ymlFilepaper-plugin.ymlTwo kinds of coverage, both under Tests > Coverage: which commands the tests typed, and which lines of the plugin the scenarios ran.

Command coverage
Fileplugin.ymlThe Coverage page lists every command the server registered, from the agent's /commands, or from plugin.yml in plugins/ without the agent. Next to each it shows how often bots, RCON and the agent's exec ran it, and which subcommands were seen.
- Namespaced labels and aliases count for the command.
- Rows nobody ran are red. Commands that were sent but are not registered show up below the table.
- Filepaper-plugin.ymlA
paper-plugin.ymlregisters its commands in code, so without the agent those plugins show no commands. - The page starts with a percentage and asks the server by itself when one is running.
Over HTTP: /coverage returns the table and /coverage/reset (token) starts the count again. Filming a subject from four angles is a different route, /film/coverage.
Code coverage
Which lines of the plugin the scenarios ran, measured by JaCoCo on the server itself.
java -jar IgniteTestTool.jar call coverage/code/on plugins=IgniteZombies # then restart the server
java -jar IgniteTestTool.jar run suite/
java -jar IgniteTestTool.jar coverage
java -jar IgniteTestTool.jar coverage ArenaEditor61.3% of 8421 lines ran, 512 classes, 97 never ran [IgniteZombies-1.5.1.jar]
most lines missed:
312 of 340 com.ignitedev.ignitezombies.arena.ArenaEditor| Topic | How it works |
|---|---|
| Which jars | plugins= holds parts of jar names split by commas. Without it every plugin but the agent is measured |
| Which classes | Of each jar the package of its main class counts, with everything under it but the folders shaded libraries go to (libs, lib, shaded, shadow, relocated) |
| Turning it on | The agent is a JVM argument, so the setting takes effect at the next server start the tool does. coverage/code/off turns it off the same way. A server the tool did not start is not measured |
| One class | With a class name the answer lists the missed line ranges and the methods that never ran |
| Adding up | The count adds up over runs and tool restarts, so a run that skips cached files does not lose what they covered. Counters of a class a new build changed are dropped. coverage/code/reset starts it again |
| CI | In CI mode --code-coverage <dir> turns it on for the run and writes coverage.txt and jacoco.exec there, the second one for any JaCoCo report tool. It needs --start-server, the agent goes on that server's command line. With --workers the files of all workers are merged |
| Call | What it does |
|---|---|
coverage/code (class=) | The coverage so far, or one class |
coverage/code/on plugins= | Measure these jars from the next server start |
coverage/code/off | Stop measuring from the next server start |
coverage/code/reset | Start counting again |
Running only what an edit can reach
While coverage is on, a pass also remembers which methods its file ran, including the ones the server ran while starting. After a new build --cache compares the plugin jars method by method. When none of those methods reads differently and nothing else in the jar changed (resources, classes outside the plugin's package), the file is reported as same ..., new build, no method it runs changed and does not run.
An edit to a method that runs at startup, a field initializer or a config class reaches every file. An edit to one command handler reaches only the files that used it. Line numbers and local variable names do not count, so an edit further up a file leaves the methods below it alone.