17
17
18
18
package org .openqa .selenium .server .htmlrunner ;
19
19
20
+ import static org .junit .Assert .assertEquals ;
20
21
import static org .junit .Assert .assertTrue ;
21
22
22
23
import com .google .common .collect .ImmutableSortedSet ;
@@ -60,18 +61,22 @@ public static void stopTestServer() {
60
61
@ Test
61
62
public void executeTests () throws IOException {
62
63
String testBase = server .whereIs ("/selenium-server/tests" );
63
- File outputFile = File .createTempFile ("core-test-suite" , browser .replace ('*' , '-' ) + ".txt " );
64
+ File outputFile = File .createTempFile ("core-test-suite" , browser .replace ('*' , '-' ) + ".html " );
64
65
assertTrue (outputFile .delete ());
65
66
66
- new HTMLLauncher ().runHTMLSuite (browser ,
67
- // We need to do this because the path relativizing code in java.net.URL is
68
- // clearly having a bad day. "/selenium-server/tests" appended to "../tests/"
69
- // ends up as "/tests" rather than "/selenium-server/tests" as you'd expect.
70
- testBase + "/TestSuite.html" ,
71
- testBase + "/TestSuite.html" ,
72
- outputFile ,
73
- TimeUnit .MINUTES .toMillis (5 ),
74
- true );
67
+ String result = new HTMLLauncher ()
68
+ .runHTMLSuite (
69
+ browser ,
70
+ // We need to do this because the path relativizing code in java.net.URL is
71
+ // clearly having a bad day. "/selenium-server/tests" appended to "../tests/"
72
+ // ends up as "/tests" rather than "/selenium-server/tests" as you'd expect.
73
+ testBase + "/TestSuite.html" ,
74
+ testBase + "/TestSuite.html" ,
75
+ outputFile ,
76
+ TimeUnit .MINUTES .toMillis (5 ),
77
+ true );
78
+
79
+ assertEquals ("PASSED" , result );
75
80
}
76
81
77
82
@ Parameterized .Parameters
@@ -96,7 +101,6 @@ public static Iterable<String> parameters() {
96
101
break ;
97
102
}
98
103
99
- System .out .println ("browsers.build() = " + browsers .build ());
100
104
return browsers .build ();
101
105
}
102
106
}
0 commit comments