ADR: Using Postman collection in Platform Validation project for Testing Dags in pipelines
Decision Title
Using Postman collection in Platform Validation project for Testing Dags in pipelines
Status
-
Proposed -
Trialing -
Under review -
Approved -
Retired
Context & Scope
Currently there aren't any Integration Tests for DAGs as part of automated pipelines to validate a DAG deployment in an End to End manner. There are tests present for DAGs like CSV Parser but they are more of Unit Tests and are not testing the flow with components like Ingestion Workflow Service and Airflow. Hence even after pipelines are successfully executed there is no surety whether a DAG is in functional state. An End to End test for a DAG should comprise of following steps
- Set up (Creating/Uploading any prerequisite data required for the DAG execution)
- Creating a Workflow via Workflow Service
- Triggering the DAG via Workflow Service
- Searching for the records created via Search Service
Proposal
The proposal here is to leverage existing Postman collections in platform validation project for DAG validation, these collections contains an exhaustive set of requests covering the entire flow as described above. Reusing these collections prevents the effort of writing Conventional Integration Tests as in OSDU services for every DAG. These collections can be executed as a containerized task using Newman utility in the Test Stage of the pipelines
Consequences
The existing postman collection might require few minor changes for them to be fully reusable in Automated pipelines
Note: From the observation so far removing any hardcoded variables and instead using Environment variables is expected to be the only required change
Rationale
Enabling a framework for End to End test will make the system more robust and any potential bugs will be caught right at the time of contributions itself.