public class JSONFormatter extends Object implements Reporter, Formatter
| Constructor and Description |
|---|
JSONFormatter(Appendable out) |
| Modifier and Type | Method and Description |
|---|---|
void |
after(Match match,
Result result) |
void |
appendDuration(int timestamp) |
void |
background(Background background)
Called before the actual execution of the background step container.
|
void |
before(Match match,
Result result) |
void |
close()
Closes all underlying streams.
|
void |
done()
Indicates that the last file has been processed.
|
void |
embedding(String mimeType,
byte[] data) |
void |
endOfScenarioLifeCycle(Scenario scenario)
Is called at the end of the scenario life cycle, meaning after the last "after" hook.
|
void |
eof()
Indicates the End-Of-File for a Gherkin document (.feature file)
|
void |
examples(Examples examples)
Called before the actual execution of the scenario examples.
|
void |
feature(Feature feature)
Called after the
Formatter.uri(String), but before the actual feature execution. |
protected com.google.gson.Gson |
gson() |
void |
match(Match match) |
void |
result(Result result) |
void |
scenario(Scenario scenario)
Called before the actual execution of the scenario step container.
|
void |
scenarioOutline(ScenarioOutline scenarioOutline)
Called before the actual execution of the scenario outline step container.
|
void |
startOfScenarioLifeCycle(Scenario scenario)
Is called at the beginning of the scenario life cycle, meaning before the first "before" hook.
|
void |
step(Step step)
Is called for each step of a step container.
|
void |
syntaxError(String state,
String event,
List<String> legalEvents,
String uri,
Integer line)
Is called in case any syntax error was detected during the parsing of the feature files.
|
void |
uri(String uri)
Called at the beginning of each feature.
|
void |
write(String text) |
public JSONFormatter(Appendable out)
public void uri(String uri)
Formatterpublic void feature(Feature feature)
FormatterFormatter.uri(String), but before the actual feature execution.public void background(Background background)
Formatterbackground in interface Formatterbackground - the to be executed Backgroundpublic void scenario(Scenario scenario)
Formatterpublic void scenarioOutline(ScenarioOutline scenarioOutline)
FormatterscenarioOutline in interface FormatterscenarioOutline - the to be executed ScenarioOutlinepublic void examples(Examples examples)
FormatterFormatter.scenarioOutline(gherkin.formatter.model.ScenarioOutline),
but before any actual scenario example.public void step(Step step)
Formatterpublic void embedding(String mimeType, byte[] data)
public void appendDuration(int timestamp)
public void eof()
Formatterpublic void done()
Formatterpublic void close()
Formatterpublic void syntaxError(String state, String event, List<String> legalEvents, String uri, Integer line)
FormattersyntaxError in interface Formatterstate - the current state of the parser machineevent - detected eventlegalEvents - expected eventuri - the URI of the feature fileline - the line number of the eventpublic void startOfScenarioLifeCycle(Scenario scenario)
FormatterstartOfScenarioLifeCycle in interface Formatterscenario - the Scenario of the current lifecyclepublic void endOfScenarioLifeCycle(Scenario scenario)
FormatterScenario of the current lifecycleendOfScenarioLifeCycle in interface Formatterprotected com.google.gson.Gson gson()
Copyright © 2024. All rights reserved.