Hi All ,
Does Unit Test Framework only works for Native Cobol codes ?
I tried using mfurun for Managed COBOL codes but i am unable to execute the scripts.
What are the other limitations ?
Can i used on Character based screens ?
Hi All ,
Does Unit Test Framework only works for Native Cobol codes ?
I tried using mfurun for Managed COBOL codes but i am unable to execute the scripts.
What are the other limitations ?
Can i used on Character based screens ?
Hi All ,
Does Unit Test Framework only works for Native Cobol codes ?
I tried using mfurun for Managed COBOL codes but i am unable to execute the scripts.
What are the other limitations ?
Can i used on Character based screens ?
The Unit Test Framework will work on native procedural programs and managed procedural programs. If you are compiling to managed then you would use mfurunil instead of mfurun.
Documentation for running unit tests can be found here::
The current limitations can be found here:
Hi All ,
Does Unit Test Framework only works for Native Cobol codes ?
I tried using mfurun for Managed COBOL codes but i am unable to execute the scripts.
What are the other limitations ?
Can i used on Character based screens ?
Thanks Chris.
I was able to write a test case for Managed Procedural pgms ( typically batch programs compiled in managed state).
In restrictions it is mentioned that it does not support User Interface Syntax , so does it mean it will not work on programs using ACCEPT statements (typically used in the Online Applications).
Thanks,
Zoeb
Hi All ,
Does Unit Test Framework only works for Native Cobol codes ?
I tried using mfurun for Managed COBOL codes but i am unable to execute the scripts.
What are the other limitations ?
Can i used on Character based screens ?
That is correct, it does not yet support ACCEPT/DISPLAY testing in your programs.
The Unit Testing Framework is in Technical Preview status which means it is not yet in a GA state.
Hi All ,
Does Unit Test Framework only works for Native Cobol codes ?
I tried using mfurun for Managed COBOL codes but i am unable to execute the scripts.
What are the other limitations ?
Can i used on Character based screens ?
Thanks.
It was giving error message as follows when my code had ACCEPT/DISPLAY/SCREEN SECTION.
Execution error : No default window setup - check for AcceptDisplayAttribute?
Hi All ,
Does Unit Test Framework only works for Native Cobol codes ?
I tried using mfurun for Managed COBOL codes but i am unable to execute the scripts.
What are the other limitations ?
Can i used on Character based screens ?
Thanks.
It was giving error message as follows when my code had ACCEPT/DISPLAY/SCREEN SECTION.
Execution error : No default window setup - check for AcceptDisplayAttribute?
Hi All ,
Does Unit Test Framework only works for Native Cobol codes ?
I tried using mfurun for Managed COBOL codes but i am unable to execute the scripts.
What are the other limitations ?
Can i used on Character based screens ?
Hi Chris ,
I tried accessing Environment Variables , Used External Path in files declarations but was unable to access them too.
These are additional limitations to Unit Test Framework.
Regards,
Zoeb
Hi All ,
Does Unit Test Framework only works for Native Cobol codes ?
I tried using mfurun for Managed COBOL codes but i am unable to execute the scripts.
What are the other limitations ?
Can i used on Character based screens ?
Can you give me an example of what it is you are trying to do? Environment variables can be set and queried as part of a test but I am not sure what it is that is failing for you.
Thanks
Hi All ,
Does Unit Test Framework only works for Native Cobol codes ?
I tried using mfurun for Managed COBOL codes but i am unable to execute the scripts.
What are the other limitations ?
Can i used on Character based screens ?
COBOL code:
identification division.
program-id. datepgm.
environment division.
configuration section.
special-names.
environment-name is ws-env-var
environment-value is ws-env-value.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT WS-INFILE ASSIGN TO
EXTERNAL FILEPATH
FILE STATUS IS WS-INFILE-SW.
data division.
FILE SECTION.
FD WS-INFILE.
01 INP-EMP-REC PIC X(500).
working-storage section.
01 WS-INFILE-SW PIC X(02) VALUE SPACES.
88 WS-INFILE-SUCESS VALUE '00'.
88 WS-INFILE-EOF VALUE '10'.
01 ws-muf-id pic x(2) value spaces.
01 ws-date pic 9(8).
01 ws-date-int pic 9(8).
*linkage section.
01 input-date.
03 input-year pic 9999.
03 input-month pic 99.
03 input-day pic 99.
01 date-function pic x.
88 add-func value "A".
88 sub-func value "S".
01 days-count pic 9(03).
01 output-date.
03 output-year pic 9999.
03 output-month pic 99.
03 output-day pic 99.
procedure division.
main-para.
accept output-date from date.
display output-date
display 'MUF' upon ws-env-var.
accept ws-muf-id from ws-env-value.
display 'MUF value is ' ws-muf-id.
open output ws-infile.
display 'File status is ' WS-INFILE-SW.
move 'Test file records' to INP-EMP-REC
write inp-emp-rec.
IF NOT WS-INFILE-SUCESS
display 'Error Writing File record, File Status :'
display WS-INFILE-SW
END-IF.
close ws-infile.
main-exit.
exit program.
end program datepgm.
Executed From Powershell:
PS C:\\temp> $env:FILEPATH = 'C:\\temp\\Sample.txt'
$env:MUF = 'PR'
& "C:\\Users\\Trainee\\VSProjects\\MFTestBatchPgm\\MFTestBatchPgm\\bin\\Debug\\InventoryPrograms.exe"
160909
MUF value is PR
File status is 00
PS C:\\temp> ls
Directory: C:\\temp
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 9/8/2016 3:24 PM 662 MFUT_DATE01-report.txt
-a--- 9/8/2016 3:23 PM 9216 MFUT_DATE01.dll
-a--- 9/7/2016 2:25 PM 664 mfut_datechk-report.txt
-a--- 9/6/2016 1:49 PM 12288 MFUT_DATECHK.dll
-a--- 9/8/2016 5:23 PM 1060 MFUT_DATEPGM-report.txt
-a--- 9/8/2016 5:19 PM 11776 MFUT_DATEPGM.dll
-a--- 9/8/2016 4:11 PM 970 MFUT_DATEPGM.dll.config
-a--- 9/9/2016 11:07 AM 500 Sample.txt
PS C:\\temp>
Executed from MF Unit test Framework:
I have set those variables in the App.config file and have copied that file in \\temp folder where my .dll is present
C:\\Users\\Trainee\\Documents>cd \\temp
C:\\temp>mfurunil MFUT_DATEPGM.dll
Micro Focus COBOL - mfurunil Utility
Unit Testing Framework for Windows/.Net/32
Options : verbose=false,process=single,junit=false,printfile=true
Fixture filename : MFUT_DATEPGM.dll
Test Run Summary
Overall Result : Passed
Tests run : 1
Tests passed : 1
Tests failed : 0
Total execution time : 57
Output Report:
Test case : MFUT_DATEPGM
Status : Completed / Passed
Time taken in ms : 000000057
Return Code : 000000000
Console output :
00160909
MUF value is
File status is 00
It has created an output but with incorrect name as FILEPATH as Type – File in the directory C:\\temp
Hi All ,
Does Unit Test Framework only works for Native Cobol codes ?
I tried using mfurun for Managed COBOL codes but i am unable to execute the scripts.
What are the other limitations ?
Can i used on Character based screens ?
MUF value is not displayed and Output file name created is incorrect
Hi All ,
Does Unit Test Framework only works for Native Cobol codes ?
I tried using mfurun for Managed COBOL codes but i am unable to execute the scripts.
What are the other limitations ?
Can i used on Character based screens ?
MUF value is not displayed and Output file name created is incorrect
Hi All ,
Does Unit Test Framework only works for Native Cobol codes ?
I tried using mfurun for Managed COBOL codes but i am unable to execute the scripts.
What are the other limitations ?
Can i used on Character based screens ?
The problem is that you are setting your environment variables in an app.config file. app.config files are only processed when starting an .exe and are not processed when starting a .dll which is the required format for the Unit Testing framework.
You will therefore have to set your environment variables using a different mechanism prior to running your unit test, either within the computers environment or within a .bat file, etc.
Hi All ,
Does Unit Test Framework only works for Native Cobol codes ?
I tried using mfurun for Managed COBOL codes but i am unable to execute the scripts.
What are the other limitations ?
Can i used on Character based screens ?
Thanks Chris . I am able to run my Unit Tests now.
I have tried both the ways of setting the variables.
Hi All ,
Does Unit Test Framework only works for Native Cobol codes ?
I tried using mfurun for Managed COBOL codes but i am unable to execute the scripts.
What are the other limitations ?
Can i used on Character based screens ?
If you create a support incident for this and put my name in the description, I will create an enhancement request for a feature to allow easier configuration of environment variables, etc when running under the Unit Test framework, perhaps a side file that can be read.
Thanks
Hi All ,
Does Unit Test Framework only works for Native Cobol codes ?
I tried using mfurun for Managed COBOL codes but i am unable to execute the scripts.
What are the other limitations ?
Can i used on Character based screens ?
I have asked Support Line to raise an incident
Hi All ,
Does Unit Test Framework only works for Native Cobol codes ?
I tried using mfurun for Managed COBOL codes but i am unable to execute the scripts.
What are the other limitations ?
Can i used on Character based screens ?
I have not yet seen an incident come through for this. Do you have an incident number that I could reference?
Hi All ,
Does Unit Test Framework only works for Native Cobol codes ?
I tried using mfurun for Managed COBOL codes but i am unable to execute the scripts.
What are the other limitations ?
Can i used on Character based screens ?
Nopes Chris . I have not got any response on my email to Support Line.
Hi All ,
Does Unit Test Framework only works for Native Cobol codes ?
I tried using mfurun for Managed COBOL codes but i am unable to execute the scripts.
What are the other limitations ?
Can i used on Character based screens ?
Nopes Chris . I have not got any response on my email to Support Line.
Hi All ,
Does Unit Test Framework only works for Native Cobol codes ?
I tried using mfurun for Managed COBOL codes but i am unable to execute the scripts.
What are the other limitations ?
Can i used on Character based screens ?
Please email me directly at chris.glazier@microfocus.com and provide me with your serial number and name and I will go ahead and create an incident for you.
Thanks.
Hi All ,
Does Unit Test Framework only works for Native Cobol codes ?
I tried using mfurun for Managed COBOL codes but i am unable to execute the scripts.
What are the other limitations ?
Can i used on Character based screens ?
I am using Trial version for VS2015 , thats why support has not provided me any incident no.
Hi All ,
Does Unit Test Framework only works for Native Cobol codes ?
I tried using mfurun for Managed COBOL codes but i am unable to execute the scripts.
What are the other limitations ?
Can i used on Character based screens ?
OK, I will go ahead and create an internal enhancement request for this feature so we can try to get it into a future product release.
Thanks.
Hi All ,
Does Unit Test Framework only works for Native Cobol codes ?
I tried using mfurun for Managed COBOL codes but i am unable to execute the scripts.
What are the other limitations ?
Can i used on Character based screens ?
Thanks
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.