Skip to main content

Plugins overview

This document will help you learn about NBomber plugins and plugin development in more detail. NBomber provides a concept of plugins that you can use to extend the functionality of NBomber. A good example would be HTTP plugin which provides a convenient API for working with HTTP protocol. Here is a list of existing plugins that you can use in your projects.

Plugins types

In fact, plugins are divided into 2 types:

  • DSL (Domain-specific language) plugin is a plugin that extends NBomber's API to interact with a specific protocol, system, database, etc. A good example is the HTTP. There is no specialized API for this type of plugins in NBomber, in fact, these plugins use native clients/drivers (for example, Redis client, MongoDb client) and integrate them with basic NBomber elements (for example, Step, ClientFactory, DataFeed).

  • WorkerPlugin is a plugin that starts at the test start and works as a background worker. Often, such a plugin can perform additional operations on incoming traffic, infrastructure, etc. WorkerPlugin can also return metrics result to be printed in the report or used for test assertions. A good example would be the Ping networking plugin, which at startup tests the specified web host and at the end of the test provides the latency results in the form of metrics.

Worker plugin development

NBomber provides an interface that you should implement to develop your custom WorkerPlugin.

type IWorkerPlugin =
inherit IDisposable
abstract PluginName: string
abstract Init: context:IBaseContext * infraConfig:IConfiguration -> Task
abstract Start: unit -> Task
abstract GetStats: currentOperation:OperationType -> Task<DataSet>
abstract GetHints: unit -> string[]
abstract Stop: unit -> Task