JBehave
  1. JBehave
  2. JBEHAVE-766

Documentation to configure maven-plugin should be updated

    Details

    • Type: Improvement Improvement
    • Status: Open Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.6.2
    • Fix Version/s: None
    • Component/s: Documentation
    • Labels:
      None
    • Number of attachments :
      0

      Description

      When introducing JBehave into our project I've run into some challenges - luckily most have been searchable and resolved.

      We have to separate tests in pom.xml, and the docs does not say <scope>test</scope> in the plugin configuration, which makes it harder to get started using JBehave for some projects.
      We also need to be able to run without tests, and use the standard maven flag -DskipTests - the maven plugin docs does not mention how to get this right, but this worked for us: http://stackoverflow.com/questions/7926723/jbehave-maven-how-to-skip-scenario-tests

        Activity

        Hide
        Anders Sandberg Nordbø added a comment -

        When <scope>test</scope> is not specified, JBehave does not look in target/test-classes where test classes normally would reside.

        Show
        Anders Sandberg Nordbø added a comment - When <scope>test</scope> is not specified, JBehave does not look in target/test-classes where test classes normally would reside.
        Hide
        Mauro Talevi added a comment -

        Hi Anders,

        I think there is some confusion around what is a "test". In Maven, target/test-classes is where the unit test classes would reside, but not necessarily the integration tests. By default, JBehave assumes that you are running integration tests and in a separate bespoke module (because it typically these have a cross-modular and cross-cutting concern).

        The Maven properties in http://jbehave.org/reference/stable/maven-goals.html does include the property <scope> and it says it defaults to "compile".

        Hence the plugin does not worry about the surefire properties, e.g. -DskipTests. Of course, you can configure to JBehave stories as JUnit tests, e.g. via the surefire plugin, but it's separate from the JBehave Maven plugin.

        That said, we can certainly improve the docs to explain and clarify this.

        Show
        Mauro Talevi added a comment - Hi Anders, I think there is some confusion around what is a "test". In Maven, target/test-classes is where the unit test classes would reside, but not necessarily the integration tests. By default, JBehave assumes that you are running integration tests and in a separate bespoke module (because it typically these have a cross-modular and cross-cutting concern). The Maven properties in http://jbehave.org/reference/stable/maven-goals.html does include the property <scope> and it says it defaults to "compile". Hence the plugin does not worry about the surefire properties, e.g. -DskipTests. Of course, you can configure to JBehave stories as JUnit tests, e.g. via the surefire plugin, but it's separate from the JBehave Maven plugin. That said, we can certainly improve the docs to explain and clarify this.
        Hide
        Anders Sandberg Nordbø added a comment -

        You're right, it's just that maven is hard (in general) for beginners like myself Yes, I think adding more examples that can be used for different configuration needs would be helpful for maven beginners.

        Show
        Anders Sandberg Nordbø added a comment - You're right, it's just that maven is hard (in general) for beginners like myself Yes, I think adding more examples that can be used for different configuration needs would be helpful for maven beginners.

          People

          • Assignee:
            Unassigned
            Reporter:
            Anders Sandberg Nordbø
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: