I am exploring fant tool today, and I have few questions.
1) The docs indicated that we must orgainzed our tests in the pod. Is this mean I can't run any of the tests without first creating the pod? The fant wont' take a script file as the fan would, which I think it would be helpful if it does. Is this not a desire feature by anyone?
2) Docs didn't indicate this, but is it correct that tests MUST be in the test folder, or just any class in the pod to be consider as test, in regardless which directory they in?
3) Would tests classes packaged in pod for deployment as well? If not how can I package pod to run the tests and then deploy pod without the tests?
4) I would think making sys::Test a mixin type rather than abstract class is more developer friendly. Is there a technical reason not to do so?
Thanks for taking time to answer my questions. I think Fantom thus far is a very practical language, and you guys are doing a great job!
~ Zemian
brianTue 13 Dec 2011
Good questions:
There has been some previous discussion about pulling test runner out and making it more sophisticated - see 1423. But currently you cannot access tests from a script. No one has asked for it to be honest which is somewhat surprising. If everybody is on board, I think it makes sense to allow fant to accept a script filename in addition to current options. Comments?
Putting tests into "test/" is convention only (although with Fantom we try really hard to stick with conventions)
Tests are currently deployed with pods. This is good because they are always there to run fant in production environments. Although it can be bad, especially with regard to JavaScript where download size matters a lot. We have talked about a tool to script test code from a pod, but haven't built anything yet. For some massive tests I actually pulled them out of the pod (testSys, testCompiler).
Mixins are more developer friendly, but they can never have state so they are more limiting for future proofing. This seems like a case where future proofing would trump flexibility.
Thanks for taking time to answer my questions. I think Fantom thus far is a very practical language, and you guys are doing a great job!
Thanks very much!
DanielFathWed 14 Dec 2011
Speaking of test, why was naming convention favored over a facet?
tacticsWed 14 Dec 2011
Speaking of test, why was naming convention favored over a facet?
Just to give my feedback on @test is that I also in favor of it. With it people are free to use whatever name they want, and you can still use testX if that suit you. The more important point I like @test is it doesn't need to extend a base class.
saltnlight5 Tue 13 Dec 2011
Hi there,
I am exploring
fant
tool today, and I have few questions.1) The docs indicated that we must orgainzed our tests in the pod. Is this mean I can't run any of the tests without first creating the pod? The
fant
wont' take a script file as thefan
would, which I think it would be helpful if it does. Is this not a desire feature by anyone?2) Docs didn't indicate this, but is it correct that tests MUST be in the
test
folder, or just any class in the pod to be consider as test, in regardless which directory they in?3) Would tests classes packaged in pod for deployment as well? If not how can I package pod to run the tests and then deploy pod without the tests?
4) I would think making sys::Test a mixin type rather than abstract class is more developer friendly. Is there a technical reason not to do so?
Thanks for taking time to answer my questions. I think Fantom thus far is a very practical language, and you guys are doing a great job!
~ Zemian
brian Tue 13 Dec 2011
Good questions:
fant
in production environments. Although it can be bad, especially with regard to JavaScript where download size matters a lot. We have talked about a tool to script test code from a pod, but haven't built anything yet. For some massive tests I actually pulled them out of the pod (testSys, testCompiler).Thanks very much!
DanielFath Wed 14 Dec 2011
Speaking of test, why was naming convention favored over a facet?
tactics Wed 14 Dec 2011
See
http://fantom.org/sidewalk/topic/890
http://fantom.org/sidewalk/topic/25
saltnlight5 Mon 19 Dec 2011
@Brian,
1) I vote for it. :)
4) What is
future proofing
mean?Just to give my feedback on
@test
is that I also in favor of it. With it people are free to use whatever name they want, and you can still usetestX
if that suit you. The more important point I like@test
is it doesn't need to extend a base class.