apache / apache/grails-intellij-plugin
Grails: Run tests as Unit tests doesn't run Grails 2.* tests (with mixins)
- Dominant language
- Java
- Stars
- 17
- Forks
- 4
- Avg merge
- 5d 15h
- Merged PRs (30d)
- 4
Description
**Build 122.728, Grails 2.1.0**
Get two controllers: HelloController and Hello2Controller with corresponding tests:
```
package test
import grails.test.mixin.*
@TestFor(HelloController)
class HelloControllerTests {
void testSomething() {
fail "Implement me"
}
}
```
```
package test
class Hello2ControllerTests extends GroovyTestCase {
void testSomething() {
fail "Implement me"
}
}
```
Run all tests in package 'test' as Unit tests. Only Hello2ControllerTests will be executed.
HelloControllerTests test is executed when run alone, however.
---
*Imported from [IDEA-94269](https://youtrack.jetbrains.com/issue/IDEA-94269) · Type: Bug · Votes: 4*
*Comments, attachments, dates and reporter are not part of the export — follow the link above for the full history.*
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the issue with Grails 2.1.0 using HelloControllerTests and Hello2ControllerTests in package test, then inspect the IntelliJ test-discovery entry point for running all tests as Unit tests. Compare discovery of the @TestFor mixin test with the GroovyTestCase test; done means both tests execute when the package is run, while the mixin test still runs alone.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- groovy
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100