0

I migrate a large Grails 1.3.7 project to 3.1.6. Tests for Controllers are integration tests. This works fine because the tests inherit from ControllerSpec. Now i´m should be able to do something like this:

@Integration
@TestFor(SampleController)
class SampleControllerIntSpec extends Specification {

Because the TestFor Annotation allows usage of model/view/.. fields like in Unit tests.

Is there a way to do something like this?

Thanks in advance.

1 Answers1

2

No the TestFor annotations are exclusively for unit tests, Integration tests are full functional tests in Grails 3 where you should use a client like Geb to send requests to the server and assert responses.

Graeme Rocher
  • 7,985
  • 2
  • 26
  • 37
  • Thanks for your fast answer. I know it isn´t possible to do it like this. I have to migrate a lot of tests and i hope there is a workaround to do it like that. Can you give me a hint? –  Apr 29 '16 at 13:07