Menu

SASUnit for SAS-DI Jobs

Anonymous
2017-02-01
2017-02-01
  • Anonymous

    Anonymous - 2017-02-01

    I took a first look on SASUnit and scanned the examples. All examples (SAS-Code - units under test) are "pure" macros. Is it possible to test against generated SAS-DI-code (not user written code), which - as far as I know - is not a macro itself (of course, generated programms contain a lot of generated macros)

     
  • Klaus Landwich

    Klaus Landwich - 2017-02-01

    Hi Anonymous user!

    Of course you can test your DI-Code.

    From my point of view there are two ways to do it.

    1. Use SASUnit simply to compare the target datasets of each DI Job. Since DI Code is almost completly generated code it should be sufficient to check only the results

    2. Call you DI Studio Code from SASUnit. Instead of calling a macro you can include your DI-Code in a SASUnit scenario/testcase.
      You must use your DI-Environment obciously.
      Perhaps by putting SASUnit on your DI Machine and run it with the provided config/autoexec on the DI Machine.
      If that's not possible, you could use SAS Connect in your SASUnit scenario/testcase to compute remotely on your DI Machine.
      If that's not possible either you have to recreate your DI Environment in SASUnit.

    If you do not use macros as examinees in SASUnit, some built-in feature will not be available.

    • Test coverage is only functioning with macros. That's due to the SAS-feature MCOVERAGEthat is used to generate test coverage.
    • Calling sequence will not be useable either, because it relies on searching the macro call inside your sas program.

    If you have any question feel free to post again

    Regards
    Klaus

     
  • Anonymous

    Anonymous - 2017-02-01

    Hi Klaus,

    thank you for your immediate answer. I'll give it a try!

    Sorry (I forgot my name)!
    Regards
    Wolfgang

     

Anonymous
Anonymous

Add attachments
Cancel