You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by Ryan Holmes <ry...@hyperstep.com> on 2006/11/19 03:27:42 UTC

Re: Running 4.1 unit tests

I haven't had time to get back to this until today, but it looks like  
I was the unlucky recipient of a bad .classpath (rev 419069 from  
7/4/06) that used .../descriptor/META-INF instead of just .../ 
descriptor. There must have been a conflict that prevented  
my .classpath from being updated with the rest of the project. I had  
fixed the descriptor paths manually before noticing my out-of- 
date .classpath, but continued to have problems running  
TestMockApplications (only about 8 scripts were passing).

Anyway, I'm happy to say that after reverting my local .classpath  
changes and updating everything, I can run TestMockApplications and  
all 39 tests are passing. :)

Thanks,
-Ryan

On Oct 29, 2006, at 7:52 PM, Ryan Holmes wrote:

> I'm still trying to figure this out, but I think you're right about  
> it being a classpath issue (isn't it always? ;)). My local tapestry  
> project is a straight checkout from tapestry4/trunk with no changed  
> settings so I'm not sure why I'm having weird problems...
>
> Yes, I have the maven2 plugin installed (v0.0.9) and it seems to  
> work fine except for that Surefire exception I mentioned, but that  
> is a problem for another day.
>
> Anyway, I think you put me on the right track -- I take it that I  
> should be able to run TestMockApplications like any other TestNG  
> class and the MasterInitializer service probably doesn't exist  
> because tapestry.init.xml isn't on the classpath and therefore is  
> not being processed by HiveMind (or something like that).
>
> I'll bug the list again if I can't get it working in a day or two  
> and I'll report the resolution as long it's not too embarrassing ;)  
> Thanks for all the help so far!
> -Ryan
>
> On Oct 29, 2006, at 6:37 PM, Jesse Kuhnert wrote:
>
>> Sounds suspect. Do you also have the maven2 eclipse plugin  
>> installed ? I've
>> not experienced any issues like the one described. Sounds possibly  
>> like
>> resources aren't being copied to the output folder (like the java  
>> build
>> option allows?) or classpath isn't setup right. I thought I had  
>> the eclipse
>> settings nailed down enough to not make people worry about this  
>> but maybe
>> it's something else..
>>
>> On 10/29/06, Ryan Holmes <ry...@hyperstep.com> wrote:
>>>
>>> Actually, Maven2 is bailing on me with a SurefirePlugin exception,
>>> but I'm a Maven2 newbie so I'll worry about that later.
>>>
>>> I have the TestNG plugin installed (v 5.2 on Eclipse 3.2) and I can
>>> run "normal" individual test classes just fine. The problem is  
>>> that I
>>> need to run the TestFor.xml script and I'm not sure how to get that
>>> working. I see the TestMockApplications class that parses and
>>> executes those scripts but when I try to run TestMockApplications
>>> directly, I get the following for every script (39 of them) in my
>>> TestNG output:
>>>
>>> javax.servlet.ServletException: Unable to initialize application
>>> servlet: Service point tapestry.init.MasterInitializer does not  
>>> exist.
>>>         at org.apache.tapestry.ApplicationServlet.init
>>> (ApplicationServlet.java:206)
>>>         at
>>> org.apache.tapestry.junit.mock.TestMockApplications.setupServlet
>>> (TestMockApplications.java:315)
>>>         at org.apache.tapestry.junit.mock.TestMockApplications.setup
>>> (TestMockApplications.java:277)
>>>         at  
>>> org.apache.tapestry.junit.mock.TestMockApplications.execute
>>> (TestMockApplications.java:195)
>>>
>>> Thanks for the help,
>>> -Ryan
>>>
>>>
>>> On Oct 29, 2006, at 6:03 PM, Jesse Kuhnert wrote:
>>>
>>> > You can run them from maven if you like, but I usually only do  
>>> that
>>> > when I
>>> > want to run "all" tests.
>>> >
>>> > Otherwise I right click on the test class (or method of test  
>>> class) in
>>> > question and choose "run as testng test" within eclipse. I don't
>>> > know if
>>> > your editor of choice supports installing a testng unit test  
>>> plugin
>>> > but I'd
>>> > highly recommend it if possible.
>>> >
>>> > On 10/29/06, Ryan Holmes <ry...@hyperstep.com> wrote:
>>> >>
>>> >> Turns out the Tapestry unit tests are a little more  
>>> complicated than
>>> >> I thought. Do I run them from Maven2, is there an Ant target, a
>>> >> TestNG config file, or what? I don't need step-by-step  
>>> instructions
>>> >> (hopefully) but a few pointers would be greatly appreciated.
>>> >>
>>> >> Thanks,
>>> >> -Ryan
>>> >>
>>> >>  
>>> -------------------------------------------------------------------- 
>>> -
>>> >> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
>>> >> For additional commands, e-mail: dev-help@tapestry.apache.org
>>> >>
>>> >>
>>> >
>>> >
>>> > --
>>> > Jesse Kuhnert
>>> > Tapestry/Dojo/(and a dash of TestNG), team member/developer
>>> >
>>> > Open source based consulting work centered around
>>> > dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
>>>
>>>
>>> -------------------------------------------------------------------- 
>>> -
>>> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: dev-help@tapestry.apache.org
>>>
>>>
>>
>>
>> -- 
>> Jesse Kuhnert
>> Tapestry/Dojo/(and a dash of TestNG), team member/developer
>>
>> Open source based consulting work centered around
>> dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org