Vicki,

added AnnotatedEtsyDotComStories to etsy-stories-java-spring tutorial
that shows how you can use SeleniumConfiguration via
AnnotatedEmbedderRunner.

When running with mvn, you need to use the profile -Pannotated-embedder.

Cheers

On 31/05/2011 16:06, Mauro Talevi wrote:
> The solution requires JBEHAVE-523.  I'll be pushing it soon.
>
> On 31 May 2011, at 15:24, Paul Hammant <[email protected]
> <mailto:[email protected]>> wrote:
>
>> Vicki,
>>
>> Have you tried adding breakpoints to to debug your way through your
>> difficulty?
>>
>> I mean in the underlying JBehave get/sets?  I helped me though
>> something simular.  For my case similar to the Etsy case, I overrode
>> JUnit's run() method and inspected the embedder at that point.  I
>> found that the Maven infrastructure had overwritten some of the
>> things I was trying to programmatically set.  There was nothing wrong
>> with that, it was as per JB design (for Maven integration) but I did
>> not realize that.
>>
>> Regards,
>>
>> - Paul
>>
>>
>> On Mon, May 30, 2011 at 2:24 AM, Mauro Talevi
>> <[email protected] <mailto:[email protected]>> wrote:
>>
>>     Hi Vicki,
>>
>>     you can look at the JBehave Tutorial, there is now a new module that
>>     uses pure Java and Spring for composition:
>>
>>     
>> https://github.com/jbehave/jbehave-tutorial/tree/master/etsy-stories-java-spring
>>
>>     It does not use annotations for configuration though.  I'll add
>>     another
>>     entry point that does so, but for the moment you can use that example
>>     for your programmatic configuration.
>>
>>     Cheers
>>
>>     On 30/05/2011 07:08, VSS wrote:
>>     > I'm sorry to keep at this, but I still can't get the SelniumContext
>>     > populated.  3 days trying now.  Maybe I'm thinking this does
>>     what it doesn't
>>     > do.
>>     > Does JBehave/Selenium actually populate the seleniumContext
>>     with the
>>     > scenario or story name, or do I have to?  And if so, how do I
>>     get the
>>     > scenario name, because if I can do that, I don't need the
>>     seleniumContext.
>>     >
>>     > Is there any documentation on this, or just the examples in
>>     > webtraderexamples?
>>     >
>>     > thanks for your patience.
>>     >
>>     > vicki
>>     >
>>     >
>>     >
>>     >
>>     > "Mauro Talevi" <[email protected]
>>     <mailto:[email protected]>> wrote
>>     > in message news:4DE0A612.5080203 <tel:612.5080203>@aquilonia.org...
>>     >> Hi Vicki,
>>     >>
>>     >> you can override the default configuration in the
>>     injectedEmbedder() via
>>     >> the useConfiguration(SeleniumConfiguration)  method.
>>     >>
>>     >> Cheers
>>     >>
>>     >> On 26/05/2011 16:11, VSS wrote:
>>     >>> Hi Mauro.
>>     >>> A portion of our framework code is below.  I tried to create a
>>     >>> SeleniumConfiguration and then call
>>     >>> injectedEmbedder.useConfiguration(seleniumConfig).  However, when
>>     >>> injectedEmbedder().runStoriesAsPaths(storyPaths()) is called,
>>     instead of
>>     >>> using seleniumConfig, it still uses the
>>     MostUsefulConfiguration.  The
>>     >>> title
>>     >>> in the SeleniumContext is never set even on failure.
>>     >>>
>>     >>> Thanks.
>>     >>> Vicki
>>     >>>
>>     >>> @RunWith(SpringAnnotatedEmbedderRunner.class)
>>     >>> @Configure(pendingStepStrategy = FailingUponPendingStep.class)
>>     >>> @UsingEmbedder(embedder = Embedder.class,
>>     generateViewAfterStories =
>>     >>> true,
>>     >>> ignoreFailureInStories = true, ignoreFailureInView = false,
>>     >>>                 storyTimeoutInSecs = 100, threads = 1,
>>     metaFilters =
>>     >>> "-skip")
>>     >>> @UsingSpring(resources = {"datasources.xml", "properties.xml",
>>     >>> "jbehave-spring-configuration.xml"})
>>     >>>
>>     >>> public abstract class AbstractSpringConfiguredTestSuite extends
>>     >>> InjectableEmbedder {
>>     >>>     @Test
>>     >>>     public void run() throws Throwable {
>>     >>>         injectedEmbedder().configuration()
>>     >>>                 .useStoryReporterBuilder(new
>>     StoryReporterBuilder()
>>     >>>                         .withRelativeDirectory("jbehave-reports")
>>     >>>                         .withFormats(HTML, CONSOLE, STATS )
>>     >>>
>>     >>>
>>     .withCodeLocation(CodeLocations.codeLocationFromPath("build/test"))
>>     >>>                         .withFailureTrace(true));
>>     >>>         injectedEmbedder().runStoriesAsPaths(storyPaths());
>>     >>>     }
>>     >>>
>>     >>>     protected abstract List<String> storyPaths();
>>     >>> }
>>     >>>
>>     >>>
>>     >>>
>>     >>>
>>     >>>
>>     >>> "Mauro Talevi" <[email protected]
>>     <mailto:[email protected]>>
>>     >>> wrote
>>     >>> in message news:[email protected]
>>     <mailto:[email protected]>...
>>     >>>> Hi Vicki,
>>     >>>>
>>     >>>> can you please be more precise about what you think you
>>     can't do?
>>     >>>>
>>     >>>> MostUsefulConfiguration is simply a concretisation of
>>     Configuration,
>>     >>>> providing some defaults.  SeleniumConfiguration extends
>>     Configuration
>>     >>>> with Selenium-specific elements.  What you can do with
>>     >>>> MostUsefulConfiguration you'll be able to do with
>>     SeleniumConfiguration.
>>     >>>>
>>     >>>> Cheers
>>     >>>>
>>     >>>> On 26/05/2011 00:34, VSS wrote:
>>     >>>>> I am trying to use the new code introduced in JBehave-413
>>     to name our
>>     >>>>> screenshot files more meaningfully.
>>     >>>>> I did try following the example laid out in Paul's tutorial
>>     site
>>     >>>>>
>>     
>> https://github.com/paul-hammant/jbehave-webdriver-example/blob/master/etsy-stories/src/main/java/org/jbehave/tutorials/etsy/EtsyDotComStories.java#L42
>>     >>>>>
>>     >>>>> However, our framework is extending InjectableEmbedder and uses
>>     >>>>> runStoriesAsPaths(storyPaths()).  In following the code
>>     around, I see
>>     >>>>> that
>>     >>>>> the Embedder class uses MostUsefulConfiguration, and there
>>     doesn't seem
>>     >>>>> to
>>     >>>>> be a way to make that a SeleniumConfiguration, which, as I
>>     see it, is
>>     >>>>> the
>>     >>>>> configuration I need to get the scenario name.
>>     >>>>>
>>     >>>>>  Following Paul's example would require me to completely
>>     rewrite the
>>     >>>>> framework, I think.  Any suggestions?
>>     >>>>>
>>     >>>>> (PS...Hi Paul, this is Vicki from Hoover's.  The framework
>>     is Kozak's,
>>     >>>>> so
>>     >>>>> you've seen it, albeit many months ago) .
>>     >>>>>
>>     >>>>> Thanks In Advance.
>>     >>>>> Vicki
>>     >>>>>
>>     >>>>>
>>     >>>>>
>>     >>>>>
>>     >>>>>
>>     ---------------------------------------------------------------------
>>     >>>>> To unsubscribe from this list, please visit:
>>     >>>>>
>>     >>>>>     http://xircles.codehaus.org/manage_email
>>     >>>>>
>>     >>>>>
>>     >>>>
>>     ---------------------------------------------------------------------
>>     >>>> To unsubscribe from this list, please visit:
>>     >>>>
>>     >>>>    http://xircles.codehaus.org/manage_email
>>     >>>>
>>     >>>>
>>     >>>>
>>     >>>
>>     >>>
>>     >>>
>>     ---------------------------------------------------------------------
>>     >>> To unsubscribe from this list, please visit:
>>     >>>
>>     >>>     http://xircles.codehaus.org/manage_email
>>     >>>
>>     >>>
>>     >>
>>     >>
>>     ---------------------------------------------------------------------
>>     >> To unsubscribe from this list, please visit:
>>     >>
>>     >>    http://xircles.codehaus.org/manage_email
>>     >>
>>     >>
>>     >>
>>     >
>>     >
>>     >
>>     >
>>     ---------------------------------------------------------------------
>>     > To unsubscribe from this list, please visit:
>>     >
>>     >     http://xircles.codehaus.org/manage_email
>>     >
>>     >
>>
>>
>>     ---------------------------------------------------------------------
>>     To unsubscribe from this list, please visit:
>>
>>        http://xircles.codehaus.org/manage_email
>>
>>
>>

Reply via email to