Project

General

Profile

Testing with ctest/cdash

Added by Sean Lynch about 13 years ago

I'm wondering what is the best way to test a Wt application.

I use CMake with CTest to test and build libraries I've written in c and I upload the results to a CDash server that I run. This is quite nice as it allows easy viewing of experimental, nightly, and continuous integration builds.

I'm somewhat confused however as to how I would test an application written in Wt. For a library it's easy to write tests that cover all functionality of the library, but how do I do this for a Wt web application - especially when it comes to user interaction with the app?

Does anyone have experience with CTest/CDash in this regard? Any ideas, comments, experience, etc. would be appreciated.


Replies (1)

RE: Testing with ctest/cdash - Added by Wim Dumon about 13 years ago

Hello,

Wt widgets cannot be simply instantiated and tested - often you need a WApplication object. But a WApplication object cannot exist without a WEnvironment, so we added a (configurable) WTestEnvironment for the purpose of testing. You can then use whatever test framework you like to develop your test cases.

See http://www.webtoolkit.eu/wt/doc/reference/html/classWt_1_1Test_1_1WTestEnvironment.html

Best regards,

Wim.

    (1-1/1)