Menu

Need some assistance getting RPGUnit running

Help
2008-10-31
2013-01-24
  • Wesley Choate

    Wesley Choate - 2008-10-31

    I have installed RPGUnit and everything seems to work fine.  But when I look at the RPGUNIT output in my spool file, the report from running the test program says the following:

    *** Tests from TESTPGM03 ***                           
    Success. 2 test cases, 0 assertion, 0 failure, 0 error.

    Then I tried the tutorial and get this report.

    *** Tests from SUMBYCUSTT ***                            
    Success. 1 test case, 0 assertion, 0 failure, 0 error.   

    Now after trying some debugging, it seems that when the RPGUNIT is getting the list of procedures to execute, the list is empty.  It gets a count (as indicated above) but the actual list does not seem populated.

    We are running V5R4 on my system.  So I hope that is not the problem.  But I do not know where to go with this...and not sure anyone is watching this forum anymore.  I do hope someone is though.

    Thanks!

     
    • Buck Calabro

      Buck Calabro - 2008-10-31

      I haven't looked at the guts in a long while but it almost sounds as though you haven't any assertions in your test jig.  I'm running V5R4 and have no issues.  Here's an example that comes from working code.  I declare the procedure name (the test) based on the procedure I'm trying to test and then I'm using assert() to verify that my tests meet their goal.

           h NoMain

            /copy rpgunit1,testcase

           dtest...
           d getNameSuf      pr

           ptest...
           p getNameSuf      b                   export
           d                 pi

               inputName    = 'John A Smith, MS.ED.';
               expectedFull = 'John A Smith';
               expectedSuf  = 'MSED';
               actualSuf = getNameSuf(inputName: actualFull);
               assert(getNameSuf(inputName: actualFull) = expectedSuf:
                 inputName);

      Hope this helps...
        --buck

       
    • lacton

      lacton - 2008-11-02

      What do you get when you try the last step in the installation procedure?

      http://www.rpgunit.org/install.html

      CRTBNDCL PGM(YOURLIB/MKRPGUNITT) SRCFILE(YOURLIB/RPGUNITT1)
      SBMJOB CMD(CALL PGM(YOURLIB/MKRPGUNITT) PARM(QTEMP)) JOB(MKRPGUNITT)

      Regards.

       
    • Buck Calabro

      Buck Calabro - 2008-11-04

      FWIW, my RPGUNIT works great when I write my own assert() but it fails MKRPGUNITT.  I don't have any problems and I'm sort of in the middle of a heavy workload so I don't have time to chase it down at the moment, but I thought I'd relay that to you.  Very nice work, thanks!

       
      • lacton

        lacton - 2008-11-05

        If you eventually find out the root cause for this strange behavior, I would be most interested.

        And thank you for using RPGUnit.

         

Log in to post a comment.