Re: Wicket tester and jquery-ui dialog

2017-01-23 Thread Maxim Solodovnik
Hello All, With the help of Sebastien I was able to create POC [1] [2] and was able to test wicket-jquery-ui dialog using wicket tester Hope this will be useful :) [1] https://github.com/apache/openmeetings/blob/3.2.x/ openmeetings-web/src/test/java/org/apache/openmeetings/

Re: Wicket tester and jquery-ui dialog

2017-01-23 Thread Sebastien
Hi Maxim, The only related thread I found is a mail entitled "WicketTester and Wicket jQuery UI" on d...@openmeetings.apache.org (from 14/09/2013). I cannot find the markmail archive however... There is no crucial information though. I will forward it to you directly to not spam users@wicket.

Re: Wicket tester and mounted resources

2016-08-09 Thread Martin Grigorov
Hi, On Aug 9, 2016 10:45 AM, "giacomolm" wrote: > > Hi Martin, > thanks for your reply. As you confirmed, mounted resources are available to > the wicket tester instance. > > What if I want to expose again those endpoints outside the tester > application? > > It would be

Re: Wicket tester and mounted resources

2016-08-09 Thread giacomolm
Hi Martin, thanks for your reply. As you confirmed, mounted resources are available to the wicket tester instance. What if I want to expose again those endpoints outside the tester application? It would be great if wicket tester can re-expose such resources: on this way I can interact with them

Re: Wicket tester and mounted resources

2016-08-08 Thread Martin Grigorov
Hi, If you use YourApplication when creating the WicketTester then those resources are already mounted for all your tests. If you use (the default) MockApplication then you'll need to mount those resource references with tester.getApplication().mountResource(...) when needed. Then you can use

Re: Wicket Tester with BookmarkablePageLink

2013-03-07 Thread yka
Thanks mate. Works fine now :) -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-Tester-with-BookmarkablePageLink-tp4656921p4657091.html Sent from the Users forum mailing list archive at Nabble.com.

Re: Wicket Tester with BookmarkablePageLink

2013-03-06 Thread yka
Hi Vineet, tried it out. My setup() method now looks like this: @Before public void setUp() { MockitoAnnotations.initMocks(this); app = new StartApplication() { @Override public ServletContext

Re: Wicket Tester with BookmarkablePageLink

2013-03-04 Thread yka
Sure, this is the test code: public class AbstractBasePageTester { private WicketTester tester; private StartApplication app; @Mock private CustomerService aService; @Before public void setUp() {

Re: wicket tester failing in CI but not locally

2010-05-18 Thread Per Newgro
Someone seems to change this, but i dodn't found an example how to solve it correctly until now. Kim had the problem some days ago to. Seems that yoiu have to add ComponentInstListener to TestApplication to. Why this was working before and not anymore - i don't know. Here is what he wrote

Re: wicket tester failing in CI but not locally

2010-05-18 Thread Douglas Ferguson
I'm not using spring. Would I still use that injector? I'm using guice.. D/ On May 18, 2010, at 1:46 AM, Per Newgro wrote: Someone seems to change this, but i dodn't found an example how to solve it correctly until now. Kim had the problem some days ago to. Seems that yoiu have to add

Re: wicket tester failing in CI but not locally

2010-05-18 Thread Douglas Ferguson
I just did this: tester.getApplication().addComponentInstantiationListener(new GuiceComponentInjector(tester.getApplication())); On May 18, 2010, at 2:01 AM, Douglas Ferguson wrote: I'm not using spring. Would I still use that injector? I'm using guice.. D/ On May 18, 2010, at

Re: wicket tester failing in CI but not locally

2010-05-18 Thread Per Newgro
Upps, sorry. Didn't recognized guice. I would try to add it appropriatly to this way public class MyApplicationextends WebApplication{ protected void init() { addComponentInstantiationListener( new GuiceComponentInjector(this, getModule()) ); }

Re: wicket tester failing in CI but not locally

2010-05-18 Thread Per Newgro
Is it the working solution? Cheers Per - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org

Re: wicket tester failing in CI but not locally

2010-05-18 Thread Douglas Ferguson
No.. I realized that the tests are running in parallel on hudson but from eclipse. Since the application is bound to a thread local, then it fails. D/ On May 18, 2010, at 2:18 AM, Per Newgro wrote: Is it the working solution? Cheers Per

Re: wicket tester failing in CI but not locally

2010-05-18 Thread Per Newgro
Sorry but more i can't do. Im not an hudson user. Cheers Per - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org

Re: wicket tester failing in CI but not locally

2010-05-18 Thread Douglas Ferguson
The problem is not a hudson problem. The problem is that wicket tester tests do not want to be run in parallel. D/ On May 18, 2010, at 2:38 AM, Per Newgro wrote: Sorry but more i can't do. Im not an hudson user. Cheers Per

Re: wicket tester failing in CI but not locally

2010-05-18 Thread Igor Vaynberg
if you want the tests to run in parallel you have to create a wicket tester inside every test method instead of just once per class. that way the threadlocal is set into every thread. -igor On Tue, May 18, 2010 at 1:49 AM, Douglas Ferguson doug...@douglasferguson.us wrote: The problem is not a

Re: Wicket Tester

2010-03-31 Thread Martin Makundi
Hi! You must create wickettester with your application. wickettester = new WicketTester(new MyApplication()); 2010/3/31 Svante Reutland svantepo...@hotmail.com: Hi!im trying to run wicket tester on my application. but I cannot get it to work.this is what I have done so far:

Re: Wicket Tester

2010-03-31 Thread svantepower
lol why didnt I see that. must be the lack of coffe ;) Thanks for your help! -- View this message in context: http://old.nabble.com/Wicket-Tester-tp28094649p28094705.html Sent from the Wicket - User mailing list archive at Nabble.com.

Re: wicket tester forms

2010-01-05 Thread Martin Makundi
Report in jira 2010/1/6 Douglas Ferguson doug...@douglasferguson.us: I just found an issue in wicket tester. If you submit a form with hidden fields it will attempt to set the models on those hidden fields. My app depends on this. D/

Re: wicket tester forms

2010-01-05 Thread Martin Makundi
With quickstart example that can reproduce the problem 2010/1/6 Martin Makundi martin.maku...@koodaripalvelut.com: Report in jira 2010/1/6 Douglas Ferguson doug...@douglasferguson.us: I just found an issue in wicket tester. If you submit a form with hidden fields it will attempt to set the

Re: wicket tester forms

2010-01-05 Thread Paul Szulc
I found more such problems. All described here: http://paulszulc.wordpress.com/2009/08/03/wicket-testing-pitfalls-and-api-issues/ On Wed, Jan 6, 2010 at 7:28 AM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: With quickstart example that can reproduce the problem 2010/1/6 Martin

Re: Wicket tester login pages

2010-01-04 Thread Martin Makundi
Hi! Depends on your login but ofcourse wicket is a whitebox so you can inject any credentials you want. But visit the login page first to create session. ** Martin 2010/1/4 Pierre Goupil goupilpie...@gmail.com: Hello all, Is there a way to access directly a page in Wicket tester? I mean:

Re: Wicket tester login pages

2010-01-04 Thread Pierre Goupil
We use @AuthorizedInstantiation. But what we're looking for is not a way to inject the credentials but rather a way to access directly a protected page in unit tests. We know how to provide credentials and browse to the page but find it dangerous: what if the credentials change, what if the

Re: Wicket tester login pages

2010-01-04 Thread Martijn Dashorst
You probably store the credentials (or isAuthenticated() == true) in the session. Just set the credentials *on* your session during testing. Martijn On Mon, Jan 4, 2010 at 12:32 PM, Pierre Goupil goupilpie...@gmail.com wrote: Hello all, Is there a way to access directly a page in Wicket

Re: Wicket tester test coverage

2009-12-01 Thread ZedroS Schwart
If the element is not in a loop, just specify the HTML ID in the template. If it is in a loop, use xpath. oh. Thanks :$ I thought wicket id were incremeting on request, meaning that even without loop the same page loaded twice would end up with a different id (with an incremented number). I

Re: Wicket tester test coverage

2009-11-27 Thread Kent Tong
zedros wrote: I saw it, but we're using guice (when, it wouldn't be a show stopper in the end). Still, on the technical side, there's also this issue with selenium using mostly id, whereas wicket'ids change with each request... How do you solve this issue ? If the element is not in a

Re: Wicket tester test coverage

2009-11-25 Thread Pierre Goupil
I use it, and what I'm looking for is a mean to ensure my test coverage. On Wed, Nov 25, 2009 at 6:13 AM, Kent Tong k...@cpttm.org.mo wrote: Pierre Goupil wrote: So I'm looking for a way to list all Page instances in a Wicket app, which could then allow me to be sure that they are

Re: Wicket tester test coverage

2009-11-25 Thread ZedroS Schwart
Hi Kent On Wed, Nov 25, 2009 at 6:13 AM, Kent Tong k...@cpttm.org.mo wrote: What you need is TDD. Once you adopt TDD, you will have every page tested. I was under the assumption that unit testing isn't valuable for GUI, esp. web gui, since the effort is too important... I think I even read

Re: Wicket tester test coverage

2009-11-25 Thread Jeremy Thomerson
Use Cobertura or similar. It will work for both your use cases and provide you with coverage metrics. -- Jeremy Thomerson http://www.wickettraining.com On Wed, Nov 25, 2009 at 2:23 AM, Pierre Goupil goupilpie...@gmail.comwrote: I use it, and what I'm looking for is a mean to ensure my test

Re: Wicket tester test coverage

2009-11-25 Thread Daan van Etten
Hi, What you can do is scan all Page classes (or Panel classes, etc) on the class-path and check if there are tests for them. Put this code in a unit test. Fail the test if you find a class without accompanying test. You can use this example to get started with the class path scanning:

Re: Wicket tester test coverage

2009-11-25 Thread Martijn Dashorst
Spring has a classpath scanner which you can copy and adapt to scan for pages and then try to instantiate them. The problem is often that pages don't have a default constructor, which is a problem if you want to instantiate them automagically. Martijn On Wed, Nov 25, 2009 at 12:57 AM, Pierre

Re: Wicket tester test coverage

2009-11-25 Thread Kent Tong
zedros wrote: I was under the assumption that unit testing isn't valuable for GUI, esp. web gui, since the effort is too important... I think I even read uncle bob saying so. How do you suggest to write/do TDD for web pages ? Without reference to his article, I can only guess that it

Re: Wicket tester test coverage

2009-11-25 Thread Daan van Etten
In my other post I gave a link to a full-fledged example which scans for Panel classes with the default constructor and instantiates them. http://stuq.nl/weblog/2009-11-01/automatically-test-your-wicket-panel-html-markup This has almost no value (in my opinion) for reporting unit testing

Re: Wicket tester test coverage

2009-11-25 Thread Pierre Goupil
Ouch! It's exactly what my first point was trying to achieve. Thanx a lot! Now, I'll have to adapt it to Selenium. I'll try post it on your blog, Daan. Who said TDD?. I know that not so much is tested in this way be it's so exhaustive (regarding the total number of Pages / Components to check)

Re: Wicket tester test coverage

2009-11-25 Thread Kent Tong
Pierre Goupil wrote: I use it, and what I'm looking for is a mean to ensure my test coverage. If you're using TDD, you will have developed the page and the unit test for that page at the same time and by definition you won't have a page that is not tested. - -- Kent Tong Better way

Re: Wicket tester test coverage

2009-11-25 Thread Pierre Goupil
Sure. But from the beginning, I was looking for a way not to write the famous 2 lines of code (see above) for each page and component. I'll have a look for sure at your lib, the Selenium integration is promising. :-) On Wed, Nov 25, 2009 at 10:25 AM, Kent Tong k...@cpttm.org.mo wrote:

Re: Wicket tester test coverage

2009-11-25 Thread Pierre Goupil
Yeah, test coverage is a big word here. But as I said I was not looking for a way to generate a report, just a mean to have my test suit fail if 1) a page throws an exception at instantiation 2) a page has not been so tested. That's exactly what you did and I'm not surprised not to be the first

Re: Wicket tester test coverage

2009-11-25 Thread Daan van Etten
Item 2 (fail if a page has not been tested) is not in my solution, but I'm glad I could help :-) Regards, Daan van Etten On Wed, 2009-11-25 at 10:32 +0100, Pierre Goupil wrote: Yeah, test coverage is a big word here. But as I said I was not looking for a way to generate a report, just a mean

Re: Wicket tester test coverage

2009-11-25 Thread Pierre Goupil
No, it isn't but: -with your solution, no test has to be written especially for each Component / Page (if one just want to check for exception) -so we are assured that no Page / Component is forgotten (in the check for exception process)) :-) On Wed, Nov 25, 2009 at 10:40 AM, Daan van Etten

Re: Wicket tester test coverage

2009-11-25 Thread ZedroS Schwart
Without reference to his article, I can only guess that it may be pointless to test the position or the color of a button in automated tests. I think it was this one : http://www.infoq.com/news/2009/11/uncle-bob-tdd-applicability but in fact uncle bob mainly says it's pointless to do TDD when

Re: Wicket tester test coverage

2009-11-24 Thread Kent Tong
Pierre Goupil wrote: So I'm looking for a way to list all Page instances in a Wicket app, which could then allow me to be sure that they are all covered by a test. And when it's done maybe I could use the same system in order to ensure that Selenium (the automated functional testing

Re: Wicket tester mock server name

2009-11-04 Thread Igor Vaynberg
you can create your own subclass of mockhttpservletrequest and return whatever you want. hooking it into wickettester should not be that bad... if it is we can see if we can make it easier. -igor On Wed, Nov 4, 2009 at 8:27 AM, Ted Vinke tvi...@first8.nl wrote: Hi! Seems a bit dumb I can't

Re: Wicket tester form submission problem

2009-04-21 Thread Martijn Dashorst
FormTester ft = tester.newFormTester(form); ft.submit(); Did you also check for any validation errors? Martijn On Tue, Apr 21, 2009 at 6:03 PM, Chiradeep Chhaya cbchh...@gmail.com wrote: I have a form that contains an indicating ajax button which when clicked performs some calculations and

Re: Wicket tester form submission problem

2009-04-21 Thread cbchhaya
Martijn, That's exactly what I am doing (I think form.submit earlier was confusing - apologies). The button has setDefaultFormProcessing to true (but is used to setResponsePage) - although this works fine functionally, could that be an issue with the test? I will debug the tree to see if

Re: Wicket Tester

2009-01-19 Thread PSkarthic
The links are very usefull. Thank you very much for your help. Regards karthic -- View this message in context: http://www.nabble.com/Wicket-Tester-tp21537981p21539882.html Sent from the Wicket - User mailing list archive at Nabble.com.

Re: Wicket Tester

2009-01-18 Thread Jeremy Thomerson
http://www.google.com/search?q=testing+wicket http://www.google.com/search?q=how+to+use+wicket+tester http://cwiki.apache.org/WICKET/testing-pages.html http://cwiki.apache.org/WICKET/unit-test.html On Mon, Jan 19, 2009 at 1:21 AM, PSkarthic kart...@touchpointindia.comwrote: Hi I have

Re: Wicket tester calling load twice in loadableDetachableModel

2008-04-24 Thread James Carman
On Wed, Apr 23, 2008 at 10:06 PM, Ned Collyer [EMAIL PROTECTED] wrote: Hi I have the following, and its resulting in 2x calls to the load on my model - which confuses me. My panel has the following in its constructor. setModel(new CompoundPropertyModel(new LoadableDetachableModel() {

Re: Wicket tester calling load twice in loadableDetachableModel

2008-04-24 Thread James Carman
On Thu, Apr 24, 2008 at 6:56 AM, James Carman [EMAIL PROTECTED] wrote: On Wed, Apr 23, 2008 at 10:06 PM, Ned Collyer [EMAIL PROTECTED] wrote: Hi I have the following, and its resulting in 2x calls to the load on my model - which confuses me. My panel has the following in its

Re: Wicket tester calling load twice in loadableDetachableModel

2008-04-24 Thread Ned Collyer
Thanks for the feedback - an interesting work around :) Generally I'd put my general service expectations in the setUp() and my verifies in the tearDown(), but I think I'm comfortable moving the verify in this circumstance. Rgds Ned On Thu, Apr 24, 2008 at 8:58 PM, James Carman [EMAIL

Re: Wicket Tester And OpenSessionInView

2008-03-02 Thread lars vonk
One thing is to run each test in a single transaction. This way the session will remain open. I tend to use Spring for this (see http://static.springframework.org/spring/docs/2.5.x/reference/testing.html#testcontext-tx. ). If you are not using Spring you could start a transaction yourself. Hop

Re: Wicket Tester And Code Output

2008-02-27 Thread Maurice Marrink
wickettester.getServletResponse().getDocument() Maurice On Wed, Feb 27, 2008 at 9:43 PM, carloc [EMAIL PROTECTED] wrote: Hi, I'm using Wicket Tester to render my pages, is there a way by which I can see the code that is rendered? For example I have, wicketTester.startPage(new

Re: wicket tester / tester.assertResultPage(clazz, filename);

2007-09-06 Thread Nino Saturnino Martinez Vazquez Wael
I should also mentioned that Im testing by doing this: WicketTester.assertResultPage(this.getClass(), filename); Nino Saturnino Martinez Vazquez Wael wrote: Hi Im trying to create a test that renders a page and then compares it to the expected result. Currently I keep getting diff errors

Re: wicket tester / tester.assertResultPage(clazz, filename);

2007-09-06 Thread Nino Saturnino Martinez Vazquez Wael
Fidling around with the spaces, I've now boiled it down to this error only: ERROR - DiffUtil - === It's not that descriptive though:( Cant really see whats wrong.. regards Nino Nino Saturnino Martinez Vazquez Wael wrote: I should also mentioned that Im

Re: wicket tester / tester.assertResultPage(clazz, filename);

2007-09-06 Thread Nino Saturnino Martinez Vazquez Wael
looking at the sourcefile I saw this option: -Dwicket.replace.expected.results=true could this be what I was looking for to genereate the expected results? I think so:) regards Nino Nino Saturnino Martinez Vazquez Wael wrote: Fidling around with the spaces, I've now boiled it down to this