You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can create and/or configure a different test suite as long as you wrap it in `javaModuleTesting.blackbox(...)`.
72
-
See documentation on [JVM Test Suites](https://docs.gradle.org/current/userguide/jvm_test_suite_plugin.html#sec:jvm_test_suite_configuration)
73
-
for more details.
74
-
75
-
It is expected that a blackbox _test source set_ has its own `module-info.java`.
65
+
The plugin automatically turns [JVM Test Suites](https://docs.gradle.org/current/userguide/jvm_test_suite_plugin.html) into _Blackbox Test Suites_ if the `src/<test-suite-name>/module-info.java` file exists.
76
66
A blackbox test suite is a separate module itself.
67
+
See documentation on [JVM Test Suites](https://docs.gradle.org/current/userguide/jvm_test_suite_plugin.html#sec:jvm_test_suite_configuration) for more details on creating and configuring test suites.
77
68
78
-
## Configure a Whitebox Test Suite
69
+
## Whitebox Test Suites
79
70
80
-
To turn the existing JVM Test Suite _test_ ito a Whitebox Test Suite:
71
+
The plugin automatically turns [JVM Test Suites](https://docs.gradle.org/current/userguide/jvm_test_suite_plugin.html)**without**`module-info.java` file into _Whitebox Test Suites_.
72
+
Whitebox Test Suites might require additional configuration, which can be done like this:
// opensTo.add("org.junit.platform.commons") <-- opensTo 'org.junit.platform.commons' is done by default
86
78
}
87
79
```
88
80
89
-
You can create and/or configure a different test suite as long as you wrap it in `javaModuleTesting.whitebox(...)`.
90
-
See documentation on [JVM Test Suites](https://docs.gradle.org/current/userguide/jvm_test_suite_plugin.html#sec:jvm_test_suite_configuration)
91
-
for more details.
81
+
See documentation on [JVM Test Suites](https://docs.gradle.org/current/userguide/jvm_test_suite_plugin.html#sec:jvm_test_suite_configuration) for more details on creating and configuring test suites.
92
82
93
-
It is expected that a whitebox _test source set_ does **not** have a `module-info.java`.
83
+
A whitebox _test source set_ does **not** have a `module-info.java`.
94
84
Instead, the _main_ and _test_ classes will be patched together and the test will run in the _main_ module which now includes the test classes as well.
95
85
Additional `requires` for the test are defined as shown above.
96
86
If the _sources under test_ are located in a different source set (not `main`), this can be configured via `sourcesUnderTest.set("source-set-name")`.
0 commit comments