Author: jpeterka
Date: 2012-08-07 10:34:05 -0400 (Tue, 07 Aug 2012)
New Revision: 42885
Modified:
trunk/tests/tests/org.jboss.tools.dummy.ui.bot.test/META-INF/MANIFEST.MF
trunk/tests/tests/org.jboss.tools.dummy.ui.bot.test/build.properties
trunk/tests/tests/org.jboss.tools.dummy.ui.bot.test/src/org/jboss/tools/dummy/ui/bot/test/DummyTest.java
Log:
dummy ui bot test logging issues fixed
Modified: trunk/tests/tests/org.jboss.tools.dummy.ui.bot.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/tests/tests/org.jboss.tools.dummy.ui.bot.test/META-INF/MANIFEST.MF 2012-08-07
14:16:02 UTC (rev 42884)
+++ trunk/tests/tests/org.jboss.tools.dummy.ui.bot.test/META-INF/MANIFEST.MF 2012-08-07
14:34:05 UTC (rev 42885)
@@ -6,6 +6,8 @@
Bundle-Activator: org.jboss.tools.dummy.ui.bot.test.Activator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
- org.eclipse.swtbot.go;bundle-version="2.0.5"
+ org.eclipse.swtbot.go;bundle-version="2.0.5",
+ org.apache.log4j
+Eclipse-RegisterBuddy: org.apache.log4j
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Modified: trunk/tests/tests/org.jboss.tools.dummy.ui.bot.test/build.properties
===================================================================
--- trunk/tests/tests/org.jboss.tools.dummy.ui.bot.test/build.properties 2012-08-07
14:16:02 UTC (rev 42884)
+++ trunk/tests/tests/org.jboss.tools.dummy.ui.bot.test/build.properties 2012-08-07
14:34:05 UTC (rev 42885)
@@ -1,4 +1,5 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
- .
+ .,\
+ src/log4j.xml
Modified:
trunk/tests/tests/org.jboss.tools.dummy.ui.bot.test/src/org/jboss/tools/dummy/ui/bot/test/DummyTest.java
===================================================================
---
trunk/tests/tests/org.jboss.tools.dummy.ui.bot.test/src/org/jboss/tools/dummy/ui/bot/test/DummyTest.java 2012-08-07
14:16:02 UTC (rev 42884)
+++
trunk/tests/tests/org.jboss.tools.dummy.ui.bot.test/src/org/jboss/tools/dummy/ui/bot/test/DummyTest.java 2012-08-07
14:34:05 UTC (rev 42885)
@@ -4,11 +4,7 @@
import static org.eclipse.swtbot.swt.finder.waits.Conditions.shellIsActive;
import static org.junit.Assert.assertEquals;
-import java.io.OutputStreamWriter;
-
-import org.apache.log4j.ConsoleAppender;
import org.apache.log4j.Logger;
-import org.apache.log4j.PatternLayout;
import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;
import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
@@ -25,24 +21,14 @@
@RunWith(SWTBotJunit4ClassRunner.class)
public class DummyTest {
- static Logger log = Logger.getLogger(DummyTest.class);
+ static Logger log = Logger.getLogger("");
@BeforeClass
public static void before() {
- ConsoleAppender ca = new ConsoleAppender();
- ca.setWriter(new OutputStreamWriter(System.out));
- ca.setLayout(new PatternLayout("[%-5p] %t: %m%n"));
- log.addAppender(ca);
}
@Test
public void dummyTest() {
- Logger log = Logger.getLogger(this.getClass());
- ConsoleAppender ca = new ConsoleAppender();
- ca.setWriter(new OutputStreamWriter(System.out));
- ca.setLayout(new PatternLayout("[%-5p] %t: %m%n"));
- log.addAppender(ca);
-
String pref = "Preferences";
SWTWorkbenchBot bot = new SWTWorkbenchBot();
bot.menu("Window").menu(pref).click();
@@ -54,8 +40,12 @@
@Test
public void hundredTimes() {
- for (int i = 0 ; i < 100; i++)
+ final int cycles = 100;
+ for (int i = 0 ; i < cycles ; i++)
+ {
dummyTest();
+ log.info(i+1 + "/" + cycles + " try passed");
+ }
}
@AfterClass
Show replies by date