Testing an opencoweb app

34 views
Skip to first unread message

Sven

unread,
Oct 10, 2011, 4:48:28 PM10/10/11
to opencoweb
Hi.

I am working on an application, where users can draw graphical objects
an I'm wondering what's the best way to write unit tests for the
collaboration functions.

I looked into d.o.h. from the dojo project, but as I understand it
it's only possible to run tests, which involve only one javascript
environment in one browser. But for an opencoweb app it is necessary
to test if the action of one user is transmitted correctly to the
other clients and if the objects there are manipulated correctly
because of this action. This involves multiple browser environments.
With which testing framework is this possible? Any ideas? I think it's
kind of important to write comprehensive tests for a collaborative
app, as these apps tend to become pretty complicated and involve
multiple users/clients.

bou...@logicalcognition.com

unread,
Oct 20, 2011, 10:44:36 AM10/20/11
to opencoweb
Hi Sven:

Not sure if you got my email, so I'll re-post here:

For JS testing, I'd highly suggest the qUnit framework, found at
http://docs.jquery.com/QUnit . As the site implies, it's jQuery-
managed, yet framework-independent test suite that supports many
powerful functions. The documentation is fairly simple. For some coweb-
specific examples that may be a little more in-depth than you need,
some qUnit tests exist for a basic text editor we did at
https://github.com/opencoweb/cowebx/tree/master/cowebx-widgets/cowebx-widgets-dojo/src/main/webapp/BasicTextareaEditor/test
. We successfully use the qUnit framework to imitate multiple browser
environments, sessions, and users concurrently, and rip through tests
accordingly.

Don't hesitate to ask for any further help in testing using qUnit or
anything else with OCW.
Reply all
Reply to author
Forward
0 new messages