Open SHND opened 2 years ago
I just found that I have the same error for suite. Could not find method suite() ...
task MyTests(type: Test) {
suite 'com.spec.path.to.test'
}
sorry, I can't reproduce that.
please could you share a repository that fails?
Unfortunately it's a private repo which I cannot share. It is using Java (Spring) along with Scala. We have this also
test {
useJUnitPlatform()
}
I'm not that great on Gradle, Is there a possibility of conflicts between plugins or dependencies? Do you have any guesses on where can I start looking and how can I debug this? What I'm effectively trying to do here, is to be able to run our UnitTests and IntegrationTests separately.
Do you have ScalaTest and JUnit in the same module?
Or have you configured com.github.maiflai.gradle-scalatest.mode = append
?
We have both Java tests and Scalatest in one repo and we are running them together through one build.gradle
configuration. We also have com.github.maiflai.gradle-scalatest.mode = append
in gradle.properties
.
The README has this (and it seems to work for me with the versions you quote above).
Please could you check that you have added the appropriate configure
line?
If you then want to use scalatest to run other Test tasks, you can instruct this plugin to configure those tasks.
task myTest(dependsOn: testClasses, type: Test, group: 'verification') { com.github.maiflai.ScalaTestPlugin.configure(it) tags { include 'com.example.tags.MyTag' } }
I'm trying to add tags to my tests and run them separately. using the
I'm using gradle 6.9.2.
When I try to compile and run the tests, I get
Could not find method tags()
.