use of org.webpieces.webserver.test.SeleniumOverridesForTest in project webpieces by deanhiller.
the class SeleniumBasicTest method setUp.
@Before
public void setUp() throws InterruptedException, ClassNotFoundException {
Asserts.assertWasCompiledWithParamNames("test");
//you may want to create this server ONCE in a static method BUT if you do, also remember to clear out all your
//mocks after every test AND you can no longer run multi-threaded(tradeoffs, tradeoffs)
//This is however pretty fast to do in many systems...
WebserverForTest webserver = new WebserverForTest(new SeleniumOverridesForTest(), new AppOverridesModule(), true, null);
webserver.start();
port = webserver.getUnderlyingHttpChannel().getLocalAddress().getPort();
}
use of org.webpieces.webserver.test.SeleniumOverridesForTest in project webpieces by deanhiller.
the class TestLesson4WithSelenium method setUp.
@Before
public void setUp() throws InterruptedException, ClassNotFoundException {
driver = new FirefoxDriver();
Asserts.assertWasCompiledWithParamNames("test");
jdbc.dropAllTablesFromDatabase();
//you may want to create this server ONCE in a static method BUT if you do, also remember to clear out all your
//mocks after every test and NOT drop tables but clear and re-populate
Server webserver = new Server(new SeleniumOverridesForTest(), new AppOverridesModule(), new ServerConfig(0, 0, pUnit));
webserver.start();
httpPort = webserver.getUnderlyingHttpChannel().getLocalAddress().getPort();
httpsPort = webserver.getUnderlyingHttpsChannel().getLocalAddress().getPort();
}
use of org.webpieces.webserver.test.SeleniumOverridesForTest in project webpieces by deanhiller.
the class TestPRGSelenium method setUp.
@Before
public void setUp() throws InterruptedException, ClassNotFoundException {
Asserts.assertWasCompiledWithParamNames("test");
VirtualFileClasspath metaFile = new VirtualFileClasspath("beansMeta.txt", WebserverForTest.class.getClassLoader());
WebserverForTest webserver = new WebserverForTest(new SeleniumOverridesForTest(), new AppOverridesModule(), true, metaFile);
webserver.start();
port = webserver.getUnderlyingHttpChannel().getLocalAddress().getPort();
}
use of org.webpieces.webserver.test.SeleniumOverridesForTest in project webpieces by deanhiller.
the class TestScopesSelenium method setUp.
@Ignore
@Before
public void setUp() throws InterruptedException, ClassNotFoundException {
Asserts.assertWasCompiledWithParamNames("test");
VirtualFileClasspath metaFile = new VirtualFileClasspath("scopesMeta.txt", WebserverForTest.class.getClassLoader());
WebserverForTest webserver = new WebserverForTest(new SeleniumOverridesForTest(), null, true, metaFile);
webserver.start();
port = webserver.getUnderlyingHttpChannel().getLocalAddress().getPort();
}
use of org.webpieces.webserver.test.SeleniumOverridesForTest in project webpieces by deanhiller.
the class TestStaticSelenium method setUp.
@Before
public void setUp() throws InterruptedException, ClassNotFoundException {
Asserts.assertWasCompiledWithParamNames("test");
VirtualFileClasspath metaFile = new VirtualFileClasspath("staticMeta.txt", WebserverForTest.class.getClassLoader());
WebserverForTest webserver = new WebserverForTest(new SeleniumOverridesForTest(), null, true, metaFile);
webserver.start();
port = webserver.getUnderlyingHttpChannel().getLocalAddress().getPort();
}
Aggregations