Hi Folks,

Would be great if some people having experience in testing classes required
a server could share their knowhow :)

Within our project, we have a set of classes that required an instance of a
server running to be properly unit tested.

Note that the server can be started easily from a command line, no
installation steps are required.

The ideas are the following:

1) Start the server at the beginning of each unit test / kill it at the end
  => The project depending on Qt, we could use QProcess to start the server
and kill it ...
  => We need to make sure port are unique for each test ( to properly handle
parallel testing and multiple dashboard running at the same time ... ).  We
were thinking to may be rely on an environment variable used as a counter
...

2) -> have a "initialize_server" test in charge of starting the server
     -> run all unit test against the same instance of the server  (all
tests would be run sequentially)
     -> have a "finalize_server" test in charge of killing/stopping the
server: Is there a cross-platform way of stopping a previously started
process in ctest ?


Thanks for your suggestions
Jc

-- 
Phone: 1-518-836-2174
Ext: 304
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to