diff --git a/junit5/pom.xml b/junit5/pom.xml index fd03368..8f59a8f 100644 --- a/junit5/pom.xml +++ b/junit5/pom.xml @@ -4,9 +4,9 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - net.autobox.tools + com.github.automatedowl.tools chromedriver-js-errors-collector - 1.0-SNAPSHOT + 1.0.1 src/main/java src/test/java @@ -50,50 +50,26 @@ org.junit.jupiter junit-jupiter-engine 5.2.0 - test org.junit.jupiter junit-jupiter-api 5.2.0 - test org.seleniumhq.selenium selenium-api 3.8.1 - test org.seleniumhq.selenium selenium-chrome-driver 3.8.1 - test org.seleniumhq.selenium selenium-remote-driver 3.8.1 - - org.seleniumhq.selenium - selenium-api - 3.12.0 - - - org.junit.jupiter - junit-jupiter-api - 5.2.0 - - - org.junit.jupiter - junit-jupiter-api - 5.2.0 - - - org.seleniumhq.selenium - selenium-api - 3.8.1 - \ No newline at end of file diff --git a/junit5/src/main/java/net/autobox/tools/JSErrorsCollectorJUnit.java b/junit5/src/main/java/com/github/automatedowl/tools/JSErrorsCollectorJUnit.java similarity index 94% rename from junit5/src/main/java/net/autobox/tools/JSErrorsCollectorJUnit.java rename to junit5/src/main/java/com/github/automatedowl/tools/JSErrorsCollectorJUnit.java index 0dc34f5..e8c6e88 100644 --- a/junit5/src/main/java/net/autobox/tools/JSErrorsCollectorJUnit.java +++ b/junit5/src/main/java/com/github/automatedowl/tools/JSErrorsCollectorJUnit.java @@ -1,4 +1,4 @@ -package net.autobox.tools; +package com.github.automatedowl.tools; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/junit5/src/main/java/net/autobox/tools/JSErrorsExtension.java b/junit5/src/main/java/com/github/automatedowl/tools/JSErrorsExtension.java similarity index 94% rename from junit5/src/main/java/net/autobox/tools/JSErrorsExtension.java rename to junit5/src/main/java/com/github/automatedowl/tools/JSErrorsExtension.java index c48fde1..fe277c1 100644 --- a/junit5/src/main/java/net/autobox/tools/JSErrorsExtension.java +++ b/junit5/src/main/java/com/github/automatedowl/tools/JSErrorsExtension.java @@ -1,4 +1,4 @@ -package net.autobox.tools; +package com.github.automatedowl.tools; import static org.junit.jupiter.api.Assertions.assertThrows; @@ -8,7 +8,7 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.stream.Stream; -import net.autobox.tools.drivers.JSErrorsDriverHolder; +import com.github.automatedowl.tools.drivers.junitholder.JSErrorsDriverHolder; import org.junit.jupiter.api.extension.AfterTestExecutionCallback; import org.junit.jupiter.api.extension.Extension; import org.junit.jupiter.api.extension.ExtensionContext; @@ -50,7 +50,7 @@ public void afterTestExecution(ExtensionContext context) { // Check for JS errors assertion boolean flag. // Skip error throwing in case of negative unit test. if (isAssertJSErrorsEnabled(context) && getJSErrorsFromLogEntries(logEntries).anyMatch(e -> true) - && context.getTestClass().toString().contains("net.autobox.tools") + && context.getTestClass().toString().contains("com.github.automatedowl") && context.getRequiredTestMethod().getName().equals("referenceErrorTest")) { assertThrows(WebDriverException.class, ()->{ throw new WebDriverException(JS_ERRORS_EXCEPTION_STRING); diff --git a/junit5/src/main/java/net/autobox/tools/drivers/JSErrorsDriverHolder.java b/junit5/src/main/java/com/github/automatedowl/tools/drivers/junitholder/JSErrorsDriverHolder.java similarity index 91% rename from junit5/src/main/java/net/autobox/tools/drivers/JSErrorsDriverHolder.java rename to junit5/src/main/java/com/github/automatedowl/tools/drivers/junitholder/JSErrorsDriverHolder.java index 9cd55d7..1c5e657 100644 --- a/junit5/src/main/java/net/autobox/tools/drivers/JSErrorsDriverHolder.java +++ b/junit5/src/main/java/com/github/automatedowl/tools/drivers/junitholder/JSErrorsDriverHolder.java @@ -1,4 +1,4 @@ -package net.autobox.tools.drivers; +package com.github.automatedowl.tools.drivers.junitholder; import java.util.HashMap; import java.util.Map; diff --git a/junit5/src/main/java/net/autobox/tools/drivers/webdriver/chromedriver b/junit5/src/main/java/com/github/automatedowl/tools/drivers/webdriver/chromedriver similarity index 100% rename from junit5/src/main/java/net/autobox/tools/drivers/webdriver/chromedriver rename to junit5/src/main/java/com/github/automatedowl/tools/drivers/webdriver/chromedriver diff --git a/junit5/src/test/java/net/autobox/tools/test/JSCollectorJUnitTest.java b/junit5/src/test/java/com/github/automatedowl/tools/JSCollectorJUnitTest.java similarity index 89% rename from junit5/src/test/java/net/autobox/tools/test/JSCollectorJUnitTest.java rename to junit5/src/test/java/com/github/automatedowl/tools/JSCollectorJUnitTest.java index 21252a7..753755e 100644 --- a/junit5/src/test/java/net/autobox/tools/test/JSCollectorJUnitTest.java +++ b/junit5/src/test/java/com/github/automatedowl/tools/JSCollectorJUnitTest.java @@ -1,7 +1,7 @@ -package net.autobox.tools.test; +package com.github.automatedowl.tools; -import net.autobox.tools.JSErrorsCollectorJUnit; -import net.autobox.tools.drivers.JSErrorsDriverHolder; +import com.github.automatedowl.tools.JSErrorsCollectorJUnit; +import com.github.automatedowl.tools.drivers.junitholder.JSErrorsDriverHolder; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; @@ -21,7 +21,7 @@ public class JSCollectorJUnitTest { static void setChromeDriver() { System.setProperty("webdriver.chrome.driver", System.getProperty("user.dir") - + "/src/main/java/net/autobox/tools/drivers/webdriver/chromedriver"); + + "/src/main/java/com/github/automatedowl/tools/drivers/webdriver/chromedriver"); } /** Test method. diff --git a/testng/pom.xml b/testng/pom.xml index 772d841..82f43ec 100644 --- a/testng/pom.xml +++ b/testng/pom.xml @@ -4,9 +4,9 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - net.autobox.tools + com.github.automatedowl.tools chromedriver-js-errors-collector - 1.0-SNAPSHOT + 1.0.1 src/main/java src/test/java @@ -46,49 +46,20 @@ junit-platform-launcher 1.2.0 - - org.seleniumhq.selenium - selenium-api - 3.8.1 - test - org.seleniumhq.selenium selenium-chrome-driver 3.8.1 - test - - - org.seleniumhq.selenium - selenium-remote-driver - 3.8.1 org.seleniumhq.selenium selenium-api - 3.12.0 - - - org.testng - testng - 6.14.3 - test - - - org.testng - testng - 6.14.3 + 3.8.1 org.testng testng 6.14.3 - compile - - - org.seleniumhq.selenium - selenium-api - 3.8.1 \ No newline at end of file diff --git a/testng/src/main/java/net/autobox/tools/JSErrorsCollectorListener.java b/testng/src/main/java/com/github/automatedowl/tools/JSErrorsCollectorListener.java similarity index 96% rename from testng/src/main/java/net/autobox/tools/JSErrorsCollectorListener.java rename to testng/src/main/java/com/github/automatedowl/tools/JSErrorsCollectorListener.java index a4060af..5d58694 100644 --- a/testng/src/main/java/net/autobox/tools/JSErrorsCollectorListener.java +++ b/testng/src/main/java/com/github/automatedowl/tools/JSErrorsCollectorListener.java @@ -1,6 +1,6 @@ -package net.autobox.tools; +package com.github.automatedowl.tools; -import net.autobox.tools.testng.drivers.JSErrorsDriverHolder; +import com.github.automatedowl.tools.drivers.testngholder.JSErrorsDriverHolder; import org.openqa.selenium.WebDriverException; import org.openqa.selenium.logging.LogEntry; import org.openqa.selenium.logging.LogType; @@ -56,7 +56,7 @@ public void afterInvocation(IInvokedMethod iInvokedMethod, ITestResult iTestResu if (isAssertJSErrorsEnabled( iInvokedMethod) && getJSErrorsFromLogEntries(logEntries).anyMatch(e -> true) && iInvokedMethod - .getTestMethod().getTestClass().toString().contains("net.autobox.tools.test") + .getTestMethod().getTestClass().toString().contains("com.github.automatedowl") && iInvokedMethod .getTestMethod().getConstructorOrMethod().getMethod().getName().equals("referenceErrorTest")) { // Don't throw exception on unit test. diff --git a/testng/src/main/java/net/autobox/tools/JSErrorsCollectorTestNG.java b/testng/src/main/java/com/github/automatedowl/tools/JSErrorsCollectorTestNG.java similarity index 93% rename from testng/src/main/java/net/autobox/tools/JSErrorsCollectorTestNG.java rename to testng/src/main/java/com/github/automatedowl/tools/JSErrorsCollectorTestNG.java index 532c5a9..1e552c6 100644 --- a/testng/src/main/java/net/autobox/tools/JSErrorsCollectorTestNG.java +++ b/testng/src/main/java/com/github/automatedowl/tools/JSErrorsCollectorTestNG.java @@ -1,4 +1,4 @@ -package net.autobox.tools; +package com.github.automatedowl.tools; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/testng/src/main/java/net/autobox/tools/testng/drivers/JSErrorsDriverHolder.java b/testng/src/main/java/com/github/automatedowl/tools/drivers/testngholder/JSErrorsDriverHolder.java similarity index 91% rename from testng/src/main/java/net/autobox/tools/testng/drivers/JSErrorsDriverHolder.java rename to testng/src/main/java/com/github/automatedowl/tools/drivers/testngholder/JSErrorsDriverHolder.java index c436fb5..78ebb07 100644 --- a/testng/src/main/java/net/autobox/tools/testng/drivers/JSErrorsDriverHolder.java +++ b/testng/src/main/java/com/github/automatedowl/tools/drivers/testngholder/JSErrorsDriverHolder.java @@ -1,4 +1,4 @@ -package net.autobox.tools.testng.drivers; +package com.github.automatedowl.tools.drivers.testngholder; import java.util.HashMap; import java.util.Map; diff --git a/testng/src/main/java/drivers/webdriver/chromedriver b/testng/src/main/java/com/github/automatedowl/tools/drivers/webdriver/chromedriver similarity index 100% rename from testng/src/main/java/drivers/webdriver/chromedriver rename to testng/src/main/java/com/github/automatedowl/tools/drivers/webdriver/chromedriver diff --git a/testng/src/test/java/net/autobox/tools/test/JSCollectorTestNGTest.java b/testng/src/test/java/com/github/automatedowl/tools/JSCollectorTestNGTest.java similarity index 87% rename from testng/src/test/java/net/autobox/tools/test/JSCollectorTestNGTest.java rename to testng/src/test/java/com/github/automatedowl/tools/JSCollectorTestNGTest.java index 80e1e1b..671200a 100644 --- a/testng/src/test/java/net/autobox/tools/test/JSCollectorTestNGTest.java +++ b/testng/src/test/java/com/github/automatedowl/tools/JSCollectorTestNGTest.java @@ -1,9 +1,7 @@ -package net.autobox.tools.test; +package com.github.automatedowl.tools; import java.lang.reflect.Method; -import net.autobox.tools.JSErrorsCollectorListener; -import net.autobox.tools.JSErrorsCollectorTestNG; -import net.autobox.tools.testng.drivers.JSErrorsDriverHolder; +import com.github.automatedowl.tools.drivers.testngholder.JSErrorsDriverHolder; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; @@ -20,7 +18,8 @@ public class JSCollectorTestNGTest { @BeforeClass static void setChromeDriver() { System.setProperty("webdriver.chrome.driver", - System.getProperty("user.dir") + "/src/main/java/drivers/webdriver/chromedriver"); + System.getProperty("user.dir") + + "/src/main/java/com/github/automatedowl/tools/drivers/webdriver/chromedriver"); } @BeforeMethod