Re: Testing Tapestry

2013-09-24 Thread Martin Kersten
> Actually, I taught OOP at graduate-level courses. ;) Well I attended those Nothing much to say about. But maybe yours are better than the one I needed to attend. Also newInstance works just fine. Even on private static classes. No access restriction here. Also having no default constructor s

Re: Testing Tapestry

2013-09-24 Thread Thiago H de Paula Figueiredo
On Tue, 24 Sep 2013 13:18:25 -0300, Martin Kersten wrote: Well its a bug. I dont habe any constructor at all. Calm down and relax. You dont need ans. Just call Class.newInstance and you are fine. That is pro.level OOP. :-) In the next message in this thread you said there was no accessible

Re: Testing Tapestry

2013-09-24 Thread Martin Kersten
Ok I found out what happends. The class is a private static class and so the default constructor is private too. Boomer. You can still pass the class along and issue newInstance on it. What a funny thing. So I just check for it and do the newInstance myself and do field injection myself. If I add a

Re: Testing Tapestry

2013-09-24 Thread Martin Kersten
Well its a bug. I dont habe any constructor at all. Calm down and relax. You dont need ans. Just call Class.newInstance and you are fine. That is pro.level OOP. :-) Am 24.09.2013 14:34 schrieb "Thiago H de Paula Figueiredo" < thiag...@gmail.com>: > On Tue, 24 Sep 2013 08:57:41 -0300, Martin Kerste

Re: Testing Tapestry

2013-09-24 Thread Thiago H de Paula Figueiredo
On Tue, 24 Sep 2013 08:57:41 -0300, Martin Kersten wrote: Also the IOC needs a public constructor for autobuild. Fine I dont have any... . Would have been a bug report. But I wont mind... . That's not a bug, that OOP and Java working as they should. How could any code instantiate a class

Re: Testing Tapestry

2013-09-24 Thread Martin Kersten
Also the IOC needs a public constructor for autobuild. Fine I dont have any... . Would have been a bug report. But I wont mind... . 2013/9/24 Thiago H de Paula Figueiredo > On Tue, 24 Sep 2013 04:13:27 -0300, Martin Kersten < > martin.kersten...@gmail.com> wrote: > > Thats it. Simple straight

Re: Testing Tapestry

2013-09-24 Thread Thiago H de Paula Figueiredo
On Tue, 24 Sep 2013 04:13:27 -0300, Martin Kersten wrote: Thats it. Simple straight forward and does the job. And I only use it for some spare situations where I have to or just dont know what the given implementation will look like since I will have processing tasks that do not use the dat

Re: Testing Tapestry

2013-09-24 Thread Martin Kersten
Well I might have misunderstood the user guide here but the following is true by checking the code: 1. The first (!) encountered constructor with a given annotation is choosen. Since the JVM makes no statement about the ordering of methods (and constructors) in the class definition after the

Re: Testing Tapestry

2013-09-23 Thread Thiago H de Paula Figueiredo
On Mon, 23 Sep 2013 17:07:54 -0300, Martin Kersten wrote: Yeah thats what I was thinking about exactly. This way I can get rid of the pesti constructor injection. Pesti? What is that? If you were talking Brazilian Portuguese, I'd knew. :D Does anyone knows if the autobuild / build proces

Re: Testing Tapestry

2013-09-23 Thread Martin Kersten
Well I knew that with the constructor it is exactly what the internal method createMethodInvocationPlan is doing. The sad thing is I have to recreate it since its internal. This ignore Inject works for me since I use autobild method of the regitry. PS: Everyone is aware of the @Autobuild method?

Re: Testing Tapestry

2013-09-23 Thread Daniel Jue
You can still use a constructor/constructor injection when registering your service in your module, if you want. (In fact the auto binding looks for the constructor with the most parameters, if none are marked with @Inject.) Or, you can use Field Injection. Not sure if you can use both, probably

Re: Testing Tapestry

2013-09-23 Thread Martin Kersten
Thanks daniel. I will check the testify stuff in a real example. 2013/9/23 Daniel Jue > I don't have spare minutes at the moment, I just want to drop these links > for you to look at (if you haven't seen them already). Hope it helps. > > http://blog.tapestry5.de/index.php/2010/11/16/improved-t

Re: Testing Tapestry

2013-09-23 Thread Daniel Jue
I don't have spare minutes at the moment, I just want to drop these links for you to look at (if you haven't seen them already). Hope it helps. http://blog.tapestry5.de/index.php/2010/11/16/improved-testing-facilities/ and then this one http://blog.tapestry5.de/index.php/2010/11/18/find-your-el

Re: Testing Tapestry

2013-09-23 Thread Martin Kersten
Yeah thats what I was thinking about exactly. This way I can get rid of the pesti constructor injection. Does anyone knows if the autobuild / build process fails if a property annotated @inject could not be injected? Kind of should be but I am quite not sure... . 2013/9/23 Daniel Jue > You'll

Re: Testing Tapestry

2013-09-23 Thread Daniel Jue
You'll probably find better examples online, but in my Test classes I usually have a method like this: private MyDAO dao; @BeforeClass public void beforeClass() { // TODO Auto-generated constructor stub System.out.println("MyDAOTest"); Registry registry; RegistryBuilder builder = new RegistryBui

Re: Testing Tapestry

2013-09-23 Thread Martin Kersten
Is there anything to aid me with the usual service test. Currently I use constructors to ease setup of the services. I will try out providing a test module setting up the services and use tapestry IOC to create those. Should have done so more early on, but wanted it simple first. But now when I hav

Re: Testing Tapestry

2013-09-23 Thread Thiago H de Paula Figueiredo
http://tapestryxpath.sourceforge.net/ implements XPath over Tapestry Element objects. On Mon, 23 Sep 2013 14:34:34 -0300, Daniel Jue wrote: I don't have spare minutes at the moment, I just want to drop these links for you to look at (if you haven't seen them already). Hope it helps. http:/

Re: Testing Tapestry

2013-09-23 Thread Martin Kersten
Problems nope. I just habe to overhowle the system and wonder what people nicht use. I will check your base clase out. Thanks for sharing. Am 23.09.2013 18:12 schrieb "Dmitry Gusev" : > I use JUnit for unit testing with T5 services, and TestNG for (smoke) > integration testing my apps with URLs. >

Re: Testing Tapestry

2013-09-23 Thread Dmitry Gusev
I use JUnit for unit testing with T5 services, and TestNG for (smoke) integration testing my apps with URLs. All my JUnit test classes inherited from BaseIntegrationTest ( https://gist.github.com/dmitrygusev/6672859), all TestNG classes inherited from a copy of SeleniumTestCase with with this patc

Re: Testing Tapestry without Seleinum

2012-10-29 Thread mbrooks
Oh man, I wish I was using jQuery. It's a component that lives in ProtoType. Might be why Selenium is choking on it >.< Though, that's a good idea to see if I can't just set those values and still use Selenium. Thanks! -- View this message in context: http://tapestry.1045711.n5.nabble.com/T

Re: Testing Tapestry without Seleinum

2012-10-29 Thread mbrooks
Right. Except that Selenium keeps freezing whenever I try to get it to move a slider. It works great for all the other components and I don't have time to keep trying to drive a square peg into a round hole. Just because something is supposed to work doesn't mean it always will. I'd rather just tr

Re: Testing Tapestry without Seleinum

2012-10-29 Thread Chris Poulsen
Replace @Property with getter/setter for the property? -- Chris On Mon, Oct 29, 2012 at 2:09 PM, mbrooks wrote: > So I have a fairly complicated page that has a slider that filters by a date > range. It gets all entries whose copyright dates fall in between the min > and max years. > > I've tr

RE: testing Tapestry applications (in general) [I]

2011-11-07 Thread Paul Field
ember 2011 18:55 To: Tapestry users Subject: Re: testing Tapestry applications (in general) 2011/11/04 15:01, Markus Johnston: > We very much would like to start writing view and controller tests. I > was wondering what other Tapestry users are doing, as far as testing > is concerned. Wha

Re: testing Tapestry applications (in general)

2011-11-04 Thread Christian Köberl
2011/11/04 15:01, Markus Johnston: > We very much would like to start writing view and controller tests. I was > wondering what other Tapestry users are doing, as far as testing is > concerned. What problems have you run into? What tools or approaches have > you found that work especially well?

Re: testing Tapestry applications (in general)

2011-11-04 Thread Markus Johnston
Thanks for the info. I'll probably check out newer versions of HTMLUnit then, to see if it is an option for us. On Fri, Nov 4, 2011 at 12:48 PM, Kalle Korhonen wrote: > On Fri, Nov 4, 2011 at 10:25 AM, Markus Johnston > wrote: > > I've found HTMLUnit, in the past to be utterly awful. At least

Re: testing Tapestry applications (in general)

2011-11-04 Thread Kalle Korhonen
On Fri, Nov 4, 2011 at 10:25 AM, Markus Johnston wrote: > I've found HTMLUnit, in the past to be utterly awful.  At least with our > web app (lots of ajax) HTMLUnit struggled and I ran into a lot of bugs. Yeah, I've heard that a few times and my own experience in the past was also that HTMLUnit c

Re: testing Tapestry applications (in general)

2011-11-04 Thread Markus Johnston
I've found HTMLUnit, in the past to be utterly awful. At least with our web app (lots of ajax) HTMLUnit struggled and I ran into a lot of bugs. On Fri, Nov 4, 2011 at 9:18 AM, Kalle Korhonen wrote: > Your mileage may vary but for my perspective, see > > http://docs.codehaus.org/display/TYNAMO/20

Re: testing Tapestry applications (in general)

2011-11-04 Thread Kalle Korhonen
Your mileage may vary but for my perspective, see http://docs.codehaus.org/display/TYNAMO/2010/07/30/Full+web+integration+testing+in+a+single+JVM. For service level tests, I tend to use Mockito a lot. Kalle On Fri, Nov 4, 2011 at 7:01 AM, Markus Johnston wrote: > We have been struggling (in my

Re: Testing Tapestry webapps with Selenium

2011-01-27 Thread Mark
On Thu, Jan 27, 2011 at 1:54 AM, Ulrich Stärk wrote: > Since these are edit or delete links this would be ambigous. I guess there > will be dozens of links called edit on that page. Hm. So do you know anything about the item you are trying to delete or edit? If you know the id, you can work that

Re: Testing Tapestry webapps with Selenium

2011-01-26 Thread Ulrich Stärk
Since these are edit or delete links this would be ambigous. I guess there will be dozens of links called edit on that page. On 26.01.2011 15:49, Mark wrote: On Wed, Jan 26, 2011 at 5:14 AM, Matias Moran wrote: But, the problem here is that I don't know the position in the Grid of the eleme

Re: Testing Tapestry webapps with Selenium

2011-01-26 Thread Mark
On Wed, Jan 26, 2011 at 5:14 AM, Matias Moran wrote: > But, the problem here is that I don't know the position in the Grid of the > elements. So, is there a way to iterate the rows of a Grid, looking for a > particular element? Do you know the name of the link? Can you use something like: clic

Re: Testing Tapestry webapps with Selenium

2011-01-26 Thread Matias Moran
ate the rows of a Grid, looking for a particular element? Thanks for the responses! Cheers! Matias. --- El mar 25-ene-11, Mark escribió: > De: Mark > Asunto: Re: Testing Tapestry webapps with Selenium > Para: "Tapestry users" > Fecha: martes, 25 de enero de 2011, 20:36

Re: Testing Tapestry webapps with Selenium

2011-01-25 Thread Mark
; >> >> --- El mar 25-ene-11, Thiago H. de Paula Figueiredo >> escribió: >> >> > De: Thiago H. de Paula Figueiredo >> > Asunto: Re: Testing Tapestry webapps with Selenium >> > Para: "Tapestry users" >> > Fecha: mar

Re: Testing Tapestry webapps with Selenium

2011-01-25 Thread Igor Drobiazko
; if there is no other solution, it is better than nothing. > > Thanks again! Greetings! > > Matias. > > > --- El mar 25-ene-11, Thiago H. de Paula Figueiredo > escribió: > > > De: Thiago H. de Paula Figueiredo > > Asunto: Re: Testing Tapestry webapps with

Re: Testing Tapestry webapps with Selenium

2011-01-25 Thread Matias Moran
gueiredo > Asunto: Re: Testing Tapestry webapps with Selenium > Para: "Tapestry users" > Fecha: martes, 25 de enero de 2011, 17:57 > On Tue, 25 Jan 2011 17:51:53 -0200, > Matias Moran > wrote: > > > The code generated by Selenium is something like > this: >

Re: Testing Tapestry webapps with Selenium

2011-01-25 Thread Thiago H. de Paula Figueiredo
On Tue, 25 Jan 2011 17:51:53 -0200, Matias Moran wrote: The code generated by Selenium is something like this: selenium.click("//a[@id='modifyUserLink']/div");selenium.waitForPageToLoad("3"); When inside a loop, if you don't provide the id for your ActionLinks, they'll generate differ

Re: Testing Tapestry webapps with Selenium

2011-01-25 Thread Matias Moran
Thanks for the quick response! Here is a piece of the code I'm trying to test: The code generated by Selenium is something like this: selenium.click("//a[@id='modifyUserLink']/div");selenium.waitForPageToLoad("3"); But it always fails, giving the err

Re: Testing Tapestry webapps with Selenium

2011-01-25 Thread Thiago H. de Paula Figueiredo
On Tue, 25 Jan 2011 17:20:38 -0200, Matias Moran wrote: Dear Tapestry users, how are you? Hi! One of those issues appear when trying to click on an actionLink inside a Grid component, lets say a link to Delete or Modify one of the rows. The error is always the same: "com.thoughtworks

Re: Testing Tapestry webapps with Selenium

2011-01-25 Thread Igor Drobiazko
Yes, it is possible. If you provide your code, probably we'll be able to help you. On Tue, Jan 25, 2011 at 8:20 PM, Matias Moran wrote: > Dear Tapestry users, how are you? > > I'm writing because in the last few days we have been implementing > integration tests using Selenium, but we have found

Re: Testing Tapestry application

2006-07-21 Thread KE Gan
Haha .. alright :> .. Thanks a bunch !! On 7/21/06, Jesse Kuhnert <[EMAIL PROTECTED]> wrote: I can't really take credit for it. All I did was move java files around to different places and made them use the testing infrastructure that Howard/the team had already created. You can use it now, ju

Re: Testing Tapestry application

2006-07-20 Thread Jesse Kuhnert
I can't really take credit for it. All I did was move java files around to different places and made them use the testing infrastructure that Howard/the team had already created. You can use it now, just don't ask for documentation yet ;) http://people.apache.org/repo/m2-snapshot-repository/org/

Re: Testing Tapestry application

2006-07-20 Thread KE Gan
Jesse, Thanks a lot for the pointers!! And eagerly looking forward for the independent testing module that you will be making available :) Could you please make a announcement here once you did ? By the way, when can we expect it ;) ? Thanks again. On 7/21/06, Jesse Kuhnert <[EMAIL PROTECTED]

Re: Testing Tapestry application

2006-07-20 Thread Jesse Kuhnert
Here, http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/test/ All ~ 1,500 unit tests in tapestry use the tapestry-testng module from howardlewisship.com. There should be enough in there for more complete examples :) I've also already broken the basic base unit test cl