SAS Data Integration Studio, DataFlux Data Management Studio, SAS/ACCESS, SAS Data Loader for Hadoop and others

Hello, Automated or Unit Testing

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 15
Accepted Solution

Hello, Automated or Unit Testing

How do Automated or Unit Testing actual works on sas programs/DI JOBS in SAS DI STUDIO?

Is there any SIMPLE practical scenario or example available to understand the concept of testing in real sas di project??

Than


Accepted Solutions
Solution
‎08-14-2015 03:22 AM
Super User
Posts: 3,250

Re: Hello, Automated or Unit Testing

Well since no one else has responded.....

I don't actually use DI Studio but if I did then I would test DI jobs the same way I test all my SAS work that is going to be productionised:

1) Aim for as clean a SAS log as possible. That means no errors, no warnings, and no notes about potential problems like missing values. The benefit of this is that if any problem does happen it is a lot easier to spot.

2) Confirm if the outputs are what are wanted.

3) Confirm the accuracy and correctness of the results. This includes comparing SAS datasets to ensure the right results are being derived and that nothing else is broken in the process. I am a total fan of PROC COMPARE for dataset comparisons. Doing a check comparing a BEFORE version with an AFTER version is in my view an essential and highly efficient and valuable way of testing.

4) Confirm that the job works reliably, consistently, and efficiently, and fits in with other production jobs.

There is no such thing as automated testing. 

View solution in original post


All Replies
Solution
‎08-14-2015 03:22 AM
Super User
Posts: 3,250

Re: Hello, Automated or Unit Testing

Well since no one else has responded.....

I don't actually use DI Studio but if I did then I would test DI jobs the same way I test all my SAS work that is going to be productionised:

1) Aim for as clean a SAS log as possible. That means no errors, no warnings, and no notes about potential problems like missing values. The benefit of this is that if any problem does happen it is a lot easier to spot.

2) Confirm if the outputs are what are wanted.

3) Confirm the accuracy and correctness of the results. This includes comparing SAS datasets to ensure the right results are being derived and that nothing else is broken in the process. I am a total fan of PROC COMPARE for dataset comparisons. Doing a check comparing a BEFORE version with an AFTER version is in my view an essential and highly efficient and valuable way of testing.

4) Confirm that the job works reliably, consistently, and efficiently, and fits in with other production jobs.

There is no such thing as automated testing. 

Occasional Contributor
Posts: 15

Re: Hello, Automated or Unit Testing

Thank you so much for your Answer.

It helps me for understanding concept.Smiley Happy

Occasional Contributor
Posts: 17

Re: Hello, Automated or Unit Testing

Hi,

I wanted to follow up on this question as this is something near and dear to my heart - test-first design (TFD) and automated unit testing. 

Philosophically, methodologies that take advantage of robust development processes are critical IMHO. Most SAS Programmers are not Developers - that is, most write their programs against the data, whereas Developers write their programs against requirements.  That distinction is very important in determining whether you (or your organization) have the support that you will need to utilize TFD.  The reason being is that this will require discipline and commitment to the approach.

With that being said, I have included some references to our thinking on how you can/ should implement TFD in your SAS programming practices.

FUTS - an open source framework for Unit Testing in SAS

Using FUTS with Test First Design - SGF/ SUGI Paper

Unit Testing Frameworks for SAS (Wiki)

Robustness in SAS Applications (PhUSE Wiki)

Hope this helps.

-greg

-greg

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 528 views
  • 1 like
  • 3 in conversation