Single flow analysis in ssis pakage

Is there any way for unit test data stream in ssis package.

Ex: sorting check - make sure the sorting is incorrect.

+3
source share
5 answers

There is a single testing framework for SSIS - see SSISUnit .

It is worth a look, but it may not solve your problem. To do this, you can use unit test individual components at the control flow level, but it is not possible to isolate individual transformations of the data stream as well - you can test the entire component of the data stream.

, , - DataFlow DataFlow, . , - .

, NUnit , SSIS api .

+2

- . : , . , , excel. , Excel . SSIS . , .

OTOH, SSIS , . MS .

0

, , .

0

I like to use data viewers when I need to see how data moves from component to component.

0
source

SSISTester can use the data stream between the two components and save the data in a file. Access to the output can be obtained in the unit test. For more information, see Ssistester.bytesoftwo.com. An example of using SSISTester for this is given below:

[UnitTest("DEMO", "CopyCustomers.dtsx", DisableLogging=true)]
[DataTap(@"\[CopyCustomers]\[DFT Convert customer names]\[RCNT Count  customers]", @"\[CopyCustomers]\[DFT Convert customer names]\[DER Convert names to upper string]")]
[DataTap(@"\[CopyCustomers]\[DFT Convert customer names]\[DER Convert names to upper string]", @"\[CopyCustomers]\[DFT Convert customer names]\[FFD Customers converted]")]
public class CopyCustomersFileAll : BaseUnitTest
{
    ...
    protected override void Verify(VerificationContext context)
    {
        ReadOnlyCollection<DataTap> dataTaps = context.DataTaps;

        DataTap dataTap = dataTaps[0];
        foreach (DataTapSnapshot snapshot in dataTap.Snapshots)
        {
            string data = snapshot.LoadData();
        }

        DataTap dataTap1 = dataTaps[1];
        foreach (DataTapSnapshot snapshot in dataTap1.Snapshots)
        {
            string data = snapshot.LoadData();
        }
    }
}
0
source

Source: https://habr.com/ru/post/1702264/


All Articles