Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All Steps Pending (0.9.229) #6

Open
jagobond opened this issue Jan 29, 2014 · 4 comments
Open

All Steps Pending (0.9.229) #6

jagobond opened this issue Jan 29, 2014 · 4 comments

Comments

@jagobond
Copy link

I've been running into an issue trying to set up Thucydides with Jbehave for the last couple of days, using version 0.9.229 of each.

The problem: no matter what I do, when I run my tests, each and every step comes back as "PENDING". This happens whether I'm running my own project, running a testRunner in this git, or even just executing a "mvn test thucydides:aggregate" on the basic maven archetype.

After some debugging, I expect the problem lies in the JUnitDescriptionGenerator.java class, particularly in the addNonExistingStep() method:

private void addNonExistingStep(Description description, String stringStepOneLine,
            String stringStep) {
        try {
            StepType stepType = configuration.keywords()
                    .stepTypeFor(stringStep);
            if (stepType == StepType.IGNORABLE) {
                addIgnorableStep(description, stringStepOneLine);
            } else {
                addPendingStep(description, stringStepOneLine);
            }
        } catch (StartingWordNotFound e) {
            // WHAT NOW?
        }
    }

I traced my tests through this method, and my stepTypes were being instantiated correctly (Given, When, etc.), but because of the "else" statement, they're all being marked as pending.

@mdolinin
Copy link
Contributor

If you want to get help with your issue. Please provide the logs of test execution.—
Sent from Mailbox for iPhone

On Wed, Jan 29, 2014 at 4:30 PM, jagobond notifications@github.com
wrote:

I've been running into an issue trying to set up Thucydides with Jbehave for the last couple of days, using version 0.9.229 of each.
The problem: no matter what I do, when I run my tests, each and every step comes back as "PENDING". This happens whether I'm running my own project, running a testRunner in this git, or even just executing a "mvn test thucydides:aggregate" on the basic maven archetype.
After some debugging, I expect the problem lies in the JUnitDescriptionGenerator.java class, particularly in the addNonExistingStep() method:

private void addNonExistingStep(Description description, String stringStepOneLine,
          String stringStep) {
      try {
          StepType stepType = configuration.keywords()
                  .stepTypeFor(stringStep);
          if (stepType == StepType.IGNORABLE) {
              addIgnorableStep(description, stringStepOneLine);
          } else {
              addPendingStep(description, stringStepOneLine);
          }
      } catch (StartingWordNotFound e) {
          // WHAT NOW?
      }
  }

I traced my tests through this method, and my stepTypes were being instantiated correctly (Given, When, etc.), but because of the "else" statement, they're all being marked as pending.

Reply to this email directly or view it on GitHub:
#6

@bbarin
Copy link

bbarin commented Apr 28, 2014

I have the same problem, seems that after release 0.9.125 the classpath ignores classes with @step in my case. The weird thing is that only occurs when Jenkins checkout the code and run the tests

@bbarin
Copy link

bbarin commented Apr 28, 2014

Ok, found the problem. The project had a space and that's converted to %20 when using the URLClassloader. Rename the project to avoid whitespace fixed the problem. But of course this is a workaround, in fact the plugin should use something like URLDecoder.decode(url.getPath(), "UTF-8")

@cvmocanu
Copy link
Contributor

I have the same problem. When the classspath contains spaces, the steps are not found (all steps are marked as PENDING).
The problem goes away if I rename the directories to make sure there is no space in the path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants