diff --git a/src/test-acceptance/java/jscover/ui/HtmlUnitUITest.java b/src/test-acceptance/java/jscover/ui/HtmlUnitUITest.java index 51b0e005..c06eff2b 100644 --- a/src/test-acceptance/java/jscover/ui/HtmlUnitUITest.java +++ b/src/test-acceptance/java/jscover/ui/HtmlUnitUITest.java @@ -367,12 +367,12 @@ You should also get your employer (if you work as a programmer) or your public class HtmlUnitUITest { private static Thread server; private static Main main = new Main(); - private static HTMLCoverageData scriptA = new HTMLCoverageData("/scripts/script-a.js", "33%", "0%", "33%"); - private static HTMLCoverageData scriptB = new HTMLCoverageData("/scripts/script-b.js", "50%", "0%", "66%"); - private static HTMLCoverageData scriptC = new HTMLCoverageData("/scripts/script-c.js", "72%", "25%", "100%"); - private static HTMLCoverageData scriptD = new HTMLCoverageData("/scripts/script-d.js", "100%", "100%", "100%"); - private static HTMLCoverageData scriptEmpty = new HTMLCoverageData("/scripts/script-empty.js", "N/A", "N/A", "N/A"); - private static HTMLCoverageData scriptLine = new HTMLCoverageData("/scripts/script-line.js", "100%", "N/A", "N/A"); + private static HTMLCoverageData scriptA = new HTMLCoverageData("/test-classes/jscover/ui/scripts/script-a.js", "33%", "0%", "33%"); + private static HTMLCoverageData scriptB = new HTMLCoverageData("/test-classes/jscover/ui/scripts/script-b.js", "50%", "0%", "66%"); + private static HTMLCoverageData scriptC = new HTMLCoverageData("/test-classes/jscover/ui/scripts/script-c.js", "72%", "25%", "100%"); + private static HTMLCoverageData scriptD = new HTMLCoverageData("/test-classes/jscover/ui/scripts/script-d.js", "100%", "100%", "100%"); + private static HTMLCoverageData scriptEmpty = new HTMLCoverageData("/test-classes/jscover/ui/scripts/script-empty.js", "N/A", "N/A", "N/A"); + private static HTMLCoverageData scriptLine = new HTMLCoverageData("/test-classes/jscover/ui/scripts/script-line.js", "100%", "N/A", "N/A"); private static List data = new ArrayList<>(); private static Map> dataMap = new HashMap<>(); static { @@ -389,9 +389,10 @@ public class HtmlUnitUITest { protected static String[] args = new String[]{ "-ws", - "--document-root=src/test-acceptance/resources/jscover/ui", + "--document-root=target", "--port=9001", "--no-instrument=example/lib", + "--no-instrument=UI-testing", "--report-dir=" + reportDir }; @@ -416,7 +417,7 @@ public void setUp() { private static void storeResult() throws IOException { WebClient webClient = new WebClient(); webClient.getOptions().setTimeout(1000); - HtmlPage page = webClient.getPage("http://localhost:9001/jscoverage.html?index.html"); + HtmlPage page = webClient.getPage("http://localhost:9001/jscoverage.html?/test-classes/jscover/ui/index.html"); page.getHtmlElementById("storeTab").click(); webClient.waitForBackgroundJavaScript(500); @@ -429,7 +430,7 @@ private static void storeResult() throws IOException { @Test public void shouldSortFilesByName() throws IOException { - HtmlPage page = webClient.getPage("file:///"+ new File(reportDir+"/jscoverage.html").getAbsolutePath()); + HtmlPage page = webClient.getPage("http://localhost:9001/UI-testing/jscoverage.html"); page.getHtmlElementById("summaryTab").click(); webClient.waitForBackgroundJavaScript(2000); @@ -449,7 +450,7 @@ private void verifyScriptMatchesRow(HTMLCoverageData data, HtmlTableRow row) { @Test public void shouldSortFilesByCoverage() throws IOException { - HtmlPage page = webClient.getPage("file:///"+ new File(reportDir+"/jscoverage.html").getAbsolutePath()); + HtmlPage page = webClient.getPage("http://localhost:9001/UI-testing/jscoverage.html"); page.getHtmlElementById("summaryTab").click(); webClient.waitForBackgroundJavaScript(2000); page.getHtmlElementById("sortByName").click();