ven central
repository.
Thanks to Steve Eynon who contributed most of the code for the Tapestry
5.3 upgrade.
- Paul
---
Paul Field
http://twitter.com/cloudy_skies
-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For
in tests of components
and Pages. It's also useful for mixins and other components that
manipulate the DOM.
- Paul
---
Paul Field
http://twitter.com/cloudy_skies
Classification: For internal use only
You may also find Tapestry Testify useful
(http://tapestry.formos.com/nightly/tapestry-testify/) - it's designed for the
class of tests where you want to test the web aspects of your application
(particularly in a unit-test style) but aren't concerned with
Classification: For internal use only
Interesting - I tried rebuilding Testify against T5.3 over the weekend and it
built fine (all tests passed). If it's simple to send me a patch so I can see
what you changed, that would be great. If not, I will try to work it out from
the zip you sent.
Best
joknroll wrote on 08/04/2011 08:47:50:
> hum ok, thank you, i'll look at your link.
>
> Someone knows if Testify will evolve, in short or long term, to manage
the
> zone update?
As soon as you start working with zones you are in the world of Javascript
and you need some kind of browser imple
Testify cannot run unit tests that rely on javascript - it is not
simulating an entire browser. So your tests act more like a browser
running with javascript turned off and you can't test AJAX functionality.
However you can test that your page degrades well if there is no
Javascript :-)
You ca
I'd like to announce the latest snapshot of the Tapestry Testify project at
Tapestry 360:
http://tapestry.formos.com/nightly/tapestry-testify/
Tapestry Testify is an extension to Tapestry that allows you to write page
and component tests very easily and have them run very efficiently.
** Release
FYI, Tapestry360/tapestry.formos.com has two problems:
The JIRA instance does not seem to be working:
http://tapestry.formos.com/jira/ returns a blank page
Most of the nightly builds are broken:
http://tapestry.formos.com/bamboo/start.action
This seems to be bacause of a change in Maven that re
Hi Joost,
I was waiting for T5.2 to settle down. I guess with the alpha release it's
time for me to take a look :-) Probably won't be for a couple of weeks
though...
Paul
"Joost Schouten (ml)"
10/08/2010 16:41
Please respond to
"Tapestry users"
To
Tapestry users
cc
Subject
Testify a
> I'm looking at the Testify framework, and while it looks promising, it
still
> doesn't connect up the spring layer.
>
> It also puts a /foo in front of every asset and page link on my page.
> Frustrating
The "/foo" is a default context that Tapestry adds when using its testing
features.
ently.
** Release Notes **
* BugFix: Can't pass String parameters to demo pages
* BugFix: NullPointerException when accessing a service
by id that has not been defined by @ForComponents
- Paul
---
Paul Field
http://twitter.com/cl
Hi Angelo,
I'm not entirely sure what's causing the error; but I have a workaround
:-)
Testify runs on top of Tapestry's testing infrastructure. Tapestry's
testing infrastructure doesn't route via
HttpServletRequest/HttpServletResponse - it comes in at the level of
Tapestry's own Request and
"Thiago H. de Paula Figueiredo" wrote on 15/03/2010
12:40:53:
> On Mon, 15 Mar 2010 04:15:41 -0300, Joost Schouten (ml)
> wrote:
>
> > org.apache.tapestry5.corelib.pages.ExceptionReport.request: Method
> > ClassTransformation.addMethod(TransformMethodSignature,String) has
been
> > deprecate
es should be cleared after each test
* BugFix: Session should be cleared after each test
- Paul
---
Paul Field
http://twitter.com/cloudy_skies
-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additio
ctionality without
checked exceptions
- Paul
---
Paul Field
http://twitter.com/cloudy_skies
-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org
Tapestry 5.2-SNAPSHOT I get another error.
>
> I use the normal Junit 4 setup.
>
> Best Regards
> Alex
>
> [attachment "signature.asc" deleted by Paul Field/db/dbcom]
---
This e-mail may contain confidential and/or privileged information. If you are
not the intended
thread
> scope of my service worked like it should, that's why I need to do an
> integration test with a real live registry.
>
> On Tue, Feb 23, 2010 at 12:42 PM, Paul Field wrote:
>
> > Hi Inge,
> >
> > Testify doesn't support overriding services actua
Hi Inge,
Testify doesn't support overriding services actually within the repository
(currently, it make components check for overrides before going to the
registry - hence the annotation name @ForComponents).
However, would a simple unit test of the service do the trick for you? In
other word
Hi Oliver,
It's a problem with the Tapestry 360 hosting service. It looks like the
Maven repository (or at least the com/formos part of it) was deleted at
some point. There's been a bug report raised for 2 weeks:
http://tapestry.formos.com/jira/browse/INFRA-17
Howard said on the mailing list a
FYI, I raised this in the Tapestry-360 JIRA a few weeks ago:
http://tapestry.formos.com/jira/browse/INFRA-17
The entire com/formos tree in the repository had been deleted (I had to
recreate the tapestry-xpath and tapestry-testify releases - but I can't do
anything about the rest).
Paul
Howard
akochnev wrote on 31/01/2010 11:26:53:
>The next thing I'm trying to work out is use Testify for unit-like
> testing. The idea was that I could possibly instantiate the page class
> myself (e.g. w/o having to ask the tester to render the page), inject
the
> dependencies (using tester.inject
egistration.class))).
> andStubReturn(testUser);
>
>replay(userRepo);
>
>Document page = tester.renderPage("stupid");
> Assert.assertTrue(page.toString().contains("I should be empty"));
>}
>
>@Test
>public void testSt
>From a quick scan, I can't see anything obviously wrong with the code
you've written.
Just in case, make sure you are using the correct base class
(com.formos.testify.testng.TapestryTest) as there are several base classes
with the same simple name.
The next thing is probably to check that the
Hi Yury,
I don't really understand what you are trying to actually test with your
test.
Anyway, let me explain why you are seeing the behaviour that you are seeing.
In Testify, you create the IOC registry and that registry remains constant
throughout all the tests. Testify does not let you mock
There's a JIRA issue about this with a variety of ideas and discussion:
https://issues.apache.org/jira/browse/TAP5-633
There really isn't a good answer to this at the moment, that I can see.
The URL rewriting means you still need to use the "Page" postfix in .tml
fies (e.g. for links), which I t
You need to be very careful about calling tester.injectInto() yourself
because the superclass TapestryTest is already doing that for you. It
contains this code:
@BeforeClass(alwaysRun=true)
public final void processInjectAnnotation() {
tester.injectInto(this);
}
So I would t
Or you can just create the URL manually with the parameter in your test:
tester.renderPage("mypage/1234"); // 1234 is the id
- Paul
Igor Drobiazko wrote on 09/11/2009 06:30:34:
> Just create another page containg a link to target page and click on
> it. The link can contain a context.
> > B
Funnily enough I was thinking of something very similar for Testify. I was
imagining a "from-tests" scope - which is basically like the per-test
scope except that the service proxies look up their implementations from
the pool of objects populated by the @ForComponents annotations. (Which
prob
> I never understand how to "inject" mock members annotated
> with @Parameter into a page when testing with Testify.
I'm not sure I understand the question. I thought @Parameter only made
sense for components - not pages.
> PS. Oh, what about @Environmental members? Same question.
I haven't tr
Hi Angelo,
> I attempted to do some page/component testings with PageTester, finally
gave
> up, lately tried again with Testify, and gave up as well, following the
> tutorials, it works, but when trying to apply the test to an existing
> project, can not make it work, probably we need some more t
Hi Mats,
> I use Testify to smoke test our pages, and currently I have
> problems with a non-empty onActivate() function:
>
> public Object onActivate(Long id) {
> // ...
> }
>
> What do I need to mock to get this onActivate() function to
> be called?
To get the onActivate calle
Hi Mats,
Sorry for the delay replying - I've been on holiday. Did you get this
resolved?
I think you'd get this kind of error if you put your tests inside one of
Tapestry's controlled packages (e.g. the pages or components packages). Or
make your pages subclasses of the test classes.
However,
olle.hal...@gmail.com wrote on 09/10/2009 16:24:43:
> I'm struggling with writing a test for a page that just redirects to an
> external page.
>
> The page basically looks like this:
>
> public class Redirecter {
>
> @Inject
> private UrlManager urlManager;
>
> public Object onActivate()
Hi Timo,
You may be interested in this issue in the Tap5 issue tracking system:
https://issues.apache.org/jira/browse/TAP5-633
Look in the comments as there is some discussion about how to achieve the
"page" class prefix.
- Paul
"Thiago H. de Paula Figueiredo" wrote on 29/09/2009
22:20:26:
uld warn about bad
nesting when the thread cleans up, so nested scopes would be reasonable.
-Paul
> On Thu, Sep 24, 2009 at 1:29 PM, Paul Field wrote:
>
> > There was a recent thread that discussed implementing the equivalent
of
> > Spring's "prototype" beans i
There was a recent thread that discussed implementing the equivalent of
Spring's "prototype" beans in Tapestry IOC. I was of the opinion that it
wasn't possible to implement sensibly: you either run the risk of the
service living too long or else Tapestry's proxies would mean that you
created a
> Peter Niederwieser
> I'd be interested to see a ServiceLifecycle implementation for prototype
> scope.
Kristian Marinkovic wrote on
16/09/2009 11:39:16:
> it is doable
>
> create a - let's say - a factory service with a Bean getBean() method.
> then create a service for the Bean inter
Mats Henricson wrote on 10/09/2009 14:59:32:
> How should we make Testify aware of asset and context?
> For example, we have this in our TML:
>${context:/foo/bar/}
> Currently testify barfs at us like this:
>
> Caused by: java.lang.RuntimeException: Unable to locate asset
> 'context:foo/bar'
Hi Andrey,
"Thiago H. de Paula Figueiredo" wrote on 08/09/2009
15:51:14:
> Em Tue, 08 Sep 2009 11:27:06 -0300, Andrey Larionov
> escreveu:
>
> > No, FactoryBean can create new instance on every call of getObject.
>
> Then you can create a new Tapestry-IoC scope (ServiceLifecycle
> impleme
Mats Henricson wrote on 08/09/2009 09:41:56:
> Mats Henricson wrote:
> > So, how should I inject my mocked @SessionState object? Is it
> > possible through the tester object, before I render the page?
>
> I'm testing this now. Hopefully it is kosher:
>
> ApplicationStateManager stateManager =
Mats Henricson wrote on 07/09/2009 12:48:39:
> I am really close to get my Testify machinery working for
> my first non-trivial page. The last hurdle (touch on wood)
> is that the @ForComponents annotation doesn't inject my
> mock object in fields annotated with @SessionState.
I wouldn't expect
A quick update... there's a small but important error in my example project
structure. I'd put the DayMonthYearDateInputDemo.tml and
DayMonthYearDateInputDemo.java files into a package called
"...demo.components" and they should be in "...demo.pages".
This is the correct structure (I hope :-) ).
Mats Henricson wrote on 03/09/2009 12:28:23:
> My current guess is that @ForComponents is pulling in and handling
> binding from my real AppManager, even though it is in no way part
> of the test.
In that case try creating the TapestryTester with a nonsense app name:
private static final Tap
Hi Borut,
> thanks VERY much for the explanations.
> I refactored my code to almost match your recomendation (I did not put
stuff
> from src/main/resources into src/main/java).
Putting the resources in the java tree was the most controversial
suggestion :-) Definitely a personal preference. Bu
Hi Borut,
It looks like the T5 page class also contain the tests.
You need to have separate classes for the page and for the tests. To test
components I create pages that I call "demo" pages (because they
demonstrate the component).
Also I would advise putting the test class in a different pac
Hi Mats,
> I then have a subclass with the JUnit 4 test:
>
> public class GamesLauncherTest extends AbstractPageTest {
>
> @ForComponents @Mock
> private XyzManager xyzManager;
>
> @Mock
> private XyzConfig xyzConfig;
>
>
> What I get is runtime exceptions, such as this:
>
>
---
This e-mail may contain confidential and/or privileged information. If you are
not the intended recipient (or have received this e-mail in error) please
notify the sender immediately and delete this e-mail. Any unauthorized
copying, disclosure or distribution of the material in this e-mail i
"Mark W. Shead" wrote on 28/08/2009 21:36:55:
> Hm it appears to give me a copy of the registry, but not the same
> instance that was used for testing the pages.
I'm not too sure what you mean by "not the same instance that was used for
testing the pages" but I'm going to guess that you are ru
Szemere Szemere wrote on 27/08/2009
16:14:16:
> Excuse my ignorance, does Testify work with Tapestry 5.0.18? The current
> version of Testify seems to require Tapestry 5.1.05. Is there a version
> that works with 5.0.18>
Sorry - Testify uses some features of the Tapestry 5.1 IOC container to
d
"Mark W. Shead" wrote on 26/08/2009 15:58:05:
> I am using the Selenium testing so I'm subclassing from
> AbstractIntegrationTestSuite in tapestry-test.
Ahhh The key thing about the TapestryTest superclasses in Testify is
that they orchestrate the annotation processing and test scope quite
Hi Mark,
If you are subclassing from one of the TapestryTest classes in Testify
then the @Inject annotation should be processed in your test.
You can put a breakpoint into TapestryTester#injectInto(Object) to check
that the annotation is being processed.
If that's happening then perhaps the IOC
For more full-on monitoring (including Tomcat - and a lot else too), you
could try:
http://www.hyperic.com/
(N.B. There is a free "open source" edition and a commercial version)
- Paul
Jérôme BERNARD wrote on 17/08/2009 09:52:35:
> Hi Angelo,
> Maybe Lambda Probe (http://www.lambdaprobe.org/d/i
ently.
I'd like to thank Peter Stavrinides, Juan E. Maya and Christian Gruber for
their feedback on the snapshot releases - without which I wouldn't have
got the JUnit4 and TestNG integration working properly.
- Paul
--
Paul Field
Research IT
Deutsche Bank
Tel: +
Paul Field wrote on 28/07/2009 09:35:05:
> rolfst wrote on 27/07/2009 14:13:51:
> > Yes there are three groups involved in the suite.
> > How ever no other test from other groups are available.
> > It seems that when I remove the reference to groups in my testng.x
apshot is
built and published.
Paul
> Paul Field wrote:
> >
> > rolfst wrote on 27/07/2009 13:26:23:
> >
> >>
> >>@Test(groups = "rbudisplay")
> >>public void test_rbuselection_fulltype() throws Exception
> >>{
> >
rolfst wrote on 27/07/2009 13:26:23:
>
>@Test(groups = "rbudisplay")
>public void test_rbuselection_fulltype() throws Exception
>{
Oooo... it might be something to do with groups. Is your suite specifying
that only certain groups are run?
(my brain aches whenever I try to work out
Christian Edward Gruber wrote on
27/07/2009 11:07:41:
> I think that @BeforeMethod is a better one to key off-of. If
> singleton-scoped objects are the only ones being injected, then
> @BeforeClass makes sense, but if you're testing per-request or per-
> session objects, then it's best to use
Hi Rolf,
> Hi I am using Testify to inject a fake repository into my testng test
but I
> come op to a problem.
>
> when i first access the fake repository it gets injected however the
second
> time i access the repository I get a null pointer exception.
>
> Now comes another strange thing whe
Hi Juan,
> I am trying to inject a service to one component using testifiy's
> @ForComponent annotation and Mockito but the component doesn't get the
> mocked service injected.
I think you have invalidated the warranty on Testify ;-)
It is important to make sure your tests are setup using the in
Hi Juan,
I had a similar problem, except that I'm using tapestry-acegi. However,
tapestry-spring and tapestry-acegi seem very similar, so perhaps what I've
done may help you...
I have an IOC module TestInfrastructureModule that is included only in my
tests. It contains this contribution:
Hi Christian,
> It might make sense to have a "hit" annotation for Testify that
> follows @Inject which allows the injection to be beforeMethod or
> beforeClass. Unfortunately, we can't re-use the jUnit ones because
> (if I recall correctly) they are not suitable for Field annotation,
> just
> > I have been playing with Testng and the Testify library but i am
> > having a small issue. It seems that the injection of services occurs
> > after the @BeforeSuite.
> >
> However, it does seem reasonable to process the @Inject annotations at
the
> start of the TestNG suite, so the latest Te
Hi Juan,
> I have been playing with Testng and the Testify library but i am
> having a small issue. It seems that the injection of services occurs
> after the @BeforeSuite.
That's true - Testify was processing @Inject annotations before every test
method, mainly because that's the natural way fo
m, you add an exclusion to
the Testify dependency; something like this:
com.formos.tapestry
tapestry-testify
1.0.0-SNAPSHOT
test
org.testng
testng
And in the next few days, I will update the Testify POM to have that
exclusion in it.
-- Paul
>
&g
Hi Peter,
> I suspect that Testify is sourcing in JUnit 3.8.1 and TestNG and
> trying to run my tests with those, and as I have no reference to
> either in my project I am guessing they come fro Testify... take a
> look at this debug output:
You might find it useful to use the Maven "depende
> > So, you need to add a dependency on the tapestry-test module (and I
need
> > to check what's going on in the Testify POM because you should've got
that
> > automatically... ).
> Thanks Paul, up and running now! please keep me posted once you have
> the pom sorted.
The latest snapshot's P
FYI, I'm not convinced that you should have to have this dependency at
all. See:
https://issues.apache.org/jira/browse/TAP5-758
Paul
--
Paul Field
Research IT
Deutsche Bank
>
> Kind regards,
> Peter
>
> - Original Message ---
AppModule.
Let me know how you get on!
Paul
--
Paul Field
Research IT
Deutsche Bank
---
This e-mail may contain confidential and/or privileged information. If you are
not the intended recipient (or have received this e-mail in error) please
notify the sender immediately and delete this e-
want to use the Testify library to
help you:
http://tapestry.formos.com/nightly/tapestry-testify/
And you'll find the XPath library useful for asserting things about parts
of the output:
http://tapestry.formos.com/nightly/tapestry-xpath/
Best wishes,
Paul
--
Paul Field
Res
/and not TestifyTest() ?
> super(SHARED_TESTER);
> }
...
Hi Peter,
Doh! Yes - I renamed the classes in the documentation and forgot to rename
the constructors... thanks for pointing that out.
I'll fix the documentation when I'm at home - it will be in the next
nightly build.
et me know the problem and I'll try to fix it.
Paul
--
Paul Field
Research IT
Deutsche Bank
---
This e-mail may contain confidential and/or privileged information. If you are
not the intended recipient (or have received this e-mail in error) please
notify the sender immed
Mockito:
public abstract class AbstractMyApplicationTest extends TapestryTest {
private static final TapestryTester SHARED_TESTER
= new TapestryTester("demo", MyCoreModule.class);
public TestifyTest() {
super(SHARED_TESTER);
}
}
--
Paul Field
Very efficient - allows a single PageTester to be used by all tests
Fedback is very welcome!
- Paul
---
Paul Field
http://creakingcogs.blogspot.com/
-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional com
Paul
---
Paul Field
http://creakingcogs.blogspot.com/
-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org
nd the "integration" approach for pages or other
kinds of acceptance tests (I have some interesting ideas about integrating
PageTester into Fitnesse :-) ).
I have most of this working and it seems to be going well (although I did
most of it yesterday so I haven't had time to
his approach helps me to write less brittle tests; I
also find working like this has other benefits in readability, elegance of
code and helping the system to flex nicely when requirements change - but
that's another topic :-)
Hope that gives you some ideas.
Paul
--
Paul Field
Re
7;m just using HTML "id" attributes with a little XPath and
it's working great.
Paul
--
Paul Field
Research IT
Deutsche Bank
"Joost Schouten (mailing lists)"
26/05/2009 22:23
Please respond to
"Tapestry users"
To
Tapestry users
cc
Subj
JMX across multiple servers using JRuby and jmx4r:
http://github.com/jmesnil/jmx4r/tree/master
Hope something in that lot is useful for you :-)
Paul
--
Paul Field
Research IT
Deutsche Bank
Peter Stavrinides
19/05/2009 14:40
Please respond to
"Tapestry users"
To
ly in conjunction with the tapestry-xpath project:
http://tapestry.formos.com/nightly/tapestry-xpath/ ).
- Paul
--
Paul Field
Research IT
Deutsche Bank
Sebastian Hennebrueder
23/04/2009 19:12
Please respond to
"Tapestry users"
To
users@tapestry.apache.org
cc
Subjec
I'd like to announce that the Tapestry XPath project is now available as a
Snapshot release at Tapestry 360:
https://tapestry.formos.com/nightly/tapestry-xpath/
Tapestry XPath allows you to use XPath expressions to query the Tapestry
DOM, which is a particularly useful thing to do in tests of com
lass);
if (annotation != null) {
model.addRenderPhase(BeginRender.class);
model.addRenderPhase(CleanupRender.class);
}
securityWorker.transform(transformation, model);
}
});
}
Paul
--
Paul Field
Research IT
ct is different to what the system
expects...
Paul
--
Paul Field
Global Markets Research IT
Deutsche Bank
"Vinicius Carvalho" <[EMAIL PROTECTED]> wrote on 22/08/2006 23:31:19:
> Hello there! I still did not gave up OC4J 10.1.3 (well, I'd love to,
> but my
ava/Article/31983/0/page/1
However, TestNG is still far ahead in terms of features. Their home page lists
some of the features (http://testng.org/doc/). It does have a bigger learning
curve than JUnit but then it does a lot more :-)
Paul
------
Paul Field
Global Markets Research IT
De
the Tomcat connector with a "proxyName" and "proxtPort" parameter so
that Tomcat knows where the pages *appear* to come from. I believe these values
will end up in your base tag.
Hope that points you in the right direction...
Paul
--
Paul Field
Global Ma
so far!) we'll move it
into our continuous integration and/or nightly builds.
However, this wiki page has relevant information:
http://wiki.openqa.org/display/SRC/Selenium-RC+and+Continuous+Integration
Paul
--
Paul Field
Global Markets Research IT
Deutsche Bank
---
owever, I've found that with
@BeforeClass/@AfterClass you have suite==class and all your tests for the
session need to be in one class. I've found that TestNG's concept of a suite is
much more suitable as it can span multiple classes and you can its 'groups'
concep
queezer
to squeeze the values (and keys?) and then concatenate them with a separator
(e.g. the parameter might end up as sp=MSname:Sfred:Sage:22).
Would probably be a nice addition to the core Tapestry framework.
Paul
--
Paul Field
Global Markets Research IT
Deutsche Bank
Oscar
87 matches
Mail list logo