vignesh srinivasan
vignesh srinivasan

Reputation: 403

Unit testing of Azure Data Factory

I have a VSTS CI/CD pipeline that deploys the Azure Data Factory project setup in my local to the existing data factory in Azure platform. Is there a way I can unit test my project? I understand that there is a visual studio test task in build definition. How do I create a unit test project for ADF ? Any suggestions will help.

Upvotes: 5

Views: 3845

Answers (4)

JSWilson
JSWilson

Reputation: 1195

While there isn't built in unit testing in ADF, Richard Ssinbank's example provides what appears to be a reasonable approach to implementing unit testing. Basically what he does is add parameters to the pipeline that allow dependency injection. The parameters start with the '_' and default to the normal dependencies that you would use in the pipeline for accessing external objects. This allows you to invoke the pipeline with stubs for testing.

Upvotes: 0

Ardalan Shahgholi
Ardalan Shahgholi

Reputation: 12575

Maybe you can use "Test Plans" in Azure Devops if you are using CI/CD.

enter image description here

Upvotes: 0

I would suggest you to try to create unit test that utilizes the ADF LocalEnvironment assembly (instead of the Console application used in their demo try to create a Unit Test project)

Upvotes: 2

starian chen-MSFT
starian chen-MSFT

Reputation: 33708

No, there isn’t Unit test for ADF project, there is a user voice that you can vote: Unit Testing for ADF Projects

Upvotes: 2

Related Questions