Skip to content

Commit 3705de8

Browse files
committed
Expand set of browsers used for core runner tests
1 parent adc8214 commit 3705de8

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

java/server/test/org/openqa/selenium/server/htmlrunner/CoreSelfTest.java

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
package org.openqa.selenium.server.htmlrunner;
1919

2020
import static org.junit.Assert.assertEquals;
21-
import static org.junit.Assert.assertTrue;
2221

22+
import com.google.common.base.StandardSystemProperty;
2323
import com.google.common.collect.ImmutableSortedSet;
2424

2525
import com.thoughtworks.selenium.testing.SeleniumAppServer;
@@ -33,8 +33,10 @@
3333
import org.openqa.selenium.environment.webserver.AppServer;
3434
import org.openqa.selenium.os.CommandLine;
3535

36-
import java.io.File;
3736
import java.io.IOException;
37+
import java.nio.file.Files;
38+
import java.nio.file.Path;
39+
import java.nio.file.Paths;
3840
import java.util.concurrent.TimeUnit;
3941

4042
@RunWith(Parameterized.class)
@@ -61,8 +63,12 @@ public static void stopTestServer() {
6163
@Test
6264
public void executeTests() throws IOException {
6365
String testBase = server.whereIs("/selenium-server/tests");
64-
File outputFile = File.createTempFile("core-test-suite", browser.replace('*', '-') + ".html");
65-
assertTrue(outputFile.delete());
66+
Path outputFile = Paths.get(StandardSystemProperty.JAVA_IO_TMPDIR.value())
67+
.resolve("core-test-suite" + browser.replace('*', '-') + ".html");
68+
if (Files.exists(outputFile)) {
69+
Files.delete(outputFile);
70+
}
71+
Files.createDirectories(outputFile.getParent());
6672

6773
String result = new HTMLLauncher()
6874
.runHTMLSuite(
@@ -72,7 +78,7 @@ public void executeTests() throws IOException {
7278
// ends up as "/tests" rather than "/selenium-server/tests" as you'd expect.
7379
testBase + "/TestSuite.html",
7480
testBase + "/TestSuite.html",
75-
outputFile,
81+
outputFile.toFile(),
7682
TimeUnit.MINUTES.toMillis(5),
7783
true);
7884

@@ -87,8 +93,8 @@ public static Iterable<String> parameters() {
8793
browsers.add("*googlechrome");
8894
}
8995

90-
if (CommandLine.find("wires") != null) {
91-
// browsers.add("*firefox");
96+
if (CommandLine.find("geckodriver") != null) {
97+
browsers.add("*firefox");
9298
}
9399

94100
switch (Platform.getCurrent().family()) {
@@ -97,7 +103,7 @@ public static Iterable<String> parameters() {
97103
break;
98104

99105
case WINDOWS:
100-
browsers.add("*iexplore");
106+
browsers.add("*MicrosoftEdge");
101107
break;
102108
}
103109

0 commit comments

Comments
 (0)