How to run all unit-tests on macOS?
-
I want to run all unit-test and get reports at xml format. I use python script to run the unit-test one by one with -xml argument. It's work on Windows OS. But on Mac OS, i haven't figured out a way to include all unit-test executables into a single bundle for deploying purpose before running test.
Anyone have experience to run and get reports for all unit-tests on MacOs? Could you give me a hint ?
I have also see a guide at https://forum.qt.io/topic/93997/qtest-how-to-aggregate-all-my-unit-tests-in-one-main-test . But I know that "QTest encourages you to organize unit tests as separate executables" , So i think this way is not encouraged .
Thanks bro -
@ntt2899 said in How to run all unit-tests on macOS?:
include all unit-test executables into a single bundle
Why do you want to do this? Unit tests are usually build as executables: one unit test unit - one executable.
"deploying purpose" - deploy to where? -
Hi @jsulm
Yes, we use QTDIR/bin/macdeployqt to copy the libraries to the bundle. But in my case, almost the unit-test use same qt libraries. So I want to include all the unit-test executable to a single bundle to deploy one time for all instead of deploying for each unit test bundle.
Actually, i am not sure my solution is right way :( . Please help to correct me.
My purpose, run all unit-tests (~30 test suites) and report at xml format for each test-suite -
@jsulm said in How to run all unit-tests on macOS?:
o you want to deploy unit test executables?!
Because when i run the executables from terminal without using macdeployqt i get a issue"
"dyld: Library not loaded: @rpath/QtCore.framework/Versions/5/QtCore" -
What version of Qt are you using ?
-
Are you using a standard QTest project ?