public interface PluginInitializer
It can be used for logging: all log messages received by the info(String) or error(String)
methods will be added to the ibello logs automatically.
Another use case of this interface is to get configuration parameters with the getConfigurationValue(String) method.
It has different method to access ibello's infrastructure in the current project. With the testData() method, we access
test data stored in files. With features() and examples(), we can access the BDD features and examples.
With requirements(), we can access the requirements. The testResults() method gives a handler object
which loads local test results.
Some methods can be used to transform data from one format to another. The json() and the csv() are used to JSON
and CSV transformation.
Some methods return objects which give us dome extra functions to build better output for the task. With the graph()
method we can define graphs, with the table() method we can create tabular data.
| Modifier and Type | Method and Description |
|---|---|
CsvTransformer |
csv()
Returns an object which can be used to transform CSV file to java objects.
|
default void |
error(String message)
Adds an error-level message to the ibello logs.
|
void |
error(String message,
Throwable exception)
Adds an error-level message to the ibello logs.
|
ExamplesHandler |
examples()
Returns an object which is designed to load Cucumber example files from an ibello project.
|
FeatureHandler |
features()
Returns an object which is designed to load Cucumber feature files from an ibello project.
|
Value |
getConfigurationValue(String name)
Returns a configuration property as a
Value. |
String |
getMergedURL(String url)
Returns an URL which is merged with the
ibello.url.base configuration property. |
GraphTool |
graph()
Returns a graph drawing tool instance.
|
HttpClient |
httpClient()
Returns a HTTP client.
|
void |
info(String message)
Adds an information-level message to the ibello logs.
|
JsonTransformer |
json()
Returns an object which can be used to transform java objects into JSON and back.
|
RegressionTool |
regression()
Returns a regression tool instance.
|
RequirementHandler |
requirements()
Returns an object which is designed to load requirement files from an ibello project.
|
RestClient |
restClient()
Returns a REST client.
|
void |
setConfigurationValue(String name,
Object value)
Sets a configuration property to the given value.
|
TableTool |
table()
Returns a table creation tool instance.
|
TestDataBuilder |
testData()
Starts a new test data loading.
|
TestResultLoader |
testResults()
Returns an object which can load ibello tests results.
|
void info(String message)
message - the log messagedefault void error(String message)
message - the log messagevoid error(String message, Throwable exception)
message - the log messageexception - an exceptionValue getConfigurationValue(String name)
Value. The returned value offers some public methods to
transform the configuration property into different java types.
This method always has a non-null result, even if the configuration value does not exist - in this case,
the wrapped value will be null.name - name of the configuration parameterValue instancevoid setConfigurationValue(String name, Object value)
Value interface.name - name of the configuration parametervalue - value of the configuration parameterString getMergedURL(String url)
ibello.url.base configuration property.
If the given URL is an absolute one with protocol, then it will be returned (without any changes).
If the URL is relative, then it will be concatenated to the configuration property, and the result will be returned.
url - the absolute or relative URLTestDataBuilder testData()
TestDataBuilder instance which can be used
to configure and perform the test loading operation.TestDataBuilderRestClient restClient()
RestClientHttpClient httpClient()
HttpClientFeatureHandler features()
ExamplesHandler examples()
RequirementHandler requirements()
TestResultLoader testResults()
JsonTransformer json()
CsvTransformer csv()
RegressionTool regression()
GraphTool graph()
TableTool table()
Created by Kornél Simon, 2022