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

Non standard directories causes an exception #43

Open
klunk opened this issue Apr 2, 2015 · 4 comments
Open

Non standard directories causes an exception #43

klunk opened this issue Apr 2, 2015 · 4 comments

Comments

@klunk
Copy link

klunk commented Apr 2, 2015

I need to reorganise my project for multiple test types, so rather than have a directory structure of

   src
   |-> cucumber
   |-> main
   \-> test

I want to have

   src
   |-> main
   \-> test
        |-> integrationTest
        |-> cucumber
        \-> unitTest

However as soon as I move cucumber under the test directory and change the sourceSets for cucumber I see the following exception:

  • What went wrong:
    Execution failed for task ':nrg-data:cucumber'.

    cucumber.runtime.java.JavaBackend.getSnippet(Lgherkin/formatter/model/Step;Lcucumber/runtime/snippets/FunctionNameGenerator;)Ljava/lang/String;

If I add an empty cucumber directory under src it works fine. this is happening with Java 1.7, Gradle 2.3 and plugin version 0.7

@viphe
Copy link
Collaborator

viphe commented Apr 3, 2015

I would have to try that. Could you fix your description of the file structure? The markdown rendering turned it flat.

@klunk
Copy link
Author

klunk commented Apr 7, 2015

I think I have found where the offending line of code is, but I am not sure how to fix it.

In the apply method of the CucumberPlugin there is a line that says

    hasCucumberSourceSet = project.file('src/cucumber').exists()

If this exists it sets up the plugin details, if it does not exist it treats it as if there is nothing for the plugin to do. I want to go through this set up code but I dont want src/cucumber to exist, however at the point of applying the plugin I do not have a cucumber sourceSet defined in my project.

@viphe
Copy link
Collaborator

viphe commented Apr 7, 2015

I see. What are you trying to achieve between:

  • have a Cucumber source set with customizable paths
  • have the Cucumber sources in the test source sets?
    (or something else).

@klunk
Copy link
Author

klunk commented Apr 7, 2015

have a Cucumber source set with customizable paths

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

2 participants