I have a web application that uses Wicket Auth / Roles to log in a user and assign roles. ( http://wicket.apache.org/learn/projects/authroles.html )
You can also refer to this example: http://www.wicket-library.com/wicket-examples-6.0.x/authentication3/
I have many web pages and I want to log in to my application before testing my pages. My test page extends WebAppTestBase.
Here is my code for WebAppTestBase:
public class WebAppTestBase {
protected WicketTester wicketTester;
private MyAuthenticatedWebApplication myAuthenticatedWebApplication = new MyAuthenticatedWebApplication();
@Before
public void setUp() {
wicketTester = new WicketTester(myAuthenticatedWebApplication);
}
@After
public void tearDown() {
wicketTester.destroy();
}
}
So, how can I set AuthenticatedWebSession authentication to authenticate my user, so I can check another page.
Hi,