Thank you for providing such a fantastic tool for UnitTesting. I am very
confident that it will substantially support our goal to validate
standard macros.
Currently I try to get the SASUnit toolbox to run in batch mode on a
Linus X64 Server. The SASUnit script will be started via a bash without
using an XDisplay.
I implemented first tests that asserts the correctness of an (output)
dataset with formats (using %assertColumns).
This functions well. The tests reconcile the correctness of actual and
expected datasets.
However, an ERROR occurs during the preparation of the html report -
when the actual dataset should be incorporated in the report
(_RENDER_ASSERTCOLUMNSREP).
SASUnit cannot find the attached format that is used in the dataset.
LOG-Message:-----------------------------------------------------------------------------------------------------------------------------------------------
MPRINT(REPORTSASUNIT._REPORTDETAILHTML._RENDER_ASSERTCOLUMNSREP): TITLE
"SAS table actually created";
ERROR: Format TRTA_F not found or couldn't be loaded for variable trt01aN.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
In the *test.sas program, I used options fmtsearch to add the search
path of the used format catalogs.
What can I do to let SASUnit find the format catalog for preparing the
html report?
Do you need some more information on this issue?
Best regards
Stefanie
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
that makes perfect sense to me. In your *test.sas programs you need the fmtsearch for your data processing.
However HTML reporting is done in the overall SAS session that uses run_all.sas. So you need to specify the fmtsearch in run_all.sas too.
That should solve the problem.
Second option would be to specficy "options nofmterr;" in run_all.sas. This will suppress the ERROR when the format is not found. The HTML report will the show the unformatted value. The comparison of the data sets will not be affected if the format is not present, because formats are only used to display values.
Regards
Klaus
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
Anonymous
-
2021-01-15
Hello Klaus,
thank you for your quick response! This solved my problem!
Additional to the fmtsearch, I had to re-specify the libraries themselves.
I added the following code right before %reportSASUnit(...)
Hello,
Thank you for providing such a fantastic tool for UnitTesting. I am very
confident that it will substantially support our goal to validate
standard macros.
Currently I try to get the SASUnit toolbox to run in batch mode on a
Linus X64 Server. The SASUnit script will be started via a bash without
using an XDisplay.
I implemented first tests that asserts the correctness of an (output)
dataset with formats (using %assertColumns).
This functions well. The tests reconcile the correctness of actual and
expected datasets.
However, an ERROR occurs during the preparation of the html report -
when the actual dataset should be incorporated in the report
(_RENDER_ASSERTCOLUMNSREP).
SASUnit cannot find the attached format that is used in the dataset.
LOG-Message:-----------------------------------------------------------------------------------------------------------------------------------------------
MPRINT(REPORTSASUNIT._REPORTDETAILHTML._RENDER_ASSERTCOLUMNSREP): TITLE
"SAS table actually created";
MPRINT(REPORTSASUNIT._REPORTDETAILHTML._RENDER_ASSERTCOLUMNSREP): PROC
PRINT DATA=_acLib._columns_act;
MPRINT(REPORTSASUNIT._REPORTDETAILHTML._RENDER_ASSERTCOLUMNSREP): RUN;
ERROR: Format TRTA_F not found or couldn't be loaded for variable trt01aN.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
In the *test.sas program, I used options fmtsearch to add the search
path of the used format catalogs.
What can I do to let SASUnit find the format catalog for preparing the
html report?
Do you need some more information on this issue?
Best regards
Stefanie
Hi Stefanie,
that makes perfect sense to me. In your *test.sas programs you need the fmtsearch for your data processing.
However HTML reporting is done in the overall SAS session that uses run_all.sas. So you need to specify the fmtsearch in run_all.sas too.
That should solve the problem.
Second option would be to specficy "options nofmterr;" in run_all.sas. This will suppress the ERROR when the format is not found. The HTML report will the show the unformatted value. The comparison of the data sets will not be affected if the format is not present, because formats are only used to display values.
Regards
Klaus
Hello Klaus,
thank you for your quick response! This solved my problem!
Additional to the fmtsearch, I had to re-specify the libraries themselves.
I added the following code right before %reportSASUnit(...)
Thank you!
Stefanie