Jan 25th, 2011, 12:22 PM
Spock support in STS
I'm using STS 2.5.2 and spock 0.5-1.7.
I have a very simple Maven and Groovy project on github:
I followed the steps here:
First, these manual steps should not be necessary, but pehaps that is a problem with m2eclipse.
Regardless, it doens't work. I can't run the Spock test because there is no option for it under "Run As".
Are other people getting this to work? If so what do I need to do?
Jan 26th, 2011, 05:51 AM
It works for me, I run some Spock tests along with the usual Junit test.
Are you sure your STS installation includes the Groovy-Eclipse Plugin? Because it's that plugin the one that allows to run Spock specifications as regular Junit tests.
Jan 26th, 2011, 12:01 PM
The appearance of 'RunAs>JUnit' will be conditional on the Spock AST transform having run successfully. I am going to add some support shortly that will enable us to determine what Ast transforms are being run against groovy projects whilst they are being compiled, but I haven't done it yet. Can you perhaps try a smaller sample project perhaps with maven out of the equation and confirm it is OK? (So just a test class and the spock jar on the project classpath)
SpringSource Tool Suite Team
Tags for this Thread