Package dev.galasa.framework.spi
Interface IResultArchiveStore
- All Known Subinterfaces:
IResultArchiveStoreService
public interface IResultArchiveStore
Used to gain access to the Result Archive Store (RAS)
POnce initialised, the Framework will provide access to 0 or more Result Archive Stores.
Apache CouchDB is the preferred RAS for an automation, and a file directory on the local filesystem is the preferred RAS for local runs.
An IResultArchiveStore
can be obtained from
IFramework.getResultArchiveStore()
.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
createTestStructure
(@NotNull String runId, @NotNull TestStructure testStructure) Creates a new RAS record for a run with the given ID and test structurevoid
flush()
@NotNull List<IResultArchiveStoreDirectoryService>
Obtain the root directory of the stored artifacts file systemlong
Retrieves the run log line count so far from the RAS so we can provide the run log start and end line numbers for each method of a test class, in the test structure.void
shutdown()
void
updateTestStructure
(@NotNull TestStructure testStructure) Update the Test Structure object in the RASs with the current statusvoid
updateTestStructure
(@NotNull String runId, @NotNull TestStructure testStructure) Update the test structure of a run with the given run IDvoid
Write a message to the run log in the RASsvoid
Write multiple messages to the run log in the RASs
-
Method Details
-
writeLog
Write a message to the run log in the RASs- Parameters:
message
- - a Message to write to the run log- Throws:
ResultArchiveStoreException
- - If there is a problem writing to the store
-
writeLog
Write multiple messages to the run log in the RASs- Parameters:
messages
- - Messages to write- Throws:
ResultArchiveStoreException
- - If there is a problem writing to the store
-
retrieveRunLogLineCount
long retrieveRunLogLineCount()Retrieves the run log line count so far from the RAS so we can provide the run log start and end line numbers for each method of a test class, in the test structure.- Returns:
-
updateTestStructure
void updateTestStructure(@NotNull @NotNull TestStructure testStructure) throws ResultArchiveStoreException Update the Test Structure object in the RASs with the current status- Parameters:
testStructure
- - The Test Structure- Throws:
ResultArchiveStoreException
- - If there is a problem writing to the store
-
updateTestStructure
void updateTestStructure(@NotNull @NotNull String runId, @NotNull @NotNull TestStructure testStructure) throws ResultArchiveStoreException Update the test structure of a run with the given run ID- Parameters:
runId
- - the ID of the run to be updatedtestStructure
- - the new test structure to be set- Throws:
ResultArchiveStoreException
- - If there is a problem accessing or writing to the RAS
-
createTestStructure
void createTestStructure(@NotNull @NotNull String runId, @NotNull @NotNull TestStructure testStructure) throws ResultArchiveStoreException Creates a new RAS record for a run with the given ID and test structure- Parameters:
runId
- - the ID of the run to create the record fortestStructure
- - the new test structure to write- Throws:
ResultArchiveStoreException
- - if there is a problem accessing or writing to the RAS
-
getStoredArtifactsRoot
Path getStoredArtifactsRoot()Obtain the root directory of the stored artifacts file system- Returns:
- a
Path
-
flush
void flush() -
shutdown
void shutdown() -
getDirectoryServices
-
calculateRasRunId
String calculateRasRunId()
-