<img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=931099456970389&amp;ev=PageView&amp;noscript=1">

LegiTest2018 has proven one thing to the Business Intelligence world: Data privacy and protection are more important than ever. With Europe’s GDPR fast approaching this month, companies must be able to answer the question, ‘What happens to consumer data?’

One thing you can do is leverage LegiTest by Pragmatic Works to test and validate information across your entire environment. In this demo, I’ll showcase how unit testing can ensure that your customer list is free from any users that wish to be excluded and have their data remain private.

Let’s get started:

    • First, I’m going to showcase inside of SQL Server Management Studio the information that I’ll be using. You can also build yourself a sample customer list.
    • Next, go through and create (or you may already have) an exclusion list to test your customer list against.
    • After setting up the items to test, we need to build the test. Boot up Visual Studio and create a new LegiTest.
    • First, I set up an ADO.net connection that’s pointing to the test database repository where my Customer and Exclusion tables are located.
    • My query is simple: select all from my customer list table where ID and select ID from exclusion.
    • Now I need to add an assertion, a way for LegiTest to know if the result of my query is a ‘Pass’ or a ‘Fail.’
    • Under my grid validation manifest, you’ll see I set it to only succeed if no rows are present, or that I only want this test to pass IF those members on the exclusion list aren’t present.
    • I run the test and open my LegiTest test explorer and see this test has failed, as there were 15 validation failures, meaning that my Customer list still contains the names on the exclusion list.
    • Luckily, I have a stored procedure that is going to remove those exclusions from my customer list.
    • After executing my stored procedure, I pulled up my customer list one more time to ensure that it succeeded.
    • Finally, I can go back to Visual Studio, rerun the test, and see my LegiTest has passed.

With this quick demo, you can see just how simple it is to build out a test using LegiTest and I can utilize this test again in the future or even automate it. Want to get started with automated testing and get piece of mind about data privacy and protection? Visit pragmaticworks.com or Legitest.com to download your free trial and view how to videos to help you create your first test. The GDPR is almost here, are you ready?


Download LegiTest

Join Our Blog

Join thousands of other SQL Server, BI and cloud pros by subscribing to our blog.

Leave a comment

Posts by Topic

see all

Recent Articles

Popular Articles