kopper
10/28/2020, 2:11 AM-Dkotest.tags="UnitTest"
the report with test results includes test classes that were not tagged. They are listed at the end of report as single line per class, i.e. no specific tests are reported. I tagged test classes, so AFAIU the specs should not even be instantiated (and they aren't when I use tags in Maven). Is this UX bug?kopper
10/28/2020, 2:13 AMkopper
10/28/2020, 3:38 AMRob Elliot
10/28/2020, 7:35 AMRob Elliot
10/28/2020, 7:36 AMsam
10/28/2020, 6:00 PMsam
10/29/2020, 2:02 PMkopper
10/30/2020, 2:25 AMimport io.kotest.core.annotation.Tags
@Tags("UnitTest")
class ReactiveLoggerTest : FunSpec() {
init {
test("example usage: Scoped log") {
...
sam
10/30/2020, 2:27 AMsam
10/30/2020, 2:28 AMclass ATest : FunSpec() {
init {
test("example usage: Scoped log").config(tags = setOf(UnitTest)) {
}
}
sam
10/30/2020, 2:28 AMkopper
10/30/2020, 2:29 AMkotest.tags=!Linux
and concluded that if the tag doesn't match the class-level tag it won't be instantiated.kopper
10/30/2020, 2:29 AMsam
10/30/2020, 2:29 AMsam
10/30/2020, 2:29 AMIf you wish to avoid creating the spec class at all then you can annotate a spec using @Tags(tag1, ...). Any tags added using this annotation apply to all tests in the class, however this will not stop a class from being instantiated unless explicitly excluded.
sam
10/30/2020, 2:30 AMkopper
10/30/2020, 2:30 AMsam
10/30/2020, 2:30 AMkopper
10/30/2020, 2:31 AMkopper
10/30/2020, 2:31 AMsam
10/30/2020, 2:32 AMsam
10/30/2020, 2:33 AMkopper
10/30/2020, 2:40 AMsam
10/30/2020, 2:40 AMsam
10/30/2020, 2:41 AMkopper
10/30/2020, 2:45 AMDkotest.tags=B
will not pick up the test. Maybe we simply need two types of tags.sam
10/30/2020, 2:46 AM@Tagged(A)
class Foo()
And you do kotest.tags=B shouldn't that class be ignored?sam
10/30/2020, 2:46 AMsam
10/30/2020, 2:46 AMkopper
10/30/2020, 2:47 AMsam
10/30/2020, 2:47 AMsam
10/30/2020, 2:48 AMsam
10/30/2020, 2:48 AMkopper
10/30/2020, 2:48 AMsam
10/30/2020, 2:49 AMkopper
10/30/2020, 2:49 AM