Hi Ralph,
Thanks for the link, this is useful! I will take a look how to use this for other testing libraries.
With regard to base tests, I have indeed tried writing unit tests with the epicsUnitTest.h but one quirk I could not understand is why I have to count up all
the asserts and add that number to the testPlan as an argument.
Do people run a script to count them or do you simply run it once to fail and then use that number?
It wasn’t a big issue, it is just a bit more overhead compared to other testing libraries.
I was also interested in using other output formats for reporting. I know epics-base can write junit files but I wanted something a bit finer grained, which I
can get with other libraries.
Kind regards,
Tom
From: Tech-talk <tech-talk-bounces at aps.anl.gov>
On Behalf Of Ralph Lange via Tech-talk
Sent: Tuesday, September 7, 2021 12:44 PM
To: EPICS Tech Talk <tech-talk at aps.anl.gov>
Subject: Re: Unit testing IOCs and databases
- Has anyone tried using other libraries, such as google test, Catch2, doctest,… to do unit testing in EPICS? If so, how can I set this up with the EPICS build system?
Base also has its own testing framework (standard C). The tests inside Base are probably the best example for that.