
This is an introduction about course!
I am using MS SQL as a database. You can use any database of your choice. To install there are simple steps. Also, to connect to database through python, every database has its own connection string that can be found through respective database official website. I have shown here how to connect to MS SQL database.
We need to run sql queries most of the time. To connect to cursor of database, time and again, we have created this framework.
I have shown a sample mapping document which we will use for validation of our test cases.
We are creating a simple test case for validation of presence of table in database.
Parametrize test cases with pytest to verify multiple tables (sales, date, customer, products), avoid repetitive definitions, and validate table presence through one streamlined test run.
Learn to use parameterized tests to verify table presence and record availability in ETL data testing, update mapping documents, and run 12 test cases across 6 tables.
Develop a framework to extract column names from a table using an sql query and Python, transforming results into a clean list for etl data testing.
Parameterize the table name for both tabs in the mapping document, validating that the target name matches the sales fact and sales age tables, then run the test case.
Validate absence of duplicates across etl tables by writing parameterized duplicate checks using primary keys; identify duplicates with count greater than one across sales, customer, product, and date dim tables.
Validate the population of the total revenue column using sample records, applying the mapping rule purchase quantity multiplied by per unit price, and confirm all test cases pass.
Create a Jenkins pipeline for test execution in ETL testing, wiring GitHub, a Jenkins file, and Pytest with a SQLite database to validate test coverage and show success.
Install pytest-html, run pytest -v to execute all 55 test cases, and generate an HTML report highlighting passes and failures for stakeholders.
Learn how to generate an Allure report after test execution by installing Allure, configuring environment paths, running pytest, and reviewing the index.html with detailed results.
The course is on a basic idea of automation in ETL Testing or Data Testing. We perform Retesting and (Non) Regression tests during a project or release. We perform same set of validation steps to ensure there are no regression introduced due to recent changes. If one has the idea on automating those repetitive task, it helps a lot to save our efforts and time.
I have used a simple ETL project to understand the automation steps. In this course, I have used Python and Pytest to organize the test cases. The project used is just to give an idea how can we connect to actual requirement when we perform actual testing during our professional work. The project is not ideal and actual ETL project can vary to a greater extent.
To validate the business rules, I have used SQL queries in the course. Few frameworks are created to use it for further test cases and execution. Most of the test cases include here are not exhaustive and are just for understanding purpose. Please do not take it as a reference for ETL Testing. Only take away from this course is how to automate your same set of validation steps.
It is recommended to have experience on ETL Testing and basic knowledge of SQL, Python and Pytest. However, if you don't have much experience on these, it won't be very difficult to understand it. I have tried to make the course as simple as possible.