Discussion:
Question about SimpleTest
Giulio Cesare Solaroli
2009-02-25 09:01:55 UTC
Permalink
Hello,

I have a question about SimpleTest, and I dare to post it here as
MochiKit is the only tool that I know of using it.

We are using SimpleTest for testing our own project, but we have now
grown a little bit too much in order to keep stuff under control.
In order to keep everything in order, I would love to be able to call
test suites recursively; that is, being able to include in the
TestRunner.runTests list an html file that has a call to
TestRunner.runTests in it.

This will allow me to have a top level index.html test file, that
would only list the subprojects index.html test files.

Is there any way you are aware of to handle this scenario?

Thanks for your attention.

Regards,

Giulio Cesare

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "MochiKit" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to mochikit+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/mochikit?hl=en
-~----------~----~----~----~------~----~------~--~---
Per Cederberg
2009-02-25 18:54:59 UTC
Permalink
Interesting that you're using SimpleTest! It is on my not-so-secret
agenda for 1.5 to merge that into MochiKit.Test and create a public
API for JS testing.

To answer your question -- I think the tests/index.html file in the
MochiKit distribution does this. It might not be all that elegant
though.

Be sure to let me know if you have any ideas regarding creating an
improved testing API.

Cheers,

/Per

On Wed, Feb 25, 2009 at 10:01 AM, Giulio Cesare Solaroli
Post by Giulio Cesare Solaroli
Hello,
I have a question about SimpleTest, and I dare to post it here as
MochiKit is the only tool that I know of using it.
We are using SimpleTest for testing our own project, but we have now
grown a little bit too much in order to keep stuff under control.
In order to keep everything in order, I would love to be able to call
test suites recursively; that is, being able to include in the
TestRunner.runTests list an html file that has a call to
TestRunner.runTests in it.
This will allow me to have a top level index.html test file, that
would only list the subprojects index.html test files.
Is there any way you are aware of to handle this scenario?
Thanks for your attention.
Regards,
Giulio Cesare
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "MochiKit" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to mochikit+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/mochikit?hl=en
-~----------~----~----~----~------~----~------~--~---
Giulio Cesare Solaroli
2009-02-26 00:35:20 UTC
Permalink
Hello Per,
Post by Per Cederberg
Interesting that you're using SimpleTest! It is on my not-so-secret
agenda for 1.5 to merge that into MochiKit.Test and create a public
API for JS testing.
Interesting; but SimpleTest is quite fine for my current needs
Post by Per Cederberg
To answer your question -- I think the tests/index.html file in the
MochiKit distribution does this. It might not be all that elegant
though.
Nope. The tests/index.html files invoke the TestRunner.runTests method
on a list of "regular" html test files.

What I need is a way to create a tests/index.html test suite, that
could include a call to (for example) tests/module1/index.html; where
the later file is structured just like the former.
Post by Per Cederberg
Be sure to let me know if you have any ideas regarding creating an
improved testing API.
At the moment our testing needs are fulfilled by SimpleTest api. The
only problem we have, is that sometimes tests fail silently, and if
you don't know the correct number of expected tests, you may miss some
errors. :-(

But this is just an implementation issue.

Regards,

Giulio Cesare

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "MochiKit" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to mochikit+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/mochikit?hl=en
-~----------~----~----~----~------~----~------~--~---
Giulio Cesare Solaroli
2009-03-30 12:39:20 UTC
Permalink
Hello Per,

I have been able to hack the SimpleTest.TestRunner code in order to be
"recursive", that is I can now have a TestRunner load other
TestRunners and not just SimpleTests as in the current code.

I still have a strange problem with Firefox 3.08 where the number of
successful tests reported is sometimes wrong, but otherwise it works
fine.

Attached you can find my updated version of TestRunner.js and
SimpleTest.js, in case anyone is interested.

Regards,

Giulio Cesare





On Thu, Feb 26, 2009 at 2:35 AM, Giulio Cesare Solaroli
Post by Giulio Cesare Solaroli
Hello Per,
Post by Per Cederberg
Interesting that you're using SimpleTest! It is on my not-so-secret
agenda for 1.5 to merge that into MochiKit.Test and create a public
API for JS testing.
Interesting; but SimpleTest is quite fine for my current needs
Post by Per Cederberg
To answer your question -- I think the tests/index.html file in the
MochiKit distribution does this. It might not be all that elegant
though.
Nope. The tests/index.html files invoke the TestRunner.runTests method
on a list of "regular" html test files.
What I need is a way to create a tests/index.html test suite, that
could include a call to (for example) tests/module1/index.html; where
the later file is structured just like the former.
Post by Per Cederberg
Be sure to let me know if you have any ideas regarding creating an
improved testing API.
At the moment our testing needs are fulfilled by SimpleTest api. The
only problem we have, is that sometimes tests fail silently, and if
you don't know the correct number of expected tests, you may miss some
errors. :-(
But this is just an implementation issue.
Regards,
Giulio Cesare
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "MochiKit" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to mochikit+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/mochikit?hl=en
-~----------~----~----~----~------~----~------~--~---
Per Cederberg
2009-03-30 18:55:30 UTC
Permalink
Thanks for the updated code Guilio! I'll have a look at it later on
and get back to you.

I'm currently a bit absent from MochiKit-related work, but I'll be
back in a month or two I hope. Like most other people lurking around
here it seems that I'm working on one or two projects too many... :-)

Cheers,

/Per

On Mon, Mar 30, 2009 at 2:39 PM, Giulio Cesare Solaroli
Post by Giulio Cesare Solaroli
Hello Per,
I have been able to hack the SimpleTest.TestRunner code in order to be
"recursive", that is I can now have a TestRunner load other
TestRunners and not just SimpleTests as in the current code.
I still have a strange problem with Firefox 3.08 where the number of
successful tests reported is sometimes wrong, but otherwise it works
fine.
Attached you can find my updated version of TestRunner.js and
SimpleTest.js, in case anyone is interested.
Regards,
Giulio Cesare
On Thu, Feb 26, 2009 at 2:35 AM, Giulio Cesare Solaroli
Post by Giulio Cesare Solaroli
Hello Per,
Post by Per Cederberg
Interesting that you're using SimpleTest! It is on my not-so-secret
agenda for 1.5 to merge that into MochiKit.Test and create a public
API for JS testing.
Interesting; but SimpleTest is quite fine for my current needs
Post by Per Cederberg
To answer your question -- I think the tests/index.html file in the
MochiKit distribution does this. It might not be all that elegant
though.
Nope. The tests/index.html files invoke the TestRunner.runTests method
on a list of "regular" html test files.
What I need is a way to create a tests/index.html test suite, that
could include a call to (for example) tests/module1/index.html; where
the later file is structured just like the former.
Post by Per Cederberg
Be sure to let me know if you have any ideas regarding creating an
improved testing API.
At the moment our testing needs are fulfilled by SimpleTest api. The
only problem we have, is that sometimes tests fail silently, and if
you don't know the correct number of expected tests, you may miss some
errors. :-(
But this is just an implementation issue.
Regards,
Giulio Cesare
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "MochiKit" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to mochikit+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/mochikit?hl=en
-~----------~----~----~----~------~----~------~--~---
Giulio Cesare Solaroli
2009-03-31 16:30:25 UTC
Permalink
If anybody is interested, I have also added a total at the bottom of
the TestRunner summary with number of total test passed and failed.
Very rewarding to see when the number of tests grows!! :-)

Giulio Cesare
Post by Per Cederberg
Thanks for the updated code Guilio! I'll have a look at it later on
and get back to you.
I'm currently a bit absent from MochiKit-related work, but I'll be
back in a month or two I hope. Like most other people lurking around
here it seems that I'm working on one or two projects too many... :-)
Cheers,
/Per
On Mon, Mar 30, 2009 at 2:39 PM, Giulio Cesare Solaroli
Post by Giulio Cesare Solaroli
Hello Per,
I have been able to hack the SimpleTest.TestRunner code in order to be
"recursive", that is I can now have a TestRunner load other
TestRunners and not just SimpleTests as in the current code.
I still have a strange problem with Firefox 3.08 where the number of
successful tests reported is sometimes wrong, but otherwise it works
fine.
Attached you can find my updated version of TestRunner.js and
SimpleTest.js, in case anyone is interested.
Regards,
Giulio Cesare
On Thu, Feb 26, 2009 at 2:35 AM, Giulio Cesare Solaroli
Post by Giulio Cesare Solaroli
Hello Per,
Post by Per Cederberg
Interesting that you're using SimpleTest! It is on my not-so-secret
agenda for 1.5 to merge that into MochiKit.Test and create a public
API for JS testing.
Interesting; but SimpleTest is quite fine for my current needs
Post by Per Cederberg
To answer your question -- I think the tests/index.html file in the
MochiKit distribution does this. It might not be all that elegant
though.
Nope. The tests/index.html files invoke the TestRunner.runTests method
on a list of "regular" html test files.
What I need is a way to create a tests/index.html test suite, that
could include a call to (for example) tests/module1/index.html; where
the later file is structured just like the former.
Post by Per Cederberg
Be sure to let me know if you have any ideas regarding creating an
improved testing API.
At the moment our testing needs are fulfilled by SimpleTest api. The
only problem we have, is that sometimes tests fail silently, and if
you don't know the correct number of expected tests, you may miss some
errors. :-(
But this is just an implementation issue.
Regards,
Giulio Cesare
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "MochiKit" group.
To post to this group, send email to ***@googlegroups.com
To unsubscribe from this group, send email to mochikit+***@googlegroups.com
For more options, visit this group at http://groups.google.com/group/mochikit?hl=en
-~----------~----~----~----~------~----~------~--~---

Continue reading on narkive:
Loading...