Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions documentation/src/docs/asciidoc/user-guide/writing-tests.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1570,6 +1570,25 @@ The last method generates a nested hierarchy of dynamic tests utilizing
include::{testDir}/example/DynamicTestsDemo.java[tags=user_guide]
----

[[writing-tests-uris-test-source-examples]]
===== URI Test Source Examples

The JUnit Platform provides `TestSource`, a representation of the source of a test
or container used to navigate to its location by IDEs and build tools.

Test sources can be constructed using URIs :

- `ClasspathResourceSource`
Use the `classpath` scheme, for example: `classpath:/test/foo.xml?line=20,column=2`

- `DirectorySource` and `FileSource`
Use file system paths.

- `MethodSource`
Use the `method` scheme and the fully-qualified-method-name ex
`method:org.junit.Foo#bar(java.lang.String, java.lang.String[])`. Please refer to the Javadoc for
`DiscoverySelectors.selectMethod(String)` for the supported formats for a FQMN.


[[writing-tests-declarative-timeouts]]
=== Timeouts
Expand Down