BI Data Stability, Consistency and Sanity Checks – C# Test Case

In any enterprise BI setup, over time it becomes a challenge to ensure the stability of all the input data streams (via any mechanism like SSIS/C#/Python..).

Because though the import package/scripts can be well coded and error handled and improved, as time passes the source systems can change, new reference data may be introduced or the validation on the source system would have flaw allowing invalid input entries flowing through to BI.

To overcome this I have realized it always becomes a necessity after a while to run a set of test cases on a regular interval in your BI platform performing key business logic validations.

So in this blog I would introduce you to the overall setup of BI Test cases mechanism which has become my favourite overtime.

Step 1: Create a C# Test Project leveraging XUnit. Please refer to the website of the framework for great tutorials.

Step 2: Copy over your Text Case Project build output to Jenkin Server and configure the job with the following steps

Configuring the Run time frequency of the build in Jenkins
"C:\TestCases\BI\xunit.runner.console.2.4.1\tools\net46\xunit.console.exe" "C:\TestCases\BI\build\Tests.dll" -xml "C:\Jenkins\workspace\BI Test Case\testReport.xml" -html "C:\Jenkins\workspace\BI Test Case\testReport.html"

Configure the build step in Jenkins to run the automated XUnit test case and produce the HTML/XML report (Execute Windows batch command)

Step 3: Configure the Post Build Actions in Jenkins for the email notifications to the developer/support for the failure test case scenario

Followed by step to interpret the XUnit xml for Jenkins reporting

And there you have it.

Now the Jenkins is configured to run you C# (XUnit) test cases against your DB every 30 mins, and for any build failures you will receive an email in the following format with the necessary attachments to review details about the failures.

So now just keep an eye on these email notification, and as saying goes “No News, is Good News” !!

Leave a Reply

Your email address will not be published. Required fields are marked *