org.jbehave.web.selenium
Class SauceContextStoryReporter

java.lang.Object
  extended by org.jbehave.core.reporters.NullStoryReporter
      extended by org.jbehave.web.selenium.SauceContextStoryReporter
All Implemented Interfaces:
org.jbehave.core.reporters.StoryReporter

public class SauceContextStoryReporter
extends org.jbehave.core.reporters.NullStoryReporter

A StoryReporter that passes back to SauceLabs the executed job results.


Constructor Summary
SauceContextStoryReporter(WebDriverProvider webDriverProvider)
           
 
Method Summary
 void afterStory(boolean givenStory)
           
 void beforeScenario(java.lang.String title)
           
 void beforeStory(org.jbehave.core.model.Story story, boolean givenStory)
           
 void failed(java.lang.String step, java.lang.Throwable cause)
           
protected  java.lang.String getJobName()
          The name of the job.
protected  java.lang.String getJobTags()
          A set of tags to apply to the job, like so: "foo", "bar"
protected  void processSauceLabsResponseLine(java.lang.String responseLineFromSauceLabs)
          By deault, this prints a URL to the Job on SauceLabs.
 
Methods inherited from class org.jbehave.core.reporters.NullStoryReporter
afterExamples, afterScenario, beforeExamples, cancelled, dryRun, example, failedOutcomes, givenStories, givenStories, ignorable, narrative, notPerformed, pending, pendingMethods, restarted, scenarioMeta, scenarioNotAllowed, storyNotAllowed, successful
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SauceContextStoryReporter

public SauceContextStoryReporter(WebDriverProvider webDriverProvider)
Method Detail

beforeStory

public void beforeStory(org.jbehave.core.model.Story story,
                        boolean givenStory)
Specified by:
beforeStory in interface org.jbehave.core.reporters.StoryReporter
Overrides:
beforeStory in class org.jbehave.core.reporters.NullStoryReporter

beforeScenario

public void beforeScenario(java.lang.String title)
Specified by:
beforeScenario in interface org.jbehave.core.reporters.StoryReporter
Overrides:
beforeScenario in class org.jbehave.core.reporters.NullStoryReporter

failed

public void failed(java.lang.String step,
                   java.lang.Throwable cause)
Specified by:
failed in interface org.jbehave.core.reporters.StoryReporter
Overrides:
failed in class org.jbehave.core.reporters.NullStoryReporter

afterStory

public void afterStory(boolean givenStory)
Specified by:
afterStory in interface org.jbehave.core.reporters.StoryReporter
Overrides:
afterStory in class org.jbehave.core.reporters.NullStoryReporter

processSauceLabsResponseLine

protected void processSauceLabsResponseLine(java.lang.String responseLineFromSauceLabs)
By deault, this prints a URL to the Job on SauceLabs. Refer https://saucelabs.com/docs/sauce-ondemand

Parameters:
responseLineFromSauceLabs - a line from the response

getJobName

protected java.lang.String getJobName()
The name of the job. By default this is the story name.

Returns:
the job name

getJobTags

protected java.lang.String getJobTags()
A set of tags to apply to the job, like so: "foo", "bar"

Returns:
a string of comma separated strings in quotes


Copyright © 2011. All Rights Reserved.