Hi Klaus, I've attached the error I get when running SASUnit on Win 11. We probably have some restrictions that creates the error. Not sure.
Yeah I just realized it is the sysscpl resolving to X64_WIN_PRO. Thanx Klaus
Hi Henrik, that is weird. We are runnging under Win11 and our sysscpl is X64_10PRO. Your sysscpl is X64_WIN+PRO instead. The plus sign inth the sysscpl causes the problem. In line 34 follollwing in _check_runenvironment.sas: %*** check for operation system ***; %if %_handleError(&l_macname. ,WrongOS ,(%upcase(&sysscp.) NE WIN) AND (%upcase(&sysscpl.) NE LINUX) AND (%upcase(&sysscpl.) NE AIX) ,Invalid operating system - only WINDOWS%str(,) LINUX AND AIX ) just add double quotes around %upcase(&sysscpl.)...
Hi Henrik, that is weird. We are runnging under Win11 and our sysscpl is X64_10PRO. Your sysscpl is X64_WIN+PRO instead. The plus sign inth the sysscpl causes the problem. In line 34 follollwing in _check_runenvironment.sas: %*** check for operation system ***; %if %_handleError(&l_macname. ,WrongOS ,(%upcase(&sysscp.) NE WIN) AND (%upcase(&sysscpl.) NE LINUX) AND (%upcase(&sysscpl.) NE AIX) ,Invalid operating system - only WINDOWS%str(,) LINUX AND AIX ) just add double quotes around %upcase(&sysscpl.)...
Hi Klaus, I'll have to get back to you on the error. Not all of us have upgraded to Win 11 yet :-), but as soon as I've upgraded I will let you know.
Hi Henrik, Yes SASUnit is runing under WIn11 and SAS9.4. Make sure to switch with us to github https://github.com/HMS-Analytical-Software/SASUnit What error is issued when running SASUnit under Win11 / SAS9.4
Has SASUnit been tested with SAS 9.4 under Windows 11? When running initsasunit.sas we get an error when running under Windows 11. It seems to be the macro _checkrunenvironment.sas creating the error. If SASUnit has been tested under Windows 11 are there any updates available? Br Henrik
Dear All, I have a "negativ test" case, which must produce an error. So the excpected behaviour is to find in the Log an "ERROR:". Is it possible to parameterize the Log Scan in a way, that finding "ERROR:" will cause a "passed" entry in the file "log4sasunit_asserts.log"? Thank you very much. Kind Regards Albert Meyn W&W Informatik GmbH Diese E-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtuemlich erhalten...
Hi Klaus Where in SASUnit should it be installed?
Hi again. I was doing some debugging and it seems to be this piece of code in xcmdwithpath.sas that couses the problem: %SYSEXEC &l_cmd. > "&logfile"; Before runnign the code sysrc is equal to 0. After running the code sysrc is equal to 255 (if I remember correct).
Hi Henrik, I'm not 100% sure where this comes from but this is my first guess. Image comparison cannot be done with in SAS so we need a third party tool to conduct that job. It is called imageMagick. You need to install that on the machine where SASUnit is running. Currently SASunit support the command line interface of version 6.9.13 Including imageMagick into SASUnit at first was only to show what you can do with assertExternal. But then it came in quite handy. If you cannot install that to your...
Hello My name is Henrik Lissau. I am a senior non-clinical programmer at Novo Nordisk. In my department, we are considering using SASUnit for unit testing of our standard SAS programs. Since we are a pharmaceutical company, there are certain requirements we must comply with in relation to using open source software. Therefore, I would like to know if you have any kind of documentation on how SASUnit was tested/validated. Any information is appreciated. Thanks in advance š Yours sincerely Henrik Lissau...
Thanks Klaus. I'll start with that. I'll need to consult our QA on how to validate our use of SASUnit internally, so I might return with a few more questions. Hope is allright.
Hi Klaus Unfortunately, I don't get the same result as in the documentation, when I run the sample project. Please see attached screenshot. I have a feeling that it is due to pixels in the images being compared. Do you guys have a quick fix for this?
Hi Henrik, We are currently working on version 2.2 of SASUnit. This includes some bug fixes and a bit refactoring. In parallel we are evaluating how SASUnit can be integrated into SAS Viya architecture. We plan to update SASUnit batch processing to be able to start "SAS Sessions" under SAS Viya. Regards Klaus
Hi What are the future plans for SASUnit. Are there any new releases coming up? Br Henrik
Hi Henrik, yes, it is possible to "test" python code with SASUnit. You can start the call to python as your test call in SASUnit. I'm not sure what portion of the python log / output will be visible in the SAS log file. That surely depends on the way you call the python program. You can then check the results (e.g. report or data set) with SASUnit. %initScenario(i_desc=Tests for python program xyz); %initTestcase(i_object=call_python_program_xyz.sas, i_desc=Call with Parameters abc) <...call python...
Do you think it would be possible to test python code with SASUnit (e.g using proc python), or would I need a separate testing tool for that? Br Henrik
Hello Henrik Lissau, your previous e-mail did reach me. I justed hadn't the time to react yet. From a validation point of view SASUnit is not part of your source code. So you do not need to validate it. As for any third-party tool you need an installational and operational qualification. This can be done by executing the sample project we deliver with SASUnit and compare it to the documentation on SourceForge or GitHub. In case you need some documentation or are interested in our testing of SASUnit...
Hello Not sure if my first email did reach you, so Iāll try again. My name is Henrik Lissau. I am a senior non-clinical programmer at Novo Nordisk. In my department, we are considering using SASUnit for unit testing of our standard SAS programs. Since we are a pharmaceutical company, there are certain requirements we must comply with in relation to using open source software. Therefore, I would like to know if you have any kind of documentation on how SASUnit was tested/validated and if you by any...
Hi My name is Henrik Lissau. I am a senior non-clinical programmer at Novo Nordisk. In my department, we are considering using SASUnit for unit testing of our standard SAS programs. Since we are a pharmaceutical company, there are certain requirements we must comply with in relation to using open source software. Therefore, I would like to know if you have any kind of documentation on how SASUnit was tested/validated. Any information is appreciated. Thanks in advance š Yours sincerely Henrik Lissau...
different location for sasunit installation and SAS programms
This is a reasonable approach. As we created the setup script we didn't have that in mind. SASUnit currently is capable to do so, but not the setup routine. To minimze manual editing of script files you can do the following: 1. Temoprarily created copy run_all.sas into ....\sasunit_prj\saspgm 2. Configure setup script to have ...\sasunit_prj as SASUNIT_PROJECTFOLDER 3. Start setup script 4. Remove run_all and saspgm folder 5. Update your run_all.sas to use absolute path to autocall members 6. Update...
Getting-Started-Video for SAS EG integration
Live on Youtube
sasunit.cfg not used in SAS subprocess
Closed with a feature branch on GitHub
Bugfix: Path not resolved in _dependency.sas
Already implemented that way. At least on GitHub.
Bugfix: Path not resolved in _dependency.sas
Already implemented that way
Hi Albert Meyn, you are absolutely right. It is common to have an %abort in some programs. But it is obvious that this interfears with the test cases. Can you isolate the functionality you want to test? So that it works without %abort? Otherwise you could wrap the %abort statement into a macro, which evaluates some macro variables. Most of the time you don't want to issue an abort statement in the development or testing environment. If you already have some indication in which environment the programs...
Hi Klaus Landwich, there is still a question open for me. I evaluate SASUnit in the development of a frame work. Part of the framework is error handling. In the error handling the framework issues a %abort cancel command. My testcase uses the framework, injects an error and then asserts the log for the error. My hand coded assertLog seems never to be excecued. My assumption is, because of the %abort in the framework the test case is broken. Because of that the default log scan run. Is that the case?...
Hi Albert Meyn, yes it is possible to parameterize the logscan. By design SASUnit adds a log scan at the end of the scenario. This happens when no log scan was implemented by the user. Your problem can be solved by an explicit call to the macro assertLog. Here you can specify then number of expected errors and warnings in the log (parameter i_errors and i_warnings. As an example: %assertLog(i_errors=1); To make sure that you allow the expected error only, you can add a call to assertLogMsg: %assertLogMsg(i_logmsg=<ERROR:...
Dear All, at the end of a test case the log is automatically scanned for "ERROR:" I do not see a possibility to parameterize this log scan. For a "negative test" I inject an error. So the expectation is, that the error in the log shoud be reported as OK~001~1~1~assertLog~0~0#0~0#0~assertLog: assert passed. Actually it is reported as: ERROR~001~1~1~assertLog~2~0#0~3#0~assertLog failed: Do I have the possibilty to change this behaviour? Thank you very much. Albert Meyn W&W Informatik GmbH
Since we moved to GitHub I created a ticket there. From my point of view these are two points: - allow bin files to be moved - Check wether runsasunit creates all the necessary folders or not. Regards Klaus
sasunit.cfg not used in SAS subprocess
From my point of view this should happen. But obvioulsy is does not. So I will investigate in that issue. Currently we are switching to GitHUb so I will open a respective ticket there.
Test files not found
Test files not found
Test files not found
Currently there is no plan to make runsasunit work recursively.
Hi mgross, yes that is true. runsasunit does not work recursively. You need to specify one call to runsasunit for each folder containing test programs. That's the way it currently is implemented. Regards Klaus
Test files not found
sasunit.cfg not used in SAS subprocess
Test files not found
sasunit.cfg not used in SAS subprocess
different location for sasunit installation and SAS programms
Dear Albert Meyn, I think I found an explanation. In Batch the logger are created in the logconfig.xml. In interactive mode this is not present. So SASUnit tries to change the log level of an non existing logger. Here windows seems to act differently. Perhaps we should get rid of the logconfig.xml-files and generate all loggers in the programs. Thanks for aour post. Kind regards Klaus Landwich
Dear Albert Meyn, first of all thanks for giving SASUnit a try. My expectation would be that it should run in any of these combinations. The configurations is obviously correct. I had a short look into SAS Notes and SAS documentation. First guess is that SAS start under Linux is differently configured within SAS. Immutabilityof the logger is explicitly set to FALSEto be able to change the logging level. Perhaps it is not possible to change the logging level under Linux. My next step is to recreate...
Dear All, I open the EG project on my laptop and access the SAS Instance and the SASUNIT installation on a Red Hat Server. SASUNIT_ROOT and SASUNIT_PROJECT_ROOT are on the Server. On starting initSASUnit with the following parameter, I get the error mentioned below. %initSASUnit( i_root =&SASUNIT_PROJECT_ROOT. ,io_target =&SASUNIT_PROJECT_ROOT./doc/sasunit/en ,i_overwrite =1 ,i_project =SASUnit Example project ,i_sasunit =&SASUNIT_ROOT./saspgm/sasunit ,i_sasautos =saspgm ,i_testdata =dat ,i_refdata...
Bugfix: Path not resolved in _dependency.sas
Bugfix: Path not resolved in _dependency.sas
Getting-Started-Video for SAS EG integration
Check "empty" scenarios and create test cases
Maintenance for SASUnit v1.7
Version 1.7 is no longer supported
Fix typo
Implement known feature of creating reports only for the new setup script
Checked all scenarios and left a remark what to do
Explaining SASUnit setup script
Hi, I did not find a way to read existing log4sass_appenders and query their file location. So I coded the name of the log file explicitly. Please change lines 167 to 173 as follows: Old version if getoption("LOG") ne "" then do; idColumn = "014"; parameterColumn="^_"; valueColumn=catt ('^{style [flyover="', getoption("LOG"), '" url="', "file:///" , getoption("LOG"), '"]', resolve('%_stdPath (i_root=&g_root, i_path=%sysfunc(getoption(log)))'), "}"); SortColumn+1; output; end; New version idColumn...
Fix for bug with link on overview page referencing log4sasunit_run_all.log
Hi, your perfectly right. I adjusted the paths to the folders and the path to the new location of the log file. Bit did not check this link. The respective lines are in the program: _reporthomehtml.sas In lines 167 to 173 the option LOG is evaluated to get the name of the log file. Obviously the option log does not conform to the name of the overall log file specified in logconfig.xml I will check on an alternative implementation and come back to you. My findings will be carried over to the next...
Hi, After executing "example/bin/sasunit.setup.9.4.en.cmd" and then "example/bin/sasunit.9.4.windows.en.overwrite.full.cmd" (SASUnit v2.1), I find that the doc main page (example/en/doc/overview.html) reports (and links to) "SAS log of reporting job" = "en/logs/run_all.log", however that file does not exist. Shouldn't it refer to "en/logs/log4sasunit_run_all.log" instead ? Where is the code that generates that value ? Many thanks
Fix bug: pgmDocSASUnit only valid with crossRefSASUnit
Update last script file
Remove obsolete todo-tag
Add parameter for resource folder
Deleting obsolete start scripts
Deleting obsolete start scripts
Release 2.1 is alive
SASUnit Documentation Home
User's Guide
Explaining SASUnit setup script
How to and Best Practices
Explaining SASUnit setup script
Release Notes Version 2.1
Create tag for release
Renamed because there were further changes
Support standard Linux paths
New Parameters are inroduced. Only resource folder ist still under /opt and not under /etc. A new pipeline is implemented in Jenkins
Clean up completed todos
Add documentation
Fix script for creating start scripts for standard linux path (etc, opt, var)
Support standard Linux paths
Hi Madalin, parts of SASUnit are usable within SAS Viya. The new interactive part introduced with version 2.0 is tested with SAS Viya. Take a look here: SASUnit 2.0 The full documentation features are not yet supported under SAS Viya. So you cannot run %run_sasunit or %report_sasunit under SAS Viya. Hope that helps. Regards Klaus
Hello, Would it be possible to know if SASUnit has been tested with SAS VIYA? Thank you, Madalin
This code run fine - using a empty SAS session...running it with the SAS UNIT Framework it will generate an print error. 33 34 35 36 proc print data=error noobs label; 37 var idColumn / style(column)=rowheader; 38 var descriptionColumn 39 programColumn 40 last_runColumn; 41 var durationColumn / style(column)=[just=right]; 2 The SAS System Thursday, October 6, 2022 03:28:00 PM 42 var resultColumn / style(column)=[background=white]; 43 run; 1 The SAS System Thursday, October 6, 2022 03:46:00 PM ERROR:...
Hi again... currently testing the tool at a client... I have same issue both with "Error.png" in the same macro.. any hint... I would like to have a full report.... Planned for showcare to the team.. Thanks
System Requirements
Error Path "ok.png" does not exist
Hi BenoƮt Just take a look at my answer to ticket 224. If you ar running SASUnit interactively there is no need and no use in running runSASUnit.sas and reportSASUnit.sas Regards Klaus
Hi BenoƮt, now I see your problem. When running SASUnit in an interactive environment like SAS Enterprise Guide, SAS Studio or even display mananger then there is a lightweighed reporting component in endScenario.sas. Therefore You don't need to run reportSASUnit.sas. You don't even have to call runSASUnit.sas What you need is a call to initSASUnit.sas and that's it. I assume You don't have access to Enterprise Guide right? Is it possible to convert an Enterprise Guide Project to a SAS Studio file?...
Error Path "ok.png" does not exist
Hi Klaus, "Log file 000.log is created when testing the capability of spawning SAS session. That functionality is only used in batch mode. That's why you don't get that error while running SASUnit in SAS Studio." --> I've this error when running SASUnit in SAS Studio. I updated reportsasunit.sas code to avoid it (I'll never run SASUnit in batch mode) : /-- only if testsuite has been initialized anew after last report -----/ IF (tsu_lastinit > tsu_lastrep OR &o_force.) and "&g_runMode." = "SASUNIT_BATCH"...