← Back to team overview

ubuntu-phone team mailing list archive

Re: preferred test framework for C++ backends?

 

Hey Alex,




On Sat, Aug 9, 2014 at 12:42 AM, Alex Chiang <achiang@xxxxxxxxxxxxx> wrote:

> Hi,
>
> I'm seeking an opinion for which testing framework to use in a
> Qt-flavored C++ library.
>
> I've seen some Ubuntu phone projects use GTest, such as
> lp:unity-scope-click and lp:ubuntu-download-manager.
>
> Are there any that use QtTest?
> ​
>
​
I'm pretty sure some are using QtTest. However, while the testing-specific
functionality in terms of assertions and expectations is roughly the same,
Google Mock offers powerful additional features on top of Google Test.
There used to be a mocking framework for Qt, too, but it seems to be
abandoned (last commit 3 years ago).

​
>
> TBH, the two frameworks seem fairly similar in functionality, so this
> seems more like a social issue than a technology issue.
>
> We don't have any special requirements. We just want to do what is
> most popular and whatever the platform recommends, in order to
> minimize the friction for potential outside developers to contribute
> to our code.
> ​
>
​
Our own internal projects are heavy consumers of GTest and GMock. Two
examples of sophisticated test suites:

  *
http://bazaar.launchpad.net/~unity-team/unity-scopes-api/trunk/files/head:/test/gtest/scopes/
  * http://bazaar.launchpad.net/~mir-team/mir/utopic/files/head:/tests/

Feel free to reach out to me on IRC and I can help out in bootstrapping
your testing efforts.

Cheers,

  Thomas
​

> ​
>
> Thanks.
>
> --
> Mailing list: https://launchpad.net/~ubuntu-phone
> Post to     : ubuntu-phone@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~ubuntu-phone
> More help   : https://help.launchpad.net/ListHelp
>

References