cucumber.runtime
Interface ScenarioResult


public interface ScenarioResult

After Hooks that declare a parameter of this type will receive an instance of this class. This allows an After hook to inspect whether or not a Scenario failed.


Method Summary
 void embed(InputStream data, String mimeType)
          Embeds data into the report(s).
 String getStatus()
           
 boolean isFailed()
           
 void write(String text)
          Outputs some text into the report.
 

Method Detail

getStatus

String getStatus()
Returns:
the most severe status of the Scenario's Steps. One of "passed", "undefined", "pending", "skipped", "failed"

isFailed

boolean isFailed()
Returns:
true if and only if getStatus() returns "failed"

embed

void embed(InputStream data,
           String mimeType)
Embeds data into the report(s). Some reporters (such as the progress one) don't embed data, but others do (html and json).

Parameters:
data - what to embed, for example an image.
mimeType - what is the data?
See Also:
ProgressFormatter, HTMLFormatter, JSONFormatter

write

void write(String text)
Outputs some text into the report.

Parameters:
text - what to put in the report.


Copyright © 2012. All Rights Reserved.