mixin spock tests in maven with java/groovy tests

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

mixin spock tests in maven with java/groovy tests

Eugene Yusim

Is there a way to setup the maven pom so I can run java tests together
with spock tests in a project?

I added the following to my pom:

  <plugin>
                <groupId>org.spockframework</groupId>
                <artifactId>spock-maven</artifactId>
                <version>0.2</version>
                <executions>
                  <execution>
                    <goals>
                      <goal>find-specks</goal>
                    </goals>
                  </execution>
                </executions>
    </plugin>

And now the only tests that run are spock tests.

Thanks in advance for any help.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Spock Framework" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.de/group/spockframework?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: mixin spock tests in maven with java/groovy tests

Peter Niederwieser
Administrator

Hi Eugene,

> Is there a way to setup the maven pom so I can run java tests together
> with spock tests in a project?

Yes it's possible. Just add the following to your POM:

<plugin>
  <artifactId>maven-surefire-plugin</artifactId>
  <configuration>
    <includes>
      <include>**/Test*.java,**/*Test.java,**/*TestCase.java</include>
    </includes>
  </configuration>
</plugin>


Alternatively, you could simply remove the spock-maven plugin. All it
does is to free you from naming conventions for test classes.

Cheers,
Peter


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Spock Framework" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.de/group/spockframework?hl=en
-~----------~----~----~----~------~----~------~--~---

Loading...