Grails 3/Gradle/IntelliJ and integration tests

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Grails 3/Gradle/IntelliJ and integration tests

budjb
It seems I'm having problems kicking off integration tests via Gradle.  I am migrating a plugin to 3.x, and have placed my integration tests in src/integration-test/groovy, and modified the existing integration tests as necessary.  Using gradle test, I can only get unit tests to run.  This is true using both IntelliJ and the command line.

The only way I can get integration tests to run is via the command line using grails test-app.  The odd thing is, using the same command in IntelliJ gives me an error: Task 'cleanGrails-test-app' not found in root project.

I'm using an unmodified build.gradle.  Am I doing something wrong or missing something?

--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/f39cd700-4e1d-47bf-8df1-1591993d90ad%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Grails 3/Gradle/IntelliJ and integration tests

Jeff Scott Brown
I think the integration tests should run if you execute "./gradlew check". You can also run them by themselves with"./gradlew integrationTest" (or ./gradlew iT for short). 



JSB

Sent from my iPhone

On Apr 6, 2015, at 9:18 AM, Bud Byrd <[hidden email]> wrote:

It seems I'm having problems kicking off integration tests via Gradle.  I am migrating a plugin to 3.x, and have placed my integration tests in src/integration-test/groovy, and modified the existing integration tests as necessary.  Using gradle test, I can only get unit tests to run.  This is true using both IntelliJ and the command line.

The only way I can get integration tests to run is via the command line using grails test-app.  The odd thing is, using the same command in IntelliJ gives me an error: Task 'cleanGrails-test-app' not found in root project.

I'm using an unmodified build.gradle.  Am I doing something wrong or missing something?

--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/f39cd700-4e1d-47bf-8df1-1591993d90ad%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/571ADEE1-2471-45BB-BE56-E66E72F109D3%40jeffandbetsy.net.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Grails 3/Gradle/IntelliJ and integration tests

nobeans
You can use 'check' or 'integrationTest' as Jeff says. 

Note that currently the test report directory both of 'test' and 'integrationTest' are same. So, if you run two tasks sequentially as 'gradle test integrationTest', the 'test' task's report would be overwritten.

On Mon, Apr 6, 2015 at 11:45 PM, Jeff Scott Brown <[hidden email]> wrote:
I think the integration tests should run if you execute "./gradlew check". You can also run them by themselves with"./gradlew integrationTest" (or ./gradlew iT for short). 



JSB

Sent from my iPhone

On Apr 6, 2015, at 9:18 AM, Bud Byrd <[hidden email]> wrote:

It seems I'm having problems kicking off integration tests via Gradle.  I am migrating a plugin to 3.x, and have placed my integration tests in src/integration-test/groovy, and modified the existing integration tests as necessary.  Using gradle test, I can only get unit tests to run.  This is true using both IntelliJ and the command line.

The only way I can get integration tests to run is via the command line using grails test-app.  The odd thing is, using the same command in IntelliJ gives me an error: Task 'cleanGrails-test-app' not found in root project.

I'm using an unmodified build.gradle.  Am I doing something wrong or missing something?

--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/f39cd700-4e1d-47bf-8df1-1591993d90ad%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/571ADEE1-2471-45BB-BE56-E66E72F109D3%40jeffandbetsy.net.

For more options, visit https://groups.google.com/d/optout.



--
Yasuharu Nakano

--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/CABguS0U4X0Cv5d-h5izYaabAaUfkadvjJa6sHLL6kBPrcPMhNQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Grails 3/Gradle/IntelliJ and integration tests

longwa
This is kind of old, but I came across this as well while porting build-test-data.

The problem isn't running the integration tests, per se, but rather that IntelliJ seems to only 'understand' that it's running tests when you specifically run the 'test' task. That's the only time it shows the test runner interface for me (maybe there's some way to make other tasks be 'test runner' enabled, not sure).

I'm sure there's a better solution, but I was able to trick IntelliJ by renaming the test task to unitTest and then creating a new test task that runs both. This seems to run both in the test runner interface (for me).

def testTask = tasks.test
tasks.remove(testTask)
testTask.name = "unitTest"
tasks.add(testTask)

task test(dependsOn:['unitTest', 'integrationTest'])

On Monday, April 6, 2015 at 10:52:56 AM UTC-4, Yasuharu Nakano wrote:
You can use 'check' or 'integrationTest' as Jeff says. 

Note that currently the test report directory both of 'test' and 'integrationTest' are same. So, if you run two tasks sequentially as 'gradle test integrationTest', the 'test' task's report would be overwritten.

On Mon, Apr 6, 2015 at 11:45 PM, Jeff Scott Brown <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="rbvsZa8NrvUJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">je...@...> wrote:
I think the integration tests should run if you execute "./gradlew check". You can also run them by themselves with"./gradlew integrationTest" (or ./gradlew iT for short). 



JSB

Sent from my iPhone

On Apr 6, 2015, at 9:18 AM, Bud Byrd <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="rbvsZa8NrvUJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">bud....@...> wrote:

It seems I'm having problems kicking off integration tests via Gradle.  I am migrating a plugin to 3.x, and have placed my integration tests in src/integration-test/groovy, and modified the existing integration tests as necessary.  Using gradle test, I can only get unit tests to run.  This is true using both IntelliJ and the command line.

The only way I can get integration tests to run is via the command line using grails test-app.  The odd thing is, using the same command in IntelliJ gives me an error: Task 'cleanGrails-test-app' not found in root project.

I'm using an unmodified build.gradle.  Am I doing something wrong or missing something?

--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="rbvsZa8NrvUJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">grails-dev-discuss+unsubscribe@....
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="rbvsZa8NrvUJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">grails-de...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/grails-dev-discuss/f39cd700-4e1d-47bf-8df1-1591993d90ad%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/grails-dev-discuss/f39cd700-4e1d-47bf-8df1-1591993d90ad%40googlegroups.com?utm_medium\75email\46utm_source\75footer&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/grails-dev-discuss/f39cd700-4e1d-47bf-8df1-1591993d90ad%40googlegroups.com?utm_medium\75email\46utm_source\75footer&#39;;return true;">https://groups.google.com/d/msgid/grails-dev-discuss/f39cd700-4e1d-47bf-8df1-1591993d90ad%40googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="rbvsZa8NrvUJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">grails-dev-discuss+unsubscribe@....
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="rbvsZa8NrvUJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">grails-de...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/grails-dev-discuss/571ADEE1-2471-45BB-BE56-E66E72F109D3%40jeffandbetsy.net?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/grails-dev-discuss/571ADEE1-2471-45BB-BE56-E66E72F109D3%40jeffandbetsy.net?utm_medium\75email\46utm_source\75footer&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/grails-dev-discuss/571ADEE1-2471-45BB-BE56-E66E72F109D3%40jeffandbetsy.net?utm_medium\75email\46utm_source\75footer&#39;;return true;">https://groups.google.com/d/msgid/grails-dev-discuss/571ADEE1-2471-45BB-BE56-E66E72F109D3%40jeffandbetsy.net.

For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.



--
Yasuharu Nakano

--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/5dfe8920-c695-4625-917f-e3f0f1261c6e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Grails 3/Gradle/IntelliJ and integration tests

Zachary Klein
Hey Aaron, sounds like you're solving the same issue I'm trying to solve. Would you mind clarifying where you're defining the new task? I don't see task definitions in my project - its that part of the Grails distribution?

Thanks!
Zak

On Thursday, October 22, 2015 at 8:59:17 AM UTC-6, Aaron wrote:
This is kind of old, but I came across this as well while porting build-test-data.

The problem isn't running the integration tests, per se, but rather that IntelliJ seems to only 'understand' that it's running tests when you specifically run the 'test' task. That's the only time it shows the test runner interface for me (maybe there's some way to make other tasks be 'test runner' enabled, not sure).

I'm sure there's a better solution, but I was able to trick IntelliJ by renaming the test task to unitTest and then creating a new test task that runs both. This seems to run both in the test runner interface (for me).

def testTask = tasks.test
tasks.remove(testTask)
testTask.name = "unitTest"
tasks.add(testTask)

task test(dependsOn:['unitTest', 'integrationTest'])

On Monday, April 6, 2015 at 10:52:56 AM UTC-4, Yasuharu Nakano wrote:
You can use 'check' or 'integrationTest' as Jeff says. 

Note that currently the test report directory both of 'test' and 'integrationTest' are same. So, if you run two tasks sequentially as 'gradle test integrationTest', the 'test' task's report would be overwritten.

On Mon, Apr 6, 2015 at 11:45 PM, Jeff Scott Brown <[hidden email]> wrote:
I think the integration tests should run if you execute "./gradlew check". You can also run them by themselves with"./gradlew integrationTest" (or ./gradlew iT for short). 



JSB

Sent from my iPhone

On Apr 6, 2015, at 9:18 AM, Bud Byrd <[hidden email]> wrote:

It seems I'm having problems kicking off integration tests via Gradle.  I am migrating a plugin to 3.x, and have placed my integration tests in src/integration-test/groovy, and modified the existing integration tests as necessary.  Using gradle test, I can only get unit tests to run.  This is true using both IntelliJ and the command line.

The only way I can get integration tests to run is via the command line using grails test-app.  The odd thing is, using the same command in IntelliJ gives me an error: Task 'cleanGrails-test-app' not found in root project.

I'm using an unmodified build.gradle.  Am I doing something wrong or missing something?

--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grails-dev-discuss+[hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/grails-dev-discuss/f39cd700-4e1d-47bf-8df1-1591993d90ad%40googlegroups.com?utm_medium=email&amp;utm_source=footer" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/grails-dev-discuss/f39cd700-4e1d-47bf-8df1-1591993d90ad%40googlegroups.com?utm_medium\75email\46utm_source\75footer&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/grails-dev-discuss/f39cd700-4e1d-47bf-8df1-1591993d90ad%40googlegroups.com?utm_medium\75email\46utm_source\75footer&#39;;return true;">https://groups.google.com/d/msgid/grails-dev-discuss/f39cd700-4e1d-47bf-8df1-1591993d90ad%40googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grails-dev-discuss+[hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/grails-dev-discuss/571ADEE1-2471-45BB-BE56-E66E72F109D3%40jeffandbetsy.net?utm_medium=email&amp;utm_source=footer" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/grails-dev-discuss/571ADEE1-2471-45BB-BE56-E66E72F109D3%40jeffandbetsy.net?utm_medium\75email\46utm_source\75footer&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/grails-dev-discuss/571ADEE1-2471-45BB-BE56-E66E72F109D3%40jeffandbetsy.net?utm_medium\75email\46utm_source\75footer&#39;;return true;">https://groups.google.com/d/msgid/grails-dev-discuss/571ADEE1-2471-45BB-BE56-E66E72F109D3%40jeffandbetsy.net.

For more options, visit <a href="https://groups.google.com/d/optout" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.



--
Yasuharu Nakano

--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/eb736926-68ec-45ae-8014-069dc4a5c3c3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.