Skip to content
This repository was archived by the owner on Jun 17, 2025. It is now read-only.

Plugin Framework

mefellows edited this page May 27, 2012 · 6 revisions

Lambda uses the Java Java ServiceLoader framework.

Plugin Types

Test (Assertion) Providers (AssertionProvider)

Data Providers (DataProvider)

Test Case Providers (TestProvider)

To create a plugin for Lambda, simply implement one or more of the above interfaces and

Example - Excel2SeleniumParser (lambda-xlsx-parser module)

The Excel2SeleniumParser Plugin class implements both the TestProvider and DataProvider interfaces for use in parsing Test Cases from Spreadsheets. To register the plugin with the framework, create the following file:

Register Plugin

Create the following file using the ServiceLeader framework format:

src/main/resources/META-INF/services/au.com.onegeek.lambda.api.Plugin

with contents:

au.com.onegeek.lambda.parser.Excel2SeleniumParser
au.com.onegeek.lambda.extension.provider.MattAssertionProvider

Drop Plugin into plugin directory

cp lambda-xlsx-parser-0.0.1-SNAPSHOT.jar <LAMBDA_HOME>/plugins

Start Lambda

cd <LAMBDA_HOME> 
bin/lambda.sh

You should see output in the startup messages indicating that your plugin was loaded successfully:

13:43:46.111 [main] DEBUG au.com.onegeek.lambda.core.PluginLoader - Loading Plugins...
13:43:46.117 [main] DEBUG au.com.onegeek.lambda.core.PluginLoader - Loading Plugin with name: au.com.onegeek.lambda.parser.Excel2SeleniumParser
13:43:46.118 [main] DEBUG au.com.onegeek.lambda.core.PluginLoader - Loading Plugin with name: au.com.onegeek.lambda.extension.provider.MattAssertionProvider
13:43:46.118 [main] DEBUG au.com.onegeek.lambda.core.PluginLoader - 2 plugins found...
13:43:46.118 [main] INFO  au.com.onegeek.lambda.core.Lambda - Loaded Plugin: au.com.onegeek.lambda.parser.Excel2SeleniumParser
13:43:46.118 [main] INFO  au.com.onegeek.lambda.core.Lambda - Loaded Plugin: au.com.onegeek.lambda.extension.provider.MattAssertionProvider