Svante | 23 Jan 10:49 2012
Picon

[Cucumber:10111] Cucumber-jvm - running all features with a specific tag

Hi,
I'm trying to run all my feature with a specific tag from one test
file with the  <at> Feature annotation. (If there are any other ways to do
it, please do tell)
So far I have been successful with running one feature by putting my
testfile (RunSlowTests.java) in my step-def package. It looks like
this:

import cucumber.junit.Cucumber;
import cucumber.junit.Feature;
import org.junit.runner.RunWith;

/**
 * Run as JUnit test to only run features with the ' <at> SmokeTest' tag
 */
 <at> RunWith(Cucumber.class)
 <at> Feature(value = "login.feature", tags = { " <at> SmokeTest" })
public class RunSmokeTest {
    // Do nothing. This file just run features with a specific tag
}

Now my question is, what can I write instead of value =
"login.feature" so all features with the tag are run, and not just the
scenarios in the "login.feature"?
I have tried all manners of different kinds of relative and absolute
paths and package names and what not, and every time i get:
"cucumber.resources.NoSuchResourceException: No resources at path
[what-ever I write in value = "blahblah"]"

Any constructive suggestion would be very appreciated.
(Continue reading)

aslak hellesoy | 23 Jan 11:16 2012
Picon

Re: [Cucumber:10112] Cucumber-jvm - running all features with a specific tag

On Mon, Jan 23, 2012 at 9:49 AM, Svante <svantetobias@...> wrote:
> Hi,
> I'm trying to run all my feature with a specific tag from one test
> file with the  <at> Feature annotation. (If there are any other ways to do
> it, please do tell)
> So far I have been successful with running one feature by putting my
> testfile (RunSlowTests.java) in my step-def package. It looks like
> this:
>
> import cucumber.junit.Cucumber;
> import cucumber.junit.Feature;
> import org.junit.runner.RunWith;
>
> /**
>  * Run as JUnit test to only run features with the ' <at> SmokeTest' tag
>  */
>  <at> RunWith(Cucumber.class)
>  <at> Feature(value = "login.feature", tags = { " <at> SmokeTest" })
> public class RunSmokeTest {
>    // Do nothing. This file just run features with a specific tag
> }
>
> Now my question is, what can I write instead of value =
> "login.feature" so all features with the tag are run, and not just the
> scenarios in the "login.feature"?
> I have tried all manners of different kinds of relative and absolute
> paths and package names and what not, and every time i get:
> "cucumber.resources.NoSuchResourceException: No resources at path
> [what-ever I write in value = "blahblah"]"
>
(Continue reading)

Svante | 23 Jan 12:45 2012
Picon

[Cucumber:10113] Re: Cucumber-jvm - running all features with a specific tag

Hi, and thank you for your suggestion.

With value="." I get:
gherkin.lexer.LexingError: Lexing error on line 1: '����

[some output that looks like it is trying to read my first step-
definition as a .feature file and fails]

%_FEATURE_END_%'. See http://wiki.github.com/cucumber/gherkin/lexingerror
for more information.
at gherkin.lexer.i18n.EN.scan(EN.java:783)
at gherkin.lexer.I18nLexer.scan(I18nLexer.java:30)
at gherkin.parser.Parser.parse(Parser.java:53)
at cucumber.runtime.FeatureBuilder.parse(FeatureBuilder.java:76)
at cucumber.junit.Cucumber$2.consume(Cucumber.java:121)
at cucumber.resources.Resources.scanFilesystem(Resources.java:169)
at cucumber.resources.Resources.scanFilesystem(Resources.java:165)
at cucumber.resources.Resources.scanFilesystem(Resources.java:165)
at cucumber.resources.Resources.scanFilesystem(Resources.java:165)
at cucumber.resources.Resources.scanFilesystem(Resources.java:165)
...

Any other suggestions?

On Jan 23, 11:16 am, aslak hellesoy <aslak.helle...@...> wrote:
>
> Have you tried  <at> Feature(value=".", tags = { " <at> SmokeTest" })
>
> Aslak
>
(Continue reading)

aslak hellesoy | 23 Jan 12:59 2012
Picon

Re: [Cucumber:10114] Re: Cucumber-jvm - running all features with a specific tag

On Mon, Jan 23, 2012 at 11:45 AM, Svante <svantetobias@...> wrote:
> Hi, and thank you for your suggestion.
>
> With value="." I get:
> gherkin.lexer.LexingError: Lexing error on line 1: '����
>
> [some output that looks like it is trying to read my first step-
> definition as a .feature file and fails]
>
> %_FEATURE_END_%'. See http://wiki.github.com/cucumber/gherkin/lexingerror
> for more information.
> at gherkin.lexer.i18n.EN.scan(EN.java:783)
> at gherkin.lexer.I18nLexer.scan(I18nLexer.java:30)
> at gherkin.parser.Parser.parse(Parser.java:53)
> at cucumber.runtime.FeatureBuilder.parse(FeatureBuilder.java:76)
> at cucumber.junit.Cucumber$2.consume(Cucumber.java:121)
> at cucumber.resources.Resources.scanFilesystem(Resources.java:169)
> at cucumber.resources.Resources.scanFilesystem(Resources.java:165)
> at cucumber.resources.Resources.scanFilesystem(Resources.java:165)
> at cucumber.resources.Resources.scanFilesystem(Resources.java:165)
> at cucumber.resources.Resources.scanFilesystem(Resources.java:165)
> ...
>
> Any other suggestions?
>

Judging from your stack trace it seems you are using an old version.
Can you try with 1.0.0.RC11 please?
Don't forget to always mention what version you're using, and what OS you're on.

(Continue reading)


Gmane