Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
161 views

Why my unit test is giving me an AssertionFailedError when I try to render another page

I am learning unit testing and trying to check if the login is valid on the HomePage and if so that the SuccessPage is rendered but it is giving me an AssertionFailedError .java: @Test ...
JägerKS's user avatar
0 votes
2 answers
388 views

How to write unit testing checking null input values using wicket

I am busy with a wicket application and need to do unit testing, and I have a login page that validates inputs from a List<Customer> but I have no idea where to start, I did try something but it ...
JägerKS's user avatar
-5 votes
1 answer
113 views

What means this Exception?

I try to test a code and got the Exception below: The component(s) below failed to render. Possible reasons could be that: 1) you have added a component in code but forgot to reference it in the ...
Dean James's user avatar
0 votes
1 answer
81 views

How can I run a test in deployment mode with WicketTester?

I want to run my tests in WicketTester in deployment mode? Is it possible to do that? I tried searching the web, but WicketTester is not really well documented.
Kamil Grosicki's user avatar
0 votes
1 answer
126 views

Cannot start WicketTester

I want to use WicketTester. But the very first line already throws an exception: WicketTester tester = new WicketTester(); The exception is: java.lang.IncompatibleClassChangeError: class net.sf....
Jemolah's user avatar
  • 2,172
1 vote
1 answer
521 views

WicketTester Select Radio Choice and click DownloadLink

I have an issue to understand how to do it correctly, as I could not find any solution on the net. I try to test radio selection and click on a download link (bonus would be asserting the downloaded ...
kism3t's user avatar
  • 1,361
1 vote
1 answer
732 views

Set a Page for Component Testing with Apache Wicket

I am testing some components in my wicket 7 application. My Component is nothing special but it inherits from public PageAwarePanel extends Panel { @Override protected void onInitialize() { ...
kism3t's user avatar
  • 1,361
0 votes
1 answer
740 views

wicket test send ajax request

I've encountered some days ago the following Problem: I have a Page.class with 2 panels. Panel 1 for example gets a click on a Datatable. @Override protected void onRowClick(final AjaxRequestTarget ...
Keey's user avatar
  • 319
0 votes
1 answer
145 views

Wicket tester not searching WebApplicationPath

In my first Wicket project (developed in Wicket 6.20 using Eclipse mars and Glassfish 4.1) based on the Quickstart Maven archetype, I am using getResourceSettings().getResourceFinders().add(new ...
grahamj42's user avatar
  • 2,762
6 votes
0 answers
466 views

Wicket page test, Jetty security configuration

I am trying to test my wicket project using Wicket Page Test. Starting the test causes Jetty to throw this error: 2015-03-24 17:46:24,789 WARN [:] [main] [] [||] - org.eclipse.jetty.webapp....
Cloud's user avatar
  • 468
0 votes
1 answer
87 views

Preferred way to handle Non-Form-Submitting AjaxEvents in Wicket-Tester

assuming I have the following code in wicket TextField foo = ...; TextField bar = ...; bar.add(new AjaxEventBehavior("change") { @Override protected void onEvent(AjaxRequestTarget ...
Ansgar Schulte's user avatar
1 vote
2 answers
449 views

Wicket JUnit test doesn't use UTF-8 properties

I am building an application with Wicket and I am writing JUnit tests for my pages. My pages are in one package, which also contains a properties file called wicket-package.utf8.properties. The ...
lmazgon's user avatar
  • 1,254
1 vote
1 answer
785 views

How to test a link's text in Wicket

I'm trying to implement a link with dynamic text in Wicket, with the username as its text. My first thought was to do something like this in the markup: <a wicket:id="somelink"><wicket:...
ethanfar's user avatar
  • 3,778
1 vote
1 answer
200 views

How can I test AutoComplete component with WicketTester

I'm wondering if anyone of you could know how to test auto-complete textfield using wickettester, I have tried formTester.setValue("path",""); wicketTester.executeAjaxEvent("path","onchange"); I've ...
hzitoun's user avatar
  • 5,832
2 votes
2 answers
1k views

unit-testing Wicket input components

I just wrote my first Wicket component :) It contains a ListView with some Radio input fields. Now I want to unit test if a selected value makes its way to the model. As WicketTester.newFormTester("...
Marcus's user avatar
  • 2,073
4 votes
1 answer
619 views

Wicket Auth/Roles user authentication before testing web Page

I have a web app which use Wicket Auth/Roles to login user and assign roles. (http://wicket.apache.org/learn/projects/authroles.html) You can refer to this example too: http://www.wicket-library.com/...
abuteau's user avatar
  • 7,431
3 votes
1 answer
239 views

WickeTester - IllegalStateException: No CDI context bound to application

I have Wicket Form and ProjectNameValidator class: @Inject ProjectDao dao; public ProjectNameValidator() { CdiContainer.get().getNonContextualManager().inject(this); } the injection ...
Monika Gottvaldova's user avatar
3 votes
1 answer
1k views

Guice and Wicket: using SessionScoped injections

I have a working Wicket [v6] application with Guice [v3] - I have used dependency injection for repository operations right now and I want to expend it into using services that are session scoped (one ...
Paul's user avatar
  • 389
6 votes
1 answer
2k views

WicketTester how to get html output for component?

I want to check if a given component has a CSS class set. To do this, I would like to get the HTML output for just that specific component. WicketTester can provide the HTML output for the entire ...
Rob Audenaerde's user avatar
2 votes
1 answer
1k views

Unit test with WicketTester and CDI-Unit works in Eclipse but fails during Maven build. What am I missing?

I am trying out using CDI-Unit to test my Wicket components, which are using CDI for dependency injection. Tests seems to work perfectly in Eclipse but fail during my Maven build and I cant seem to ...
Jesper Tejlgaard's user avatar
0 votes
2 answers
784 views

Test a input without the WicketForm

I have panels that's create input fields and that are include in a form in another panel creating the form. My problem is that I don't see how to unit test my panel. Let's say I have this java : ...
wishper's user avatar
  • 625
2 votes
1 answer
2k views

testing wicket pages

I am writing tests for wicket pages. I have three dropdowns on my page. Depending upon the values selected from the dropdowns the panel gets rendered(the panel contains a data table). How do I change ...
sweetcode's user avatar
  • 159
1 vote
1 answer
663 views

Wickettester on two submits of same form

I'm having trouble sending a wickettester form twice and validating that the error message given the first time is removed in the second submit. In the code given below I first submit an empty form ...
staffang's user avatar
  • 176
3 votes
1 answer
2k views

Wicket (Java) : How to use wickettester to test if 404 redirected to correct page

With the wicketframework it's possible to use wickettester and see lastrenderedpage. I want to test if my wicketapplication redirects the user to my custom ErrorPage on runtimeexceptions and missing ...
Beamie's user avatar
  • 715
0 votes
2 answers
1k views

How do you test Wicket TextFields for read-only?

I want to test that my Wicket TextField is set to readonly. I have set up my WicketTester but that just supports assertDisabled() which is useless and fails in my case. I already tried tester....
Lucas Hoepner's user avatar
4 votes
2 answers
2k views

Using WicketTester to verify a Validator is added to a TextField?

I have the following panel that I use in my wicket application and I want to write a test to ensure that calling addPatternValidator(String pattern) adds a PatternValidator to the TextField. public ...
jrochette's user avatar
  • 1,117
5 votes
2 answers
933 views

How do I keep component paths constant across unit tests when using Wicket Tester

I have several wicket tests that target a sortable DataTable, specifically ajax-clicking the sortable column headers and asserting the contents of the rendered body rows. Now the component hierarchy ...
Michael-7's user avatar
  • 1,789
0 votes
2 answers
251 views

WicketTester with Hibernate

I'm currently figuring out how to make my Wicket Application testable. Basically, it is a Wicket / Hibernate / Apache Derby setup. Hibernate is used as a filter (as seen on: http://community.jboss....
Rob Audenaerde's user avatar
1 vote
1 answer
2k views

Testing Wicket panels with constructor arguments

I got a page with several panels that takes several parameters in their constructors. One of them being a menu that takes a list for the different buttons in the menu. I've tried to test it as ...
Alvin's user avatar
  • 178
0 votes
1 answer
747 views

How can I set http Header Data in WicketTester

I have web application that is behind a proxy. If the user has logged in, an http-header is set. I have a page that checks the header, to make sure the user isn't logged in. How can I add the header ...
Raystorm's user avatar
  • 6,528
4 votes
2 answers
5k views

How to unit test a custom Wicket component

Given this really simple Wicket component: public class ProductImage extends WebComponent { public ProductImage(String id, Product p) { super(id, new Model(p)); add(new ...
Eduardo Costa's user avatar
3 votes
3 answers
1k views

Can I get the source of the current Wicket Page?

I've been using wicketTester.getServetResponse.getDocument to get the text of the current page for testing, only to find that after an ajax request it is set to the ajax response, not the whole page. ...
Duncan McGregor's user avatar
0 votes
1 answer
228 views

How can I tell from a Wicket Page object that it has changed?

Here's my scenario. I'm testing a Wicket app, and I'm parsing the page text wicktetTester.getServletResponse.getDocument as XML in order to find components with XPath. This is quite expensive, so I'd ...
Duncan McGregor's user avatar
1 vote
1 answer
487 views

wicket and AtUnit

I've started playing with Wicket and I've chosen Guice as dependency injection framework. Now I'm trying to learn how to write a unit test for a WebPage object. I googled a bit and I've found this ...
kamiseq's user avatar
  • 11
1 vote
1 answer
282 views

How do I query the text of an element (Component) using WicketTester?

Rather than specifying the id-path for components to click in WicketTester I'd like to find the link with a specific text. I can use MarkupContainer.visitChildren to run through the tree, but can I ...
Duncan McGregor's user avatar
8 votes
6 answers
5k views

How to test AjaxFormChoiceComponentUpdatingBehavior in WicketTester

In my Wicket application I used one radio button with "yes" and "no" options. If I select "No", I should display one dropdown choice. I wrote code using AjaxFormChoiceComponentUpdatingBehavior. How ...
Robo's user avatar
  • 81
6 votes
1 answer
3k views

How to type into input field with WicketTester?

I'm writing a unit test for a Wicket WebPage. I want to fire up a page, type into a field, click a link, and then make some assertions. Looking at the API of WicketTester and BaseWicketTester, I ...
Jonik's user avatar
  • 81.6k