• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Learning Dojo: dojo custom widgets, unit testing, tellurium

 
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do you cover how to create custom widgets in Dojo and also how to unit test them. Do you talk about any unit testing frameworks to test custom widgets?

The reason I ask is, we have been working on open source Tellurium Automated Testing Framework (http://code.google.com/p/aost/ ) using Selenium and Groovy. We have created a test for Dojo' date picker widget. Its also really easy to create tests for other widgets too. Just curious if there is another unit testing framework.

Thanks in advance,
Vivek
 
Author
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Vivek,
Good work on the widget there. I haven't used the tsting framework you mention, but I cover very much how to make custom widgets, yes

I also mention DOH, which is Dojo's own unit testing system. Links here:

http://dojotoolkit.org/book/dojo-book-0-9/part-4-meta-dojo/d-o-h-unit-testing

http://www.sitepen.com/blog/2008/04/15/unit-testing-custom-code-with-the-dojo-objective-harness/

Cheers,
PS
 
Vivek Mongolu
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the reply. I will check out DOH, but at your convenience check out our Tellurium and let us know how we can improve.

Thanks,
Vivek
 
Peter Svensson
Author
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi again,

I just checked out Tellurium a bit and it seems really comprehensive. DOH is very much more simple 'jUnit'-like unit tests. Recently, some Dojo commiters added a simple UI / Event testing package called Robot which is perhaps similar in intent if not in principle to Tellurium.

Robot is used in two steps; First you include the robot.js script, and activate the listener by a special keypress. All events, mouse moves, clicks and keys pressed, et.c. are then remembered and displayed in a specialwindow at another keypress. This list is copied and pasted into a testfile.

Then the page can be laoded again, with robot.js in test-mode, with the file containing the pasted info as config-file.

This is a very simple way of testing UIs of course, and Tellurium gives muhc more flexibility fromwhat I've seen so far.

Cheers,
PS
 
Vivek Mongolu
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey,

Thanks for checking out Tellurium. We are trying to make testing really robust using Groovy/Selenium/JUnit/TestNG. The only problem for not using is creating the UI model, which is collection of dom elements that you want to run tests on. We are trying to solve this problem. Right now we working on firefox plugin to allow users to click on the elements and convert the elements to the UI Model which they can copy and paste in their Unit test. Hopefully that will drive more users to start using Tellurium framework.

BTW, we use Dojo heavily in our company. Our client side framework is built on Dijit's widget/event/publish/subscribe..


Thanks
Vivek
 
Peter Svensson
Author
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Viveku,

I'm thinking that you could use the doh.robot UI testing from inside Dojo. If you could generate the event-files that robot uses on the server from Tellurium, based on your configuration/Groovy files, it might be a good fit.

Then again, I might not have understood the delineation for Tellurium yet, but it's worth a tought.

Glad to hear that you're using widgetry and the pubsub message bus. It does really help out in tight corners.

Please let me know if you need a hand.

Cheers,
PS
 
I knew that guy would be trouble! Thanks tiny ad!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic