Skip to main content
The Plugins surface lets you verify that specific plugins are loaded and check the total plugin count. PluginTestAdapter provides direct PluginManager access, while PluginAssert wraps lookups as failing assertions with descriptive messages. Plugin loading tests are smoke tests for your server setup. If a plugin fails to load (missing dependency, initialization error, wrong JAR placement), these tests catch it immediately. This is especially valuable in CI/CD pipelines where you want to verify the complete plugin set is loaded before running feature tests.

Complete Example Suite

Adapter Methods

Assertion Methods

When to Test Plugins

Plugin tests serve as the foundation of your test suite:
  • CI/CD smoke tests - Verify all required plugins loaded before running feature tests
  • Dependency checks - Confirm your mod’s plugin dependencies are present
  • Version validation - After server updates, verify the plugin set is intact
  • Debugging - Use getPluginNames() to see exactly what loaded when tests fail
assertPluginLoaded() searches the PluginManager by name using reflection - it checks getPlugin(), isLoaded(), and getPlugins() accessors.

Next Steps