You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Dongmei Cao <do...@icann.org> on 2010/06/09 00:26:19 UTC

Testify unable to locate the @IncludeStylesheet

I’m trying to use Testify to do unit testing. But it can not locate the css files in the @IncludeStylesheet annotation. It works fine if I use <link>. I have specified the context root when initializing the TapestryTester, such as,
 private static final TapestryTester SHARED_TESTER =
        new TapestryTester("org.blah.foo", "App", "src/main/webapp", DemoModule.class);

Caused by: java.lang.RuntimeException: Unable to locate asset 'context:css/grid.css' (the file does not exist).

Anything needs to be configured in order for it to work??

Re: Testify unable to locate the @IncludeStylesheet

Posted by Dongmei Cao <do...@icann.org>.
I figured out where the problem was (at least for my case) when I was trying
to create an integration test. (I'm still stuck with the integration test).

I have a hierarchical project/module structure. So, it is like
MyProjects 
   - Project1
   - Project2
   - Project3

For the test cases inside Project1, I need to manually set the context-path
to "Project1/src/main/webapp". Otherwise, Testify looks into
"MyProjects/src/main/webapp". For integration test, I ran into another issue
that after I manually set the context-path, it still can not find the
webdefault.xml file because of the same reason - it looks into the
MyProjects/src/test/conf dir, not Project1/src/test/conf. Is there anywhere
I can rest the conf dir?

Thanks,
D.  


On 6/9/10 9:15 AM, "Bryan Lewis" <br...@maine.rr.com> wrote:

> I'm on an older version of testify, 1.0.0.  Maybe that's a clue.
> 
> 
> On Wed, Jun 9, 2010 at 8:26 AM, paha <ch...@yahoo.com> wrote:
> 
>> 
>> Doesn't work for me either. Neither PageTester nor Testify (based on it)
>> seem
>> to handle asset:context: properly. I have no other explanation, why the
>> same
>> things work in tapestry itself and don't work in PageTester
>> --
>> View this message in context:
>> http://old.nabble.com/Testify-unable-to-locate-the-%40IncludeStylesheet-tp288
>> 23942p28829603.html
>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>> 
>> 


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


Re: Testify unable to locate the @IncludeStylesheet

Posted by Bryan Lewis <br...@maine.rr.com>.
I'm on an older version of testify, 1.0.0.  Maybe that's a clue.


On Wed, Jun 9, 2010 at 8:26 AM, paha <ch...@yahoo.com> wrote:

>
> Doesn't work for me either. Neither PageTester nor Testify (based on it)
> seem
> to handle asset:context: properly. I have no other explanation, why the
> same
> things work in tapestry itself and don't work in PageTester
> --
> View this message in context:
> http://old.nabble.com/Testify-unable-to-locate-the-%40IncludeStylesheet-tp28823942p28829603.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: Testify unable to locate the @IncludeStylesheet

Posted by paha <ch...@yahoo.com>.
Doesn't work for me either. Neither PageTester nor Testify (based on it) seem
to handle asset:context: properly. I have no other explanation, why the same
things work in tapestry itself and don't work in PageTester
-- 
View this message in context: http://old.nabble.com/Testify-unable-to-locate-the-%40IncludeStylesheet-tp28823942p28829603.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


Re: Testify unable to locate the @IncludeStylesheet

Posted by Bryan Lewis <br...@maine.rr.com>.
I've used Testify with no real problems. I tried your line of initialization
code and it worked for me. I've done no special configuration, just
righ-clicked on my tet class and Debug as TestNG Test.

The exception says it's looking for a file src/main/webapp/css/grid.css.



On Tue, Jun 8, 2010 at 6:26 PM, Dongmei Cao <do...@icann.org> wrote:

> I’m trying to use Testify to do unit testing. But it can not locate the css
> files in the @IncludeStylesheet annotation. It works fine if I use <link>. I
> have specified the context root when initializing the TapestryTester, such
> as,
>  private static final TapestryTester SHARED_TESTER =
>        new TapestryTester("org.blah.foo", "App", "src/main/webapp",
> DemoModule.class);
>
> Caused by: java.lang.RuntimeException: Unable to locate asset
> 'context:css/grid.css' (the file does not exist).
>
> Anything needs to be configured in order for it to work??
>