The framework supports two types of tests, and understanding the difference helps you decide where to focus your effort.
Activity testing is about testing individual activities in isolation. You pick a specific activity from a pipeline, set up a state with the parameters and variables it needs, evaluate it, and assert against the results. This is useful for validating that expressions within an activity resolve correctly.
For example, if you have a web activity whose URL is built from a global parameter and a variable, you can test that the concatenation produces the right result without running the entire pipeline. You set up the state with specific values, evaluate the activity, and check the output.
from data_factory_testing_framework.state import PipelineRunState,
RunParameter, RunParameterType from
data_factory_testing_framework.state.run_parameter
import PipelineRunVariable
# Get the activity from your pipeline activity =
pipeline.get_activity_by_name("MyWebActivity")
# Set up the state state =
PipelineRunState( parameters=[
RunParameter(RunParameterType.Global, "BaseUrl",
"https://api.example.com"), ], variables=[
PipelineRunVariable("Path", "/data/export"), ], )
# Evaluate and assert activity.evaluate(state) assert
activity.type_properties["url"].result ==
"https://api.example.com/data/export"
Pipeline testing takes a broader view. Instead of testing a single activity, you test the execution flow of an entire pipeline. You provide input parameters and then iterate through the activities as the framework evaluates them, asserting that the right activities run in the right order. This is where you can validate conditional logic, verify that branches are followed correctly, and check that the pipeline behaves as expected for different sets of inputs.
Pipeline testing is great for validating that your automation workflows handle different scenarios correctly, especially when pipelines include If Condition, Switch, or ForEach activities that create multiple execution paths.