Hi I have three scenario and i would like to run scenarios in different env
based on the tags.

I have tagged my 3 scenario as

@env SIT [to run in SIT]          //.....scenario1
@env QA [to run in QA]          //.....scenario2
@env SITQA [to run in both]    //.....scenario3

and in my meta filter i use
<metaFilters> <metaFilter>*-env QA*</metaFilter>      </metaFilters>

With these i get following exceptions [logs attached]
*(BeforeStories)*

*[INFO] Running story org/test/sample/stories/my.story*

*(org/test/sample/stories/my.story)*
*Scenario: this scenario should run in SIT*
 *Given I am a SIT step*

*Scenario: this scenario should run in QA*
*[WARNING] Failed to run story org/test/sample/stories/my.story*
*org.jbehave.core.failures.UUIDExceptionWrapper:
java.lang.NullPointerException*
* at
org.jbehave.core.embedder.PerformableTree.perform(PerformableTree.java:366)*
* at
org.jbehave.core.embedder.StoryManager$EnqueuedStory.call(StoryManager.java:238)*
* at
org.jbehave.core.embedder.StoryManager$EnqueuedStory.call(StoryManager.java:217)*
* at java.util.concurrent.FutureTask.run(FutureTask.java:262)*
* at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)*
* at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)*
* at java.lang.Thread.run(Thread.java:745)*



Can anyone explain me whats wrong or how can i achieve this including
excluding scenario based on tags ?

Thanks
Ajay
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building JBehave Stories 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ metatags 
---
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. 
build is platform dependent!
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, 
i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO] Copying 1 resource
[INFO] 
[INFO] --- jbehave-maven-plugin:4.0-beta-8:unpack-view-resources 
(unpack-view-resources) @ metatags ---
[INFO] Unpacked 
c:\maven\repository\org\jbehave\site\jbehave-site-resources\3.1.1\jbehave-site-resources-3.1.1.zip
 to C:\Users\dsoxajay\Desktop\metatags\target\jbehave\view
[INFO] Unpacked 
c:\maven\repository\org\jbehave\jbehave-core\4.0-beta-8\jbehave-core-4.0-beta-8-resources.zip
 to C:\Users\dsoxajay\Desktop\metatags\target\jbehave\view
[INFO] 
[INFO] --- maven-compiler-plugin:2.1:compile (default-compile) @ metatags ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ 
metatags ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, 
i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory 
C:\Users\dsoxajay\Desktop\metatags\src\test\resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.1:testCompile (default-testCompile) @ 
metatags ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ metatags ---
[INFO] No tests to run.
[INFO] 
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ metatags ---
[INFO] Building jar: 
C:\Users\dsoxajay\Desktop\metatags\target\metatags-1.0-SNAPSHOT.jar
[INFO] 
[INFO] --- jbehave-maven-plugin:4.0-beta-8:run-stories-as-embeddables 
(embeddable-stories) @ metatags ---
[INFO] Running stories as embeddables using embedder 
Embedder[storyMapper=StoryMapper,storyRunner=<null>,embedderMonitor=MavenEmbedderMonitor,classLoader=EmbedderClassLoader[urls=[/C:/Users/dsoxajay/Desktop/metatags/target/classes/,
 jbehave-core-4.0-beta-8.jar, junit-4.11.jar, hamcrest-core-1.3.jar, 
hamcrest-library-1.3.jar, hamcrest-integration-1.3.jar, 
commons-collections-3.2.1.jar, commons-io-2.4.jar, commons-lang-2.6.jar, 
plexus-utils-3.0.10.jar, freemarker-2.3.20.jar, paranamer-2.4.jar, 
xstream-1.4.5.jar, xmlpull-1.1.3.1.jar, 
xpp3_min-1.1.4c.jar],parent=ClassRealm[plugin>org.jbehave:jbehave-maven-plugin:4.0-beta-8,
 parent: 
sun.misc.Launcher$AppClassLoader@7b76fb04]],embedderControls=UnmodifiableEmbedderControls[EmbedderControls[batch=false,skip=false,generateViewAfterStories=true,ignoreFailureInStories=true,ignoreFailureInView=false,verboseFailures=false,verboseFiltering=false,storyTimeoutInSecs=300,failOnStoryTimeout=false,threads=1]],embedderFailureStrategy=<null>,configuration=org.jbehave.core.configuration.MostUsefulConfiguration@44732a9e,candidateSteps=<null>,stepsFactory=<null>,metaFilters=[-env
 
QA],systemProperties=<null>,executorService=<null>,executorServiceCreated=false,performableTree=PerformableTree,storyManager=<null>]
[INFO] Found class names: [org.test.sample.MyStories]
[INFO] Using controls 
UnmodifiableEmbedderControls[EmbedderControls[batch=false,skip=false,generateViewAfterStories=true,ignoreFailureInStories=true,ignoreFailureInView=false,verboseFailures=false,verboseFiltering=false,storyTimeoutInSecs=300,failOnStoryTimeout=false,threads=1]]
[INFO] Running embeddable org.test.sample.MyStories
[INFO] Processing system properties {}
[INFO] Using controls 
UnmodifiableEmbedderControls[EmbedderControls[batch=false,skip=false,generateViewAfterStories=true,ignoreFailureInStories=true,ignoreFailureInView=false,verboseFailures=false,verboseFiltering=false,storyTimeoutInSecs=300,failOnStoryTimeout=false,threads=1]]

(BeforeStories)

[INFO] Running story org/test/sample/stories/my.story

(org/test/sample/stories/my.story)
Scenario: this scenario should run in SIT
Given I am a SIT step

Scenario: this scenario should run in QA
[WARNING] Failed to run story org/test/sample/stories/my.story
org.jbehave.core.failures.UUIDExceptionWrapper: java.lang.NullPointerException
        at 
org.jbehave.core.embedder.PerformableTree.perform(PerformableTree.java:366)
        at 
org.jbehave.core.embedder.StoryManager$EnqueuedStory.call(StoryManager.java:238)
        at 
org.jbehave.core.embedder.StoryManager$EnqueuedStory.call(StoryManager.java:217)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
        at 
org.jbehave.core.embedder.PerformableTree$PerformableScenario.perform(PerformableTree.java:808)
        at 
org.jbehave.core.embedder.PerformableTree$PerformableStory.performScenarios(PerformableTree.java:740)
        at 
org.jbehave.core.embedder.PerformableTree$PerformableStory.perform(PerformableTree.java:719)
        at 
org.jbehave.core.embedder.PerformableTree.performCancellable(PerformableTree.java:380)
        at 
org.jbehave.core.embedder.PerformableTree.perform(PerformableTree.java:360)
        ... 6 more

(AfterStories)

[INFO] Generating reports view to 
'C:\Users\dsoxajay\Desktop\metatags\target\jbehave' using formats '[stats, 
console, txt, html, xml]' and view properties 
'{navigator=ftl/jbehave-navigator.ftl, views=ftl/jbehave-views.ftl, 
reports=ftl/jbehave-reports-with-totals.ftl, 
nonDecorated=ftl/jbehave-report-non-decorated.ftl, 
decorated=ftl/jbehave-report-decorated.ftl, maps=ftl/jbehave-maps.ftl}'
[INFO] Reports view generated with 0 stories (of which 0 pending) containing 0 
scenarios (of which 0 pending)
[INFO] 
[INFO] --- maven-install-plugin:2.4:install (default-install) @ metatags ---
[INFO] Installing 
C:\Users\dsoxajay\Desktop\metatags\target\metatags-1.0-SNAPSHOT.jar to 
c:\maven\repository\org\test\sample\metatags\1.0-SNAPSHOT\metatags-1.0-SNAPSHOT.jar
[INFO] Installing C:\Users\dsoxajay\Desktop\metatags\pom.xml to 
c:\maven\repository\org\test\sample\metatags\1.0-SNAPSHOT\metatags-1.0-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.796 s
[INFO] Finished at: 2014-08-13T09:47:18+10:00
[INFO] Final Memory: 11M/61M
[INFO] ------------------------------------------------------------------------
Narrative:
In order to use the tags to seggregate features As a tester i would like to 
specify which scenario to run in QA or SIT or both

Metatags.story

Scenario: this scenario should run in SIT
Meta:
@env SIT
Given I am a SIT step


Scenario:this scenario should run in QA
Meta:
@env QA
Given I am a QA step


Scenario: this scenario should run in SIT and QA
Meta:
@env QASIT
Given I am a both step
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to