Unit test for multi processes applications



  • Hello all,

    I am currently looking for the good way to unit test an application (exactly it's a framework) that uses a multi processes approach.

    Does anyone know a good way/good framework to unit test such an application ?

    Thank you in advance!


  • Lifetime Qt Champion

    Hi,

    Can you describe what your framework does more precisely ?



  • Hello,

    The framework mainly starts processes (either on creation or on demand) and manages these processes. These processes are internal applications with different aims. Some of these application also can start another processes and manage them.

    Those applications communicate together using an IPC implementation (either with a QLocalServer/QLocalSocket or with TCP/IP).

    I would like to unit test:

    • Our IPC implementation
    • Our processes management system

    Thank you a lot in advance!


  • Lifetime Qt Champion

    The Qt Test Framework might be enough for your needs.



  • Hi @mistralegna,

    As @SGaist suggested, you can use the Qt Test Framework (just as you could use any other decent test framework).

    I would like to unit test:

    • Our IPC implementation
    • Our processes management system

    Since you're asking about unit testing here, not integration testing, I'd suggest that you mock out the "internal applications" with very simple Qt-based versions that the unit test application can then communicate with.

    Happy to expand on that if you like. If so, perhaps give us one example of an IPC request that would be tested, otherwise I'd just make up some "helloworld" scenario.

    Cheers.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.