Class CustomExecutionHistoryRepository
java.lang.Object
org.qubership.atp.ram.repositories.impl.CustomExecutionHistoryRepository
- All Implemented Interfaces:
FieldConstants
-
Field Summary
Fields inherited from interface org.qubership.atp.ram.repositories.impl.FieldConstants
_ID, $_ID, $BROWSER_CONSOLE_LOGS_TABLE, $CHILDREN, $DURATION, $EXECUTION_REQUEST, $EXECUTION_REQUEST_ID, $FINISH_DATE, $ID, $ISSUE, $METADATA, $PARENT_LOG_RECORD_ID, $ROOT_CAUSE, $START_DATE, $TEST_RUN, $TESTING_STATUS, ANALYZED_BY_QA, BROWSER_CONSOLE_LOGS_TABLE, CHILDREN, CHILDREN_0, CHILDREN_DEPTH, CREATED_DATE, CREATED_DATE_STAMP, DURATION, END_DATE, ENTITIES, ENVIRONMENT, ENVIRONMENT_ID, EXECUTION_REQUEST, EXECUTION_REQUEST_ID, EXECUTION_REQUEST_NAME, EXECUTION_REQUESTS, EXECUTION_STATUS, EXECUTOR, EXECUTOR_ID, EXECUTOR_NAME, FAIL_PATTERN, FAIL_PATTERN_NAME_FIELD, FAIL_REASON, FAIL_REASON_NAME_FIELD, FAIL_TEST_RUNS_COUNT_FIELD, FAILED_RATE, FILE_NAME, FILE_TYPE, FILTERED_BY_LABELS, FILTERED_BY_LABELS_IDS, FINISH_DATE, ID, ISSUE, JIRA_DEFECTS, JIRA_TICKETS, LAST_UPDATED, LEVEL, LOG_COLLECTOR_DATA, LOG_RECORD_FILE_METADATA, LOG_RECORD_ID, LOG_RECORD_TEST_RUN_ID, MESSAGE, METADATA, NAME, OPERATOR, PARENT, PARENT_RECORD_ID, PARENT_TEST_RUN_ID, PASSED_RATE, PREVIEW, PROJECT_ID, QA_SYSTEM_INFO_LIST, RESOLVED, RESULTS, ROOT_CAUSE, ROOT_CAUSE_ID, START_DATE, TA_SYSTEM_INFO_LIST, TEST_RUN, TEST_RUN_ID, TESTCASE_ID, TESTCASE_NAME, TESTING_STATUS, TESTRUNS, TIMESTAMP, TOTAL_COUNT, TYPE, URL, USER_ID, UUID, VALIDATION_LABELS, VALIDATION_STEPS_LABELS, VALIDATION_TABLE, WARNING_RATE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetTestCaseExecutions(TestCaseExecutionHistorySearchRequest request, UUID testCaseId) Get test case executions by test case id with pagination support.
-
Constructor Details
-
CustomExecutionHistoryRepository
public CustomExecutionHistoryRepository()
-
-
Method Details
-
getTestCaseExecutions
public PaginationResponse<TestCaseExecutionHistory.TestCaseExecution> getTestCaseExecutions(TestCaseExecutionHistorySearchRequest request, UUID testCaseId) Get test case executions by test case id with pagination support. Example of generated query: [ { "$match":{ "testCaseId":JUUID("942dec40-19f0-4c1a-b8ce-0e0faaaac18c"), "testingStatus":{ "$in":["PASSED", "FAILED"] }, "rootCauseId":{ "$in":[JUUID("5bbf39f7-9aaf-44c2-b8cd-b44562d017ac")] } } }, { "$lookup":{ "from":"executionRequests", "localField":"executionRequestId", "foreignField":"_id", "as":"executionRequest" } }, { "$lookup":{ "from":"rootCause", "localField":"rootCauseId", "foreignField":"_id", "as":"rootCause" } }, { "$unwind":"$executionRequest" }, { "$unwind":"$rootCause" }, { "$match":{ "executionRequest.environmentId":{ "$in":[JUUID("42cc4271-aa0f-4571-a7e0-d46f37001708")] }, "executionRequest.executorId":{ "$in":[JUUID("0ba2b3a5-3546-47cc-a4cf-2fffe6e58348")] }, "executionRequest.analyzedByQa":false } }, { "$project":{ "projectId":"$executionRequest.projectId", "executionRequestId":"$executionRequest._id", "executionRequestName":"$executionRequest.name", "testingStatus":1, "analyzedByQa":"$executionRequest.analyzedByQa", "startDate":1, "finishDate":1, "duration":1, "passedRate":"$executionRequest.passedRate", "warningRate":"$executionRequest.warningRate", "failedRate":"$executionRequest.failedRate", "environmentId":"$executionRequest.environmentId", "executorId":"$executionRequest.executorId", "executorName":"$executionRequest.executorName", "filteredByLabelsIds":"$executionRequest.filteredByLabels", "failReason":"$rootCause.name", "testRunId":"$_id" } }, { "$sort":{ "startDate":-1 } }, { "$facet":{ "entities":[ { "$skip":0 }, { "$limit":15 } ], "metadata":[ { "$group":{ "_id":null, "totalCount":{ "$sum":1 } } } ] } }, { "$project":{ "entities":1, "totalCount":{ "$arrayElemAt":[ "$metadata.totalCount", 0 ] } } } ]- Parameters:
request- search requesttestCaseId- test case identifier- Returns:
- test case executions list
-