Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate status from test case result #14049

Closed
Tracked by #13746
TeddyCr opened this issue Nov 21, 2023 · 4 comments · Fixed by #14204
Closed
Tracked by #13746

Separate status from test case result #14049

TeddyCr opened this issue Nov 21, 2023 · 4 comments · Fixed by #14204
Assignees

Comments

@TeddyCr
Copy link
Contributor

TeddyCr commented Nov 21, 2023

Context

Failure status is currently stored alongside a testCaseResult. For each failure a new failure status is created and stored with the testCaseResult -- see below.

"testCaseFailureStatus": {
"description": "Schema to capture test case result.",
"javaType": "org.openmetadata.schema.tests.type.TestCaseFailureStatus",
"type": "object",
"properties":
{
"testCaseFailureStatusType": {
"description": "Status of Test Case Acknowledgement.",
"javaType": "org.openmetadata.schema.tests.type.TestCaseFailureStatusType",
"type": "string",
"enum": ["Ack", "New", "Resolved"],
"javaEnums": [
{
"name": "Ack"
},
{
"name": "New"
},
{
"name": "Resolved"
}
]
},
"testCaseFailureReason": {
"description": "Reason of Test Case resolution.",
"javaType": "org.openmetadata.schema.tests.type.TestCaseFailureReason",
"type": "string",
"enum": ["FalsePositive", "MissingData", "Duplicates", "OutOfBounds", "Other"],
"javaEnums": [
{
"name": "FalsePositive"
},
{
"name": "MissingData"
},
{
"name": "Duplicates"
},
{
"name": "OutOfBounds"
},
{
"name": "Other"
}
]
},
"testCaseFailureComment": {
"description": "Test case failure resolution comment.",
"type": "string"
},
"updatedBy": {
"description": "User who updated the test case failure status.",
"type": "string"
},
"updatedAt": {
"description": "Time when test case failure status was updated.",
"$ref": "../type/basic.json#/definitions/timestamp"
}
}
}
},
"additionalProperties": false

To prevent re writing the test case failure status to a testCaseResult, we'll be separating failure status as their own entities and link it to a testCaseResult (if status of testCaseResult if different than resolved).

A.C.

  • Separate failure status into its own extension. Should be a time series extension linking failureStatus [Many] <-> [One] testCase
  • Create assign and review statuses
  • Enable listing of failure status by:
    • status
    • test case
    • assignee -> this should be an entity reference
    • reviewer -> this should be an entity reference
@TeddyCr TeddyCr self-assigned this Nov 21, 2023
@TeddyCr TeddyCr moved this to Features in Release 1.3.0 Nov 21, 2023
@harshach
Copy link
Collaborator

@TeddyCr so there will be global status at test case level. How do we determine a test case is failed or not , if we are not going to use the testcase result a way of checking it?

@TeddyCr
Copy link
Contributor Author

TeddyCr commented Nov 21, 2023

@harshach I was thinking to have a reference to the testCaseFailureStatus in the testCaseResult. Let me know if you are thinking otherwise.

Basically, when we write a testCaseResult that failed, we check if the latest status is not Resolved, if it is not we return the testCaseFailure reference and attach it to the testCaseResult, if it is we create a new one and attach it to the testCaseResult.

I had this kind of relationship in mind

image

Where the ID of the testCaseFailureStatus stays the same until we have it as resolved -- like below. Of course ID won't be incremental but UUID.

image

now my initial thought was to keep the only 2 states that we have right in the threadTaskStatus Open or Close and to open new task (i.e. if a status goes from ack -> assigned then open a task, if it goes from assigned -> InReview then close the assigned task and open a new one for the inReview). Hence the ID of the testCaseFailureStatus stays the same until we have it as resolved so that we can display the timeline (see below) on each task.

Screenshot 2023-11-21 at 6 38 43 PM

@harshach
Copy link
Collaborator

@TeddyCr what happens if the test case is failed with false positives or some temporary issue. Lets say after 2 more runs its turned to green automatically without user doing anything, will this handle that case?

Instead of calling testCaseResultFailureStatus -> should we call it as testCaseResultStatus. Why not store the current status?
2.

@TeddyCr
Copy link
Contributor Author

TeddyCr commented Nov 27, 2023

Why not store the current status?

@harshach what do you mean by this ^?

what happens if the test case is failed with false positives or some temporary issue. Lets say after 2 more runs its turned to green automatically without user doing anything, will this handle that case?
We had discussed that we would not close it automatically but that a user should close with a reason to keep an accurate view of the statuses. Let me know if you think we should do it in a different way.

@pmbrull pmbrull moved this from Features to Lineage - Mayur, Karan, Himank, Suresh in Release 1.3.0 Nov 29, 2023
@harshach harshach moved this from Lineage - Mayur, Karan, Himank, Suresh to Data Quality - Teddy, Pere, Harsha, Shailesh, Rupesh in Release 1.3.0 Nov 30, 2023
TeddyCr added a commit that referenced this issue Dec 5, 2023
#14204)

* refactor: entityFQN as ListFilter condition

* feat: implement resolution entity timeseries

* fix: rename to testCaseResolutionStatus

* ref: extracted ES query builder into private method

* ref: extract OS query builder in its own method

* ref: remove ingestion logic for test case resolution

* fix: reorganize json schemas to fix circular import in Python

* ref: object names in typescript code

* feat: added indexing of test case resolution

* feat: added test case resolution sample data

* fix: test case resolution api logic

* fix: audit logger for entityTimeSeriesInterface

* fix: DDL generation

* style: python linting

* fix: skip UI test case resolution tests

* fix: remove extension field

* fix: renamed testCaseFailureStatus to testCaseResolutionStatus

* fix: remove reviewer

* fix: rename sequenceId to stateId

* fix: re adjust search weights

* fix: removed InReview status

* style: ran python linting
@harshach harshach moved this from Data Quality - Teddy, Pere, Harsha, Shailesh, Rupesh to Done in Release 1.3.0 Dec 11, 2023
MrVinegar pushed a commit to MrVinegar/OpenMetadata that referenced this issue Dec 15, 2023
…st case result (open-metadata#14204)

* refactor: entityFQN as ListFilter condition

* feat: implement resolution entity timeseries

* fix: rename to testCaseResolutionStatus

* ref: extracted ES query builder into private method

* ref: extract OS query builder in its own method

* ref: remove ingestion logic for test case resolution

* fix: reorganize json schemas to fix circular import in Python

* ref: object names in typescript code

* feat: added indexing of test case resolution

* feat: added test case resolution sample data

* fix: test case resolution api logic

* fix: audit logger for entityTimeSeriesInterface

* fix: DDL generation

* style: python linting

* fix: skip UI test case resolution tests

* fix: remove extension field

* fix: renamed testCaseFailureStatus to testCaseResolutionStatus

* fix: remove reviewer

* fix: rename sequenceId to stateId

* fix: re adjust search weights

* fix: removed InReview status

* style: ran python linting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants