This getting started focuses on novice users who are not familiar with Python or package management. It guides the user through the process of downloading the data factory pipeline files, setting up a Python project and installing the framework so that they can start writing tests.
For experienced Python and package management users, you can skip this page and go directly to the repository setup page.
Install the dotnet runtime (not SDK) from here. This is required to run some expression functions on dotnet just like in Data Factory.
The framework is designed to work with the json
files that define the data factory pipelines and activities. Files from the data factory environment can be downloaded from your data factory environment as described in the repository setup page.
For Visual Studio Code, the guidance is:
-
Create a new folder alongside the data factory pipeline files for the test project called
tests
. -
Open the new folder in Visual Studio Code.
-
Install the framework by installing the library the terminal with pip:
pip install data-factory-testing-framework
-
Install pytest as testing library. All examples in this documentation are using pytest.
pip install pytest
-
Download the pipeline files from data factory environment and place them in the project folder as described in the repository setup page.
Additional resources:
- Get Started Tutorial for Python in Visual Studio Code
- Integrated Terminal in Visual Studio Code
- pytest: helps you write better programs — pytest documentation
Once the setup is finished, reading the following pages is recommended to learn how to write tests for the data factory:
- Initializing the framework (make sure to initialize the root folder of the framework with the path to the folder containing the pipeline definitions).
- Activity testing
- Pipeline testing