allure-framework/allure-java

Spock2 BDD blocks not appearing

alexmjames opened this issue · 1 comments

I'm submitting a ...

  • bug report
  • feature request
  • support request => Please do not submit support request here, see note at the top of this template.

What is the current behavior?

I am having spock2 tests alone in a project with below surefire config and dependencies in pom. The allure report generated is not having the given-when-then blocks as expected with allure-spock2 implementation but rest of the details like steps, attachments etc are available. Am I missing any configuration/dependency or is this a bug.

 <build>
      <plugin>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>3.0.0-M7</version>
          <dependencies>
            <dependency>
              <groupId>org.aspectj</groupId>
              <artifactId>aspectjweaver</artifactId>
              <version>1.9.9.1</version>
            </dependency>
          </dependencies>
          <configuration>
            <useModulePath>false</useModulePath>
            <useFile>false</useFile>
            <argLine>-javaagent:${settings.localRepository}/org/aspectj/aspectjweaver/1.9.9.1/aspectjweaver-1.9.9.1.jar</argLine>
            <includes>
              <include>**/*Spec*.*</include>
            </includes>
          </configuration>
     </plugin>
     <plugin>
        <groupId>org.codehaus.gmavenplus</groupId>
        <artifactId>gmavenplus-plugin</artifactId>
        <version>2.1.0</version>
        <executions>
          <execution>
            <goals>
              <goal>compile</goal>
              <goal>compileTests</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
 </build>
 <dependencies>
    <dependency>
      <groupId>org.spockframework</groupId>
      <artifactId>spock-core</artifactId>
      <version>2.3-groovy-3.0</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>io.qameta.allure</groupId>
      <artifactId>allure-spock2</artifactId>
      <version>2.20.1</version>
      <scope>compile</scope>
    </dependency>
 </dependencies>

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem

What is the expected behavior?

Allure report having Given-When-Then blocks with the associated comments like

given: set the query params
..
when: call get method
..
then: check the response status code

What is the motivation / use case for changing the behavior?

Please tell us about your environment:

| Allure version | 2.20.1 |
| Test framework | spock-core@2.3-groovy-3.0 |
| Allure integration | allure-spock2@2.20.1 |

Other information