Package org.qubership.atp.ram.services
Class LogRecordService
java.lang.Object
org.qubership.atp.ram.services.CrudService<LogRecord>
org.qubership.atp.ram.services.LogRecordService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddLogRecordAkb(UUID logRecordId, UUID akbRecordId) Add existing AkbRecord to LogRecord.addLogRecordAkbRecords(UUID logRecordUuid, List<UUID> akbRecordsUuid) Add existing AkbRecord to LogRecord.voidAnalyzes all LogRecords in TestRun.countAllFailedLrByTestRunIds(Collection<UUID> testRunsIds) countAllPassedLrByTestRunIds(Collection<UUID> testRunsIds) countLrsByTestRunsId(Set<UUID> testRunsId) Get count LR-s for TR.create()voidcreateBrowserConsoleLog(UUID logRecordUuid, List<BrowserConsoleLogsTable> logs) Create BrowserConsoleLog for LogRecord.createLogRecordByRequest(LogRecord request) Deprecated.voidFilter context variable of logrecord by specified parameters.Filter step context variables context variables response.findAllByTestRunIdOrderByStartDateAsc(UUID testRunUuid, LogRecordFilteringRequest filteringRequest) Returns List of full LogRecords for TestRun.FindLogRecordby uuid or throw NPE if LR doesn't exist.findByRequest(LogRecord request) Deprecated.findByTestRunIdAndParentUuid(UUID testRunId, UUID parentId, LogRecordFilteringRequest filteringRequest) Returns List of LogRecord for TestRun and ParentLogRecord.findFailedLogRecordsWithMetaInfoByTestRunIds(Collection<UUID> testRunIds) findLastInProgressLogRecordByTestRunId(UUID testRunId) findLastInProgressOrcLogRecordByTestRunId(UUID testRunId) findLogRecordForTreeByUuid(UUID logRecordId) findLogRecordNamesByTestRunId(UUID testRunUuid) Returns names of LogRecords (@Link LogRecord) for TestRun.findLogRecordsWithParentsByPreviewExists(UUID testRunId) findLogRecordsWithPreviewByTestRunIdOrderByStartDateAsc(UUID testRunUuid, LogRecordFilteringRequest filteringRequest) Returns List of LogRecords with id, status, type and preview for TestRun.Returns List of LogRecords with id, status, type, name, message, parent id, is section, is compound, testRun id and duration for TestRun.Return list of LR with fields: validationLabels, validationTable, testingStatus.findLogRecordsWithValidationParamsByTestRunIds(Collection<UUID> testRunIds) findOrCreate(LogRecord request) Deprecated.use LogRecordLoggingController instead of this.findTopLogRecordsOnTestRun(UUID testRunId) Get list of child LR or current LR.getAll()getAllByTestingStatusAndTestRunId(TestingStatuses testingStatuses, UUID testRunId) Find LR-s with fields 'uuid' and 'name' by testing status and test run id.Get All context variables of logrecord.getAllFailedLogRecordsByTestRunId(UUID testRunId) getAllFailedLogRecordsByTestRunIds(Collection<UUID> testRunsIds) getAllFailedLogRecordsByTestRunIdsStream(Collection<UUID> testRunsIds, Collection<UUID> logRecordsIdForExclude) Get failed LR-s by TR-s id and exclude some LR-s by ID-s.getAllHierarchicalChildrenLogRecords(UUID parentLogRecordId) Get all hierarchical children log records for parent log record.voidgetAllHierarchicalUILogRecords(List<LogRecord> list, LogRecord logRecord) Get hierarchical UI log records.getAllLogRecordsByTestRunIds(List<UUID> testRunIds) getAllLogRecordScreenshotPreviews(UUID logRecordId) Get all log record children previews.getAllLogRecordsUuidByTestRunId(UUID testRunId) getAllMatchesLogRecordsByTestRunId(UUID testRunId, String searchValue) getAllMatchesLogRecordsByTestRunIdCaseInsensitive(UUID testRunId, String searchValue) getAllNotSectionLogRecordsByTestRunId(UUID testRunId) getAllNotStartedLogRecordsByTestRunId(UUID testRunId) getAllTestingStatusLogRecordsByTestRunId(UUID testRunId) getAllTestRunBvLogRecordsWithValidationSteps(UUID testRunId) Get all test run BV log records.getBrowserConsoleLogsTable(UUID logRecordUuid, org.springframework.data.domain.Pageable pageable) Find BrowserConsoleLogs by LogRecordUUID with pagination.longReturns number of children for LogRecord.getContextVariables(UUID id, Integer page, Integer size, List<ContextVariablesActiveTab> activeTabs) Get context variables of logrecord.getContextVariablesByIds(List<UUID> logRecordIds) Get context variables by logRecordIds.getErrorMapping(ExecutionRequestService executionRequestService, String source, UUID parentUuid) Loads list ofErrorMappingItemfrom specified sources.Gets location in editor by id of log record.Find parent LR by UUID and his children, if exists.Gets log record children.getLogRecordChildrenByName(UUID id, String searchValue) Finds child Log Records by name.Get general info for logrecord.Get log record message parameters.getLogRecordPath(UUID uuid) getLogRecordWithChildrenByTrIdAndStatus(UUID testRunId, TestingStatuses testingStatuses) Get first parent and children LR.getProjectIdByParentId(UUID parentId, String source) Gets project id by parent id.Method returns quantity of all Log Records which match to current and new patterns.getStepContextVariables(UUID id, Integer page, Integer size, List<ContextVariablesActiveTab> activeTabs) Gets step context variables.Get step context variables of logrecord.getSubstepScreenshots(List<UUID> logRecordIds) Get list of substeps response.getUuidAndMessageFailedLogRecordsByTestRunId(UUID testRunId) voidinit()Init invertStatusMap.revertTestingStatusForLogRecord(UUID logRecordId) Revert testing status for log record.voidsaveCountScreenshots(UUID executionRequestUuid, List<TestRun> testRuns) Deprecated.use LogRecordLoggingController instead of this.searchContextVariableParameters(UUID logRecordId, String name) Search context variable parameters.searchStepContextVariableParameters(UUID logRecordId, String name) Search step context variable parameters list.voidupdateContextVariables(UUID logRecordId, UpdateLogRecordContextVariablesRequest request) Update log record context variables.voidupdateExecutionStatus(UUID logRecordId, UpdateLogRecordExecutionStatusRequest request) Update log record execution status.voidupdateMessageParameters(UUID logRecordId, UpdateLogRecordMessageParametersRequest request) Update log record message parameters.voidupdateSsmMetricReportsData(UUID logRecordId, SsmMetricReports data) Update SSM metric reports data.voidupdateStepContextVariables(UUID logRecordId, UpdateLogRecordContextVariablesRequest request) Update log record step context variables.Methods inherited from class org.qubership.atp.ram.services.CrudService
get, saveAll
-
Constructor Details
-
LogRecordService
public LogRecordService()
-
-
Method Details
-
init
Init invertStatusMap. -
repository
- Specified by:
repositoryin classCrudService<LogRecord>
-
getAll
- Overrides:
getAllin classCrudService<LogRecord>
-
getByIds
-
getLogRecordChildren
Gets log record children.- Parameters:
id- the id- Returns:
- the log record children
-
getStepContextVariablesOfLogRecord
Get step context variables of logrecord.- Parameters:
id- if of logrecord.- Returns:
- List of step context variables.
-
getContextVariablesByIds
Get context variables by logRecordIds.- Parameters:
logRecordIds- logRecordIds- Returns:
- list of context variables collected from logRecords
-
getContextVariables
public Object getContextVariables(UUID id, Integer page, Integer size, List<ContextVariablesActiveTab> activeTabs) Get context variables of logrecord.- Parameters:
id- if of logrecordpage- number of page for paginationsize- size of 1 page for pagination- Returns:
- List of paginated context variables and total caount of context variables.
-
getAllContextVariables
Get All context variables of logrecord.- Parameters:
id- if of logrecord- Returns:
- List of paginated context variables and total caount of context variables.
-
getStepContextVariables
public Object getStepContextVariables(UUID id, Integer page, Integer size, List<ContextVariablesActiveTab> activeTabs) Gets step context variables.- Parameters:
id- the idpage- the pagesize- the sizeactiveTabs- the active tabs- Returns:
- the step context variables
-
filterContextVariables
public ContextVariablesResponse filterContextVariables(UUID id, List<String> parameters, String beforeValue, String afterValue) Filter context variable of logrecord by specified parameters.- Parameters:
id- if of logrecordparameters- list of context variables names to filter bybeforeValue- beforeValue to filter by using "contains" strategyafterValue- afterValue to filter by using "contains" strategy- Returns:
- list of context variables that have passed all predicates.
-
filterStepContextVariables
public ContextVariablesResponse filterStepContextVariables(UUID id, List<String> parameters, String beforeValue, String afterValue) Filter step context variables context variables response.- Parameters:
id- the idparameters- the parametersbeforeValue- the before valueafterValue- the after value- Returns:
- the context variables response
-
delete
-
getOrderedChildrenLogRecordsForParentLogRecord
-
create
-
save
- Overrides:
savein classCrudService<LogRecord>
-
findById
FindLogRecordby uuid or throw NPE if LR doesn't exist.- Parameters:
logRecordId- for findLogRecord- Returns:
- return log record by uuid or throw NPE
-
findLastInProgressLogRecordByTestRunId
-
findLastInProgressOrcLogRecordByTestRunId
-
getBrowserConsoleLogsTable
public PaginationResponse<BrowserConsoleLogsTable> getBrowserConsoleLogsTable(UUID logRecordUuid, org.springframework.data.domain.Pageable pageable) Find BrowserConsoleLogs by LogRecordUUID with pagination. -
createBrowserConsoleLog
Create BrowserConsoleLog for LogRecord.- Parameters:
logRecordUuid- LogRecordIdlogs- logs to save
-
addLogRecordAkb
Add existing AkbRecord to LogRecord. -
saveCountScreenshots
Deprecated.use LogRecordLoggingController instead of this.Save number of screenshots fot TestRuns from current ER.- Parameters:
executionRequestUuid- Execution Request UUID
-
analyze
Analyzes all LogRecords in TestRun. -
createLogRecordByRequest
Deprecated.CreateLogRecordby request from adapter. -
getErrorMapping
public List<ErrorMappingItem> getErrorMapping(ExecutionRequestService executionRequestService, String source, UUID parentUuid) Loads list ofErrorMappingItemfrom specified sources.- Parameters:
executionRequestService-ExecutionRequestServicesource- TestRun or ExecutionRequest.parentUuid- UUID of TestRun or ExecutionRequest- Returns:
- list of
ErrorMappingItem
-
getProjectIdByParentId
Gets project id by parent id.- Parameters:
parentId- parent idsource- source type- Returns:
- project id
-
getLogRecordPath
-
addLogRecordAkbRecords
Add existing AkbRecord to LogRecord. -
findByTestRunIdAndParentUuid
public List<LogRecord> findByTestRunIdAndParentUuid(UUID testRunId, UUID parentId, LogRecordFilteringRequest filteringRequest) Returns List of LogRecord for TestRun and ParentLogRecord. -
findTopLogRecordsOnTestRun
-
findAllByTestRunIdOrderByStartDateAsc
public List<LogRecord> findAllByTestRunIdOrderByStartDateAsc(UUID testRunUuid, LogRecordFilteringRequest filteringRequest) Returns List of full LogRecords for TestRun. -
findLogRecordsWithPreviewByTestRunIdOrderByStartDateAsc
public List<LogRecord> findLogRecordsWithPreviewByTestRunIdOrderByStartDateAsc(UUID testRunUuid, LogRecordFilteringRequest filteringRequest) Returns List of LogRecords with id, status, type and preview for TestRun. -
findLogRecordsWithSpecificFieldsByTestRunIdOrderByStartDateAsc
public List<LogRecord> findLogRecordsWithSpecificFieldsByTestRunIdOrderByStartDateAsc(UUID testRunId) Returns List of LogRecords with id, status, type, name, message, parent id, is section, is compound, testRun id and duration for TestRun. -
findLogRecordNamesByTestRunId
Returns names of LogRecords (@Link LogRecord) for TestRun. -
getChildrenCount
Returns number of children for LogRecord. -
getProjectIdByLogRecordId
-
findOrCreate
Deprecated.use LogRecordLoggingController instead of this.Find or create log record.- Parameters:
request- creation request- Returns:
- result
-
findByRequest
Deprecated.Find by testRunId from logrecord or find by testRunId from request. -
getAllLogRecordsUuidByTestRunId
-
getAllSectionNotCompoundLogRecordsByTestRunId
-
getAllNotSectionLogRecordsByTestRunId
-
getAllFailedLogRecordsByTestRunId
-
getUuidAndMessageFailedLogRecordsByTestRunId
-
getAllTestingStatusLogRecordsByTestRunId
-
getAllFailedLogRecordsByTestRunIds
-
getAllNotStartedLogRecordsByTestRunId
-
geChildLogRecordsOrParent
Get list of child LR or current LR.- Parameters:
id- of current LR- Returns:
- list of LR-s
-
getAllMatchesLogRecordsByTestRunId
-
getAllMatchesLogRecordsByTestRunIdCaseInsensitive
-
getLogRecordByIdWithChildren
Find parent LR by UUID and his children, if exists.- Parameters:
uuid- for find LR- Returns:
- parent LR and his children if exists
-
getLocationInEditor
Gets location in editor by id of log record.- Parameters:
id- the id- Returns:
- the location in editor
-
getLogRecordContent
Get general info for logrecord. -
getAllTestRunBvLogRecordsWithValidationSteps
Get all test run BV log records.- Parameters:
testRunId- test rin identifier- Returns:
- log records
-
getAllByTestingStatusAndTestRunId
public List<LogRecord> getAllByTestingStatusAndTestRunId(TestingStatuses testingStatuses, UUID testRunId) Find LR-s with fields 'uuid' and 'name' by testing status and test run id.- Parameters:
testingStatuses- status of found LR-stestRunId- uuid TR for found LR-s- Returns:
- list of LR-s with fields 'uuid' and 'name'
-
findLogRecordsWithValidationParamsByTestRunIds
-
findFailedLogRecordsWithMetaInfoByTestRunIds
-
findLogRecordsWithValidationParamsAndFailureByTestRunIds
public Stream<LogRecord> findLogRecordsWithValidationParamsAndFailureByTestRunIds(Collection<UUID> testRunIds) -
getLogRecordChildrenByName
Finds child Log Records by name.- Parameters:
id- of parent Log RecordsearchValue- part of the child Log Record name to search- Returns:
- list of child Log Record
-
getAllLogRecordScreenshotPreviews
Get all log record children previews.- Parameters:
logRecordId- log record id- Returns:
- list of previews
-
updateExecutionStatus
Update log record execution status.- Parameters:
logRecordId- log record idrequest- update request
-
updateContextVariables
public void updateContextVariables(UUID logRecordId, UpdateLogRecordContextVariablesRequest request) Update log record context variables.- Parameters:
logRecordId- log record idrequest- update request
-
updateStepContextVariables
public void updateStepContextVariables(UUID logRecordId, UpdateLogRecordContextVariablesRequest request) Update log record step context variables.- Parameters:
logRecordId- log record idrequest- update request
-
updateMessageParameters
public void updateMessageParameters(UUID logRecordId, UpdateLogRecordMessageParametersRequest request) Update log record message parameters.- Parameters:
logRecordId- log record idrequest- update request
-
getAllHierarchicalChildrenLogRecords
Get all hierarchical children log records for parent log record.- Parameters:
parentLogRecordId- paren log record id- Returns:
- children log records
-
getAllHierarchicalUILogRecords
Get hierarchical UI log records.- Parameters:
list- list containerlogRecord- parent log record
-
revertTestingStatusForLogRecord
Revert testing status for log record. Note if you need correct test run status as well you have to call method testRunService.revertTestingStatusForLogRecord instead of this- Parameters:
logRecordId- the log record id- Returns:
- the log record
-
findLogRecordForTreeByUuid
-
getQuantityLogRecordsWhichMatchToPatterns
public LogRecordQuantityResponse getQuantityLogRecordsWhichMatchToPatterns(LogRecordQuantityMatchPatternRequest request) Method returns quantity of all Log Records which match to current and new patterns. Returning value contains quantity of all Log Records which match to current and new patterns.- Parameters:
request- contains parameters for calculation- Returns:
- object of type
LogRecordQuantityResponse
-
findLogRecordsWithValidationParamsAndStatusByTrId
Return list of LR with fields: validationLabels, validationTable, testingStatus.- Parameters:
testRunId- for search of log records- Returns:
- list of log records for current test run
-
getLogRecordMessageParameters
Get log record message parameters.- Parameters:
id- log record identifier- Returns:
- message parameters
-
searchContextVariableParameters
Search context variable parameters.- Parameters:
logRecordId- log record identifiername- search name- Returns:
- result parameter names list
-
searchStepContextVariableParameters
Search step context variable parameters list.- Parameters:
logRecordId- the log record idname- the name- Returns:
- the list
-
getLogRecordWithChildrenByTrIdAndStatus
public LogRecordWithChildrenResponse getLogRecordWithChildrenByTrIdAndStatus(UUID testRunId, TestingStatuses testingStatuses) Get first parent and children LR.- Parameters:
testRunId- TR idtestingStatuses- status- Returns:
- parent and children LR
-
countLrsByTestRunsId
Get count LR-s for TR.- Parameters:
testRunsId- for count LR-s- Returns:
- count LR-s
-
getSubstepScreenshots
Get list of substeps response.- Parameters:
logRecordIds- for get screenshot- Returns:
- list of
SubstepScreenshotResponse
-
findLogRecordsWithParentsByPreviewExists
public List<LogRecordWithParentListResponse> findLogRecordsWithParentsByPreviewExists(UUID testRunId) -
getAllLogRecordsByTestRunIds
-
updateSsmMetricReportsData
Update SSM metric reports data.- Parameters:
logRecordId- log record identifierdata- SSM metric reports data
-
countAllFailedLrByTestRunIds
-
countAllPassedLrByTestRunIds
-
getAllFailedLogRecordsByTestRunIdsStream
public Stream<LogRecord> getAllFailedLogRecordsByTestRunIdsStream(Collection<UUID> testRunsIds, Collection<UUID> logRecordsIdForExclude) Get failed LR-s by TR-s id and exclude some LR-s by ID-s.- Parameters:
testRunsIds- for find LR-slogRecordsIdForExclude- for exclude LR-s by id- Returns:
- stream of
LogRecord
-