English 中文(简体)
testing source application in qooxdoo
原标题:

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?

最佳回答

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

问题回答

暂无回答




相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签