Package io.klib.swtbot.support
Class ArtifactPaths
java.lang.Object
io.klib.swtbot.support.ArtifactPaths
Creates isolated run/test directories and reserves unique PNG artifact paths.
-
Constructor Summary
ConstructorsConstructorDescriptionArtifactPaths(Path root, String testId) Creates a new run directory below the normalized absolute output root. -
Method Summary
-
Constructor Details
-
ArtifactPaths
Creates a new run directory below the normalized absolute output root. Test identifiers are sanitized and limited to 80 characters.- Parameters:
root- writable output root; created if absenttestId- non-null test identifier- Throws:
IOException- if directories cannot be created or the root is not writableNullPointerException- if an argument is null
-
-
Method Details
-
directory
Returns this run's test directory.- Returns:
- the absolute directory dedicated to this run and test
-
allocate
Reserves a unique empty file, not a completed screenshot.- Parameters:
checkpoint- non-null checkpoint name, sanitized and boundedmode- non-null mode label, sanitized and bounded- Returns:
- path to a newly created empty PNG file within
directory() - Throws:
IOException- if the file cannot be createdNullPointerException- if a name is null
-