microsoft / data-factory-testing-framework

A stand-alone test framework that allows to write unit tests for Data Factory pipelines on Microsoft Fabric and Azure Data Factory.
MIT License
68 stars 15 forks source link

TestFramework not working #77

Closed moisessalum closed 5 months ago

moisessalum commented 5 months ago

Hello,

First time opening a bug, so please share any feedback if something is not right.

I installed the library from PyPi both locally and on a Databricks cluster with no issues. pip install data-factory-testing-framework

When I'm trying to import TestFramework, I get the following error both locally and on ADB. from data_factory_testing_framework import TestFramework ImportError: cannot import name 'TestFramework' from 'data_factory_testing_framework' (/opt/homebrew/lib/python3.11/site-packages/data_factory_testing_framework/__init__.py)

If I run something like import data_factory_testing_framework it doesn't complain.

Not sure how to proceed.

Thanks.

arjendev commented 5 months ago

Hi @moisessalum,

It looks like the TestFramework is indeed not in that specific package. We will address this in a future update, thanks for the feedback!

For now, can you try to import the TestFramework as shown below?

from data_factory_testing_framework.test_framework import TestFramework

moisessalum commented 5 months ago

Hey @arjendev

Thanks for the feedback.

I've tested the command you provided, but now I get the following error everywhere.

from data_factory_testing_framework.test_framework import TestFramework RuntimeError: Failed to create a .NET runtime (coreclr) using the parameters {}.

arjendev commented 5 months ago

Hi @moisessalum,

Good! The framework is dependent on the dotnet runtime, because some parts of the expressions are evaluated in dotnet.

Install the dotnet runtime from here. Using only the runtime and not the SDK should be sufficient.

I'm sorry for the inconvenience, in our latest refactor of the documentation this part got removed, I will add it back!

moisessalum commented 5 months ago

@arjendev

I just installed the dotnet runtime and I don't get any errors at all.

Thanks for the support!

arjendev commented 5 months ago

Awesome, I will then close this issue. Feel free to open another issue if you encounter anything else.