This project has moved and is read-only. For the latest updates, please go here.

Test Run Stats & Integration with VS08

Jun 4, 2010 at 5:20 AM

Hi -

Good work! You sure have a good product. I work for Avanade and have shared this amongst the communities, expect a lot of Avanade SSIS architects to pick this up for evaluation. I have been trying this out in my project and have created some documentation to get my team trained on the tool. I am happy to share or if you would like build the documentation for the product.

A couple of questions

  1. The test files created through SSISUnit are of the type ‘myTestName.SSISUnit’, can I call the tests to be executed through Visual Studio08?

Example in Visual Studio MyTestProject.csproj I would like to make a call for the execution of myTestName.SSISUnit, this is how I used to do it for tests created in BizUnit

   [TestMethod]

        public void Test_01_FILECopyWithXmlValidation()

        {

            BizUnit.BizUnit  bizUnit = new BizUnit.BizUnit(@"F:\tarun.arora\Visual Studio 2005\Projects\TestSSISUTs\MyTestProject\XMLFile1.xml");

            bizUnit.RunTest();

        }

 Can you share how you have implemented this?

 2. Statistics, The code coverage? Is there a way to find out the tasks covered and the times they were called?

 

I am pretty new to SSIS and its unit testing. I created a sample SSIS package and tried both BizUnit 3.1 and SSISUnit 1.0,

 

Personally I found SSISUnit easy to steer while writing the test cases, the areas where it scores over BizUnit

1. Option to create a test using a package - This automatically picks up the useful information of database connection string, possible test cases in terms of the package tasks.

2. Level of Testing - SSISUnit not only allows end to end testing of the package but also lets one dig deep and test at the task level. It does this by identifying the GUIDs associated with the package Tasks and gives user the option of running tests at the task level. This is a major plus because it will allow writing unit test at a more granular level.

 

I would like your take on this – I think it would be possible to test this with BizUnit too. I can write a test using BizUnit with which I can query the tables modified by that task and asset the same with the help of some sql queries. But this approach would fail if the package during its execution re-modifies the same table.

So, consider an example, Table Calc has columns number 1 and number 2

-  The first task in the package inserts 5 in the column number1 and 7 in the column number2

- The second task in the package updates the row with 15 in the column number1 and 27 in the column number2

Can I use SSISUnit to test the first task operation and then further do an end to end test to check the entire flow?

 3. Graphical user interface - I cannot contest too hard on this, though BizUnit 3.1 also has this feature, yet I felt that the GUI in SSISUnit is more relevant to SSIS testing and helps reduce the possibility of introducing casual errors in the unit tests.

 Disadvantages 

SSISunit is still fresh in the market, it's still at version 1. There are not many samples or help docs available. While BizUnit has reached version 3.1 and has strong community support and help documentation.

Coordinator
Jun 4, 2010 at 5:24 PM

Thanks for the feedback, it's always appreciated.

On your first question (running from VS), I think you got your answer in this thread: http://ssisunit.codeplex.com/Thread/View.aspx?ThreadId=59513. Steve's done a nice job integrating SSISUnit through the API in the Visual Studio environment, and my approach is pretty similar to what he uses.

On the second question (statistics) - yes, I think this is doable, and I've added it as a work item.

I haven't used BizUnit, so I can't comment with any degree of knowledge on what it does and doesn't do. However, from reading the documentation, it looks like you'd be limited to testing an entire package as a unit if you used BizUnit. For the way I approach unit testing SSIS, that's not granular enough. I like testing individual tasks, and eventually I plan to extend the functionality to testing individual components in the data flow.

For the scenario you describe with Table Calc and modifying it twice - SSISUnit supports Setup and Teardown before and after each test. Normally, I would implement those to restore the table to it's original state, so that you can run the tests in any order and still get the correct results. A third test to run the entire package can be easily implemented and won't need any special handling if the task-level tests clean up properly.

Any assistance you can give on documentation would be much appreciated. If you have some you can share, you can email me at john {dot} welch {at} live {dot} com and I'll be happy to review it and post it to the wiki here.

Thanks again for the comments and feedback,

John