• 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

Prototype+Scriptaculous Book Authors: Question about tests

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Dave Crane, Bear Bibeault & Tom Locke

First of all, welcome and congratulations for the new book.

Are you covering Scriptaculous' Javascript Unit Testing Library in the Book? If so, how do you think would be the best way to simulate a user event in a Javascript unit test? Is it possible to create a stubbed version of Prototype's Event object to be used in a Unit Test?

Thanks!
 
author
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Danilo,

No, we don't cover the testing framework in the book - too much else going on in those libraries, even with 500-odd pages!

Testing UI events is always problematic. You could create a stub Event object, but my feeling is you'd be stubbing away the place where 90% of the errors would crop up in production, namely the browser's implementation of Event.

Might be worth having a look at the Selenium testing tools. Someone showed me a firefox plugin for these the other day that allows you to record GUI tests within the browser. Not perfect - I don't think you can replay the tests in other browsers - but it's a step in the right direction.

HTH

Dave
 
I'd appreciate it if you pronounced my name correctly. Pinhead, with a silent "H". Petite ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic