Page 1 of 1

AJAX for simpletest?

Posted: Sun Aug 14, 2005 1:00 pm
by nielsene
Now I know absolutely nothing about AJAX, but it seems there might be some benefit in making a TestRunner, or test front end using it. For instance with the test GUI (in one of te lost threads) it would allow for updating percent complete. It could also be useful for running the test cases in seperate script environments and avoiding timeout issues?

Just a random thought....

Posted: Sun Aug 14, 2005 4:14 pm
by McGruff
I think there might have been some discussion related to this on the SimpleTest mailing list. Personally I'm a luddite when it comes to js. Some people (myself included) have it turned off by default making it rather useless. I haven't a clue how you would test a page which uses js.

Firefox has a nice feature (maybe it's an add-on, forget now) where js is blocked by default but can be allowed per session and/or per site.

Posted: Sun Aug 14, 2005 4:26 pm
by nielsene
I agree about having JS turned off, I have it off on almost every site I visit, but I was asking about its applicibility in helping create a more useful client for use in Unit-Testing. Not using simpletest to test JS code.

Posted: Sun Aug 14, 2005 4:50 pm
by stryderjzw

Posted: Mon Aug 15, 2005 11:12 am
by nielsene
Is that FF only? I use Safari at home and it didn't seem to do anything, but then again, I'm clueless about XUL.

Posted: Mon Aug 15, 2005 11:33 am
by timvw
There is: http://www.edwardh.com/jsunit/.. Meaby it will get to work together with simpletest one day..
http://www.sitepoint.com/forums/showpos ... stcount=42

Posted: Mon Aug 15, 2005 11:36 am
by nielsene
Again, I'm not asking about tools to test JS. I was asking if JS or AJAX or whatever looking promising as something to help improving the User Interface to running test cases built with SimpleTest via the standard HtmlReporter.

Posted: Mon Aug 15, 2005 7:09 pm
by stryderjzw
I'm not sure if it's Firefox only. I use Firefox and it works, and have not tried it on any other browser.

I think the developer sometimes checks in on the Sitepoint forums... maybe a search there will help.

Posted: Mon Aug 15, 2005 7:15 pm
by feyd
last I remember, XUL is Mozilla stuff only...

Posted: Tue Aug 16, 2005 5:15 am
by timvw
I don't think it will allow one to avoid time-out issues, as the tests still need to be run by php, so i'm not seeing advantages right now.

I think it's going to be easier if one uses the xmlreporter instead of htmlreporter. It should make the request/recieve/display with javascript (and xmlhttp) a little more straightforward.

Posted: Tue Aug 16, 2005 10:04 am
by nielsene
Well currently none of my tests are too long, but the combination of all of them will hit the timeout. Was thinking that an AJAX version could somehow aggregate the results and show a nice tracking green bar as progress is made, while handing new page requests behind the scenes to keep the timeouts reasonable.