use of org.opennms.netmgt.poller.monitors.SeleniumMonitor in project opennms by OpenNMS.
the class SeleniumMonitorTest method testPollStatusNotNull.
// Requires Firefox to be installed to run
@Test
@JUnitHttpServer(port = 10342, webapps = @Webapp(context = "/opennms", path = "src/test/resources/testWar"))
public void testPollStatusNotNull() throws UnknownHostException {
MonitoredService monSvc = new MockMonitoredService(1, "papajohns", InetAddressUtils.addr("213.187.33.164"), "PapaJohnsSite");
Map<String, Object> params = new HashMap<String, Object>();
params.put("selenium-test", "SeleniumGroovyTest.groovy");
params.put("base-url", "localhost");
params.put("port", "10342");
SeleniumMonitor ajaxPSM = new SeleniumMonitor();
PollStatus pollStatus = ajaxPSM.poll(monSvc, params);
assertNotNull("PollStatus must not be null", pollStatus);
System.err.println("PollStatus message: " + pollStatus.getReason());
assertEquals(PollStatus.available(), pollStatus);
}
Aggregations