IBM Z and LinuxONE Software

Software

Software

In order to compete you have to be trusted. System software delivers high-performing system and database management, faster insights, secure cloud and agile DevOps, plus the reliability, flexibility and protection you expect from the mainframe.

 View Only
  • 1.  zUNIT - Question about how it works behind the scenes

    Posted Fri July 08, 2022 09:32 AM
    Hello all !
    Hope this is the right forum to write my doubt ...
    I'm studding the possibility of implementing the use of zUNIT in order to automate the unit test in my shop !
    One doubt that I've and reading the manual I couldn't figure out is, how zUNIT works in order to be possible to make the unit test before the deployment of the program in the environment ?
    Can someone help me to understand its mechanism ? Let's imagine that I've a CICS program with DB2; In order to test the modification I will need to compile, bind it and give a newcopy on the environment....
    If with zUNIT, I can test it before deploy it on the env. how it is possible for zUNIT to test the modification without the new BIND and NEWCOPY ?

    Thank you in advance !
    Best Regards

    ------------------------------
    Joao Carvalho
    ------------------------------


  • 2.  RE: zUNIT - Question about how it works behind the scenes

    Posted Mon July 11, 2022 12:27 PM
    Hello Joao,    We're excited to hear of your interest in ZUnit.  ZUnit is a framework that will greatly simplify Unit Testing z/OS applications.  In unit testing, developers test smaller segments of the application such as a procedure. A developer can use ZUnit to create reusable unit tests. An example may work best to address your question.  The way it works is the developer executes the code they with to test using the full middleware stack (in your case CICS and DB2)  and ZUnit records the execution, and captures the test(s) ,call it Test1, which is now a reusable test. Using ZUnit, Test1 can now be executed in batch on any z/OS LPAR where the Dynamic Test Runner (DTR is the component that enables the tests to be recorded and executed)  is active  as the middleware (CICS and DB2) is no longer required to run Test1!  Next for example the developer has to change the program under test, so they update the program, recompile and create the executable.  If using DBB (Dependency Based Build), Test1 is automatically rebuilt with the updated program. The developer  again uses ZUnit to execute the test in batch on any z/OS LPAR  (where DTR is active) and can quickly determine if the test results are successful. Again neither CICS nor DB2 is required to run the test!   We hope this response addresses your question.   Feel free to take our Ztrial and try ZUnit!

    ------------------------------
    Kim Bailey
    ------------------------------



  • 3.  RE: zUNIT - Question about how it works behind the scenes

    Posted Tue July 12, 2022 05:59 AM
    Hi Kim, thanks for the return!
    So, when you say that "... Using ZUnit, Test1 can now be executed in batch on any z/OS LPAR where the Dynamic Test Runner (DTR is the component that enables the tests to be recorded and executed)  is active  as the middleware is active  as the middleware (CICS and DB2) is no longer required to run Test1! ...." it means that what will simulate the CICS and DB2 will be the DTR ?
    Sorry but it is not yet clear to me :) ; It makes confusion in my head trying to understand how zUNIT simulates the access to a DB2 table ....


    Best Regards,
    joao


    ------------------------------
    Joao Carvalho
    ------------------------------



  • 4.  RE: zUNIT - Question about how it works behind the scenes

    Posted Wed July 13, 2022 07:44 AM
    Hi Joao,   When the Dynamic Test Runner (DTR) records the test, it stubs-out the invocations (calls) to the subsystems (CICS, DB2, etc) so that is why when Test1 runs again it can run in batch without the middlware (CICS or DB2).  Apologies I should have clarified that in my first response.  Feel freed to message or email me for any questions.

    ------------------------------
    Kim Bailey
    ------------------------------



  • 5.  RE: zUNIT - Question about how it works behind the scenes

    Posted Wed August 03, 2022 11:00 AM
    Hi Kim, 
    thank you very much for the information; it helped a lot ! 
    We'll move forward with zUNIT installation

    ------------------------------
    Joao Carvalho
    ------------------------------