Thread

  1. plpgsql unit testing and code coverage

    Joao Miguel Ferreira <joao.miguel.c.ferreira@gmail.com> — 2020-12-31T12:20:52Z

    Hello,
    
    I'm a fan of unit testing and related matters but have used it only on
    client applications, not on database implemented logic. I recently joined a
    project whit dozens of PL functions and procedures.
    
    So, it would be great for me to find a way to execute unit tests on those
    functions and procedures and, even better, if I can get code coverage
    results from it. I really enjoy approaching sw development with these tools.
    
    I'dd appreciate your feedback
    
    Thank you
    Joao
    
  2. Re: plpgsql unit testing and code coverage

    Philip Semanchuk <philip@americanefficient.com> — 2020-12-31T13:52:43Z

    
    > On Dec 31, 2020, at 7:20 AM, Joao Miguel Ferreira <joao.miguel.c.ferreira@gmail.com> wrote:
    > 
    > Hello,
    > 
    > I'm a fan of unit testing and related matters but have used it only on client applications, not on database implemented logic. I recently joined a project whit dozens of PL functions and procedures.
    > 
    > So, it would be great for me to find a way to execute unit tests on those functions and procedures and, even better, if I can get code coverage results from it. I really enjoy approaching sw development with these tools.
    > 
    > I'dd appreciate your feedback
    
    Hi Joao,
    Are you familiar with pgTAP? (https://pgtap.org) It gives you some of what you want, but I don’t think it handles coverage.
    
    Cheers
    Philip
    
    
    
  3. Re: plpgsql unit testing and code coverage

    Pavel Stehule <pavel.stehule@gmail.com> — 2020-12-31T15:24:35Z

    čt 31. 12. 2020 v 13:21 odesílatel Joao Miguel Ferreira <
    joao.miguel.c.ferreira@gmail.com> napsal:
    
    > Hello,
    >
    > I'm a fan of unit testing and related matters but have used it only on
    > client applications, not on database implemented logic. I recently joined a
    > project whit dozens of PL functions and procedures.
    >
    > So, it would be great for me to find a way to execute unit tests on those
    > functions and procedures and, even better, if I can get code coverage
    > results from it. I really enjoy approaching sw development with these tools.
    >
    
    try to look on https://github.com/okbob/plpgsql_check
    
    Regards
    
    Pavel
    
    
    > I'dd appreciate your feedback
    >
    > Thank you
    > Joao
    >
    >
    
  4. Re: plpgsql unit testing and code coverage

    Joao Miguel Ferreira <joao.miguel.c.ferreira@gmail.com> — 2021-01-01T11:36:34Z

    Hi Philip and Pavel,
    
    Thank you for your contributions. Both seem very interesting :) I will look
    into it
    
    Happy New Year
    Cheers
    jmf
    
    
    On Thu, Dec 31, 2020 at 3:25 PM Pavel Stehule <pavel.stehule@gmail.com>
    wrote:
    
    >
    >
    > čt 31. 12. 2020 v 13:21 odesílatel Joao Miguel Ferreira <
    > joao.miguel.c.ferreira@gmail.com> napsal:
    >
    >> Hello,
    >>
    >> I'm a fan of unit testing and related matters but have used it only on
    >> client applications, not on database implemented logic. I recently joined a
    >> project whit dozens of PL functions and procedures.
    >>
    >> So, it would be great for me to find a way to execute unit tests on those
    >> functions and procedures and, even better, if I can get code coverage
    >> results from it. I really enjoy approaching sw development with these tools.
    >>
    >
    > try to look on https://github.com/okbob/plpgsql_check
    >
    > Regards
    >
    > Pavel
    >
    >
    >> I'dd appreciate your feedback
    >>
    >> Thank you
    >> Joao
    >>
    >>