views:

104

answers:

1

I began to use Qooxdoo the last month so i've got very little experience in its usage. I need to create a test application like the testrunner on the Qooxdoo website, but i need to do tests inside my application environment. I followed these steps:

  • Created the application
  • Compiled the source version with generate.py source
  • Create the test with generate.py test

In this test if i try to access my application it gives me an error because its undefined.

Then reading the documentation on the website i've found that this type of tests must be done using generate.py test-source. But running the index-source.html in the test folder the result is the same: the application is not working.

What is the right way to this? What did I do wrong?

+1  A: 

Using generate.py test or generate.py test-source create a testrunner for you application, like the one you have seen on the qooxdoo website. But your own testrunner contains every test you wrote in the test namespace of your application.

The testrunner is mainly designed for unit tests, which means testing single, small pieces of an application. For example if you have some kind of data manipulating object, you can easily test that by creating on of those objects like you do in the your application code. The same is true for not that small objects like your application. You can create an instance of your application in a unit test and access the methods on that application as well:

var app = new customNamespace.Application();
this.assertTrue(app.yourMethodName());

But if you really need to test the whole application at once, Selenium [1] could be a better choice. qooxdoo offers a users a Selenium user extension for easier handling qooxdoo applications.

[1] http://seleniumhq.org/

[2] http://qooxdoo.org/contrib/project/simulator

Martin Wittemann
Thanks for the answer, so there's no way at the moment to test the entire application using only qooxdoo testrunner
mck89
Sorry i read better your answer and checked out the documentation and now i've understood what should i do. Thank you again.
mck89