lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Steve,

On Thu, Aug 4, 2011 at 2:26 AM, steve donovan <steve.j.donovan@gmail.com> wrote:
On Wed, Aug 3, 2011 at 8:37 PM, Ryan Pusztai <rpusztai@gmail.com> wrote:
> I am wondering if anyone has any experience using Orbit [1] and developing
> tests for the created web application? I am looking for some
> general strategy and hoping that it can be done easily. Thanks.

One thing I did with Orbiter was to have a 'test' mode where the app
would spit out the generated HTML, rather than serve it up.

The equivalent for Orbit would be to use wget to grab Orbit pages as
HTML and check that. Would certainly work as a regression test - i.e.
that a page continues to generate exactly the same code as before.

Orbit's htmlification mode is powerful but will output any tags,
spelled correctly or not. E.g. if you typed tabl {...} in a hurry you
would get <tabl ...> tags.  So some kind of HTML verifier would be
useful.

This is a wonderful idea and I really want/need this to work. Can you give me ideas on how to write an Orbit and Orbiter app in the same code. This would allow for local testing using Orbiter, then I use Orbit on the production server to host the released application.

I have tried using Orbiter in Orbit. I found this in the documentation:

Since such widgets could be useful for Orbit programmers as well, I've introduced some bridging code so that Orbit applications can also use Orbiter widgets. Look at the dropdown-orbit.lua example - the key statement is:


module("dropdown_test", package.seeall, orbit.new, html.new)

That is, html.new is another function that gets passed the new module object. Please note that the actual widgets must be loaded after the modulestatement, since they may want to setup some static dispatches. This is somewhat clumsy, and likely to change in later versions: but the point is that the non-core parts of Orbiter can be used by Orbit.

but it did not work at all. I did get your simple example to work, but my complex app did not port at all. Any ideas?
--
Regards,
Ryan