On 05/17/2010 08:13 AM, Vincent Massol wrote:
On May 17, 2010, at 2:34 AM, sdumitriu (SVN) wrote:
Author: sdumitriu Date: 2010-05-17 02:34:18 +0200 (Mon, 17 May 2010) New Revision: 28901
Modified: enterprise/trunk/distribution-test/ui-tests/src/test/it/org/xwiki/it/ui/EscapeTest.java Log: [misc] Added a test.
Modified: enterprise/trunk/distribution-test/ui-tests/src/test/it/org/xwiki/it/ui/EscapeTest.java
[snip]
+ /** + * Go to a working page after each test run to prevent failures in {@link #setUp()} + */ + @After + public void tearDown() + { + TestUtils.gotoPage("Main", "WebHome", getDriver()); + }
It's a little bit better to do this in setUp rather than in tearDown, for performance (Each test is responsible to set up a working state).
It's not about setting up for the tests in this class, but leaving a working page for the next (whatever, unknown) test. It's not a common requirement, but this particular test might leave a broken page, like a missing header, thus causing the is logged in check to fail. Why do you say it's bad for performance? -- Sergiu Dumitriu http://purl.org/net/sergiu/