[Interest] Need advice to add tests to an existing project

Xavier Bigand flamaros.xavier at gmail.com
Tue Nov 7 23:50:07 CET 2017


Thank you Christian for answer.

Yes I thought to create a static library of our project, but as we have
many IDE it will be an effort to do that. So I think that I found a better
solution as we already have a special build Developer for us, we can simply
add support of new application command line options to launch it in
automated test mode.

But if I do that will we able to launch tests directly from QtCreator as
suite tests or at least with a new running target (with correct launch
options)?



2017-11-03 23:47 GMT+01:00 Christian Gagneraud <chgans at gmail.com>:

> On 4 November 2017 at 05:12, Xavier Bigand <flamaros.xavier at gmail.com>
> wrote:
> > Hello,
> >
> > I recently added some unit tests to a personal project made with qbs,
> and I
> > am interested to do something similar on my work project.
> >
> >
> > We already have some hand made tests that are launched at start up, it
> start
> > to be not enough and  I am interested to go deeper with better reports
> and a
> > separated binary.
> > But as our project is big, I want to know if there is a way to share .o
> > files between the main project and the tests sub project.
> > Our project is made with qmake and .a pro file, we also use shadow
> builds.
>
> Depending on how many '.o' you want, you could:
> - If it's just a a few: include the header and the cpp unit in your test
> itself.
> - If there are more: bundle all your object in a static library.
>
> Chris
>
> >
> >
> > --
> > Xavier
> >
> > _______________________________________________
> > Interest mailing list
> > Interest at qt-project.org
> > http://lists.qt-project.org/mailman/listinfo/interest
> >
>



-- 
Xavier
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20171107/a76ded94/attachment.html>


More information about the Interest mailing list