From ad360abb27934d368fb92d9ef7dc737f0d0129c9 Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Tue, 11 Aug 2020 12:40:16 -0500 Subject: [PATCH 01/91] Started working on MongoDB functionality. create MongoDBConfig class Created tests for MongoDBConfig class, all tests pass --- jmaqs-mongoDB/config.xml | 41 ++++++++++++++ jmaqs-mongoDB/pom.xml | 38 +++++++++++++ .../MongoDBConfig.java | 54 +++++++++++++++++++ .../MongoDBConfigUnitTests.java | 50 +++++++++++++++++ .../jmaqs/utilities/helper/ConfigSection.java | 5 ++ .../utilities/helper/TestCategories.java | 5 ++ pom.xml | 1 + 7 files changed, 194 insertions(+) create mode 100644 jmaqs-mongoDB/config.xml create mode 100644 jmaqs-mongoDB/pom.xml create mode 100644 jmaqs-mongoDB/src/main/java/com.magenic.jmaqs.mongoDB/MongoDBConfig.java create mode 100644 jmaqs-mongoDB/src/test/java/com.magenic.jmaqs.mongoDB/MongoDBConfigUnitTests.java diff --git a/jmaqs-mongoDB/config.xml b/jmaqs-mongoDB/config.xml new file mode 100644 index 000000000..8a3179607 --- /dev/null +++ b/jmaqs-mongoDB/config.xml @@ -0,0 +1,41 @@ + + + + + + 100 + + + 10000 + + + YES + + + VERBOSE + + + TXT + + + ./target/logs + + + mongodb://localhost:27017 + MongoDatabaseTest + MongoTestCollection + 30 + + diff --git a/jmaqs-mongoDB/pom.xml b/jmaqs-mongoDB/pom.xml new file mode 100644 index 000000000..83eb27314 --- /dev/null +++ b/jmaqs-mongoDB/pom.xml @@ -0,0 +1,38 @@ + + + 4.0.0 + + com.magenic.jmaqs + jmaqs-framework + ${revision} + + com.magenic.jmaqs.mongoDB + jmaqs-mongoDB + JMAQS MongoDB Database Testing Module + + + + + com.magenic.jmaqs.base + jmaqs-base + ${project.version} + + + com.magenic.jmaqs.utilities + jmaqs-utilities + ${project.version} + compile + + + org.mongodb + mongo-java-driver + 3.4.1 + + + org.testng + testng + + + diff --git a/jmaqs-mongoDB/src/main/java/com.magenic.jmaqs.mongoDB/MongoDBConfig.java b/jmaqs-mongoDB/src/main/java/com.magenic.jmaqs.mongoDB/MongoDBConfig.java new file mode 100644 index 000000000..25074a2eb --- /dev/null +++ b/jmaqs-mongoDB/src/main/java/com.magenic.jmaqs.mongoDB/MongoDBConfig.java @@ -0,0 +1,54 @@ +/* + * Copyright 2020 (C) Magenic, All rights Reserved + */ + +package com.magenic.jmaqs.mongoDB; + +import com.magenic.jmaqs.utilities.helper.Config; +import com.magenic.jmaqs.utilities.helper.ConfigSection; + +/** + * MongoDB config class + */ +public class MongoDBConfig { + + private MongoDBConfig() {} + + /** + * The MongoDB configuration section. + */ + private static final ConfigSection MONGO_SECTION = ConfigSection.MONGO_MAQS; + + /** + * Get the client connection string. + * @return The connection type + */ + public static String getConnectionString() { + return Config.getValueForSection(MONGO_SECTION, "MongoConnectionString"); + } + + /** + * Get the database connection string + * @return The database name + */ + public static String getDatabaseString() { + return Config.getValueForSection(MONGO_SECTION, "MongoDatabase"); + } + + /** + * Get the mongo collection string + * @return The mongo collection string + */ + public static String getCollectionString() { + return Config.getValueForSection(MONGO_SECTION, "MongoCollection"); + } + + /** + * Get the database timeout in seconds + * @return The timeout in seconds from the config file or default + * of 30 seconds when no config.xml key is found + */ + public static int getQueryTimeout() { + return Integer.parseInt(Config.getValueForSection(MONGO_SECTION, "MongoTimeout", "30")); + } +} diff --git a/jmaqs-mongoDB/src/test/java/com.magenic.jmaqs.mongoDB/MongoDBConfigUnitTests.java b/jmaqs-mongoDB/src/test/java/com.magenic.jmaqs.mongoDB/MongoDBConfigUnitTests.java new file mode 100644 index 000000000..51ff6667a --- /dev/null +++ b/jmaqs-mongoDB/src/test/java/com.magenic.jmaqs.mongoDB/MongoDBConfigUnitTests.java @@ -0,0 +1,50 @@ +/* + * Copyright 2020 (C) Magenic, All rights Reserved + */ + +package com.magenic.jmaqs.mongoDB; + +import com.magenic.jmaqs.utilities.helper.TestCategories; +import org.testng.Assert; +import org.testng.annotations.Test; + +/** + * Test class for database configurations. + */ +public class MongoDBConfigUnitTests { + /** + * Gets the connection string. + */ + @Test(groups = TestCategories.MONGO) + public void getDatabaseConnectionStringTest() { + String connection = MongoDBConfig.getConnectionString(); + Assert.assertEquals(connection, "mongodb://localhost:27017", "connection strings do not match"); + } + + /** + * Gets the connection string. + */ + @Test(groups = TestCategories.MONGO) + public void getDatabaseCollectionStringTest() { + String collection = MongoDBConfig.getCollectionString(); + Assert.assertEquals(collection, "MongoTestCollection", "collection strings do not match"); + } + + /** + * Gets the database string. + */ + @Test(groups = TestCategories.MONGO) + public void getDatabaseStringTest() { + String databaseString = MongoDBConfig.getDatabaseString(); + Assert.assertEquals(databaseString, "MongoDatabaseTest", "database string do not match"); + } + + /** + * Gets the timeout value. + */ + @Test(groups = TestCategories.MONGO) + public void getDatabaseQueryTimeout() { + int databaseTimeout = MongoDBConfig.getQueryTimeout(); + Assert.assertEquals(databaseTimeout, 30, "Timeout is incorrect"); + } +} diff --git a/jmaqs-utilities/src/main/java/com/magenic/jmaqs/utilities/helper/ConfigSection.java b/jmaqs-utilities/src/main/java/com/magenic/jmaqs/utilities/helper/ConfigSection.java index b1c5f223a..3b3b5986b 100644 --- a/jmaqs-utilities/src/main/java/com/magenic/jmaqs/utilities/helper/ConfigSection.java +++ b/jmaqs-utilities/src/main/java/com/magenic/jmaqs/utilities/helper/ConfigSection.java @@ -39,6 +39,11 @@ public enum ConfigSection { */ MAGENIC_MAQS("MagenicMaqs"), + /** + * The default mongoDB maqs section. + */ + MONGO_MAQS("MongoMaqs"), + /** * The default remote selenium capabilities section. */ diff --git a/jmaqs-utilities/src/main/java/com/magenic/jmaqs/utilities/helper/TestCategories.java b/jmaqs-utilities/src/main/java/com/magenic/jmaqs/utilities/helper/TestCategories.java index b5ab68cfc..2841e6ea6 100644 --- a/jmaqs-utilities/src/main/java/com/magenic/jmaqs/utilities/helper/TestCategories.java +++ b/jmaqs-utilities/src/main/java/com/magenic/jmaqs/utilities/helper/TestCategories.java @@ -52,4 +52,9 @@ private TestCategories() { * String for Cucumber unit test category. */ public static final String CUCUMBER = "Cucumber Unit Tests"; + + /** + * String for MongoDB unit test category. + */ + public static final String MONGO = "MongoDB Unit Tests"; } diff --git a/pom.xml b/pom.xml index c279ccc17..6269c0f20 100644 --- a/pom.xml +++ b/pom.xml @@ -54,6 +54,7 @@ jmaqs-appium jmaqs-database jmaqs-cucumber + jmaqs-mongoDB From ee11665a177198e25724d07c8d85c7748ea7d926 Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Tue, 11 Aug 2020 16:22:21 -0500 Subject: [PATCH 02/91] Continued progress, Config unit tests are only ones that still work. --- .../magenic/jmaqs/mongo/BaseMongoTest.java | 99 ++++++++++ .../magenic/jmaqs/mongo}/MongoDBConfig.java | 2 +- .../magenic/jmaqs/mongo/MongoDBDriver.java | 108 +++++++++++ .../jmaqs/mongo/MongoDriverManager.java | 96 ++++++++++ .../com/magenic/jmaqs/mongo/MongoFactory.java | 66 +++++++ .../magenic/jmaqs/mongo/MongoTestObject.java | 74 ++++++++ .../jmaqs/mongo/MongoDBConfigUnitTest.java} | 4 +- .../magenic/jmaqs/mongo/MongoDBUnitTest.java | 173 ++++++++++++++++++ 8 files changed, 619 insertions(+), 3 deletions(-) create mode 100644 jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/BaseMongoTest.java rename jmaqs-mongoDB/src/main/java/{com.magenic.jmaqs.mongoDB => com/magenic/jmaqs/mongo}/MongoDBConfig.java (97%) create mode 100644 jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDBDriver.java create mode 100644 jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDriverManager.java create mode 100644 jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoFactory.java create mode 100644 jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoTestObject.java rename jmaqs-mongoDB/src/test/java/{com.magenic.jmaqs.mongoDB/MongoDBConfigUnitTests.java => com/magenic/jmaqs/mongo/MongoDBConfigUnitTest.java} (94%) create mode 100644 jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBUnitTest.java diff --git a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/BaseMongoTest.java b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/BaseMongoTest.java new file mode 100644 index 000000000..5a747cb7d --- /dev/null +++ b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/BaseMongoTest.java @@ -0,0 +1,99 @@ +/* + * Copyright 2020 (C) Magenic, All rights Reserved + */ + +package com.magenic.jmaqs.mongo; + +import com.magenic.jmaqs.base.BaseExtendableTest; +import com.mongodb.client.MongoCollection; +import org.bson.Document; +import org.testng.ITestResult; + +import java.util.function.Supplier; + +/// +/// Generic base MongoDB test class +/// +/// The mongo collection type +public class BaseMongoTest extends BaseExtendableTest { + /// + /// Initializes a new instance of the class. + /// Setup the database client for each test class + /// + public BaseMongoTest() { } + + /** + * Steps to do before logging teardown results. + * + * @param resultType The test result + */ + @Override protected void beforeLoggingTeardown(ITestResult resultType) { + + } + + @Override protected void createNewTestObject() { + + } + + /// + /// Gets or sets the web service driver + /// + public MongoDBDriver getMongoDBDriver() { + return this.getTestObject().getMongoDBDriver(); + } + + public void setMongoDBDriver(MongoDBDriver value) { + this.getTestObject().overrideMongoDBDriver(value); + } + + /// + /// Override the Mongo driver - does not lazy load + /// + /// New Mongo driver + public void overrideConnectionDriver(MongoDBDriver driver) { + this.getTestObject().overrideMongoDBDriver(driver); + } + + /// + /// Override the Mongo driver - respects lazy loading + /// + /// The new collection connection + public void overrideConnectionDriver( + Supplier> overrideCollectionConnection) { + this.getTestObject().overrideMongoDBDriver(overrideCollectionConnection); + } + + /// + /// Override the Mongo driver - respects lazy loading + /// + /// Client connection string + /// Database connection string + /// Mongo collection string + public void overrideConnectionDriver(String connectionString, String databaseString, String collectionString) { + this.getTestObject().overrideMongoDBDriver(connectionString, databaseString, collectionString); + } + + /// + /// Get the base web service url + /// + /// The base web service url + protected String getBaseConnectionString() { + return MongoDBConfig.getConnectionString(); + } + + /// + /// Get the base web service url + /// + /// The base web service url + protected String getBaseDatabaseString() { + return MongoDBConfig.getDatabaseString(); + } + + /// + /// Get the base web service url + /// + /// The base web service url + protected String getBaseCollectionString() { + return MongoDBConfig.getCollectionString(); + } +} diff --git a/jmaqs-mongoDB/src/main/java/com.magenic.jmaqs.mongoDB/MongoDBConfig.java b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDBConfig.java similarity index 97% rename from jmaqs-mongoDB/src/main/java/com.magenic.jmaqs.mongoDB/MongoDBConfig.java rename to jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDBConfig.java index 25074a2eb..ca4306303 100644 --- a/jmaqs-mongoDB/src/main/java/com.magenic.jmaqs.mongoDB/MongoDBConfig.java +++ b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDBConfig.java @@ -2,7 +2,7 @@ * Copyright 2020 (C) Magenic, All rights Reserved */ -package com.magenic.jmaqs.mongoDB; +package com.magenic.jmaqs.mongo; import com.magenic.jmaqs.utilities.helper.Config; import com.magenic.jmaqs.utilities.helper.ConfigSection; diff --git a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDBDriver.java b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDBDriver.java new file mode 100644 index 000000000..79e141cb0 --- /dev/null +++ b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDBDriver.java @@ -0,0 +1,108 @@ +/* + * Copyright 2020 (C) Magenic, All rights Reserved + */ + +package com.magenic.jmaqs.mongo; + +import com.mongodb.MongoClient; +import com.mongodb.client.MongoCollection; +import com.mongodb.client.MongoDatabase; +import org.bson.Document; + +import java.util.List; + +/** + * Class to wrap the MongoCollection and related helper functions + */ +public class MongoDBDriver { + /** + * Initializes a new instance of the MongoDBDriver class + * @param collection The collection object + */ + public MongoDBDriver(MongoCollection collection) { + setCollection(collection); + } + + /** + * Initializes a new instance of the MongoDBDriver class + * @param connectionString Server address + * @param databaseString Name of the database + * @param collectionString Name of the collection + */ + public MongoDBDriver(String connectionString, String databaseString, String collectionString) { + setCollection(MongoFactory.getCollection(connectionString, databaseString, collectionString)); + } + + /** + * Initializes a new instance of the MongoDBDriver class. + * @param collectionString Name of the collection + */ + public MongoDBDriver(String collectionString) { + setCollection(MongoFactory.getCollection(MongoDBConfig.getConnectionString(), + MongoDBConfig.getDatabaseString(), collectionString)); + } + + /** + * Initializes a new instance of the MongoDBDriver class. + */ + public MongoDBDriver() { + setCollection(MongoFactory.getDefaultCollection()); + } + + /** + * Gets the client object. + * @return the mongo client + */ + public MongoClient getMongoClient() { + return this.Database.Client; + } + + private MongoDatabase database; + + /// + /// Gets the database object + /// + public MongoDatabase getDatabase() { + return this.collection.Database; + } + + private MongoCollection collection; + + /** + * Gets the collection object. + * @return a mongo collection + */ + public MongoCollection getCollection() { return collection; } + + /** + * Sets the Mongo Collection object. + * @param newCollection the collection to be set + */ + private void setCollection(MongoCollection newCollection) { + this.collection = newCollection; + } + + /// + /// List all of the items in the collection + /// + /// List of the items in the collection + public List listAllCollectionItems() { + return this.getCollection().Find(_ => true).ToList(); + } + + /// + /// Checks if the collection contains any records + /// + /// True if the collection is empty, false otherwise + public boolean isCollectionEmpty() { + return !this.getCollection().Find(_ => true).Any(); + } + + /// + /// Counts all of the items in the collection + /// + /// Number of items in the collection + public int countAllItemsInCollection() { + return Integer.parseInt(this.getCollection().CountDocuments(_ => true).ToString()); + } +} diff --git a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDriverManager.java b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDriverManager.java new file mode 100644 index 000000000..b0b137533 --- /dev/null +++ b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDriverManager.java @@ -0,0 +1,96 @@ +/* + * Copyright 2020 (C) Magenic, All rights Reserved + */ + +package com.magenic.jmaqs.mongo; + +import com.magenic.jmaqs.base.BaseTestObject; +import com.magenic.jmaqs.base.DriverManager; +import com.magenic.jmaqs.utilities.logging.LoggingConfig; +import com.magenic.jmaqs.utilities.logging.LoggingEnabled; +import com.magenic.jmaqs.utilities.logging.MessageType; +import com.mongodb.client.MongoCollection; +import org.bson.Document; + +import java.util.function.Supplier; + +/** + * Mongo database driver. + */ +public class MongoDriverManager extends DriverManager { + /** + * Cached copy of the connection driver. + */ + private MongoDBDriver driver; + + /** + * Initializes a new instance of the MongoDriverManager class. + * @param connectionString Client connection string + * @param databaseString Database connection string + * @param collectionString Mongo collection string + * @param testObject Test object this driver is getting added to + */ + public MongoDriverManager(String connectionString, String databaseString, String collectionString, BaseTestObject testObject) { + super(() -> (MongoDBDriver) MongoFactory.getCollection(connectionString, databaseString, collectionString), testObject); + } + + /** + * Initializes a new instance of the MongoDriverManager class. + * @param getCollection Function for getting a Mongo collection connection + * @param testObject Test object this driver is getting added to + */ + public MongoDriverManager(Supplier getCollection, BaseTestObject testObject) { + super(getCollection, testObject); + } + + /** + * Override the Mongo driver. + * @param overrideDriver The new Mongo driver + */ + public void overrideDriver(MongoDBDriver overrideDriver) { + this.driver = overrideDriver; + this.setBaseDriver((MongoDBDriver) overrideDriver.getCollection()); + } + + /** + * Override the Mongo driver - respects lazy loading. + * @param connectionString Connection string of mongo DB + * @param databaseString Database string to use + * @param collectionString Collection string to use + */ + public void overrideDriver(String connectionString, String databaseString, String collectionString) { + this.driver = null; + this.overrideDriver(() -> MongoFactory.getCollection(connectionString, databaseString, collectionString)); + } + + /** + * Override the Mongo driver - respects lazy loading. + * @param overrideCollectionConnection The new collection connection + */ + public void overrideDriver(Supplier> overrideCollectionConnection) { + this.driver = null; + this.overrideDriver(overrideCollectionConnection); + } + + /** + * Get the Mongo driver + * @return The Mongo driver + */ + public MongoDBDriver getMongoDriver() { + if (this.driver == null) { + MongoCollection temp = (MongoCollection)getBase(); + + if (LoggingConfig.getLoggingEnabledSetting() == LoggingEnabled.NO) { + this.getLogger().logMessage(MessageType.INFORMATION, "Getting Mongo driver"); + this.driver = new MongoDBDriver(temp); + } else { + this.getLogger().logMessage(MessageType.INFORMATION, "Getting event firing Mongo driver"); + } + } + + return this.driver; + } + + @Override + public void close() throws Exception { } +} diff --git a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoFactory.java b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoFactory.java new file mode 100644 index 000000000..54cdc1e7d --- /dev/null +++ b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoFactory.java @@ -0,0 +1,66 @@ +/* + * Copyright 2020 (C) Magenic, All rights Reserved + */ + +package com.magenic.jmaqs.mongo; + +import com.mongodb.MongoClient; +import com.mongodb.MongoClientOptions; +import com.mongodb.MongoClientURI; +import com.mongodb.MongoException; +import com.mongodb.client.MongoCollection; +import com.mongodb.client.MongoDatabase; +import org.bson.Document; + +/** + * Mongo database factory. + */ +public class MongoFactory { + + private MongoFactory() {} + + /** + * Get the email client using connection information from the test run configuration. + * @return The email connection + */ + public static MongoCollection getDefaultCollection(){ + return getCollection(MongoDBConfig.getConnectionString(), + MongoDBConfig.getDatabaseString(), MongoDBConfig.getCollectionString()); + } + + /** + * Get the email client using connection information from the test run configuration. + * @param connectionString the connection string + * @param databaseString the database string + * @param collectionString the collection string + * @return The email connection + */ + public static MongoCollection getCollection(String connectionString, String databaseString, String collectionString) { + MongoDatabase database; + try (MongoClient connection = new MongoClient(new MongoClientURI(connectionString))) { + database = connection.getDatabase(databaseString); + } catch (Exception e) { + throw new MongoException("connection was not created"); + } + return database.getCollection(collectionString); + } + + /** + * Get the email client using connection information from the test run configuration. + * @param connectionString the connection string + * @param databaseString the database string + * @param settings the mongoDB settings to be set + * @param collectionString the collection string + * @return The email connection + */ + public static MongoCollection getCollection(String connectionString, String databaseString, + MongoClientOptions settings, String collectionString) { + MongoDatabase database; + try (MongoClient connection = new MongoClient(connectionString, settings)) { + database = connection.getDatabase(databaseString); + } catch (Exception e) { + throw new MongoException("connection was not created"); + } + return database.getCollection(collectionString); + } +} diff --git a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoTestObject.java b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoTestObject.java new file mode 100644 index 000000000..c64e947d8 --- /dev/null +++ b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoTestObject.java @@ -0,0 +1,74 @@ +/* + * Copyright 2020 (C) Magenic, All rights Reserved + */ + +package com.magenic.jmaqs.mongo; + +import com.magenic.jmaqs.base.BaseTestObject; +import com.magenic.jmaqs.utilities.logging.Logger; +import com.mongodb.client.MongoCollection; +import org.bson.Document; + +import java.util.function.Supplier; + +/** + * Mongo test context data. + */ +public class MongoTestObject extends BaseTestObject { + /** + * Initializes a new instance of the MongoTestObject class + * @param connectionString Client connection string + * @param databaseString Database connection string + * @param collectionString Mongo collection string + * @param logger The test's logger + * @param fullyQualifiedTestName The test's fully qualified test name + */ + public MongoTestObject(String connectionString, String databaseString, String collectionString, Logger logger, + String fullyQualifiedTestName) { + super(logger, fullyQualifiedTestName); + this.getManagerStore().put((MongoDriverManager.class).getCanonicalName(), + new MongoDriverManager(connectionString,databaseString,collectionString, this)); + } + + /** + * Gets the Mongo driver manager. + * @return the mongo driver manager + */ + public MongoDriverManager getMongoDBManager() { + return (MongoDriverManager) this.getManagerStore().get(MongoDriverManager.class.getCanonicalName()); + } + + /** + * Gets the Mongo driver. + * @return the stored mongoDB driver. + */ + public MongoDBDriver getMongoDBDriver() { + return this.getMongoDBManager().getMongoDriver(); + } + + /** + * Override the Mongo driver settings. + * @param connectionString Client connection string + * @param databaseString Database connection string + * @param collectionString Mongo collection string + */ + public void overrideMongoDBDriver(String connectionString, String databaseString, String collectionString) { + this.getMongoDBManager().overrideDriver(connectionString, databaseString, collectionString); + } + + /** + * Override the Mongo driver settings. + * @param driver New Mongo driver + */ + public void overrideMongoDBDriver(MongoDBDriver driver) { + this.getMongoDBManager().overrideDriver(driver); + } + + /** + * Override the Mongo driver a collection function. + * @param overrideCollectionConnection The collection function + */ + public void overrideMongoDBDriver(Supplier> overrideCollectionConnection) { + this.getMongoDBManager().overrideDriver(overrideCollectionConnection); + } +} diff --git a/jmaqs-mongoDB/src/test/java/com.magenic.jmaqs.mongoDB/MongoDBConfigUnitTests.java b/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBConfigUnitTest.java similarity index 94% rename from jmaqs-mongoDB/src/test/java/com.magenic.jmaqs.mongoDB/MongoDBConfigUnitTests.java rename to jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBConfigUnitTest.java index 51ff6667a..393420f3d 100644 --- a/jmaqs-mongoDB/src/test/java/com.magenic.jmaqs.mongoDB/MongoDBConfigUnitTests.java +++ b/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBConfigUnitTest.java @@ -2,7 +2,7 @@ * Copyright 2020 (C) Magenic, All rights Reserved */ -package com.magenic.jmaqs.mongoDB; +package com.magenic.jmaqs.mongo; import com.magenic.jmaqs.utilities.helper.TestCategories; import org.testng.Assert; @@ -11,7 +11,7 @@ /** * Test class for database configurations. */ -public class MongoDBConfigUnitTests { +public class MongoDBConfigUnitTest { /** * Gets the connection string. */ diff --git a/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBUnitTest.java b/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBUnitTest.java new file mode 100644 index 000000000..58be252ad --- /dev/null +++ b/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBUnitTest.java @@ -0,0 +1,173 @@ +/* + * Copyright 2020 (C) Magenic, All rights Reserved + */ + +package com.magenic.jmaqs.mongo; + +import com.magenic.jmaqs.utilities.helper.TestCategories; +import com.mongodb.client.MongoCollection; +import org.bson.BsonDocument; +import org.bson.Document; +import org.testng.Assert; +import org.testng.ITestResult; +import org.testng.annotations.Test; + +import java.util.List; +/// +/// Test basic mongo base test functionality +/// +public class MongoDBUnitTest extends BaseMongoTest { + /// + /// Is the collection override respected + /// + @Test(groups = TestCategories.MONGO) + public void OverrideCollectionFunction() { + MongoCollection collection = this.getMongoDBDriver().getCollection(); + MongoCollection newCollection = MongoFactory.getDefaultCollection(); + this.getTestObject().overrideMongoDBDriver(() -> newCollection); + + Assert.assertNotEquals(collection, this.getMongoDBDriver().getCollection()); + Assert.assertEquals(newCollection, this.getMongoDBDriver().getCollection()); + Assert.assertFalse(this.getMongoDBDriver().isCollectionEmpty()); + } + + /// + /// Are the connection string overrides respected + /// + @Test(groups = TestCategories.MONGO) + public void OverrideConnectionStrings() { + MongoCollection collection = this.getMongoDBDriver().getCollection(); + this.getTestObject().overrideMongoDBDriver(MongoDBConfig.getConnectionString(), + MongoDBConfig.getDatabaseString(), MongoDBConfig.getCollectionString()); + + Assert.assertNotEquals(collection, this.getMongoDBDriver().getCollection()); + Assert.assertFalse(this.getMongoDBDriver().isCollectionEmpty()); + } + + /// + /// Is the driver override respected + /// + @Test(groups = TestCategories.MONGO) + public void OverrideDriver() { + MongoDBDriver firstDriver = this.getMongoDBDriver(); + MongoDBDriver newDriver = new MongoDBDriver(MongoFactory.getDefaultCollection()); + this.getTestObject().overrideMongoDBDriver(newDriver); + + Assert.assertNotEquals(firstDriver, this.getMongoDBDriver()); + Assert.assertEquals(newDriver, this.getMongoDBDriver()); + Assert.assertFalse(this.getMongoDBDriver().isCollectionEmpty()); + } + + /// + /// Is the test over-ridable with a custom driver + /// + @Test(groups = TestCategories.MONGO) + public void OverrideWithCustomDriver() { + MongoDBDriver firstDriver = this.getMongoDBDriver(); + MongoDBDriver newDriver = new MongoDBDriver(MongoFactory.getCollection(MongoDBConfig.getConnectionString(), + MongoDBConfig.getDatabaseString(), null, MongoDBConfig.getCollectionString())); + this.getTestObject().overrideMongoDBDriver(newDriver); + + Assert.assertNotEquals(firstDriver, this.getMongoDBDriver()); + Assert.assertEquals(newDriver, this.getMongoDBDriver()); + Assert.assertFalse(this.getMongoDBDriver().isCollectionEmpty()); + } + + /// + /// Test the list all collection items helper function + /// + @Test(groups = TestCategories.MONGO) + public void TestMongoListAllCollectionItems() { + List collectionItems = this.getMongoDBDriver().listAllCollectionItems(); + for (Document bson : collectionItems){ + Assert.assertTrue(bson.containsKey("lid")); + } + + Assert.assertEquals(4, collectionItems.size()); + } + + /// + /// Test the count all collection items helper function + /// + @Test(groups = TestCategories.MONGO) + public void TestMongoCountItemsInCollection() { + Assert.assertEquals(4, this.getMongoDBDriver().countAllItemsInCollection()); + } + + /// + /// Test the collection works as expected + /// + @Test(groups = TestCategories.MONGO) + public void TestMongoGetLoginID() { + var filter = Builders.Filter.Eq("lid", "test3"); + + String value = this.getMongoDBDriver().getCollection().find(filter).ToList()[0]["lid"].ToString(); + Assert.assertEquals("test3", value); + } + + /// + /// Test the collection works as expected + /// + @Test(groups = TestCategories.MONGO) + public void TestMongoQueryAndReturnFirst() { + var filter = Builders.Filter.Eq("lid", "test3"); + MongoCollection document = this.getMongoDBDriver().getCollection().Find(filter).ToList().First(); + Assert.assertEquals("test3", document["lid"].ToString()); + } + + /// + /// Test the collection works as expected + /// + @Test(groups = TestCategories.MONGO) + public void TestMongoFindListWithKey() { + var filter = Builders.Filter.Exists("lid"); + List documentList = this.MongoDBDriver.Collection.Find(filter).ToList(); + foreach (BsonDocument documents in documentList) + { + Assert.AreNotEqual(documents["lid"].ToString(), string.Empty); + } + + Assert.AreEqual(4, documentList.Count); + } + + /// + /// Test the collection works as expected + /// + @Test(groups = TestCategories.MONGO) + public void TestMongoLinqQuery() { + MongoQueryable query = + from e in this.MongoDBDriver.Collection.AsQueryable() + where e["lid"] == "test1" + select e; + List retList = query.ToList(); + foreach (var value in retList) + { + Assert.AreEqual("test1", value["lid"]); + } + } + + /// + /// Make sure the test objects map properly + /// + @Test(groups = TestCategories.MONGO) + public void TestMongoDBTestObjectMapCorrectly() + { + Assert.AreEqual(this.TestObject.Log, this.Log, "Logs don't match"); + Assert.AreEqual(this.TestObject.SoftAssert, this.SoftAssert, "Soft asserts don't match"); + Assert.AreEqual(this.TestObject.PerfTimerCollection, this.PerfTimerCollection, "Soft asserts don't match"); + Assert.AreEqual(this.TestObject.MongoDBDriver, this.MongoDBDriver, "Web service driver don't match"); + } + + /** + * Steps to do before logging teardown results. + * + * @param resultType The test result + */ + @Override protected void beforeLoggingTeardown(ITestResult resultType) { + + } + + @Override protected void createNewTestObject() { + + } +} From 2d2dcef416eab73171f4682637c918889cebe750 Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Tue, 11 Aug 2020 23:26:42 -0500 Subject: [PATCH 03/91] Working on tests --- .../magenic/jmaqs/mongo/BaseMongoTest.java | 100 ++++++----- .../magenic/jmaqs/mongo/MongoDBDriver.java | 76 +++++--- .../jmaqs/mongo/MongoDriverManager.java | 22 ++- .../magenic/jmaqs/mongo/MongoDBUnitTest.java | 166 +++++++++--------- 4 files changed, 208 insertions(+), 156 deletions(-) diff --git a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/BaseMongoTest.java b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/BaseMongoTest.java index 5a747cb7d..7eb47488c 100644 --- a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/BaseMongoTest.java +++ b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/BaseMongoTest.java @@ -11,89 +11,93 @@ import java.util.function.Supplier; -/// -/// Generic base MongoDB test class -/// -/// The mongo collection type +/** + * Generic base MongoDB test class. + */ public class BaseMongoTest extends BaseExtendableTest { - /// - /// Initializes a new instance of the class. - /// Setup the database client for each test class - /// - public BaseMongoTest() { } - /** - * Steps to do before logging teardown results. - * - * @param resultType The test result + * Initializes a new instance of the BaseMongoTest class, + * Setup the database client for each test class. */ - @Override protected void beforeLoggingTeardown(ITestResult resultType) { - - } - - @Override protected void createNewTestObject() { - + public BaseMongoTest() { + // Currently not populated with any logic } - /// - /// Gets or sets the web service driver - /// + /** + * Gets the mongoDB driver. + * @return the mongoDB driver + */ public MongoDBDriver getMongoDBDriver() { return this.getTestObject().getMongoDBDriver(); } + /** + * Sets the MongoDB driver + * @param value the MongoDB driver to be set. + */ public void setMongoDBDriver(MongoDBDriver value) { this.getTestObject().overrideMongoDBDriver(value); } - /// - /// Override the Mongo driver - does not lazy load - /// - /// New Mongo driver + /** + * Override the Mongo driver - does not lazy load. + * @param driver New Mongo driver + */ public void overrideConnectionDriver(MongoDBDriver driver) { this.getTestObject().overrideMongoDBDriver(driver); } - /// - /// Override the Mongo driver - respects lazy loading - /// - /// The new collection connection + /** + * Override the Mongo driver - respects lazy loading. + * @param overrideCollectionConnection The new collection connection + */ public void overrideConnectionDriver( Supplier> overrideCollectionConnection) { this.getTestObject().overrideMongoDBDriver(overrideCollectionConnection); } - /// - /// Override the Mongo driver - respects lazy loading - /// - /// Client connection string - /// Database connection string - /// Mongo collection string + /** + * Override the Mongo driver - respects lazy loading. + * @param connectionString Client connection string + * @param databaseString Database connection string + * @param collectionString Mongo collection string + */ public void overrideConnectionDriver(String connectionString, String databaseString, String collectionString) { this.getTestObject().overrideMongoDBDriver(connectionString, databaseString, collectionString); } - /// - /// Get the base web service url - /// - /// The base web service url + /** + * Get the base web service url. + * @return The base web service url + */ protected String getBaseConnectionString() { return MongoDBConfig.getConnectionString(); } - /// - /// Get the base web service url - /// - /// The base web service url + /** + * Get the base web service url. + * @return The base web service url + */ protected String getBaseDatabaseString() { return MongoDBConfig.getDatabaseString(); } - /// - /// Get the base web service url - /// - /// The base web service url + /** + * Get the base web service url. + * @return The base web service url + */ protected String getBaseCollectionString() { return MongoDBConfig.getCollectionString(); } + + /** + * Steps to do before logging teardown results. + * @param resultType The test result + */ + @Override protected void beforeLoggingTeardown(ITestResult resultType) { + + } + + @Override protected void createNewTestObject() { + } } diff --git a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDBDriver.java b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDBDriver.java index 79e141cb0..b8af63785 100644 --- a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDBDriver.java +++ b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDBDriver.java @@ -5,6 +5,7 @@ package com.magenic.jmaqs.mongo; import com.mongodb.MongoClient; +import com.mongodb.MongoException; import com.mongodb.client.MongoCollection; import com.mongodb.client.MongoDatabase; import org.bson.Document; @@ -14,7 +15,7 @@ /** * Class to wrap the MongoCollection and related helper functions */ -public class MongoDBDriver { +public class MongoDBDriver implements AutoCloseable{ /** * Initializes a new instance of the MongoDBDriver class * @param collection The collection object @@ -49,23 +50,43 @@ public MongoDBDriver() { setCollection(MongoFactory.getDefaultCollection()); } + /** + * The Mongo DB client. + */ + private MongoClient client; + /** * Gets the client object. * @return the mongo client */ public MongoClient getMongoClient() { - return this.Database.Client; + return this.client; } + /** + * Sets the client object. + * @param newClient the new mongo Client to be set. + */ + public void setMongoClient(MongoClient newClient) { + this.client = newClient; + } + + /** + * The MongoDB Database. + */ private MongoDatabase database; - /// - /// Gets the database object - /// + /** + * Gets the database object. + * @return the MongoDB database object + */ public MongoDatabase getDatabase() { - return this.collection.Database; + return this.database; } + /** + * The MongoDB collection. + */ private MongoCollection collection; /** @@ -82,27 +103,40 @@ private void setCollection(MongoCollection newCollection) { this.collection = newCollection; } - /// - /// List all of the items in the collection - /// - /// List of the items in the collection + /** + * List all of the items in the collection + * @return List of the items in the collection + */ public List listAllCollectionItems() { - return this.getCollection().Find(_ => true).ToList(); + //return this.getCollection().Find(_ -> true).ToList(); + List collectionList = null; + try { + for (Document doc : this.getCollection().find()) { + collectionList.add(doc); + } + } catch (Exception e) { + throw new MongoException("Collection document is empty"); + } + return collectionList; } - /// - /// Checks if the collection contains any records - /// - /// True if the collection is empty, false otherwise + /** + * Checks if the collection contains any records. + * @return True if the collection is empty, false otherwise + */ public boolean isCollectionEmpty() { - return !this.getCollection().Find(_ => true).Any(); + return this.getCollection().find() == null; } - /// - /// Counts all of the items in the collection - /// - /// Number of items in the collection + /** + * Counts all of the items in the collection. + * @return Number of items in the collection + */ public int countAllItemsInCollection() { - return Integer.parseInt(this.getCollection().CountDocuments(_ => true).ToString()); + return (int) this.getCollection().count(); + } + + @Override public void close() throws Exception { + } } diff --git a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDriverManager.java b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDriverManager.java index b0b137533..2dd8bf161 100644 --- a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDriverManager.java +++ b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDriverManager.java @@ -60,7 +60,7 @@ public void overrideDriver(MongoDBDriver overrideDriver) { */ public void overrideDriver(String connectionString, String databaseString, String collectionString) { this.driver = null; - this.overrideDriver(() -> MongoFactory.getCollection(connectionString, databaseString, collectionString)); + this.overrideDriverGet(() -> MongoFactory.getCollection(connectionString, databaseString, collectionString)); } /** @@ -69,7 +69,7 @@ public void overrideDriver(String connectionString, String databaseString, Strin */ public void overrideDriver(Supplier> overrideCollectionConnection) { this.driver = null; - this.overrideDriver(overrideCollectionConnection); + this.overrideDriverGet(overrideCollectionConnection); } /** @@ -78,7 +78,8 @@ public void overrideDriver(Supplier> overrideCollectio */ public MongoDBDriver getMongoDriver() { if (this.driver == null) { - MongoCollection temp = (MongoCollection)getBase(); + // TODO: delete this if it works properly + MongoCollection temp = /*(MongoCollection)*/ getBase().getCollection(); if (LoggingConfig.getLoggingEnabledSetting() == LoggingEnabled.NO) { this.getLogger().logMessage(MessageType.INFORMATION, "Getting Mongo driver"); @@ -91,6 +92,19 @@ public MongoDBDriver getMongoDriver() { return this.driver; } + protected void overrideDriverGet(Supplier> driverGet) { + this.setBaseDriver((MongoDBDriver) driverGet); + } + + @Override - public void close() throws Exception { } + public void close() throws Exception { + if (!this.isDriverInitialized()) { + return; + } + + MongoDBDriver mongoDBDriver = this.getMongoDriver(); + mongoDBDriver.close(); + this.baseDriver = null; + } } diff --git a/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBUnitTest.java b/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBUnitTest.java index 58be252ad..f2776a07c 100644 --- a/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBUnitTest.java +++ b/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBUnitTest.java @@ -5,21 +5,22 @@ package com.magenic.jmaqs.mongo; import com.magenic.jmaqs.utilities.helper.TestCategories; +import com.mongodb.QueryBuilder; import com.mongodb.client.MongoCollection; import org.bson.BsonDocument; import org.bson.Document; import org.testng.Assert; import org.testng.ITestResult; import org.testng.annotations.Test; - import java.util.List; -/// -/// Test basic mongo base test functionality -/// + +/** + * Test basic mongo base test functionality + */ public class MongoDBUnitTest extends BaseMongoTest { - /// - /// Is the collection override respected - /// + /** + * Is the collection override respected. + */ @Test(groups = TestCategories.MONGO) public void OverrideCollectionFunction() { MongoCollection collection = this.getMongoDBDriver().getCollection(); @@ -31,9 +32,9 @@ public void OverrideCollectionFunction() { Assert.assertFalse(this.getMongoDBDriver().isCollectionEmpty()); } - /// - /// Are the connection string overrides respected - /// + /** + * Are the connection string overrides respected. + */ @Test(groups = TestCategories.MONGO) public void OverrideConnectionStrings() { MongoCollection collection = this.getMongoDBDriver().getCollection(); @@ -44,9 +45,9 @@ public void OverrideConnectionStrings() { Assert.assertFalse(this.getMongoDBDriver().isCollectionEmpty()); } - /// - /// Is the driver override respected - /// + /** + * Is the driver override respected. + */ @Test(groups = TestCategories.MONGO) public void OverrideDriver() { MongoDBDriver firstDriver = this.getMongoDBDriver(); @@ -58,9 +59,9 @@ public void OverrideDriver() { Assert.assertFalse(this.getMongoDBDriver().isCollectionEmpty()); } - /// - /// Is the test over-ridable with a custom driver - /// + /** + * Is the test over-ridable with a custom driver. + */ @Test(groups = TestCategories.MONGO) public void OverrideWithCustomDriver() { MongoDBDriver firstDriver = this.getMongoDBDriver(); @@ -73,9 +74,9 @@ public void OverrideWithCustomDriver() { Assert.assertFalse(this.getMongoDBDriver().isCollectionEmpty()); } - /// - /// Test the list all collection items helper function - /// + /** + * Test the list all collection items helper function. + */ @Test(groups = TestCategories.MONGO) public void TestMongoListAllCollectionItems() { List collectionItems = this.getMongoDBDriver().listAllCollectionItems(); @@ -86,76 +87,73 @@ public void TestMongoListAllCollectionItems() { Assert.assertEquals(4, collectionItems.size()); } - /// - /// Test the count all collection items helper function - /// + /** + * Test the count all collection items helper function + */ @Test(groups = TestCategories.MONGO) public void TestMongoCountItemsInCollection() { Assert.assertEquals(4, this.getMongoDBDriver().countAllItemsInCollection()); } - /// - /// Test the collection works as expected - /// - @Test(groups = TestCategories.MONGO) - public void TestMongoGetLoginID() { - var filter = Builders.Filter.Eq("lid", "test3"); - String value = this.getMongoDBDriver().getCollection().find(filter).ToList()[0]["lid"].ToString(); - Assert.assertEquals("test3", value); - } - - /// - /// Test the collection works as expected - /// - @Test(groups = TestCategories.MONGO) - public void TestMongoQueryAndReturnFirst() { - var filter = Builders.Filter.Eq("lid", "test3"); - MongoCollection document = this.getMongoDBDriver().getCollection().Find(filter).ToList().First(); - Assert.assertEquals("test3", document["lid"].ToString()); - } + ///** + // * Test the collection works as expected. + // */ + //@Test(groups = TestCategories.MONGO) + //public void TestMongoGetLoginID() { + // var filter = Builders.Filter.Eq("lid", "test3"); +// + // String value = this.getMongoDBDriver().getCollection().find(filter).ToList()[0]["lid"].ToString(); + // Assert.assertEquals("test3", value); + //} +// + ///** + // * Test the collection works as expected. + // */ + //@Test(groups = TestCategories.MONGO) + //public void TestMongoQueryAndReturnFirst() { + // var filter = Builders.Filter.Eq("lid", "test3"); + // MongoCollection document = this.getMongoDBDriver().getCollection().Find(filter).ToList().First(); + // Assert.assertEquals("test3", document["lid"].ToString()); + //} +// + ///** + // * Test the collection works as expected + // */ + //@Test(groups = TestCategories.MONGO) + //public void TestMongoFindListWithKey() { + // var filter = Builders.Filter.Exists("lid"); + // List documentList = this.getMongoDBDriver().getCollection().find(filter); + // for (Document documents : documentList) { + // Assert.assertNotEquals(documents.get("lid").toString(), ""); + // } +// + // Assert.assertEquals(4, documentList.size()); + //} +// + ///** + // * Test the collection works as expected. + // */ + //@Test(groups = TestCategories.MONGO) + //public void TestMongoLinqQuery() { + // QueryBuilder query = + // from e in this.getMongoDBDriver().getCollection().Collection.AsQueryable() + // where e["lid"] == "test1" + // select e; + // List retList = query.ToList(); + // for (var value : retList) { + // Assert.assertEquals("test1", value["lid"]); + // } + //} - /// - /// Test the collection works as expected - /// - @Test(groups = TestCategories.MONGO) - public void TestMongoFindListWithKey() { - var filter = Builders.Filter.Exists("lid"); - List documentList = this.MongoDBDriver.Collection.Find(filter).ToList(); - foreach (BsonDocument documents in documentList) - { - Assert.AreNotEqual(documents["lid"].ToString(), string.Empty); - } - - Assert.AreEqual(4, documentList.Count); - } - - /// - /// Test the collection works as expected - /// - @Test(groups = TestCategories.MONGO) - public void TestMongoLinqQuery() { - MongoQueryable query = - from e in this.MongoDBDriver.Collection.AsQueryable() - where e["lid"] == "test1" - select e; - List retList = query.ToList(); - foreach (var value in retList) - { - Assert.AreEqual("test1", value["lid"]); - } - } - - /// - /// Make sure the test objects map properly - /// + /** + * Make sure the test objects map properly. + */ @Test(groups = TestCategories.MONGO) - public void TestMongoDBTestObjectMapCorrectly() - { - Assert.AreEqual(this.TestObject.Log, this.Log, "Logs don't match"); - Assert.AreEqual(this.TestObject.SoftAssert, this.SoftAssert, "Soft asserts don't match"); - Assert.AreEqual(this.TestObject.PerfTimerCollection, this.PerfTimerCollection, "Soft asserts don't match"); - Assert.AreEqual(this.TestObject.MongoDBDriver, this.MongoDBDriver, "Web service driver don't match"); + public void TestMongoDBTestObjectMapCorrectly() { + Assert.assertEquals(this.getTestObject().getLogger(), this.getLogger(), "Logs don't match"); + Assert.assertEquals(this.getTestObject().getPerfTimerCollection(), this.getPerfTimerCollection(), "Soft asserts don't match"); + Assert.assertEquals(this.getTestObject().getMongoDBDriver(), this.getMongoDBDriver(), "Web service driver don't match"); } /** @@ -163,11 +161,13 @@ public void TestMongoDBTestObjectMapCorrectly() * * @param resultType The test result */ - @Override protected void beforeLoggingTeardown(ITestResult resultType) { + @Override + protected void beforeLoggingTeardown(ITestResult resultType) { } - @Override protected void createNewTestObject() { + @Override + protected void createNewTestObject() { } } From ae19537054ba0a6cd7e05eff0aabd42555d10f21 Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Thu, 3 Sep 2020 14:02:21 -0500 Subject: [PATCH 04/91] more work on unit tests --- .../magenic/jmaqs/mongo/BaseMongoTest.java | 28 ++++---- .../jmaqs/mongo/MongoDriverManager.java | 7 +- .../jmaqs/mongo/BaseMongoUnitTest.java | 66 +++++++++++++++++++ ...itTest.java => MongoDBDriverUnitTest.java} | 61 +---------------- .../jmaqs/mongo/MongoTestObjectUnitTest.java | 65 ++++++++++++++++++ 5 files changed, 147 insertions(+), 80 deletions(-) create mode 100644 jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/BaseMongoUnitTest.java rename jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/{MongoDBUnitTest.java => MongoDBDriverUnitTest.java} (58%) create mode 100644 jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoTestObjectUnitTest.java diff --git a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/BaseMongoTest.java b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/BaseMongoTest.java index 7eb47488c..b7f1ff467 100644 --- a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/BaseMongoTest.java +++ b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/BaseMongoTest.java @@ -5,12 +5,11 @@ package com.magenic.jmaqs.mongo; import com.magenic.jmaqs.base.BaseExtendableTest; -import com.mongodb.client.MongoCollection; -import org.bson.Document; +import com.magenic.jmaqs.utilities.logging.FileLogger; +import com.magenic.jmaqs.utilities.logging.LoggingEnabled; +import com.magenic.jmaqs.utilities.logging.MessageType; import org.testng.ITestResult; -import java.util.function.Supplier; - /** * Generic base MongoDB test class. */ @@ -47,15 +46,6 @@ public void overrideConnectionDriver(MongoDBDriver driver) { this.getTestObject().overrideMongoDBDriver(driver); } - /** - * Override the Mongo driver - respects lazy loading. - * @param overrideCollectionConnection The new collection connection - */ - public void overrideConnectionDriver( - Supplier> overrideCollectionConnection) { - this.getTestObject().overrideMongoDBDriver(overrideCollectionConnection); - } - /** * Override the Mongo driver - respects lazy loading. * @param connectionString Client connection string @@ -94,10 +84,14 @@ protected String getBaseCollectionString() { * Steps to do before logging teardown results. * @param resultType The test result */ - @Override protected void beforeLoggingTeardown(ITestResult resultType) { - - } + @Override + protected void beforeLoggingTeardown(ITestResult resultType) { + // Currently not populated with any logic + } - @Override protected void createNewTestObject() { + @Override + protected void createNewTestObject() { + this.setTestObject(new MongoTestObject(this.getBaseConnectionString(), this.getBaseDatabaseString(), + this.getBaseCollectionString(), this.createLogger(), this.getFullyQualifiedTestClassName())); } } diff --git a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDriverManager.java b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDriverManager.java index 2dd8bf161..57750e9f2 100644 --- a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDriverManager.java +++ b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDriverManager.java @@ -77,9 +77,10 @@ public void overrideDriver(Supplier> overrideCollectio * @return The Mongo driver */ public MongoDBDriver getMongoDriver() { + /* if (this.driver == null) { // TODO: delete this if it works properly - MongoCollection temp = /*(MongoCollection)*/ getBase().getCollection(); + MongoCollection temp = (MongoCollection) getBase().getCollection(); if (LoggingConfig.getLoggingEnabledSetting() == LoggingEnabled.NO) { this.getLogger().logMessage(MessageType.INFORMATION, "Getting Mongo driver"); @@ -90,19 +91,19 @@ public MongoDBDriver getMongoDriver() { } return this.driver; + */ + return getBase(); } protected void overrideDriverGet(Supplier> driverGet) { this.setBaseDriver((MongoDBDriver) driverGet); } - @Override public void close() throws Exception { if (!this.isDriverInitialized()) { return; } - MongoDBDriver mongoDBDriver = this.getMongoDriver(); mongoDBDriver.close(); this.baseDriver = null; diff --git a/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/BaseMongoUnitTest.java b/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/BaseMongoUnitTest.java new file mode 100644 index 000000000..7805ba3a7 --- /dev/null +++ b/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/BaseMongoUnitTest.java @@ -0,0 +1,66 @@ +package com.magenic.jmaqs.mongo; + +import com.magenic.jmaqs.utilities.helper.TestCategories; +import org.testng.Assert; +import org.testng.annotations.Test; + +public class BaseMongoUnitTest extends BaseMongoTest { + @Test(groups = TestCategories.MONGO) + public void testGetMongoDBDriver() { + MongoDBDriver mongoDBDriver = getMongoDBDriver(); + Assert.assertNotNull(mongoDBDriver, + "Checking that MongoDB Driver is not null through BaseMongoTest"); + } + + @Test(groups = TestCategories.MONGO) + public void testSetMongoDBDriver() { + int hashCode = this.getMongoDBDriver().hashCode(); + try { + this.setMongoDBDriver(new MongoDBDriver()); + } catch (Exception e) { + e.printStackTrace(); + } + int hashCode1 = this.getMongoDBDriver().hashCode(); + Assert.assertNotEquals(hashCode, hashCode1); + } + + @Test(groups = TestCategories.MONGO) + public void testGetMongoTestObject() { + Assert.assertNotNull(this.getTestObject(), + "Checking that Selenium Test Object is not null through BaseSeleniumTest"); + } + + @Test(groups = TestCategories.MONGO) + public void testOverrideConnectionDriver() { + overrideConnectionDriver(this.getMongoDBDriver()); + overrideConnectionDriver(this.getBaseConnectionString(), this.getBaseDatabaseString(), this.getBaseCollectionString()); + Assert.assertNotNull(getMongoDBDriver()); + } + + /** + * Gets the connection string. + */ + @Test(groups = TestCategories.MONGO) + public void getDatabaseConnectionStringTest() { + String connection = this.getBaseConnectionString(); + Assert.assertEquals(connection, "mongodb://localhost:27017", "connection strings do not match"); + } + + /** + * Gets the connection string. + */ + @Test(groups = TestCategories.MONGO) + public void getDatabaseCollectionStringTest() { + String collection = this.getBaseCollectionString(); + Assert.assertEquals(collection, "MongoTestCollection", "collection strings do not match"); + } + + /** + * Gets the database string. + */ + @Test(groups = TestCategories.MONGO) + public void getDatabaseStringTest() { + String databaseString = this.getBaseDatabaseString(); + Assert.assertEquals(databaseString, "MongoDatabaseTest", "database string do not match"); + } +} diff --git a/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBUnitTest.java b/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBDriverUnitTest.java similarity index 58% rename from jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBUnitTest.java rename to jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBDriverUnitTest.java index f2776a07c..232af3646 100644 --- a/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBUnitTest.java +++ b/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBDriverUnitTest.java @@ -5,9 +5,6 @@ package com.magenic.jmaqs.mongo; import com.magenic.jmaqs.utilities.helper.TestCategories; -import com.mongodb.QueryBuilder; -import com.mongodb.client.MongoCollection; -import org.bson.BsonDocument; import org.bson.Document; import org.testng.Assert; import org.testng.ITestResult; @@ -17,63 +14,7 @@ /** * Test basic mongo base test functionality */ -public class MongoDBUnitTest extends BaseMongoTest { - /** - * Is the collection override respected. - */ - @Test(groups = TestCategories.MONGO) - public void OverrideCollectionFunction() { - MongoCollection collection = this.getMongoDBDriver().getCollection(); - MongoCollection newCollection = MongoFactory.getDefaultCollection(); - this.getTestObject().overrideMongoDBDriver(() -> newCollection); - - Assert.assertNotEquals(collection, this.getMongoDBDriver().getCollection()); - Assert.assertEquals(newCollection, this.getMongoDBDriver().getCollection()); - Assert.assertFalse(this.getMongoDBDriver().isCollectionEmpty()); - } - - /** - * Are the connection string overrides respected. - */ - @Test(groups = TestCategories.MONGO) - public void OverrideConnectionStrings() { - MongoCollection collection = this.getMongoDBDriver().getCollection(); - this.getTestObject().overrideMongoDBDriver(MongoDBConfig.getConnectionString(), - MongoDBConfig.getDatabaseString(), MongoDBConfig.getCollectionString()); - - Assert.assertNotEquals(collection, this.getMongoDBDriver().getCollection()); - Assert.assertFalse(this.getMongoDBDriver().isCollectionEmpty()); - } - - /** - * Is the driver override respected. - */ - @Test(groups = TestCategories.MONGO) - public void OverrideDriver() { - MongoDBDriver firstDriver = this.getMongoDBDriver(); - MongoDBDriver newDriver = new MongoDBDriver(MongoFactory.getDefaultCollection()); - this.getTestObject().overrideMongoDBDriver(newDriver); - - Assert.assertNotEquals(firstDriver, this.getMongoDBDriver()); - Assert.assertEquals(newDriver, this.getMongoDBDriver()); - Assert.assertFalse(this.getMongoDBDriver().isCollectionEmpty()); - } - - /** - * Is the test over-ridable with a custom driver. - */ - @Test(groups = TestCategories.MONGO) - public void OverrideWithCustomDriver() { - MongoDBDriver firstDriver = this.getMongoDBDriver(); - MongoDBDriver newDriver = new MongoDBDriver(MongoFactory.getCollection(MongoDBConfig.getConnectionString(), - MongoDBConfig.getDatabaseString(), null, MongoDBConfig.getCollectionString())); - this.getTestObject().overrideMongoDBDriver(newDriver); - - Assert.assertNotEquals(firstDriver, this.getMongoDBDriver()); - Assert.assertEquals(newDriver, this.getMongoDBDriver()); - Assert.assertFalse(this.getMongoDBDriver().isCollectionEmpty()); - } - +public class MongoDBDriverUnitTest extends BaseMongoTest { /** * Test the list all collection items helper function. */ diff --git a/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoTestObjectUnitTest.java b/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoTestObjectUnitTest.java new file mode 100644 index 000000000..6be73d97a --- /dev/null +++ b/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoTestObjectUnitTest.java @@ -0,0 +1,65 @@ +package com.magenic.jmaqs.mongo; + +import com.magenic.jmaqs.utilities.helper.TestCategories; +import com.mongodb.client.MongoCollection; +import org.bson.Document; +import org.testng.Assert; +import org.testng.annotations.Test; + +public class MongoTestObjectUnitTest extends BaseMongoTest{ + /** + * Is the collection override respected. + */ + @Test(groups = TestCategories.MONGO) + public void overrideCollectionFunction() { + MongoCollection collection = this.getMongoDBDriver().getCollection(); + MongoCollection newCollection = MongoFactory.getDefaultCollection(); + this.getTestObject().overrideMongoDBDriver(() -> newCollection); + + Assert.assertNotEquals(collection, this.getMongoDBDriver().getCollection()); + Assert.assertEquals(newCollection, this.getMongoDBDriver().getCollection()); + Assert.assertFalse(this.getMongoDBDriver().isCollectionEmpty()); + } + + /** + * Are the connection string overrides respected. + */ + @Test(groups = TestCategories.MONGO) + public void overrideConnectionStrings() { + MongoCollection collection = this.getMongoDBDriver().getCollection(); + this.getTestObject().overrideMongoDBDriver(MongoDBConfig.getConnectionString(), + MongoDBConfig.getDatabaseString(), MongoDBConfig.getCollectionString()); + + Assert.assertNotEquals(collection, this.getMongoDBDriver().getCollection()); + Assert.assertFalse(this.getMongoDBDriver().isCollectionEmpty()); + } + + /** + * Is the driver override respected. + */ + @Test(groups = TestCategories.MONGO) + public void overrideDriver() { + MongoDBDriver firstDriver = this.getMongoDBDriver(); + MongoDBDriver newDriver = new MongoDBDriver(MongoFactory.getDefaultCollection()); + this.getTestObject().overrideMongoDBDriver(newDriver); + + Assert.assertNotEquals(firstDriver, this.getMongoDBDriver()); + Assert.assertEquals(newDriver, this.getMongoDBDriver()); + Assert.assertFalse(this.getMongoDBDriver().isCollectionEmpty()); + } + + /** + * Is the test overridable with a custom driver. + */ + @Test(groups = TestCategories.MONGO) + public void overrideWithCustomDriver() { + MongoDBDriver firstDriver = this.getMongoDBDriver(); + MongoDBDriver newDriver = new MongoDBDriver(MongoFactory.getCollection(MongoDBConfig.getConnectionString(), + MongoDBConfig.getDatabaseString(), null, MongoDBConfig.getCollectionString())); + this.getTestObject().overrideMongoDBDriver(newDriver); + + Assert.assertNotEquals(firstDriver, this.getMongoDBDriver()); + Assert.assertEquals(newDriver, this.getMongoDBDriver()); + Assert.assertFalse(this.getMongoDBDriver().isCollectionEmpty()); + } +} From 29c0b1810db5e7697d884a2b85bd4f2bcbd4a352 Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Fri, 18 Sep 2020 13:17:49 -0500 Subject: [PATCH 05/91] updates --- .../src/main/java/com/magenic/jmaqs/mongo/BaseMongoTest.java | 3 --- .../main/java/com/magenic/jmaqs/mongo/MongoDriverManager.java | 3 --- .../test/java/com/magenic/jmaqs/mongo/BaseMongoUnitTest.java | 2 +- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/BaseMongoTest.java b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/BaseMongoTest.java index b7f1ff467..52e627fa3 100644 --- a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/BaseMongoTest.java +++ b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/BaseMongoTest.java @@ -5,9 +5,6 @@ package com.magenic.jmaqs.mongo; import com.magenic.jmaqs.base.BaseExtendableTest; -import com.magenic.jmaqs.utilities.logging.FileLogger; -import com.magenic.jmaqs.utilities.logging.LoggingEnabled; -import com.magenic.jmaqs.utilities.logging.MessageType; import org.testng.ITestResult; /** diff --git a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDriverManager.java b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDriverManager.java index 57750e9f2..e6f1bdaa4 100644 --- a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDriverManager.java +++ b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDriverManager.java @@ -6,9 +6,6 @@ import com.magenic.jmaqs.base.BaseTestObject; import com.magenic.jmaqs.base.DriverManager; -import com.magenic.jmaqs.utilities.logging.LoggingConfig; -import com.magenic.jmaqs.utilities.logging.LoggingEnabled; -import com.magenic.jmaqs.utilities.logging.MessageType; import com.mongodb.client.MongoCollection; import org.bson.Document; diff --git a/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/BaseMongoUnitTest.java b/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/BaseMongoUnitTest.java index 7805ba3a7..38c295142 100644 --- a/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/BaseMongoUnitTest.java +++ b/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/BaseMongoUnitTest.java @@ -7,7 +7,7 @@ public class BaseMongoUnitTest extends BaseMongoTest { @Test(groups = TestCategories.MONGO) public void testGetMongoDBDriver() { - MongoDBDriver mongoDBDriver = getMongoDBDriver(); + MongoDBDriver mongoDBDriver = this.getMongoDBDriver(); Assert.assertNotNull(mongoDBDriver, "Checking that MongoDB Driver is not null through BaseMongoTest"); } From 6d0fb621a230816f366d6edb82bdea5dc4170966 Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Sat, 9 Jan 2021 19:27:26 -0600 Subject: [PATCH 06/91] continued working on MongoDB stuff, now to figure out why MongoDbDriver doesn't initialize --- .../magenic/jmaqs/mongo/BaseMongoTest.java | 8 +- .../magenic/jmaqs/mongo/MongoDBConfig.java | 2 +- .../magenic/jmaqs/mongo/MongoDBDriver.java | 2 +- .../jmaqs/mongo/MongoDriverManager.java | 17 +-- .../com/magenic/jmaqs/mongo/MongoFactory.java | 2 +- .../magenic/jmaqs/mongo/MongoTestObject.java | 2 +- .../jmaqs/mongo/BaseMongoUnitTest.java | 4 + .../jmaqs/mongo/MongoDBConfigUnitTest.java | 2 +- .../jmaqs/mongo/MongoDBDriverUnitTest.java | 125 ++++++++++-------- .../jmaqs/mongo/MongoTestObjectUnitTest.java | 10 +- 10 files changed, 92 insertions(+), 82 deletions(-) diff --git a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/BaseMongoTest.java b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/BaseMongoTest.java index 52e627fa3..03e328a86 100644 --- a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/BaseMongoTest.java +++ b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/BaseMongoTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 (C) Magenic, All rights Reserved + * Copyright 2021 (C) Magenic, All rights Reserved */ package com.magenic.jmaqs.mongo; @@ -29,10 +29,10 @@ public MongoDBDriver getMongoDBDriver() { /** * Sets the MongoDB driver - * @param value the MongoDB driver to be set. + * @param driver the MongoDB driver to be set. */ - public void setMongoDBDriver(MongoDBDriver value) { - this.getTestObject().overrideMongoDBDriver(value); + public void setMongoDBDriver(MongoDBDriver driver) { + this.getTestObject().overrideMongoDBDriver(driver); } /** diff --git a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDBConfig.java b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDBConfig.java index ca4306303..f1c499d7d 100644 --- a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDBConfig.java +++ b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDBConfig.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 (C) Magenic, All rights Reserved + * Copyright 2021 (C) Magenic, All rights Reserved */ package com.magenic.jmaqs.mongo; diff --git a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDBDriver.java b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDBDriver.java index b8af63785..1f25dd235 100644 --- a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDBDriver.java +++ b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDBDriver.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 (C) Magenic, All rights Reserved + * Copyright 2021 (C) Magenic, All rights Reserved */ package com.magenic.jmaqs.mongo; diff --git a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDriverManager.java b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDriverManager.java index e6f1bdaa4..b52c17d59 100644 --- a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDriverManager.java +++ b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDriverManager.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 (C) Magenic, All rights Reserved + * Copyright 2021 (C) Magenic, All rights Reserved */ package com.magenic.jmaqs.mongo; @@ -74,21 +74,6 @@ public void overrideDriver(Supplier> overrideCollectio * @return The Mongo driver */ public MongoDBDriver getMongoDriver() { - /* - if (this.driver == null) { - // TODO: delete this if it works properly - MongoCollection temp = (MongoCollection) getBase().getCollection(); - - if (LoggingConfig.getLoggingEnabledSetting() == LoggingEnabled.NO) { - this.getLogger().logMessage(MessageType.INFORMATION, "Getting Mongo driver"); - this.driver = new MongoDBDriver(temp); - } else { - this.getLogger().logMessage(MessageType.INFORMATION, "Getting event firing Mongo driver"); - } - } - - return this.driver; - */ return getBase(); } diff --git a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoFactory.java b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoFactory.java index 54cdc1e7d..1b1c1ebfd 100644 --- a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoFactory.java +++ b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 (C) Magenic, All rights Reserved + * Copyright 2021 (C) Magenic, All rights Reserved */ package com.magenic.jmaqs.mongo; diff --git a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoTestObject.java b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoTestObject.java index c64e947d8..ff96ed999 100644 --- a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoTestObject.java +++ b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoTestObject.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 (C) Magenic, All rights Reserved + * Copyright 2021 (C) Magenic, All rights Reserved */ package com.magenic.jmaqs.mongo; diff --git a/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/BaseMongoUnitTest.java b/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/BaseMongoUnitTest.java index 38c295142..22400cbb7 100644 --- a/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/BaseMongoUnitTest.java +++ b/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/BaseMongoUnitTest.java @@ -1,3 +1,7 @@ +/* + * Copyright 2021 (C) Magenic, All rights Reserved + */ + package com.magenic.jmaqs.mongo; import com.magenic.jmaqs.utilities.helper.TestCategories; diff --git a/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBConfigUnitTest.java b/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBConfigUnitTest.java index 393420f3d..2d2cd0fc6 100644 --- a/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBConfigUnitTest.java +++ b/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBConfigUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2020 (C) Magenic, All rights Reserved + * Copyright 2021 (C) Magenic, All rights Reserved */ package com.magenic.jmaqs.mongo; diff --git a/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBDriverUnitTest.java b/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBDriverUnitTest.java index 232af3646..5f461002f 100644 --- a/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBDriverUnitTest.java +++ b/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBDriverUnitTest.java @@ -1,91 +1,108 @@ /* - * Copyright 2020 (C) Magenic, All rights Reserved + * Copyright 2021 (C) Magenic, All rights Reserved */ package com.magenic.jmaqs.mongo; import com.magenic.jmaqs.utilities.helper.TestCategories; +import com.mongodb.client.model.Filters; import org.bson.Document; +import org.bson.conversions.Bson; import org.testng.Assert; import org.testng.ITestResult; +import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; +import java.util.ArrayList; import java.util.List; /** * Test basic mongo base test functionality */ public class MongoDBDriverUnitTest extends BaseMongoTest { + + @BeforeTest + public void setup() { + + } + /** * Test the list all collection items helper function. */ @Test(groups = TestCategories.MONGO) - public void TestMongoListAllCollectionItems() { + public void testMongoListAllCollectionItems() { List collectionItems = this.getMongoDBDriver().listAllCollectionItems(); for (Document bson : collectionItems){ Assert.assertTrue(bson.containsKey("lid")); } - Assert.assertEquals(4, collectionItems.size()); + Assert.assertEquals(collectionItems.size(), 4); } /** * Test the count all collection items helper function */ @Test(groups = TestCategories.MONGO) - public void TestMongoCountItemsInCollection() { - Assert.assertEquals(4, this.getMongoDBDriver().countAllItemsInCollection()); + public void testMongoCountItemsInCollection() { + Assert.assertEquals(this.getMongoDBDriver().countAllItemsInCollection(), 4); + } + + + /** + * Test the collection works as expected. + */ + @Test(groups = TestCategories.MONGO) + public void TestMongoGetLoginID() { + Bson filter = Filters.eq("lid", "test3"); + //String value = this.getMongoDBDriver().getCollection().find(filter).ToList()[0]["lid"].ToString(); + List value = this.getMongoDBDriver().getCollection().find(filter).into(new ArrayList<>()); + Assert.assertEquals(value.get(0).toString(), "test3"); + } + + /** + * Test the collection works as expected. + */ + @Test(groups = TestCategories.MONGO) + public void TestMongoQueryAndReturnFirst() { + Bson filter = Filters.eq("lid", "test3"); + //MongoCollection document = this.getMongoDBDriver().getCollection().find(filter).ToList().First(); + Document document = this.getMongoDBDriver().getCollection().find(filter).first(); + Assert.assertEquals(document.get("lid").toString(), "test3"); + } + + /** + * Test the collection works as expected + */ + @Test(groups = TestCategories.MONGO) + public void TestMongoFindListWithKey() { + //var filter = Builders.Filter.Exists("lid"); + Bson filter = Filters.exists("lid"); + List documentList = this.getMongoDBDriver().getCollection().find(filter).into(new ArrayList<>()); + + for (Document documents : documentList) { + Assert.assertNotEquals(documents.get("lid").toString(), ""); + } + Assert.assertEquals(documentList.size(), 4); } + /** + * Test the collection works as expected. + */ + @Test(groups = TestCategories.MONGO) + public void TestMongoLinqQuery() { + /* + QueryBuilder querys = + from e in this.getMongoDBDriver().getCollection() + where e["lid"] == "test1" + select e; + */ - ///** - // * Test the collection works as expected. - // */ - //@Test(groups = TestCategories.MONGO) - //public void TestMongoGetLoginID() { - // var filter = Builders.Filter.Eq("lid", "test3"); -// - // String value = this.getMongoDBDriver().getCollection().find(filter).ToList()[0]["lid"].ToString(); - // Assert.assertEquals("test3", value); - //} -// - ///** - // * Test the collection works as expected. - // */ - //@Test(groups = TestCategories.MONGO) - //public void TestMongoQueryAndReturnFirst() { - // var filter = Builders.Filter.Eq("lid", "test3"); - // MongoCollection document = this.getMongoDBDriver().getCollection().Find(filter).ToList().First(); - // Assert.assertEquals("test3", document["lid"].ToString()); - //} -// - ///** - // * Test the collection works as expected - // */ - //@Test(groups = TestCategories.MONGO) - //public void TestMongoFindListWithKey() { - // var filter = Builders.Filter.Exists("lid"); - // List documentList = this.getMongoDBDriver().getCollection().find(filter); - // for (Document documents : documentList) { - // Assert.assertNotEquals(documents.get("lid").toString(), ""); - // } -// - // Assert.assertEquals(4, documentList.size()); - //} -// - ///** - // * Test the collection works as expected. - // */ - //@Test(groups = TestCategories.MONGO) - //public void TestMongoLinqQuery() { - // QueryBuilder query = - // from e in this.getMongoDBDriver().getCollection().Collection.AsQueryable() - // where e["lid"] == "test1" - // select e; - // List retList = query.ToList(); - // for (var value : retList) { - // Assert.assertEquals("test1", value["lid"]); - // } - //} + Bson filter = Filters.eq("lid", "test1"); + List retList = this.getMongoDBDriver().getCollection().find(filter).into(new ArrayList<>()); + + for (Document value : retList) { + Assert.assertEquals(value.get("lid"), "test1"); + } + } /** * Make sure the test objects map properly. diff --git a/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoTestObjectUnitTest.java b/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoTestObjectUnitTest.java index 6be73d97a..f38e8d296 100644 --- a/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoTestObjectUnitTest.java +++ b/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoTestObjectUnitTest.java @@ -1,3 +1,7 @@ +/* + * Copyright 2021 (C) Magenic, All rights Reserved + */ + package com.magenic.jmaqs.mongo; import com.magenic.jmaqs.utilities.helper.TestCategories; @@ -7,13 +11,14 @@ import org.testng.annotations.Test; public class MongoTestObjectUnitTest extends BaseMongoTest{ + private final MongoCollection collection = this.getMongoDBDriver().getCollection(); + private final MongoCollection newCollection = MongoFactory.getDefaultCollection(); + /** * Is the collection override respected. */ @Test(groups = TestCategories.MONGO) public void overrideCollectionFunction() { - MongoCollection collection = this.getMongoDBDriver().getCollection(); - MongoCollection newCollection = MongoFactory.getDefaultCollection(); this.getTestObject().overrideMongoDBDriver(() -> newCollection); Assert.assertNotEquals(collection, this.getMongoDBDriver().getCollection()); @@ -26,7 +31,6 @@ public void overrideCollectionFunction() { */ @Test(groups = TestCategories.MONGO) public void overrideConnectionStrings() { - MongoCollection collection = this.getMongoDBDriver().getCollection(); this.getTestObject().overrideMongoDBDriver(MongoDBConfig.getConnectionString(), MongoDBConfig.getDatabaseString(), MongoDBConfig.getCollectionString()); From 77e965715a3ec3ce269fdb5c412e68c005819f54 Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Mon, 11 Jan 2021 12:00:32 -0600 Subject: [PATCH 07/91] working on tests --- .../java/com/magenic/jmaqs/mongo/MongoDBDriverUnitTest.java | 6 ------ 1 file changed, 6 deletions(-) diff --git a/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBDriverUnitTest.java b/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBDriverUnitTest.java index 5f461002f..a6acbffa8 100644 --- a/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBDriverUnitTest.java +++ b/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBDriverUnitTest.java @@ -19,12 +19,6 @@ * Test basic mongo base test functionality */ public class MongoDBDriverUnitTest extends BaseMongoTest { - - @BeforeTest - public void setup() { - - } - /** * Test the list all collection items helper function. */ From bb74e6f286721c34194d7dbd2cc1d686935ee0cd Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Thu, 14 Jan 2021 12:17:53 -0600 Subject: [PATCH 08/91] driver update --- .../java/com/magenic/jmaqs/mongo/MongoDBDriver.java | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDBDriver.java b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDBDriver.java index 1f25dd235..240c1be5f 100644 --- a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDBDriver.java +++ b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDBDriver.java @@ -5,11 +5,11 @@ package com.magenic.jmaqs.mongo; import com.mongodb.MongoClient; -import com.mongodb.MongoException; import com.mongodb.client.MongoCollection; import com.mongodb.client.MongoDatabase; import org.bson.Document; +import java.util.ArrayList; import java.util.List; /** @@ -108,16 +108,7 @@ private void setCollection(MongoCollection newCollection) { * @return List of the items in the collection */ public List listAllCollectionItems() { - //return this.getCollection().Find(_ -> true).ToList(); - List collectionList = null; - try { - for (Document doc : this.getCollection().find()) { - collectionList.add(doc); - } - } catch (Exception e) { - throw new MongoException("Collection document is empty"); - } - return collectionList; + return this.getCollection().find().into(new ArrayList<>()); } /** From 2a9e9fc7959fbb6fd4b8ff82c5ebb42290e0f0b9 Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Sat, 23 Jan 2021 13:05:24 -0600 Subject: [PATCH 09/91] more work on unit tests --- jmaqs-mongoDB/pom.xml | 12 +- .../magenic/jmaqs/mongo/BaseMongoTest.java | 12 +- .../magenic/jmaqs/mongo/MongoDBDriver.java | 5 +- .../jmaqs/mongo/MongoDriverManager.java | 12 +- .../magenic/jmaqs/mongo/MongoTestObject.java | 2 +- .../jmaqs/mongo/BaseMongoUnitTest.java | 27 ++-- .../jmaqs/mongo/MongoDBConfigUnitTest.java | 22 +-- .../jmaqs/mongo/MongoDBDriverUnitTest.java | 102 +++++--------- .../mongo/MongoDBFunctionalUnitTest.java | 85 ++++++++++++ .../mongo/MongoDriverManagerUnitTest.java | 128 ++++++++++++++++++ .../jmaqs/mongo/MongoTestObjectUnitTest.java | 13 +- 11 files changed, 304 insertions(+), 116 deletions(-) create mode 100644 jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBFunctionalUnitTest.java create mode 100644 jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDriverManagerUnitTest.java diff --git a/jmaqs-mongoDB/pom.xml b/jmaqs-mongoDB/pom.xml index 83eb27314..2dc1b97c9 100644 --- a/jmaqs-mongoDB/pom.xml +++ b/jmaqs-mongoDB/pom.xml @@ -1,13 +1,12 @@ - - + 4.0.0 + com.magenic.jmaqs jmaqs-framework ${revision} + com.magenic.jmaqs.mongoDB jmaqs-mongoDB JMAQS MongoDB Database Testing Module @@ -34,5 +33,10 @@ org.testng testng + + com.magenic.jmaqs.webservices + jmaqs-webservices-jdk8 + test + diff --git a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/BaseMongoTest.java b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/BaseMongoTest.java index 03e328a86..a62b3f524 100644 --- a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/BaseMongoTest.java +++ b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/BaseMongoTest.java @@ -77,6 +77,12 @@ protected String getBaseCollectionString() { return MongoDBConfig.getCollectionString(); } + @Override + protected void createNewTestObject() { + this.setTestObject(new MongoTestObject(this.getBaseConnectionString(), this.getBaseDatabaseString(), + this.getBaseCollectionString(), this.createLogger(), this.getFullyQualifiedTestClassName())); + } + /** * Steps to do before logging teardown results. * @param resultType The test result @@ -84,11 +90,5 @@ protected String getBaseCollectionString() { @Override protected void beforeLoggingTeardown(ITestResult resultType) { // Currently not populated with any logic - } - - @Override - protected void createNewTestObject() { - this.setTestObject(new MongoTestObject(this.getBaseConnectionString(), this.getBaseDatabaseString(), - this.getBaseCollectionString(), this.createLogger(), this.getFullyQualifiedTestClassName())); } } diff --git a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDBDriver.java b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDBDriver.java index 240c1be5f..19ed1a2b5 100644 --- a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDBDriver.java +++ b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDBDriver.java @@ -7,10 +7,9 @@ import com.mongodb.MongoClient; import com.mongodb.client.MongoCollection; import com.mongodb.client.MongoDatabase; -import org.bson.Document; - import java.util.ArrayList; import java.util.List; +import org.bson.Document; /** * Class to wrap the MongoCollection and related helper functions @@ -127,7 +126,7 @@ public int countAllItemsInCollection() { return (int) this.getCollection().count(); } - @Override public void close() throws Exception { + @Override public void close() { } } diff --git a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDriverManager.java b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDriverManager.java index b52c17d59..8ce717eec 100644 --- a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDriverManager.java +++ b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDriverManager.java @@ -28,17 +28,19 @@ public class MongoDriverManager extends DriverManager { * @param testObject Test object this driver is getting added to */ public MongoDriverManager(String connectionString, String databaseString, String collectionString, BaseTestObject testObject) { - super(() -> (MongoDBDriver) MongoFactory.getCollection(connectionString, databaseString, collectionString), testObject); + super(() -> new MongoDBDriver(MongoFactory.getCollection(connectionString, databaseString, collectionString)), testObject); } - /** + /* + /* TODO: is this needed? * Initializes a new instance of the MongoDriverManager class. * @param getCollection Function for getting a Mongo collection connection * @param testObject Test object this driver is getting added to - */ + * public MongoDriverManager(Supplier getCollection, BaseTestObject testObject) { super(getCollection, testObject); } + */ /** * Override the Mongo driver. @@ -46,7 +48,7 @@ public MongoDriverManager(Supplier getCollection, BaseTestObject */ public void overrideDriver(MongoDBDriver overrideDriver) { this.driver = overrideDriver; - this.setBaseDriver((MongoDBDriver) overrideDriver.getCollection()); + this.setBaseDriver(new MongoDBDriver(overrideDriver.getCollection())); } /** @@ -78,7 +80,7 @@ public MongoDBDriver getMongoDriver() { } protected void overrideDriverGet(Supplier> driverGet) { - this.setBaseDriver((MongoDBDriver) driverGet); + this.setBaseDriver(new MongoDBDriver(driverGet.get())); } @Override diff --git a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoTestObject.java b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoTestObject.java index ff96ed999..98b4ebd81 100644 --- a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoTestObject.java +++ b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoTestObject.java @@ -35,7 +35,7 @@ public MongoTestObject(String connectionString, String databaseString, String co * @return the mongo driver manager */ public MongoDriverManager getMongoDBManager() { - return (MongoDriverManager) this.getManagerStore().get(MongoDriverManager.class.getCanonicalName()); + return this.getManagerStore().getDriver(MongoDriverManager.class.getCanonicalName()); } /** diff --git a/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/BaseMongoUnitTest.java b/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/BaseMongoUnitTest.java index 22400cbb7..bd8750fb5 100644 --- a/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/BaseMongoUnitTest.java +++ b/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/BaseMongoUnitTest.java @@ -29,14 +29,9 @@ public void testSetMongoDBDriver() { } @Test(groups = TestCategories.MONGO) - public void testGetMongoTestObject() { - Assert.assertNotNull(this.getTestObject(), - "Checking that Selenium Test Object is not null through BaseSeleniumTest"); - } - - @Test(groups = TestCategories.MONGO) - public void testOverrideConnectionDriver() { + public void testOverrideConnectionDriverWithMongoDBDriver() { overrideConnectionDriver(this.getMongoDBDriver()); + Assert.assertNotNull(getMongoDBDriver()); overrideConnectionDriver(this.getBaseConnectionString(), this.getBaseDatabaseString(), this.getBaseCollectionString()); Assert.assertNotNull(getMongoDBDriver()); } @@ -45,26 +40,26 @@ public void testOverrideConnectionDriver() { * Gets the connection string. */ @Test(groups = TestCategories.MONGO) - public void getDatabaseConnectionStringTest() { + public void testGetBaseMongoConnectionStringTest() { String connection = this.getBaseConnectionString(); Assert.assertEquals(connection, "mongodb://localhost:27017", "connection strings do not match"); } /** - * Gets the connection string. + * Gets the database string. */ @Test(groups = TestCategories.MONGO) - public void getDatabaseCollectionStringTest() { - String collection = this.getBaseCollectionString(); - Assert.assertEquals(collection, "MongoTestCollection", "collection strings do not match"); + public void testGetBaseMongoStringTest() { + String databaseString = this.getBaseDatabaseString(); + Assert.assertEquals(databaseString, "MongoDatabaseTest", "database string do not match"); } /** - * Gets the database string. + * Gets the connection string. */ @Test(groups = TestCategories.MONGO) - public void getDatabaseStringTest() { - String databaseString = this.getBaseDatabaseString(); - Assert.assertEquals(databaseString, "MongoDatabaseTest", "database string do not match"); + public void testGetBaseMongoCollectionStringTest() { + String collection = this.getBaseCollectionString(); + Assert.assertEquals(collection, "MongoTestCollection", "collection strings do not match"); } } diff --git a/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBConfigUnitTest.java b/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBConfigUnitTest.java index 2d2cd0fc6..5a019ba5c 100644 --- a/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBConfigUnitTest.java +++ b/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBConfigUnitTest.java @@ -11,39 +11,39 @@ /** * Test class for database configurations. */ -public class MongoDBConfigUnitTest { +public class MongoDBConfigUnitTest extends BaseMongoTest{ /** * Gets the connection string. */ @Test(groups = TestCategories.MONGO) - public void getDatabaseConnectionStringTest() { + public void testGetMongoDBConnectionStringTest() { String connection = MongoDBConfig.getConnectionString(); Assert.assertEquals(connection, "mongodb://localhost:27017", "connection strings do not match"); } /** - * Gets the connection string. + * Gets the database string. */ @Test(groups = TestCategories.MONGO) - public void getDatabaseCollectionStringTest() { - String collection = MongoDBConfig.getCollectionString(); - Assert.assertEquals(collection, "MongoTestCollection", "collection strings do not match"); + public void testGetMongoDBDatabaseStringTest() { + String databaseString = MongoDBConfig.getDatabaseString(); + Assert.assertEquals(databaseString, "MongoDatabaseTest", "database string do not match"); } /** - * Gets the database string. + * Gets the connection string. */ @Test(groups = TestCategories.MONGO) - public void getDatabaseStringTest() { - String databaseString = MongoDBConfig.getDatabaseString(); - Assert.assertEquals(databaseString, "MongoDatabaseTest", "database string do not match"); + public void testGetMongoDBCollectionStringTest() { + String collection = MongoDBConfig.getCollectionString(); + Assert.assertEquals(collection, "MongoTestCollection", "collection strings do not match"); } /** * Gets the timeout value. */ @Test(groups = TestCategories.MONGO) - public void getDatabaseQueryTimeout() { + public void testGetMongoDBQueryTimeout() { int databaseTimeout = MongoDBConfig.getQueryTimeout(); Assert.assertEquals(databaseTimeout, 30, "Timeout is incorrect"); } diff --git a/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBDriverUnitTest.java b/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBDriverUnitTest.java index a6acbffa8..1ad3825ce 100644 --- a/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBDriverUnitTest.java +++ b/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBDriverUnitTest.java @@ -5,107 +5,73 @@ package com.magenic.jmaqs.mongo; import com.magenic.jmaqs.utilities.helper.TestCategories; -import com.mongodb.client.model.Filters; +import com.mongodb.MongoClient; +import com.mongodb.client.MongoCollection; import org.bson.Document; -import org.bson.conversions.Bson; import org.testng.Assert; import org.testng.ITestResult; -import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; -import java.util.ArrayList; import java.util.List; /** * Test basic mongo base test functionality */ public class MongoDBDriverUnitTest extends BaseMongoTest { - /** - * Test the list all collection items helper function. - */ + @Test(groups = TestCategories.MONGO) - public void testMongoListAllCollectionItems() { - List collectionItems = this.getMongoDBDriver().listAllCollectionItems(); - for (Document bson : collectionItems){ - Assert.assertTrue(bson.containsKey("lid")); - } + public void testMongoDBDriver() { + MongoCollection collection = MongoFactory.getDefaultCollection(); + MongoDBDriver driver = new MongoDBDriver(collection); + Assert.assertNotNull(driver); - Assert.assertEquals(collectionItems.size(), 4); - } + driver = new MongoDBDriver(MongoDBConfig.getConnectionString(), + MongoDBConfig.getDatabaseString(), MongoDBConfig.getConnectionString()); + Assert.assertNotNull(driver); - /** - * Test the count all collection items helper function - */ - @Test(groups = TestCategories.MONGO) - public void testMongoCountItemsInCollection() { - Assert.assertEquals(this.getMongoDBDriver().countAllItemsInCollection(), 4); + driver = new MongoDBDriver(MongoDBConfig.getCollectionString()); + Assert.assertNotNull(driver); } - - /** - * Test the collection works as expected. - */ @Test(groups = TestCategories.MONGO) - public void TestMongoGetLoginID() { - Bson filter = Filters.eq("lid", "test3"); - //String value = this.getMongoDBDriver().getCollection().find(filter).ToList()[0]["lid"].ToString(); - List value = this.getMongoDBDriver().getCollection().find(filter).into(new ArrayList<>()); - Assert.assertEquals(value.get(0).toString(), "test3"); + public void testGetMongoClient() { + this.setMongoDBDriver(new MongoDBDriver()); + MongoClient client = this.getMongoDBDriver().getMongoClient(); + Assert.assertNotNull(client); } - /** - * Test the collection works as expected. - */ @Test(groups = TestCategories.MONGO) - public void TestMongoQueryAndReturnFirst() { - Bson filter = Filters.eq("lid", "test3"); - //MongoCollection document = this.getMongoDBDriver().getCollection().find(filter).ToList().First(); - Document document = this.getMongoDBDriver().getCollection().find(filter).first(); - Assert.assertEquals(document.get("lid").toString(), "test3"); + public void testSetMongoClient() { + this.setMongoDBDriver(new MongoDBDriver()); + this.getMongoDBDriver().setMongoClient(new MongoClient()); + Assert.assertNotNull(this.getMongoDBDriver().getMongoClient()); } /** - * Test the collection works as expected + * Test the list all collection items helper function. */ @Test(groups = TestCategories.MONGO) - public void TestMongoFindListWithKey() { - //var filter = Builders.Filter.Exists("lid"); - Bson filter = Filters.exists("lid"); - List documentList = this.getMongoDBDriver().getCollection().find(filter).into(new ArrayList<>()); - - for (Document documents : documentList) { - Assert.assertNotEquals(documents.get("lid").toString(), ""); + public void testListAllCollectionItems() { + this.setMongoDBDriver(new MongoDBDriver()); + List collectionItems = this.getMongoDBDriver().listAllCollectionItems(); + for (Document bson : collectionItems){ + Assert.assertTrue(bson.containsKey("lid")); } - Assert.assertEquals(documentList.size(), 4); + + Assert.assertEquals(collectionItems.size(), 4); } - /** - * Test the collection works as expected. - */ @Test(groups = TestCategories.MONGO) - public void TestMongoLinqQuery() { - /* - QueryBuilder querys = - from e in this.getMongoDBDriver().getCollection() - where e["lid"] == "test1" - select e; - */ - - Bson filter = Filters.eq("lid", "test1"); - List retList = this.getMongoDBDriver().getCollection().find(filter).into(new ArrayList<>()); - - for (Document value : retList) { - Assert.assertEquals(value.get("lid"), "test1"); - } + public void testIsCollectionEmpty() { + boolean collection = this.getMongoDBDriver().isCollectionEmpty(); + Assert.assertTrue(collection); } /** - * Make sure the test objects map properly. + * Test the count all collection items helper function */ @Test(groups = TestCategories.MONGO) - public void TestMongoDBTestObjectMapCorrectly() { - Assert.assertEquals(this.getTestObject().getLogger(), this.getLogger(), "Logs don't match"); - Assert.assertEquals(this.getTestObject().getPerfTimerCollection(), this.getPerfTimerCollection(), "Soft asserts don't match"); - Assert.assertEquals(this.getTestObject().getMongoDBDriver(), this.getMongoDBDriver(), "Web service driver don't match"); + public void testMongoCountAllItemsInCollection() { + Assert.assertEquals(this.getMongoDBDriver().countAllItemsInCollection(), 4); } /** diff --git a/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBFunctionalUnitTest.java b/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBFunctionalUnitTest.java new file mode 100644 index 000000000..8182da16d --- /dev/null +++ b/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBFunctionalUnitTest.java @@ -0,0 +1,85 @@ +/* + * Copyright 2021 (C) Magenic, All rights Reserved + */ + +package com.magenic.jmaqs.mongo; + +import com.magenic.jmaqs.utilities.helper.TestCategories; +import com.mongodb.client.model.Filters; +import org.bson.Document; +import org.bson.conversions.Bson; +import org.testng.Assert; +import org.testng.annotations.Test; + +import java.util.ArrayList; +import java.util.List; + +public class MongoDBFunctionalUnitTest extends BaseMongoTest{ + + /** + * Test the collection works as expected. + */ + @Test(groups = TestCategories.MONGO) + public void testMongoGetLoginID() { + Bson filter = Filters.eq("lid", "test3"); + //String value = this.getMongoDBDriver().getCollection().find(filter).ToList()[0]["lid"].ToString(); + List value = this.getMongoDBDriver().getCollection().find(filter).into(new ArrayList<>()); + Assert.assertEquals(value.get(0).toString(), "test3"); + } + + /** + * Test the collection works as expected. + */ + @Test(groups = TestCategories.MONGO) + public void testMongoQueryAndReturnFirst() { + Bson filter = Filters.eq("lid", "test3"); + //MongoCollection document = this.getMongoDBDriver().getCollection().find(filter).ToList().First(); + Document document = this.getMongoDBDriver().getCollection().find(filter).first(); + Assert.assertEquals(document.get("lid").toString(), "test3"); + } + + /** + * Test the collection works as expected + */ + @Test(groups = TestCategories.MONGO) + public void testMongoFindListWithKey() { + //var filter = Builders.Filter.Exists("lid"); + Bson filter = Filters.exists("lid"); + List documentList = this.getMongoDBDriver().getCollection().find(filter).into(new ArrayList<>()); + + for (Document documents : documentList) { + Assert.assertNotEquals(documents.get("lid").toString(), ""); + } + Assert.assertEquals(documentList.size(), 4); + } + + /** + * Test the collection works as expected. + */ + @Test(groups = TestCategories.MONGO) + public void testMongoLinqQuery() { + /* + QueryBuilder querys = + from e in this.getMongoDBDriver().getCollection() + where e["lid"] == "test1" + select e; + */ + + Bson filter = Filters.eq("lid", "test1"); + List retList = this.getMongoDBDriver().getCollection().find(filter).into(new ArrayList<>()); + + for (Document value : retList) { + Assert.assertEquals(value.get("lid"), "test1"); + } + } + + /** + * Make sure the test objects map properly. + */ + @Test(groups = TestCategories.MONGO) + public void testMongoDBTestObjectMapCorrectly() { + Assert.assertEquals(this.getTestObject().getLogger(), this.getLogger(), "Logs don't match"); + Assert.assertEquals(this.getTestObject().getPerfTimerCollection(), this.getPerfTimerCollection(), "Soft asserts don't match"); + Assert.assertEquals(this.getTestObject().getMongoDBDriver(), this.getMongoDBDriver(), "Web service driver don't match"); + } +} diff --git a/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDriverManagerUnitTest.java b/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDriverManagerUnitTest.java new file mode 100644 index 000000000..91131594f --- /dev/null +++ b/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDriverManagerUnitTest.java @@ -0,0 +1,128 @@ +/* + * Copyright 2021 (C) Magenic, All rights Reserved + */ + +package com.magenic.jmaqs.mongo; + +import com.magenic.jmaqs.utilities.helper.TestCategories; +import com.mongodb.client.MongoCollection; +import org.bson.Document; +import org.testng.Assert; +import org.testng.annotations.Test; + +public class MongoDriverManagerUnitTest extends BaseMongoTest{ + + @Test(groups = TestCategories.MONGO) + public void testMongoDriverManager() { + MongoDriverManager manager = new MongoDriverManager(MongoDBConfig.getConnectionString(), + MongoDBConfig.getDatabaseString(),MongoDBConfig.getCollectionString(), this.getTestObject()); + Assert.assertNotNull(manager); + } + + /// + /// Override driver with collection string + /// + @Test(groups = TestCategories.MONGO) + public void respectCollectionDriverOverride() { + //MongoDBConfig.GetConnectionString(), MongoDBConfig.GetDatabaseString(), collectionString + MongoDBDriver mongoDriver = new MongoDBDriver(MongoDBConfig.getCollectionString()); + this.getTestObject().getMongoDBManager().overrideDriver(mongoDriver); + Assert.assertEquals(mongoDriver.getCollection(), this.getMongoDBDriver().getCollection()); + } + + /// + /// Override drive with all 3 connection strings + /// + @Test(groups = TestCategories.MONGO) + public void respectDriverConnectionsOverride() { + MongoDBDriver mongoDriver = new MongoDBDriver(MongoDBConfig.getConnectionString(), + MongoDBConfig.getDatabaseString(), MongoDBConfig.getCollectionString()); + this.getTestObject().getMongoDBManager().overrideDriver(mongoDriver); + Assert.assertEquals(mongoDriver.getCollection(), this.getMongoDBDriver().getCollection()); + } + + /// + /// Override driver directly + /// + @Test(groups = TestCategories.MONGO) + public void respectDirectDriverOverride() { + MongoDBDriver mongoDriver = new MongoDBDriver(MongoDBConfig.getCollectionString()); + this.setMongoDBDriver(mongoDriver); + Assert.assertEquals(mongoDriver.getCollection(), this.getMongoDBDriver().getCollection()); + } + + /// + /// Override driver with new driver + /// + @Test(groups = TestCategories.MONGO) + public void respectNewDriverOverride() { + MongoDBDriver mongoDriver = new MongoDBDriver(MongoDBConfig.getCollectionString()); + this.getTestObject().overrideMongoDBDriver(mongoDriver); + Assert.assertEquals(mongoDriver.getCollection(), this.getMongoDBDriver().getCollection()); + } + + /// + /// Override drive with collection function + /// + @Test(groups = TestCategories.MONGO) + public void respectCollectionOverride() { + MongoCollection collection = MongoFactory.getDefaultCollection(); + this.getTestObject().overrideMongoDBDriver(() -> collection); + Assert.assertEquals(collection, this.getMongoDBDriver().getCollection()); + } + + /// + /// Override drive with all 3 connection strings + /// + @Test(groups = TestCategories.MONGO) + public void respectDriverConnectionStingsOverride() { + MongoCollection collection = this.getMongoDBDriver().getCollection(); + this.getTestObject().overrideMongoDBDriver(MongoDBConfig.getConnectionString(), + MongoDBConfig.getDatabaseString(), MongoDBConfig.getCollectionString()); + Assert.assertNotEquals(collection, this.getMongoDBDriver().getCollection()); + } + + /// + /// Override in base with collection function + /// + @Test(groups = TestCategories.MONGO) + public void respectCollectionOverrideInBase() { + MongoCollection collection = MongoFactory.getDefaultCollection(); + this.overrideConnectionDriver(new MongoDBDriver(collection)); + Assert.assertEquals(collection, this.getMongoDBDriver().getCollection()); + } + + /// + /// Override in base with new driver + /// + @Test(groups = TestCategories.MONGO) + public void respectDriverOverrideInBase() { + MongoCollection collection = MongoFactory.getDefaultCollection(); + this.overrideConnectionDriver(new MongoDBDriver(collection)); + Assert.assertEquals(collection, this.getMongoDBDriver().getCollection()); + } + + /// + /// Override drive with strings in base + /// + @Test(groups = TestCategories.MONGO) + public void testRespectConnectionStingsOverrideInBase() { + MongoCollection collection = this.getMongoDBDriver().getCollection(); + this.overrideConnectionDriver(MongoDBConfig.getConnectionString(), + MongoDBConfig.getDatabaseString(), MongoDBConfig.getCollectionString()); + Assert.assertNotEquals(collection, this.getMongoDBDriver().getCollection()); + } + + /** + * Override with default driver + */ + @Test(groups = TestCategories.MONGO) + public void respectDefaultDriverOverride() { + MongoDBDriver mongoDriver = new MongoDBDriver(); + this.getTestObject().getMongoDBManager().overrideDriver(mongoDriver); + + Assert.assertEquals(mongoDriver.getCollection(), this.getMongoDBDriver().getCollection()); + Assert.assertEquals(mongoDriver.getDatabase(), this.getMongoDBDriver().getDatabase()); + Assert.assertEquals(mongoDriver.getMongoClient(), this.getMongoDBDriver().getMongoClient()); + } +} diff --git a/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoTestObjectUnitTest.java b/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoTestObjectUnitTest.java index f38e8d296..165513312 100644 --- a/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoTestObjectUnitTest.java +++ b/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoTestObjectUnitTest.java @@ -10,7 +10,7 @@ import org.testng.Assert; import org.testng.annotations.Test; -public class MongoTestObjectUnitTest extends BaseMongoTest{ +public class MongoTestObjectUnitTest extends BaseMongoTest { private final MongoCollection collection = this.getMongoDBDriver().getCollection(); private final MongoCollection newCollection = MongoFactory.getDefaultCollection(); @@ -20,7 +20,6 @@ public class MongoTestObjectUnitTest extends BaseMongoTest{ @Test(groups = TestCategories.MONGO) public void overrideCollectionFunction() { this.getTestObject().overrideMongoDBDriver(() -> newCollection); - Assert.assertNotEquals(collection, this.getMongoDBDriver().getCollection()); Assert.assertEquals(newCollection, this.getMongoDBDriver().getCollection()); Assert.assertFalse(this.getMongoDBDriver().isCollectionEmpty()); @@ -66,4 +65,14 @@ public void overrideWithCustomDriver() { Assert.assertEquals(newDriver, this.getMongoDBDriver()); Assert.assertFalse(this.getMongoDBDriver().isCollectionEmpty()); } + + /// + /// Make sure the test objects map properly + /// + @Test(groups = TestCategories.MONGO) + public void testMongoDBTestObjectMapCorrectly() { + Assert.assertEquals(this.getTestObject().getLogger(), this.getLogger(), "Logs don't match"); + Assert.assertEquals(this.getTestObject().getPerfTimerCollection(), this.getPerfTimerCollection(), "The Perf timers don't match"); + Assert.assertEquals(this.getTestObject().getMongoDBDriver(), this.getMongoDBDriver(), "MongoDB drivers don't match"); + } } From d307ede98d03d7296023b51892a3edff2955d824 Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Thu, 28 Jan 2021 13:48:00 -0600 Subject: [PATCH 10/91] Changed to actual mongoDB repo --- jmaqs-mongoDB/pom.xml | 4 +- .../magenic/jmaqs/mongo/BaseMongoTest.java | 18 ++++++-- .../magenic/jmaqs/mongo/MongoDBDriver.java | 44 +++++++++++++++--- .../jmaqs/mongo/MongoDriverManager.java | 13 +++--- .../com/magenic/jmaqs/mongo/MongoFactory.java | 41 ++++++++++------- .../jmaqs/mongo/MongoDBDriverUnitTest.java | 6 +-- .../mongo/MongoDBFunctionalUnitTest.java | 10 ----- .../mongo/MongoDriverManagerUnitTest.java | 45 ++++++++----------- .../jmaqs/mongo/MongoTestObjectUnitTest.java | 24 +++++++--- 9 files changed, 122 insertions(+), 83 deletions(-) diff --git a/jmaqs-mongoDB/pom.xml b/jmaqs-mongoDB/pom.xml index 2dc1b97c9..49328056f 100644 --- a/jmaqs-mongoDB/pom.xml +++ b/jmaqs-mongoDB/pom.xml @@ -26,8 +26,8 @@ org.mongodb - mongo-java-driver - 3.4.1 + mongodb-driver-sync + 4.2.0 org.testng diff --git a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/BaseMongoTest.java b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/BaseMongoTest.java index a62b3f524..4482c047e 100644 --- a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/BaseMongoTest.java +++ b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/BaseMongoTest.java @@ -5,8 +5,12 @@ package com.magenic.jmaqs.mongo; import com.magenic.jmaqs.base.BaseExtendableTest; +import com.mongodb.client.MongoCollection; +import org.bson.Document; import org.testng.ITestResult; +import java.util.function.Supplier; + /** * Generic base MongoDB test class. */ @@ -45,10 +49,18 @@ public void overrideConnectionDriver(MongoDBDriver driver) { /** * Override the Mongo driver - respects lazy loading. - * @param connectionString Client connection string - * @param databaseString Database connection string - * @param collectionString Mongo collection string + * @param overrideCollectionConnection The collection function */ + public void overrideConnectionDriver(Supplier> overrideCollectionConnection) { + this.getTestObject().overrideMongoDBDriver(overrideCollectionConnection); + } + + /** + * Override the Mongo driver - respects lazy loading. + * @param connectionString Client connection string + * @param databaseString Database connection string + * @param collectionString Mongo collection string + */ public void overrideConnectionDriver(String connectionString, String databaseString, String collectionString) { this.getTestObject().overrideMongoDBDriver(connectionString, databaseString, collectionString); } diff --git a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDBDriver.java b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDBDriver.java index 19ed1a2b5..f64c6856f 100644 --- a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDBDriver.java +++ b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDBDriver.java @@ -4,11 +4,14 @@ package com.magenic.jmaqs.mongo; -import com.mongodb.MongoClient; +import com.mongodb.MongoClientSettings; +import com.mongodb.client.MongoClient; +import com.mongodb.client.MongoClients; import com.mongodb.client.MongoCollection; import com.mongodb.client.MongoDatabase; import java.util.ArrayList; import java.util.List; + import org.bson.Document; /** @@ -30,7 +33,9 @@ public MongoDBDriver(MongoCollection collection) { * @param collectionString Name of the collection */ public MongoDBDriver(String connectionString, String databaseString, String collectionString) { - setCollection(MongoFactory.getCollection(connectionString, databaseString, collectionString)); + setMongoClient(connectionString); + setDatabase(this.getMongoClient(), databaseString); + setCollection(this.getDatabase(), collectionString); } /** @@ -42,6 +47,15 @@ public MongoDBDriver(String collectionString) { MongoDBConfig.getDatabaseString(), collectionString)); } + /** + * Initializes a new instance of the MongoDBDriver class. + * @param collectionString Name of the collection + */ + public MongoDBDriver(MongoClientSettings clientSettings, String databaseString, String collectionString) { + this.setMongoClient(clientSettings); + setCollection(this.getMongoClient().getDatabase(databaseString).getCollection(collectionString)); + } + /** * Initializes a new instance of the MongoDBDriver class. */ @@ -64,10 +78,14 @@ public MongoClient getMongoClient() { /** * Sets the client object. - * @param newClient the new mongo Client to be set. + * @param connectionString the new mongo Client to be set. */ - public void setMongoClient(MongoClient newClient) { - this.client = newClient; + public void setMongoClient(String connectionString) { + this.client = MongoClients.create(connectionString); + } + + public void setMongoClient(MongoClientSettings mongoClientSettings) { + this.client = MongoClients.create(mongoClientSettings); } /** @@ -83,6 +101,14 @@ public MongoDatabase getDatabase() { return this.database; } + public void setDatabase(MongoClient mongoClient, String mongoDatabase) { + this.database = mongoClient.getDatabase(mongoDatabase); + } + + public void setDatabase(String mongoDatabase) { + this.database = this.getMongoClient().getDatabase(mongoDatabase); + } + /** * The MongoDB collection. */ @@ -102,6 +128,10 @@ private void setCollection(MongoCollection newCollection) { this.collection = newCollection; } + private void setCollection(MongoDatabase database, String collection) { + this.collection = database.getCollection(collection); + } + /** * List all of the items in the collection * @return List of the items in the collection @@ -115,7 +145,7 @@ public List listAllCollectionItems() { * @return True if the collection is empty, false otherwise */ public boolean isCollectionEmpty() { - return this.getCollection().find() == null; + return this.getCollection() == null; } /** @@ -123,7 +153,7 @@ public boolean isCollectionEmpty() { * @return Number of items in the collection */ public int countAllItemsInCollection() { - return (int) this.getCollection().count(); + return (int) this.getCollection().countDocuments(); } @Override public void close() { diff --git a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDriverManager.java b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDriverManager.java index 8ce717eec..fed7f6847 100644 --- a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDriverManager.java +++ b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDriverManager.java @@ -8,7 +8,6 @@ import com.magenic.jmaqs.base.DriverManager; import com.mongodb.client.MongoCollection; import org.bson.Document; - import java.util.function.Supplier; /** @@ -31,16 +30,15 @@ public MongoDriverManager(String connectionString, String databaseString, String super(() -> new MongoDBDriver(MongoFactory.getCollection(connectionString, databaseString, collectionString)), testObject); } - /* - /* TODO: is this needed? + /** TODO: is this needed? * Initializes a new instance of the MongoDriverManager class. * @param getCollection Function for getting a Mongo collection connection * @param testObject Test object this driver is getting added to - * + */ public MongoDriverManager(Supplier getCollection, BaseTestObject testObject) { super(getCollection, testObject); } - */ + /** * Override the Mongo driver. @@ -60,6 +58,7 @@ public void overrideDriver(MongoDBDriver overrideDriver) { public void overrideDriver(String connectionString, String databaseString, String collectionString) { this.driver = null; this.overrideDriverGet(() -> MongoFactory.getCollection(connectionString, databaseString, collectionString)); + this.overrideDriverGet(() -> MongoFactory.getCollection(connectionString, databaseString, collectionString)); } /** @@ -76,7 +75,7 @@ public void overrideDriver(Supplier> overrideCollectio * @return The Mongo driver */ public MongoDBDriver getMongoDriver() { - return getBase(); + return this.getBase(); } protected void overrideDriverGet(Supplier> driverGet) { @@ -84,7 +83,7 @@ protected void overrideDriverGet(Supplier> driverGet) } @Override - public void close() throws Exception { + public void close() { if (!this.isDriverInitialized()) { return; } diff --git a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoFactory.java b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoFactory.java index 1b1c1ebfd..15ac52377 100644 --- a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoFactory.java +++ b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoFactory.java @@ -4,10 +4,11 @@ package com.magenic.jmaqs.mongo; -import com.mongodb.MongoClient; -import com.mongodb.MongoClientOptions; -import com.mongodb.MongoClientURI; +import com.mongodb.MongoClientException; +import com.mongodb.MongoClientSettings; import com.mongodb.MongoException; +import com.mongodb.client.MongoClient; +import com.mongodb.client.MongoClients; import com.mongodb.client.MongoCollection; import com.mongodb.client.MongoDatabase; import org.bson.Document; @@ -36,31 +37,37 @@ public static MongoCollection getDefaultCollection(){ * @return The email connection */ public static MongoCollection getCollection(String connectionString, String databaseString, String collectionString) { + MongoClient mongoClient; MongoDatabase database; - try (MongoClient connection = new MongoClient(new MongoClientURI(connectionString))) { - database = connection.getDatabase(databaseString); - } catch (Exception e) { - throw new MongoException("connection was not created"); - } + + try { + mongoClient = MongoClients.create(connectionString); + database = mongoClient.getDatabase(databaseString); + } catch (MongoClientException e) { + throw new MongoClientException("connection was not created"); + } catch (MongoException e) { + throw new MongoException("database does not exist"); + } + return database.getCollection(collectionString); } /** * Get the email client using connection information from the test run configuration. - * @param connectionString the connection string * @param databaseString the database string * @param settings the mongoDB settings to be set * @param collectionString the collection string * @return The email connection */ - public static MongoCollection getCollection(String connectionString, String databaseString, - MongoClientOptions settings, String collectionString) { - MongoDatabase database; - try (MongoClient connection = new MongoClient(connectionString, settings)) { - database = connection.getDatabase(databaseString); - } catch (Exception e) { - throw new MongoException("connection was not created"); - } + public static MongoCollection getCollection(String databaseString, + String collectionString, MongoClientSettings settings) { + MongoClient mongoClient = MongoClients.create(settings); + + MongoDatabase database = mongoClient.getDatabase(databaseString); + + if (database.getName() == null) { + throw new MongoException("connection was not created"); + } return database.getCollection(collectionString); } } diff --git a/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBDriverUnitTest.java b/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBDriverUnitTest.java index 1ad3825ce..f92961775 100644 --- a/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBDriverUnitTest.java +++ b/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBDriverUnitTest.java @@ -5,7 +5,7 @@ package com.magenic.jmaqs.mongo; import com.magenic.jmaqs.utilities.helper.TestCategories; -import com.mongodb.MongoClient; +import com.mongodb.client.MongoClient; import com.mongodb.client.MongoCollection; import org.bson.Document; import org.testng.Assert; @@ -42,7 +42,7 @@ public void testGetMongoClient() { @Test(groups = TestCategories.MONGO) public void testSetMongoClient() { this.setMongoDBDriver(new MongoDBDriver()); - this.getMongoDBDriver().setMongoClient(new MongoClient()); + this.getMongoDBDriver().setMongoClient(MongoDBConfig.getConnectionString()); Assert.assertNotNull(this.getMongoDBDriver().getMongoClient()); } @@ -70,7 +70,7 @@ public void testIsCollectionEmpty() { * Test the count all collection items helper function */ @Test(groups = TestCategories.MONGO) - public void testMongoCountAllItemsInCollection() { + public void testCountAllItemsInCollection() { Assert.assertEquals(this.getMongoDBDriver().countAllItemsInCollection(), 4); } diff --git a/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBFunctionalUnitTest.java b/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBFunctionalUnitTest.java index 8182da16d..39640cff7 100644 --- a/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBFunctionalUnitTest.java +++ b/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBFunctionalUnitTest.java @@ -72,14 +72,4 @@ public void testMongoLinqQuery() { Assert.assertEquals(value.get("lid"), "test1"); } } - - /** - * Make sure the test objects map properly. - */ - @Test(groups = TestCategories.MONGO) - public void testMongoDBTestObjectMapCorrectly() { - Assert.assertEquals(this.getTestObject().getLogger(), this.getLogger(), "Logs don't match"); - Assert.assertEquals(this.getTestObject().getPerfTimerCollection(), this.getPerfTimerCollection(), "Soft asserts don't match"); - Assert.assertEquals(this.getTestObject().getMongoDBDriver(), this.getMongoDBDriver(), "Web service driver don't match"); - } } diff --git a/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDriverManagerUnitTest.java b/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDriverManagerUnitTest.java index 91131594f..e70b31864 100644 --- a/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDriverManagerUnitTest.java +++ b/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDriverManagerUnitTest.java @@ -11,12 +11,16 @@ import org.testng.annotations.Test; public class MongoDriverManagerUnitTest extends BaseMongoTest{ - + /// + /// Override with default driver + /// @Test(groups = TestCategories.MONGO) - public void testMongoDriverManager() { - MongoDriverManager manager = new MongoDriverManager(MongoDBConfig.getConnectionString(), - MongoDBConfig.getDatabaseString(),MongoDBConfig.getCollectionString(), this.getTestObject()); - Assert.assertNotNull(manager); + public void respectDefaultDriverOverride() { + MongoDBDriver mongoDriver = new MongoDBDriver(); + this.getTestObject().getMongoDBManager().overrideDriver(mongoDriver); + Assert.assertEquals(mongoDriver.getCollection(), this.getMongoDBDriver().getCollection()); + Assert.assertEquals(mongoDriver.getDatabase(), this.getMongoDBDriver().getDatabase()); + Assert.assertEquals(mongoDriver.getMongoClient(), this.getMongoDBDriver().getMongoClient()); } /// @@ -34,7 +38,7 @@ public void respectCollectionDriverOverride() { /// Override drive with all 3 connection strings /// @Test(groups = TestCategories.MONGO) - public void respectDriverConnectionsOverride() { + public void RespectDriverConnectionsOverride() { MongoDBDriver mongoDriver = new MongoDBDriver(MongoDBConfig.getConnectionString(), MongoDBConfig.getDatabaseString(), MongoDBConfig.getCollectionString()); this.getTestObject().getMongoDBManager().overrideDriver(mongoDriver); @@ -45,7 +49,7 @@ public void respectDriverConnectionsOverride() { /// Override driver directly /// @Test(groups = TestCategories.MONGO) - public void respectDirectDriverOverride() { + public void RespectDirectDriverOverride() { MongoDBDriver mongoDriver = new MongoDBDriver(MongoDBConfig.getCollectionString()); this.setMongoDBDriver(mongoDriver); Assert.assertEquals(mongoDriver.getCollection(), this.getMongoDBDriver().getCollection()); @@ -55,7 +59,7 @@ public void respectDirectDriverOverride() { /// Override driver with new driver /// @Test(groups = TestCategories.MONGO) - public void respectNewDriverOverride() { + public void RespectNewDriverOverride() { MongoDBDriver mongoDriver = new MongoDBDriver(MongoDBConfig.getCollectionString()); this.getTestObject().overrideMongoDBDriver(mongoDriver); Assert.assertEquals(mongoDriver.getCollection(), this.getMongoDBDriver().getCollection()); @@ -65,7 +69,7 @@ public void respectNewDriverOverride() { /// Override drive with collection function /// @Test(groups = TestCategories.MONGO) - public void respectCollectionOverride() { + public void RespectCollectionOverride() { MongoCollection collection = MongoFactory.getDefaultCollection(); this.getTestObject().overrideMongoDBDriver(() -> collection); Assert.assertEquals(collection, this.getMongoDBDriver().getCollection()); @@ -75,7 +79,7 @@ public void respectCollectionOverride() { /// Override drive with all 3 connection strings /// @Test(groups = TestCategories.MONGO) - public void respectDriverConnectionStingsOverride() { + public void RespectDriverConnectionStingsOverride() { MongoCollection collection = this.getMongoDBDriver().getCollection(); this.getTestObject().overrideMongoDBDriver(MongoDBConfig.getConnectionString(), MongoDBConfig.getDatabaseString(), MongoDBConfig.getCollectionString()); @@ -86,9 +90,9 @@ public void respectDriverConnectionStingsOverride() { /// Override in base with collection function /// @Test(groups = TestCategories.MONGO) - public void respectCollectionOverrideInBase() { + public void RespectCollectionOverrideInBase() { MongoCollection collection = MongoFactory.getDefaultCollection(); - this.overrideConnectionDriver(new MongoDBDriver(collection)); + this.overrideConnectionDriver(() -> collection); Assert.assertEquals(collection, this.getMongoDBDriver().getCollection()); } @@ -96,7 +100,7 @@ public void respectCollectionOverrideInBase() { /// Override in base with new driver /// @Test(groups = TestCategories.MONGO) - public void respectDriverOverrideInBase() { + public void RespectDriverOverrideInBase() { MongoCollection collection = MongoFactory.getDefaultCollection(); this.overrideConnectionDriver(new MongoDBDriver(collection)); Assert.assertEquals(collection, this.getMongoDBDriver().getCollection()); @@ -106,23 +110,10 @@ public void respectDriverOverrideInBase() { /// Override drive with strings in base /// @Test(groups = TestCategories.MONGO) - public void testRespectConnectionStingsOverrideInBase() { + public void RespectConnectionStingsOverrideInBase() { MongoCollection collection = this.getMongoDBDriver().getCollection(); this.overrideConnectionDriver(MongoDBConfig.getConnectionString(), MongoDBConfig.getDatabaseString(), MongoDBConfig.getCollectionString()); Assert.assertNotEquals(collection, this.getMongoDBDriver().getCollection()); } - - /** - * Override with default driver - */ - @Test(groups = TestCategories.MONGO) - public void respectDefaultDriverOverride() { - MongoDBDriver mongoDriver = new MongoDBDriver(); - this.getTestObject().getMongoDBManager().overrideDriver(mongoDriver); - - Assert.assertEquals(mongoDriver.getCollection(), this.getMongoDBDriver().getCollection()); - Assert.assertEquals(mongoDriver.getDatabase(), this.getMongoDBDriver().getDatabase()); - Assert.assertEquals(mongoDriver.getMongoClient(), this.getMongoDBDriver().getMongoClient()); - } } diff --git a/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoTestObjectUnitTest.java b/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoTestObjectUnitTest.java index 165513312..3de3868cf 100644 --- a/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoTestObjectUnitTest.java +++ b/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoTestObjectUnitTest.java @@ -5,20 +5,24 @@ package com.magenic.jmaqs.mongo; import com.magenic.jmaqs.utilities.helper.TestCategories; +import com.mongodb.ConnectionString; +import com.mongodb.MongoClientSettings; import com.mongodb.client.MongoCollection; import org.bson.Document; import org.testng.Assert; import org.testng.annotations.Test; public class MongoTestObjectUnitTest extends BaseMongoTest { - private final MongoCollection collection = this.getMongoDBDriver().getCollection(); - private final MongoCollection newCollection = MongoFactory.getDefaultCollection(); + /** * Is the collection override respected. */ @Test(groups = TestCategories.MONGO) public void overrideCollectionFunction() { + MongoCollection collection = this.getMongoDBDriver().getCollection(); + MongoCollection newCollection = MongoFactory.getDefaultCollection(); + this.getTestObject().overrideMongoDBDriver(() -> newCollection); Assert.assertNotEquals(collection, this.getMongoDBDriver().getCollection()); Assert.assertEquals(newCollection, this.getMongoDBDriver().getCollection()); @@ -30,6 +34,7 @@ public void overrideCollectionFunction() { */ @Test(groups = TestCategories.MONGO) public void overrideConnectionStrings() { + MongoCollection collection = this.getMongoDBDriver().getCollection(); this.getTestObject().overrideMongoDBDriver(MongoDBConfig.getConnectionString(), MongoDBConfig.getDatabaseString(), MongoDBConfig.getCollectionString()); @@ -57,8 +62,13 @@ public void overrideDriver() { @Test(groups = TestCategories.MONGO) public void overrideWithCustomDriver() { MongoDBDriver firstDriver = this.getMongoDBDriver(); - MongoDBDriver newDriver = new MongoDBDriver(MongoFactory.getCollection(MongoDBConfig.getConnectionString(), - MongoDBConfig.getDatabaseString(), null, MongoDBConfig.getCollectionString())); + + MongoClientSettings settings = MongoClientSettings.builder() + .applyConnectionString(new ConnectionString(MongoDBConfig.getConnectionString())) + .build(); + + MongoDBDriver newDriver = new MongoDBDriver(settings, + MongoDBConfig.getDatabaseString(), MongoDBConfig.getCollectionString()); this.getTestObject().overrideMongoDBDriver(newDriver); Assert.assertNotEquals(firstDriver, this.getMongoDBDriver()); @@ -70,9 +80,9 @@ public void overrideWithCustomDriver() { /// Make sure the test objects map properly /// @Test(groups = TestCategories.MONGO) - public void testMongoDBTestObjectMapCorrectly() { + public void TestMongoDBTestObjectMapCorrectly() { Assert.assertEquals(this.getTestObject().getLogger(), this.getLogger(), "Logs don't match"); - Assert.assertEquals(this.getTestObject().getPerfTimerCollection(), this.getPerfTimerCollection(), "The Perf timers don't match"); - Assert.assertEquals(this.getTestObject().getMongoDBDriver(), this.getMongoDBDriver(), "MongoDB drivers don't match"); + Assert.assertEquals(this.getTestObject().getPerfTimerCollection(), this.getPerfTimerCollection(), "Perf Timer Collections don't match"); + Assert.assertEquals(this.getTestObject().getMongoDBDriver(), this.getMongoDBDriver(), "Web service driver don't match"); } } From 389b376e25c4dac28e890e34a22d7bb081ec63c1 Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Thu, 28 Jan 2021 13:50:58 -0600 Subject: [PATCH 11/91] updated pom --- jmaqs-mongoDB/pom.xml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/jmaqs-mongoDB/pom.xml b/jmaqs-mongoDB/pom.xml index 49328056f..ab8c030f0 100644 --- a/jmaqs-mongoDB/pom.xml +++ b/jmaqs-mongoDB/pom.xml @@ -1,15 +1,16 @@ - + + 4.0.0 - com.magenic.jmaqs jmaqs-framework ${revision} - com.magenic.jmaqs.mongoDB jmaqs-mongoDB - JMAQS MongoDB Database Testing Module + JMAQS MongoDB Testing Module From caf6cce0b8fa5de2bffd2fc0b986f8951911f204 Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Fri, 4 Jun 2021 10:16:55 -0500 Subject: [PATCH 12/91] checkstyle changes --- .../magenic/jmaqs/mongo/BaseMongoTest.java | 15 ++++--- .../magenic/jmaqs/mongo/MongoDBConfig.java | 5 ++- .../magenic/jmaqs/mongo/MongoDBDriver.java | 39 +++++++++++++------ .../jmaqs/mongo/MongoDriverManager.java | 13 ++++--- .../com/magenic/jmaqs/mongo/MongoFactory.java | 24 ++++++++---- .../magenic/jmaqs/mongo/MongoTestObject.java | 9 ++--- .../jmaqs/mongo/MongoDBDriverUnitTest.java | 16 -------- 7 files changed, 65 insertions(+), 56 deletions(-) diff --git a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/BaseMongoTest.java b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/BaseMongoTest.java index 4482c047e..56b3cc078 100644 --- a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/BaseMongoTest.java +++ b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/BaseMongoTest.java @@ -6,11 +6,10 @@ import com.magenic.jmaqs.base.BaseExtendableTest; import com.mongodb.client.MongoCollection; +import java.util.function.Supplier; import org.bson.Document; import org.testng.ITestResult; -import java.util.function.Supplier; - /** * Generic base MongoDB test class. */ @@ -55,12 +54,12 @@ public void overrideConnectionDriver(Supplier> overrid this.getTestObject().overrideMongoDBDriver(overrideCollectionConnection); } - /** - * Override the Mongo driver - respects lazy loading. - * @param connectionString Client connection string - * @param databaseString Database connection string - * @param collectionString Mongo collection string - */ + /** + * Override the Mongo driver - respects lazy loading. + * @param connectionString Client connection string + * @param databaseString Database connection string + * @param collectionString Mongo collection string + */ public void overrideConnectionDriver(String connectionString, String databaseString, String collectionString) { this.getTestObject().overrideMongoDBDriver(connectionString, databaseString, collectionString); } diff --git a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDBConfig.java b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDBConfig.java index f1c499d7d..d1fe1b2f8 100644 --- a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDBConfig.java +++ b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDBConfig.java @@ -12,7 +12,8 @@ */ public class MongoDBConfig { - private MongoDBConfig() {} + private MongoDBConfig() { + } /** * The MongoDB configuration section. @@ -46,7 +47,7 @@ public static String getCollectionString() { /** * Get the database timeout in seconds * @return The timeout in seconds from the config file or default - * of 30 seconds when no config.xml key is found + * of 30 seconds when no config.xml key is found */ public static int getQueryTimeout() { return Integer.parseInt(Config.getValueForSection(MONGO_SECTION, "MongoTimeout", "30")); diff --git a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDBDriver.java b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDBDriver.java index f64c6856f..fd64dee52 100644 --- a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDBDriver.java +++ b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDBDriver.java @@ -11,15 +11,14 @@ import com.mongodb.client.MongoDatabase; import java.util.ArrayList; import java.util.List; - import org.bson.Document; /** - * Class to wrap the MongoCollection and related helper functions + * Class to wrap the MongoCollection and related helper functions. */ -public class MongoDBDriver implements AutoCloseable{ +public class MongoDBDriver implements AutoCloseable { /** - * Initializes a new instance of the MongoDBDriver class + * Initializes a new instance of the MongoDBDriver class. * @param collection The collection object */ public MongoDBDriver(MongoCollection collection) { @@ -27,7 +26,7 @@ public MongoDBDriver(MongoCollection collection) { } /** - * Initializes a new instance of the MongoDBDriver class + * Initializes a new instance of the MongoDBDriver class. * @param connectionString Server address * @param databaseString Name of the database * @param collectionString Name of the collection @@ -73,7 +72,7 @@ public MongoDBDriver() { * @return the mongo client */ public MongoClient getMongoClient() { - return this.client; + return this.client; } /** @@ -98,13 +97,22 @@ public void setMongoClient(MongoClientSettings mongoClientSettings) { * @return the MongoDB database object */ public MongoDatabase getDatabase() { - return this.database; + return this.database; } + /** + * Sets the database object. + * @param mongoClient the mongo DB client of the database + * @param mongoDatabase the name of the mongo database + */ public void setDatabase(MongoClient mongoClient, String mongoDatabase) { this.database = mongoClient.getDatabase(mongoDatabase); } + /** + * Sets the database object. + * @param mongoDatabase the name of the mongo database + */ public void setDatabase(String mongoDatabase) { this.database = this.getMongoClient().getDatabase(mongoDatabase); } @@ -118,7 +126,9 @@ public void setDatabase(String mongoDatabase) { * Gets the collection object. * @return a mongo collection */ - public MongoCollection getCollection() { return collection; } + public MongoCollection getCollection() { + return collection; + } /** * Sets the Mongo Collection object. @@ -128,12 +138,17 @@ private void setCollection(MongoCollection newCollection) { this.collection = newCollection; } + /** + * Sets the Mongo Collection object. + * @param database the mongo DB database of the collection + * @param collection the string value of the collection + */ private void setCollection(MongoDatabase database, String collection) { this.collection = database.getCollection(collection); } /** - * List all of the items in the collection + * List all of the items in the collection. * @return List of the items in the collection */ public List listAllCollectionItems() { @@ -145,7 +160,7 @@ public List listAllCollectionItems() { * @return True if the collection is empty, false otherwise */ public boolean isCollectionEmpty() { - return this.getCollection() == null; + return this.getCollection().countDocuments() == 0; } /** @@ -156,7 +171,7 @@ public int countAllItemsInCollection() { return (int) this.getCollection().countDocuments(); } - @Override public void close() { - + @Override + public void close() { } } diff --git a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDriverManager.java b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDriverManager.java index fed7f6847..715805667 100644 --- a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDriverManager.java +++ b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDriverManager.java @@ -7,8 +7,8 @@ import com.magenic.jmaqs.base.BaseTestObject; import com.magenic.jmaqs.base.DriverManager; import com.mongodb.client.MongoCollection; -import org.bson.Document; import java.util.function.Supplier; +import org.bson.Document; /** * Mongo database driver. @@ -26,8 +26,10 @@ public class MongoDriverManager extends DriverManager { * @param collectionString Mongo collection string * @param testObject Test object this driver is getting added to */ - public MongoDriverManager(String connectionString, String databaseString, String collectionString, BaseTestObject testObject) { - super(() -> new MongoDBDriver(MongoFactory.getCollection(connectionString, databaseString, collectionString)), testObject); + public MongoDriverManager(String connectionString, String databaseString, + String collectionString, BaseTestObject testObject) { + super(() -> new MongoDBDriver( + MongoFactory.getCollection(connectionString, databaseString, collectionString)), testObject); } /** TODO: is this needed? @@ -71,13 +73,14 @@ public void overrideDriver(Supplier> overrideCollectio } /** - * Get the Mongo driver + * Get the Mongo driver. * @return The Mongo driver */ public MongoDBDriver getMongoDriver() { return this.getBase(); } + protected void overrideDriverGet(Supplier> driverGet) { this.setBaseDriver(new MongoDBDriver(driverGet.get())); } @@ -88,7 +91,7 @@ public void close() { return; } MongoDBDriver mongoDBDriver = this.getMongoDriver(); - mongoDBDriver.close(); + mongoDBDriver.getMongoClient().close(); this.baseDriver = null; } } diff --git a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoFactory.java b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoFactory.java index 15ac52377..5f99a087a 100644 --- a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoFactory.java +++ b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoFactory.java @@ -18,13 +18,14 @@ */ public class MongoFactory { - private MongoFactory() {} + private MongoFactory() { + } /** * Get the email client using connection information from the test run configuration. * @return The email connection */ - public static MongoCollection getDefaultCollection(){ + public static MongoCollection getDefaultCollection() { return getCollection(MongoDBConfig.getConnectionString(), MongoDBConfig.getDatabaseString(), MongoDBConfig.getCollectionString()); } @@ -36,7 +37,8 @@ public static MongoCollection getDefaultCollection(){ * @param collectionString the collection string * @return The email connection */ - public static MongoCollection getCollection(String connectionString, String databaseString, String collectionString) { + public static MongoCollection getCollection( + String connectionString, String databaseString, String collectionString) { MongoClient mongoClient; MongoDatabase database; @@ -63,11 +65,17 @@ public static MongoCollection getCollection(String databaseString, String collectionString, MongoClientSettings settings) { MongoClient mongoClient = MongoClients.create(settings); - MongoDatabase database = mongoClient.getDatabase(databaseString); + MongoDatabase database; + + try { + database = mongoClient.getDatabase(databaseString); + } catch (Exception e) { + throw new MongoException("connection was not created: " + e); + } - if (database.getName() == null) { - throw new MongoException("connection was not created"); - } - return database.getCollection(collectionString); + if (database.getName() == null) { + throw new MongoException("connection was not created"); + } + return database.getCollection(collectionString); } } diff --git a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoTestObject.java b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoTestObject.java index 98b4ebd81..6bb8b55dc 100644 --- a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoTestObject.java +++ b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoTestObject.java @@ -7,16 +7,15 @@ import com.magenic.jmaqs.base.BaseTestObject; import com.magenic.jmaqs.utilities.logging.Logger; import com.mongodb.client.MongoCollection; -import org.bson.Document; - import java.util.function.Supplier; +import org.bson.Document; /** * Mongo test context data. */ public class MongoTestObject extends BaseTestObject { /** - * Initializes a new instance of the MongoTestObject class + * Initializes a new instance of the MongoTestObject class. * @param connectionString Client connection string * @param databaseString Database connection string * @param collectionString Mongo collection string @@ -24,7 +23,7 @@ public class MongoTestObject extends BaseTestObject { * @param fullyQualifiedTestName The test's fully qualified test name */ public MongoTestObject(String connectionString, String databaseString, String collectionString, Logger logger, - String fullyQualifiedTestName) { + String fullyQualifiedTestName) { super(logger, fullyQualifiedTestName); this.getManagerStore().put((MongoDriverManager.class).getCanonicalName(), new MongoDriverManager(connectionString,databaseString,collectionString, this)); @@ -43,7 +42,7 @@ public MongoDriverManager getMongoDBManager() { * @return the stored mongoDB driver. */ public MongoDBDriver getMongoDBDriver() { - return this.getMongoDBManager().getMongoDriver(); + return this.getMongoDBManager().getMongoDriver(); } /** diff --git a/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBDriverUnitTest.java b/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBDriverUnitTest.java index f92961775..b17b6a801 100644 --- a/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBDriverUnitTest.java +++ b/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBDriverUnitTest.java @@ -9,7 +9,6 @@ import com.mongodb.client.MongoCollection; import org.bson.Document; import org.testng.Assert; -import org.testng.ITestResult; import org.testng.annotations.Test; import java.util.List; @@ -73,19 +72,4 @@ public void testIsCollectionEmpty() { public void testCountAllItemsInCollection() { Assert.assertEquals(this.getMongoDBDriver().countAllItemsInCollection(), 4); } - - /** - * Steps to do before logging teardown results. - * - * @param resultType The test result - */ - @Override - protected void beforeLoggingTeardown(ITestResult resultType) { - - } - - @Override - protected void createNewTestObject() { - - } } From b881d0148398e8f8771d1662141bd143652bb639 Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Wed, 9 Jun 2021 11:11:17 -0500 Subject: [PATCH 13/91] added MongoDB as dependency in framework .pom --- pom.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pom.xml b/pom.xml index 42691c3b7..16f928a9b 100644 --- a/pom.xml +++ b/pom.xml @@ -309,6 +309,11 @@ jmaqs-cucumber ${project.version} + + com.magenic.jmaqs.mongoDB + jmaqs-mongoDB + ${project.version} + From 63eb864b76b10d41efd0bb642719245d531d6034 Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Wed, 9 Jun 2021 12:19:14 -0500 Subject: [PATCH 14/91] checkstyle updates --- .../main/java/com/magenic/jmaqs/mongo/MongoTestObject.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoTestObject.java b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoTestObject.java index 6bb8b55dc..90ff18a28 100644 --- a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoTestObject.java +++ b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoTestObject.java @@ -22,8 +22,8 @@ public class MongoTestObject extends BaseTestObject { * @param logger The test's logger * @param fullyQualifiedTestName The test's fully qualified test name */ - public MongoTestObject(String connectionString, String databaseString, String collectionString, Logger logger, - String fullyQualifiedTestName) { + public MongoTestObject(String connectionString, String databaseString, String collectionString, + Logger logger, String fullyQualifiedTestName) { super(logger, fullyQualifiedTestName); this.getManagerStore().put((MongoDriverManager.class).getCanonicalName(), new MongoDriverManager(connectionString,databaseString,collectionString, this)); From 8663ef46d8b95e516744ccc294cbb97c247a12ad Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Wed, 9 Jun 2021 12:23:19 -0500 Subject: [PATCH 15/91] checkstyle updates --- .../main/java/com/magenic/jmaqs/mongo/BaseMongoTest.java | 2 +- .../main/java/com/magenic/jmaqs/mongo/MongoDBConfig.java | 8 ++++---- .../java/com/magenic/jmaqs/mongo/MongoDriverManager.java | 1 - .../main/java/com/magenic/jmaqs/mongo/MongoFactory.java | 4 ++-- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/BaseMongoTest.java b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/BaseMongoTest.java index 56b3cc078..f7afd73da 100644 --- a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/BaseMongoTest.java +++ b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/BaseMongoTest.java @@ -31,7 +31,7 @@ public MongoDBDriver getMongoDBDriver() { } /** - * Sets the MongoDB driver + * Sets the MongoDB driver. * @param driver the MongoDB driver to be set. */ public void setMongoDBDriver(MongoDBDriver driver) { diff --git a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDBConfig.java b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDBConfig.java index d1fe1b2f8..47e88385e 100644 --- a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDBConfig.java +++ b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDBConfig.java @@ -8,7 +8,7 @@ import com.magenic.jmaqs.utilities.helper.ConfigSection; /** - * MongoDB config class + * MongoDB config class. */ public class MongoDBConfig { @@ -29,7 +29,7 @@ public static String getConnectionString() { } /** - * Get the database connection string + * Get the database connection string. * @return The database name */ public static String getDatabaseString() { @@ -37,7 +37,7 @@ public static String getDatabaseString() { } /** - * Get the mongo collection string + * Get the mongo collection string. * @return The mongo collection string */ public static String getCollectionString() { @@ -45,7 +45,7 @@ public static String getCollectionString() { } /** - * Get the database timeout in seconds + * Get the database timeout in seconds. * @return The timeout in seconds from the config file or default * of 30 seconds when no config.xml key is found */ diff --git a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDriverManager.java b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDriverManager.java index 715805667..b4de22a3d 100644 --- a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDriverManager.java +++ b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDriverManager.java @@ -85,7 +85,6 @@ protected void overrideDriverGet(Supplier> driverGet) this.setBaseDriver(new MongoDBDriver(driverGet.get())); } - @Override public void close() { if (!this.isDriverInitialized()) { return; diff --git a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoFactory.java b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoFactory.java index 5f99a087a..abcf2bb46 100644 --- a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoFactory.java +++ b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoFactory.java @@ -50,7 +50,6 @@ public static MongoCollection getCollection( } catch (MongoException e) { throw new MongoException("database does not exist"); } - return database.getCollection(collectionString); } @@ -63,11 +62,12 @@ public static MongoCollection getCollection( */ public static MongoCollection getCollection(String databaseString, String collectionString, MongoClientSettings settings) { - MongoClient mongoClient = MongoClients.create(settings); + MongoClient mongoClient; MongoDatabase database; try { + mongoClient = MongoClients.create(settings); database = mongoClient.getDatabase(databaseString); } catch (Exception e) { throw new MongoException("connection was not created: " + e); From b1572c919e33ef3c2f5f87f1a408d9eba5df0202 Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Fri, 11 Jun 2021 13:01:24 -0500 Subject: [PATCH 16/91] updated mongodb driver version --- jmaqs-mongoDB/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jmaqs-mongoDB/pom.xml b/jmaqs-mongoDB/pom.xml index ab8c030f0..d1038358c 100644 --- a/jmaqs-mongoDB/pom.xml +++ b/jmaqs-mongoDB/pom.xml @@ -28,7 +28,7 @@ org.mongodb mongodb-driver-sync - 4.2.0 + 4.2.3 org.testng From a7e7df81f0b0e2d45c011780bfef9243f5f9a822 Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Mon, 18 Oct 2021 14:26:37 -0500 Subject: [PATCH 17/91] added comments formatting --- .../magenic/jmaqs/mongo/BaseMongoTest.java | 3 +- .../magenic/jmaqs/mongo/MongoDBDriver.java | 1 + .../jmaqs/mongo/MongoDriverManager.java | 2 +- .../magenic/jmaqs/mongo/MongoTestObject.java | 1 + .../jmaqs/mongo/BaseMongoUnitTest.java | 3 + .../jmaqs/mongo/MongoDBConfigUnitTest.java | 1 + .../jmaqs/mongo/MongoDBDriverUnitTest.java | 2 +- .../mongo/MongoDBFunctionalUnitTest.java | 4 +- .../mongo/MongoDriverManagerUnitTest.java | 66 ++++++++++--------- .../jmaqs/mongo/MongoTestObjectUnitTest.java | 4 +- 10 files changed, 51 insertions(+), 36 deletions(-) diff --git a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/BaseMongoTest.java b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/BaseMongoTest.java index f7afd73da..773342eff 100644 --- a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/BaseMongoTest.java +++ b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/BaseMongoTest.java @@ -14,12 +14,13 @@ * Generic base MongoDB test class. */ public class BaseMongoTest extends BaseExtendableTest { + /** * Initializes a new instance of the BaseMongoTest class, * Setup the database client for each test class. */ public BaseMongoTest() { - // Currently not populated with any logic + // Currently, not populated with any logic } /** diff --git a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDBDriver.java b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDBDriver.java index fd64dee52..7b0811e8d 100644 --- a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDBDriver.java +++ b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDBDriver.java @@ -17,6 +17,7 @@ * Class to wrap the MongoCollection and related helper functions. */ public class MongoDBDriver implements AutoCloseable { + /** * Initializes a new instance of the MongoDBDriver class. * @param collection The collection object diff --git a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDriverManager.java b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDriverManager.java index b4de22a3d..7c4e148d7 100644 --- a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDriverManager.java +++ b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDriverManager.java @@ -14,6 +14,7 @@ * Mongo database driver. */ public class MongoDriverManager extends DriverManager { + /** * Cached copy of the connection driver. */ @@ -80,7 +81,6 @@ public MongoDBDriver getMongoDriver() { return this.getBase(); } - protected void overrideDriverGet(Supplier> driverGet) { this.setBaseDriver(new MongoDBDriver(driverGet.get())); } diff --git a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoTestObject.java b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoTestObject.java index 90ff18a28..fa89ade9d 100644 --- a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoTestObject.java +++ b/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoTestObject.java @@ -14,6 +14,7 @@ * Mongo test context data. */ public class MongoTestObject extends BaseTestObject { + /** * Initializes a new instance of the MongoTestObject class. * @param connectionString Client connection string diff --git a/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/BaseMongoUnitTest.java b/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/BaseMongoUnitTest.java index bd8750fb5..85132c761 100644 --- a/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/BaseMongoUnitTest.java +++ b/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/BaseMongoUnitTest.java @@ -8,6 +8,9 @@ import org.testng.Assert; import org.testng.annotations.Test; +/** + * Test the Base Mongo Test functionality. + */ public class BaseMongoUnitTest extends BaseMongoTest { @Test(groups = TestCategories.MONGO) public void testGetMongoDBDriver() { diff --git a/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBConfigUnitTest.java b/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBConfigUnitTest.java index 5a019ba5c..4c69dfcd2 100644 --- a/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBConfigUnitTest.java +++ b/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBConfigUnitTest.java @@ -12,6 +12,7 @@ * Test class for database configurations. */ public class MongoDBConfigUnitTest extends BaseMongoTest{ + /** * Gets the connection string. */ diff --git a/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBDriverUnitTest.java b/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBDriverUnitTest.java index b17b6a801..8ab8baa5c 100644 --- a/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBDriverUnitTest.java +++ b/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBDriverUnitTest.java @@ -13,7 +13,7 @@ import java.util.List; /** - * Test basic mongo base test functionality + * Test mongo base test functionality */ public class MongoDBDriverUnitTest extends BaseMongoTest { diff --git a/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBFunctionalUnitTest.java b/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBFunctionalUnitTest.java index 39640cff7..c619368be 100644 --- a/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBFunctionalUnitTest.java +++ b/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBFunctionalUnitTest.java @@ -10,10 +10,12 @@ import org.bson.conversions.Bson; import org.testng.Assert; import org.testng.annotations.Test; - import java.util.ArrayList; import java.util.List; +/** + * Test Mongo Functionality. + */ public class MongoDBFunctionalUnitTest extends BaseMongoTest{ /** diff --git a/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDriverManagerUnitTest.java b/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDriverManagerUnitTest.java index e70b31864..c5bd97e11 100644 --- a/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDriverManagerUnitTest.java +++ b/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDriverManagerUnitTest.java @@ -10,10 +10,14 @@ import org.testng.Assert; import org.testng.annotations.Test; +/** + * Test the mongo driver manager functionality. + */ public class MongoDriverManagerUnitTest extends BaseMongoTest{ - /// - /// Override with default driver - /// + + /** + * Override with default driver. + */ @Test(groups = TestCategories.MONGO) public void respectDefaultDriverOverride() { MongoDBDriver mongoDriver = new MongoDBDriver(); @@ -23,20 +27,20 @@ public void respectDefaultDriverOverride() { Assert.assertEquals(mongoDriver.getMongoClient(), this.getMongoDBDriver().getMongoClient()); } - /// - /// Override driver with collection string - /// + /** + * Override driver with collection string. + */ @Test(groups = TestCategories.MONGO) public void respectCollectionDriverOverride() { - //MongoDBConfig.GetConnectionString(), MongoDBConfig.GetDatabaseString(), collectionString + // MongoDBConfig.GetConnectionString(), MongoDBConfig.GetDatabaseString(), collectionString MongoDBDriver mongoDriver = new MongoDBDriver(MongoDBConfig.getCollectionString()); this.getTestObject().getMongoDBManager().overrideDriver(mongoDriver); Assert.assertEquals(mongoDriver.getCollection(), this.getMongoDBDriver().getCollection()); } - /// - /// Override drive with all 3 connection strings - /// + /** + * Override drive with all 3 connection strings. + */ @Test(groups = TestCategories.MONGO) public void RespectDriverConnectionsOverride() { MongoDBDriver mongoDriver = new MongoDBDriver(MongoDBConfig.getConnectionString(), @@ -45,9 +49,9 @@ public void RespectDriverConnectionsOverride() { Assert.assertEquals(mongoDriver.getCollection(), this.getMongoDBDriver().getCollection()); } - /// - /// Override driver directly - /// + /** + * Override driver directly. + */ @Test(groups = TestCategories.MONGO) public void RespectDirectDriverOverride() { MongoDBDriver mongoDriver = new MongoDBDriver(MongoDBConfig.getCollectionString()); @@ -55,9 +59,9 @@ public void RespectDirectDriverOverride() { Assert.assertEquals(mongoDriver.getCollection(), this.getMongoDBDriver().getCollection()); } - /// - /// Override driver with new driver - /// + /** + * Override driver with new driver. + */ @Test(groups = TestCategories.MONGO) public void RespectNewDriverOverride() { MongoDBDriver mongoDriver = new MongoDBDriver(MongoDBConfig.getCollectionString()); @@ -65,9 +69,9 @@ public void RespectNewDriverOverride() { Assert.assertEquals(mongoDriver.getCollection(), this.getMongoDBDriver().getCollection()); } - /// - /// Override drive with collection function - /// + /** + * Override drive with collection function. + */ @Test(groups = TestCategories.MONGO) public void RespectCollectionOverride() { MongoCollection collection = MongoFactory.getDefaultCollection(); @@ -75,9 +79,9 @@ public void RespectCollectionOverride() { Assert.assertEquals(collection, this.getMongoDBDriver().getCollection()); } - /// - /// Override drive with all 3 connection strings - /// + /** + * Override drive with all 3 connection strings. + */ @Test(groups = TestCategories.MONGO) public void RespectDriverConnectionStingsOverride() { MongoCollection collection = this.getMongoDBDriver().getCollection(); @@ -86,9 +90,9 @@ public void RespectDriverConnectionStingsOverride() { Assert.assertNotEquals(collection, this.getMongoDBDriver().getCollection()); } - /// - /// Override in base with collection function - /// + /** + * Override in base with collection function. + */ @Test(groups = TestCategories.MONGO) public void RespectCollectionOverrideInBase() { MongoCollection collection = MongoFactory.getDefaultCollection(); @@ -96,9 +100,9 @@ public void RespectCollectionOverrideInBase() { Assert.assertEquals(collection, this.getMongoDBDriver().getCollection()); } - /// - /// Override in base with new driver - /// + /** + * Override in base with new driver. + */ @Test(groups = TestCategories.MONGO) public void RespectDriverOverrideInBase() { MongoCollection collection = MongoFactory.getDefaultCollection(); @@ -106,9 +110,9 @@ public void RespectDriverOverrideInBase() { Assert.assertEquals(collection, this.getMongoDBDriver().getCollection()); } - /// - /// Override drive with strings in base - /// + /** + * Override drive with strings in base. + */ @Test(groups = TestCategories.MONGO) public void RespectConnectionStingsOverrideInBase() { MongoCollection collection = this.getMongoDBDriver().getCollection(); diff --git a/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoTestObjectUnitTest.java b/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoTestObjectUnitTest.java index 3de3868cf..4ca1e61ff 100644 --- a/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoTestObjectUnitTest.java +++ b/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoTestObjectUnitTest.java @@ -12,9 +12,11 @@ import org.testng.Assert; import org.testng.annotations.Test; +/** + * Test the mongo test object functionality. + */ public class MongoTestObjectUnitTest extends BaseMongoTest { - /** * Is the collection override respected. */ From 245bb189c9f505c57b62671a07c701eec3be70f5 Mon Sep 17 00:00:00 2001 From: jredingcvs <97762469+jredingcvs@users.noreply.github.com> Date: Sat, 22 Jan 2022 19:12:22 -0600 Subject: [PATCH 18/91] add docker stuff for mongo db --- Docker/MAQSMongoDB/docker-compose.yml | 20 ++++++++++++++++++++ Docker/MAQSMongoDB/seed/seed.js | 22 ++++++++++++++++++++++ Docker/docker-compose.yml | 15 +++++++++++++++ 3 files changed, 57 insertions(+) create mode 100644 Docker/MAQSMongoDB/docker-compose.yml create mode 100644 Docker/MAQSMongoDB/seed/seed.js create mode 100644 Docker/docker-compose.yml diff --git a/Docker/MAQSMongoDB/docker-compose.yml b/Docker/MAQSMongoDB/docker-compose.yml new file mode 100644 index 000000000..3f4517b9a --- /dev/null +++ b/Docker/MAQSMongoDB/docker-compose.yml @@ -0,0 +1,20 @@ +version: '2' + +services: + mongo: + image: mongo + restart: always + ports: + - "27017:27017" + volumes: + - ./seed/seed.js:/docker-entrypoint-initdb.d/seed.js + mongo-express: + image: mongo-express + restart: always + ports: + - 8081:8081 + links: + - mongo + environment: + ME_CONFIG_MONGODB_ADMINUSERNAME: + ME_CONFIG_MONGODB_ADMINPASSWORD: \ No newline at end of file diff --git a/Docker/MAQSMongoDB/seed/seed.js b/Docker/MAQSMongoDB/seed/seed.js new file mode 100644 index 000000000..badfaf331 --- /dev/null +++ b/Docker/MAQSMongoDB/seed/seed.js @@ -0,0 +1,22 @@ +db = db.getSiblingDB('MongoDatabaseTest') +db.MongoTestCollection.drop(); +db.MongoTestCollection.insertMany([ + { + "lid": "test1", + "isChanged": true, + "order": 1 + }, + { + "lid": "test2", + "isChanged": false, + "order": 2 + }, + { + "lid": "test3", + "isChanged": false + }, + { + "lid": "test4", + "isChanged": false + } +]) \ No newline at end of file diff --git a/Docker/docker-compose.yml b/Docker/docker-compose.yml new file mode 100644 index 000000000..44c3c95f1 --- /dev/null +++ b/Docker/docker-compose.yml @@ -0,0 +1,15 @@ +# The extends functionality is not yet available in +# Docker config files versioned 3 and higher. +# If the version is bumped, this config file will have to change. +# See https://github.com/moby/moby/issues/31101. +version: '2' + +services: + mssql: + extends: + file: ./MAQSSQLServer/docker-compose.yml + service: mssql + mongo: + extends: + file: ./MAQSMongoDB/docker-compose.yml + service: mongo \ No newline at end of file From 141c4eb2781743022f3978052c4ca5eadd557479 Mon Sep 17 00:00:00 2001 From: jredingcvs <97762469+jredingcvs@users.noreply.github.com> Date: Sat, 22 Jan 2022 20:49:14 -0600 Subject: [PATCH 19/91] more edits for mongo db --- {jmaqs-mongoDB => maqs-mongoDB}/config.xml | 4 ++-- {jmaqs-mongoDB => maqs-mongoDB}/pom.xml | 12 ++++-------- .../java/com/magenic/maqs}/mongo/BaseMongoTest.java | 10 +++++----- .../java/com/magenic/maqs}/mongo/MongoDBConfig.java | 4 ++-- .../java/com/magenic/maqs}/mongo/MongoDBDriver.java | 8 ++++---- .../com/magenic/maqs}/mongo/MongoDriverManager.java | 4 ++-- .../java/com/magenic/maqs}/mongo/MongoFactory.java | 6 +++--- .../com/magenic/maqs}/mongo/MongoTestObject.java | 4 ++-- .../com/magenic/maqs}/mongo/BaseMongoUnitTest.java | 4 ++-- .../magenic/maqs}/mongo/MongoDBConfigUnitTest.java | 4 ++-- .../magenic/maqs}/mongo/MongoDBDriverUnitTest.java | 4 ++-- .../maqs}/mongo/MongoDBFunctionalUnitTest.java | 4 ++-- .../maqs}/mongo/MongoDriverManagerUnitTest.java | 4 ++-- .../magenic/maqs}/mongo/MongoTestObjectUnitTest.java | 4 ++-- pom.xml | 6 +++--- 15 files changed, 39 insertions(+), 43 deletions(-) rename {jmaqs-mongoDB => maqs-mongoDB}/config.xml (97%) rename {jmaqs-mongoDB => maqs-mongoDB}/pom.xml (79%) rename {jmaqs-mongoDB/src/main/java/com/magenic/jmaqs => maqs-mongoDB/src/main/java/com/magenic/maqs}/mongo/BaseMongoTest.java (92%) rename {jmaqs-mongoDB/src/main/java/com/magenic/jmaqs => maqs-mongoDB/src/main/java/com/magenic/maqs}/mongo/MongoDBConfig.java (93%) rename {jmaqs-mongoDB/src/main/java/com/magenic/jmaqs => maqs-mongoDB/src/main/java/com/magenic/maqs}/mongo/MongoDBDriver.java (96%) rename {jmaqs-mongoDB/src/main/java/com/magenic/jmaqs => maqs-mongoDB/src/main/java/com/magenic/maqs}/mongo/MongoDriverManager.java (97%) rename {jmaqs-mongoDB/src/main/java/com/magenic/jmaqs => maqs-mongoDB/src/main/java/com/magenic/maqs}/mongo/MongoFactory.java (95%) rename {jmaqs-mongoDB/src/main/java/com/magenic/jmaqs => maqs-mongoDB/src/main/java/com/magenic/maqs}/mongo/MongoTestObject.java (96%) rename {jmaqs-mongoDB/src/test/java/com/magenic/jmaqs => maqs-mongoDB/src/test/java/com/magenic/maqs}/mongo/BaseMongoUnitTest.java (96%) rename {jmaqs-mongoDB/src/test/java/com/magenic/jmaqs => maqs-mongoDB/src/test/java/com/magenic/maqs}/mongo/MongoDBConfigUnitTest.java (94%) rename {jmaqs-mongoDB/src/test/java/com/magenic/jmaqs => maqs-mongoDB/src/test/java/com/magenic/maqs}/mongo/MongoDBDriverUnitTest.java (96%) rename {jmaqs-mongoDB/src/test/java/com/magenic/jmaqs => maqs-mongoDB/src/test/java/com/magenic/maqs}/mongo/MongoDBFunctionalUnitTest.java (96%) rename {jmaqs-mongoDB/src/test/java/com/magenic/jmaqs => maqs-mongoDB/src/test/java/com/magenic/maqs}/mongo/MongoDriverManagerUnitTest.java (98%) rename {jmaqs-mongoDB/src/test/java/com/magenic/jmaqs => maqs-mongoDB/src/test/java/com/magenic/maqs}/mongo/MongoTestObjectUnitTest.java (97%) diff --git a/jmaqs-mongoDB/config.xml b/maqs-mongoDB/config.xml similarity index 97% rename from jmaqs-mongoDB/config.xml rename to maqs-mongoDB/config.xml index 8a3179607..54da3ca88 100644 --- a/jmaqs-mongoDB/config.xml +++ b/maqs-mongoDB/config.xml @@ -1,7 +1,7 @@ - + 100 @@ -31,7 +31,7 @@ ./target/logs - + mongodb://localhost:27017 MongoDatabaseTest diff --git a/jmaqs-mongoDB/pom.xml b/maqs-mongoDB/pom.xml similarity index 79% rename from jmaqs-mongoDB/pom.xml rename to maqs-mongoDB/pom.xml index d1038358c..be58b06d4 100644 --- a/jmaqs-mongoDB/pom.xml +++ b/maqs-mongoDB/pom.xml @@ -8,9 +8,9 @@ jmaqs-framework ${revision} - com.magenic.jmaqs.mongoDB + com.magenic.maqs.mongoDB jmaqs-mongoDB - JMAQS MongoDB Testing Module + MAQS MongoDB Testing Module @@ -28,16 +28,12 @@ org.mongodb mongodb-driver-sync - 4.2.3 + 4.4.1 org.testng testng - - com.magenic.jmaqs.webservices - jmaqs-webservices-jdk8 - test - + diff --git a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/BaseMongoTest.java b/maqs-mongoDB/src/main/java/com/magenic/maqs/mongo/BaseMongoTest.java similarity index 92% rename from jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/BaseMongoTest.java rename to maqs-mongoDB/src/main/java/com/magenic/maqs/mongo/BaseMongoTest.java index 773342eff..677ef6dfe 100644 --- a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/BaseMongoTest.java +++ b/maqs-mongoDB/src/main/java/com/magenic/maqs/mongo/BaseMongoTest.java @@ -1,8 +1,8 @@ /* - * Copyright 2021 (C) Magenic, All rights Reserved + * Copyright 2022 Cognizant, All rights Reserved */ -package com.magenic.jmaqs.mongo; +package com.magenic.maqs.mongo; import com.magenic.jmaqs.base.BaseExtendableTest; import com.mongodb.client.MongoCollection; @@ -17,7 +17,7 @@ public class BaseMongoTest extends BaseExtendableTest { /** * Initializes a new instance of the BaseMongoTest class, - * Setup the database client for each test class. + * Set up the database client for each test class. */ public BaseMongoTest() { // Currently, not populated with any logic @@ -96,11 +96,11 @@ protected void createNewTestObject() { } /** - * Steps to do before logging teardown results. + * Steps to take before logging teardown results. * @param resultType The test result */ @Override protected void beforeLoggingTeardown(ITestResult resultType) { - // Currently not populated with any logic + // Currently, not populated with any logic } } diff --git a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDBConfig.java b/maqs-mongoDB/src/main/java/com/magenic/maqs/mongo/MongoDBConfig.java similarity index 93% rename from jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDBConfig.java rename to maqs-mongoDB/src/main/java/com/magenic/maqs/mongo/MongoDBConfig.java index 47e88385e..8fb55afc2 100644 --- a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDBConfig.java +++ b/maqs-mongoDB/src/main/java/com/magenic/maqs/mongo/MongoDBConfig.java @@ -1,8 +1,8 @@ /* - * Copyright 2021 (C) Magenic, All rights Reserved + * Copyright 2022 Cognizant, All rights Reserved */ -package com.magenic.jmaqs.mongo; +package com.magenic.maqs.mongo; import com.magenic.jmaqs.utilities.helper.Config; import com.magenic.jmaqs.utilities.helper.ConfigSection; diff --git a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDBDriver.java b/maqs-mongoDB/src/main/java/com/magenic/maqs/mongo/MongoDBDriver.java similarity index 96% rename from jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDBDriver.java rename to maqs-mongoDB/src/main/java/com/magenic/maqs/mongo/MongoDBDriver.java index 7b0811e8d..82ef5d3fb 100644 --- a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDBDriver.java +++ b/maqs-mongoDB/src/main/java/com/magenic/maqs/mongo/MongoDBDriver.java @@ -1,8 +1,8 @@ /* - * Copyright 2021 (C) Magenic, All rights Reserved + * Copyright 2022 Cognizant, All rights Reserved */ -package com.magenic.jmaqs.mongo; +package com.magenic.maqs.mongo; import com.mongodb.MongoClientSettings; import com.mongodb.client.MongoClient; @@ -149,7 +149,7 @@ private void setCollection(MongoDatabase database, String collection) { } /** - * List all of the items in the collection. + * List all the items in the collection. * @return List of the items in the collection */ public List listAllCollectionItems() { @@ -165,7 +165,7 @@ public boolean isCollectionEmpty() { } /** - * Counts all of the items in the collection. + * Counts all the items in the collection. * @return Number of items in the collection */ public int countAllItemsInCollection() { diff --git a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDriverManager.java b/maqs-mongoDB/src/main/java/com/magenic/maqs/mongo/MongoDriverManager.java similarity index 97% rename from jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDriverManager.java rename to maqs-mongoDB/src/main/java/com/magenic/maqs/mongo/MongoDriverManager.java index 7c4e148d7..b7459a9e2 100644 --- a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoDriverManager.java +++ b/maqs-mongoDB/src/main/java/com/magenic/maqs/mongo/MongoDriverManager.java @@ -1,8 +1,8 @@ /* - * Copyright 2021 (C) Magenic, All rights Reserved + * Copyright 2022 Cognizant, All rights Reserved */ -package com.magenic.jmaqs.mongo; +package com.magenic.maqs.mongo; import com.magenic.jmaqs.base.BaseTestObject; import com.magenic.jmaqs.base.DriverManager; diff --git a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoFactory.java b/maqs-mongoDB/src/main/java/com/magenic/maqs/mongo/MongoFactory.java similarity index 95% rename from jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoFactory.java rename to maqs-mongoDB/src/main/java/com/magenic/maqs/mongo/MongoFactory.java index abcf2bb46..aaf7f2108 100644 --- a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoFactory.java +++ b/maqs-mongoDB/src/main/java/com/magenic/maqs/mongo/MongoFactory.java @@ -1,8 +1,8 @@ /* - * Copyright 2021 (C) Magenic, All rights Reserved + * Copyright 2022 Cognizant, All rights Reserved */ -package com.magenic.jmaqs.mongo; +package com.magenic.maqs.mongo; import com.mongodb.MongoClientException; import com.mongodb.MongoClientSettings; @@ -73,7 +73,7 @@ public static MongoCollection getCollection(String databaseString, throw new MongoException("connection was not created: " + e); } - if (database.getName() == null) { + if (database.getName().isEmpty()) { throw new MongoException("connection was not created"); } return database.getCollection(collectionString); diff --git a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoTestObject.java b/maqs-mongoDB/src/main/java/com/magenic/maqs/mongo/MongoTestObject.java similarity index 96% rename from jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoTestObject.java rename to maqs-mongoDB/src/main/java/com/magenic/maqs/mongo/MongoTestObject.java index fa89ade9d..2769d3e30 100644 --- a/jmaqs-mongoDB/src/main/java/com/magenic/jmaqs/mongo/MongoTestObject.java +++ b/maqs-mongoDB/src/main/java/com/magenic/maqs/mongo/MongoTestObject.java @@ -1,8 +1,8 @@ /* - * Copyright 2021 (C) Magenic, All rights Reserved + * Copyright 2022 Cognizant, All rights Reserved */ -package com.magenic.jmaqs.mongo; +package com.magenic.maqs.mongo; import com.magenic.jmaqs.base.BaseTestObject; import com.magenic.jmaqs.utilities.logging.Logger; diff --git a/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/BaseMongoUnitTest.java b/maqs-mongoDB/src/test/java/com/magenic/maqs/mongo/BaseMongoUnitTest.java similarity index 96% rename from jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/BaseMongoUnitTest.java rename to maqs-mongoDB/src/test/java/com/magenic/maqs/mongo/BaseMongoUnitTest.java index 85132c761..96dc32467 100644 --- a/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/BaseMongoUnitTest.java +++ b/maqs-mongoDB/src/test/java/com/magenic/maqs/mongo/BaseMongoUnitTest.java @@ -1,8 +1,8 @@ /* - * Copyright 2021 (C) Magenic, All rights Reserved + * Copyright 2022 Cognizant, All rights Reserved */ -package com.magenic.jmaqs.mongo; +package com.magenic.maqs.mongo; import com.magenic.jmaqs.utilities.helper.TestCategories; import org.testng.Assert; diff --git a/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBConfigUnitTest.java b/maqs-mongoDB/src/test/java/com/magenic/maqs/mongo/MongoDBConfigUnitTest.java similarity index 94% rename from jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBConfigUnitTest.java rename to maqs-mongoDB/src/test/java/com/magenic/maqs/mongo/MongoDBConfigUnitTest.java index 4c69dfcd2..c4a55baba 100644 --- a/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBConfigUnitTest.java +++ b/maqs-mongoDB/src/test/java/com/magenic/maqs/mongo/MongoDBConfigUnitTest.java @@ -1,8 +1,8 @@ /* - * Copyright 2021 (C) Magenic, All rights Reserved + * Copyright 2022 Cognizant, All rights Reserved */ -package com.magenic.jmaqs.mongo; +package com.magenic.maqs.mongo; import com.magenic.jmaqs.utilities.helper.TestCategories; import org.testng.Assert; diff --git a/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBDriverUnitTest.java b/maqs-mongoDB/src/test/java/com/magenic/maqs/mongo/MongoDBDriverUnitTest.java similarity index 96% rename from jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBDriverUnitTest.java rename to maqs-mongoDB/src/test/java/com/magenic/maqs/mongo/MongoDBDriverUnitTest.java index 8ab8baa5c..f7e2a8260 100644 --- a/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBDriverUnitTest.java +++ b/maqs-mongoDB/src/test/java/com/magenic/maqs/mongo/MongoDBDriverUnitTest.java @@ -1,8 +1,8 @@ /* - * Copyright 2021 (C) Magenic, All rights Reserved + * Copyright 2022 Cognizant, All rights Reserved */ -package com.magenic.jmaqs.mongo; +package com.magenic.maqs.mongo; import com.magenic.jmaqs.utilities.helper.TestCategories; import com.mongodb.client.MongoClient; diff --git a/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBFunctionalUnitTest.java b/maqs-mongoDB/src/test/java/com/magenic/maqs/mongo/MongoDBFunctionalUnitTest.java similarity index 96% rename from jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBFunctionalUnitTest.java rename to maqs-mongoDB/src/test/java/com/magenic/maqs/mongo/MongoDBFunctionalUnitTest.java index c619368be..53b350c6d 100644 --- a/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDBFunctionalUnitTest.java +++ b/maqs-mongoDB/src/test/java/com/magenic/maqs/mongo/MongoDBFunctionalUnitTest.java @@ -1,8 +1,8 @@ /* - * Copyright 2021 (C) Magenic, All rights Reserved + * Copyright 2022 Cognizant, All rights Reserved */ -package com.magenic.jmaqs.mongo; +package com.magenic.maqs.mongo; import com.magenic.jmaqs.utilities.helper.TestCategories; import com.mongodb.client.model.Filters; diff --git a/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDriverManagerUnitTest.java b/maqs-mongoDB/src/test/java/com/magenic/maqs/mongo/MongoDriverManagerUnitTest.java similarity index 98% rename from jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDriverManagerUnitTest.java rename to maqs-mongoDB/src/test/java/com/magenic/maqs/mongo/MongoDriverManagerUnitTest.java index c5bd97e11..9cbc0be52 100644 --- a/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoDriverManagerUnitTest.java +++ b/maqs-mongoDB/src/test/java/com/magenic/maqs/mongo/MongoDriverManagerUnitTest.java @@ -1,8 +1,8 @@ /* - * Copyright 2021 (C) Magenic, All rights Reserved + * Copyright 2022 Cognizant, All rights Reserved */ -package com.magenic.jmaqs.mongo; +package com.magenic.maqs.mongo; import com.magenic.jmaqs.utilities.helper.TestCategories; import com.mongodb.client.MongoCollection; diff --git a/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoTestObjectUnitTest.java b/maqs-mongoDB/src/test/java/com/magenic/maqs/mongo/MongoTestObjectUnitTest.java similarity index 97% rename from jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoTestObjectUnitTest.java rename to maqs-mongoDB/src/test/java/com/magenic/maqs/mongo/MongoTestObjectUnitTest.java index 4ca1e61ff..f3c426a7a 100644 --- a/jmaqs-mongoDB/src/test/java/com/magenic/jmaqs/mongo/MongoTestObjectUnitTest.java +++ b/maqs-mongoDB/src/test/java/com/magenic/maqs/mongo/MongoTestObjectUnitTest.java @@ -1,8 +1,8 @@ /* - * Copyright 2021 (C) Magenic, All rights Reserved + * Copyright 2022 Cognizant, All rights Reserved */ -package com.magenic.jmaqs.mongo; +package com.magenic.maqs.mongo; import com.magenic.jmaqs.utilities.helper.TestCategories; import com.mongodb.ConnectionString; diff --git a/pom.xml b/pom.xml index 10e2a42d1..24913bb23 100644 --- a/pom.xml +++ b/pom.xml @@ -56,7 +56,7 @@ jmaqs-database jmaqs-cucumber jmaqs-accessibility - jmaqs-mongoDB + maqs-mongoDB @@ -332,8 +332,8 @@ ${project.version} - com.magenic.jmaqs.mongoDB - jmaqs-mongoDB + com.magenic.maqs.mongoDB + maqs-mongoDB ${project.version} From 8a3b8a7408132ab536533d61dbfeaf2d09ef29e7 Mon Sep 17 00:00:00 2001 From: jredingcvs <97762469+jredingcvs@users.noreply.github.com> Date: Sat, 22 Jan 2022 21:07:33 -0600 Subject: [PATCH 20/91] added content for mongo db --- {maqs-mongoDB => maqs-noSQL}/config.xml | 0 {maqs-mongoDB => maqs-noSQL}/pom.xml | 15 ++++++++++----- .../maqs/noSQL}/BaseMongoTest.java | 2 +- .../maqs/noSQL}/MongoDBConfig.java | 2 +- .../maqs/noSQL}/MongoDBDriver.java | 2 +- .../maqs/noSQL}/MongoDriverManager.java | 2 +- .../maqs/noSQL}/MongoFactory.java | 2 +- .../maqs/noSQL}/MongoTestObject.java | 2 +- .../maqs/noSQL}/BaseMongoUnitTest.java | 2 +- .../maqs/noSQL}/MongoDBConfigUnitTest.java | 2 +- .../maqs/noSQL}/MongoDBDriverUnitTest.java | 2 +- .../maqs/noSQL}/MongoDBFunctionalUnitTest.java | 2 +- .../maqs/noSQL}/MongoDriverManagerUnitTest.java | 2 +- .../maqs/noSQL}/MongoTestObjectUnitTest.java | 2 +- pom.xml | 6 +++--- 15 files changed, 25 insertions(+), 20 deletions(-) rename {maqs-mongoDB => maqs-noSQL}/config.xml (100%) rename {maqs-mongoDB => maqs-noSQL}/pom.xml (81%) rename {maqs-mongoDB/src/main/java/com/magenic/maqs/mongo => maqs-noSQL/src/main/java/com/cognizantsoftvision/maqs/noSQL}/BaseMongoTest.java (98%) rename {maqs-mongoDB/src/main/java/com/magenic/maqs/mongo => maqs-noSQL/src/main/java/com/cognizantsoftvision/maqs/noSQL}/MongoDBConfig.java (96%) rename {maqs-mongoDB/src/main/java/com/magenic/maqs/mongo => maqs-noSQL/src/main/java/com/cognizantsoftvision/maqs/noSQL}/MongoDBDriver.java (99%) rename {maqs-mongoDB/src/main/java/com/magenic/maqs/mongo => maqs-noSQL/src/main/java/com/cognizantsoftvision/maqs/noSQL}/MongoDriverManager.java (98%) rename {maqs-mongoDB/src/main/java/com/magenic/maqs/mongo => maqs-noSQL/src/main/java/com/cognizantsoftvision/maqs/noSQL}/MongoFactory.java (98%) rename {maqs-mongoDB/src/main/java/com/magenic/maqs/mongo => maqs-noSQL/src/main/java/com/cognizantsoftvision/maqs/noSQL}/MongoTestObject.java (98%) rename {maqs-mongoDB/src/test/java/com/magenic/maqs/mongo => maqs-noSQL/src/test/java/com/cognizantsoftvision/maqs/noSQL}/BaseMongoUnitTest.java (98%) rename {maqs-mongoDB/src/test/java/com/magenic/maqs/mongo => maqs-noSQL/src/test/java/com/cognizantsoftvision/maqs/noSQL}/MongoDBConfigUnitTest.java (97%) rename {maqs-mongoDB/src/test/java/com/magenic/maqs/mongo => maqs-noSQL/src/test/java/com/cognizantsoftvision/maqs/noSQL}/MongoDBDriverUnitTest.java (98%) rename {maqs-mongoDB/src/test/java/com/magenic/maqs/mongo => maqs-noSQL/src/test/java/com/cognizantsoftvision/maqs/noSQL}/MongoDBFunctionalUnitTest.java (98%) rename {maqs-mongoDB/src/test/java/com/magenic/maqs/mongo => maqs-noSQL/src/test/java/com/cognizantsoftvision/maqs/noSQL}/MongoDriverManagerUnitTest.java (99%) rename {maqs-mongoDB/src/test/java/com/magenic/maqs/mongo => maqs-noSQL/src/test/java/com/cognizantsoftvision/maqs/noSQL}/MongoTestObjectUnitTest.java (98%) diff --git a/maqs-mongoDB/config.xml b/maqs-noSQL/config.xml similarity index 100% rename from maqs-mongoDB/config.xml rename to maqs-noSQL/config.xml diff --git a/maqs-mongoDB/pom.xml b/maqs-noSQL/pom.xml similarity index 81% rename from maqs-mongoDB/pom.xml rename to maqs-noSQL/pom.xml index be58b06d4..448ac29a4 100644 --- a/maqs-mongoDB/pom.xml +++ b/maqs-noSQL/pom.xml @@ -3,16 +3,22 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 + com.magenic.jmaqs jmaqs-framework ${revision} - com.magenic.maqs.mongoDB - jmaqs-mongoDB - MAQS MongoDB Testing Module + + com.cognizantsoftvision.maqs.noSQL + maqs-noSQL + MAQS NoSQL Testing Module + ${revision} + + 4.4.1 + com.magenic.jmaqs.base @@ -28,12 +34,11 @@ org.mongodb mongodb-driver-sync - 4.4.1 + ${mongoDB.version} org.testng testng - diff --git a/maqs-mongoDB/src/main/java/com/magenic/maqs/mongo/BaseMongoTest.java b/maqs-noSQL/src/main/java/com/cognizantsoftvision/maqs/noSQL/BaseMongoTest.java similarity index 98% rename from maqs-mongoDB/src/main/java/com/magenic/maqs/mongo/BaseMongoTest.java rename to maqs-noSQL/src/main/java/com/cognizantsoftvision/maqs/noSQL/BaseMongoTest.java index 677ef6dfe..b5820f044 100644 --- a/maqs-mongoDB/src/main/java/com/magenic/maqs/mongo/BaseMongoTest.java +++ b/maqs-noSQL/src/main/java/com/cognizantsoftvision/maqs/noSQL/BaseMongoTest.java @@ -2,7 +2,7 @@ * Copyright 2022 Cognizant, All rights Reserved */ -package com.magenic.maqs.mongo; +package com.cognizantsoftvision.maqs.noSQL; import com.magenic.jmaqs.base.BaseExtendableTest; import com.mongodb.client.MongoCollection; diff --git a/maqs-mongoDB/src/main/java/com/magenic/maqs/mongo/MongoDBConfig.java b/maqs-noSQL/src/main/java/com/cognizantsoftvision/maqs/noSQL/MongoDBConfig.java similarity index 96% rename from maqs-mongoDB/src/main/java/com/magenic/maqs/mongo/MongoDBConfig.java rename to maqs-noSQL/src/main/java/com/cognizantsoftvision/maqs/noSQL/MongoDBConfig.java index 8fb55afc2..c6c2dcc68 100644 --- a/maqs-mongoDB/src/main/java/com/magenic/maqs/mongo/MongoDBConfig.java +++ b/maqs-noSQL/src/main/java/com/cognizantsoftvision/maqs/noSQL/MongoDBConfig.java @@ -2,7 +2,7 @@ * Copyright 2022 Cognizant, All rights Reserved */ -package com.magenic.maqs.mongo; +package com.cognizantsoftvision.maqs.noSQL; import com.magenic.jmaqs.utilities.helper.Config; import com.magenic.jmaqs.utilities.helper.ConfigSection; diff --git a/maqs-mongoDB/src/main/java/com/magenic/maqs/mongo/MongoDBDriver.java b/maqs-noSQL/src/main/java/com/cognizantsoftvision/maqs/noSQL/MongoDBDriver.java similarity index 99% rename from maqs-mongoDB/src/main/java/com/magenic/maqs/mongo/MongoDBDriver.java rename to maqs-noSQL/src/main/java/com/cognizantsoftvision/maqs/noSQL/MongoDBDriver.java index 82ef5d3fb..b9ecb816b 100644 --- a/maqs-mongoDB/src/main/java/com/magenic/maqs/mongo/MongoDBDriver.java +++ b/maqs-noSQL/src/main/java/com/cognizantsoftvision/maqs/noSQL/MongoDBDriver.java @@ -2,7 +2,7 @@ * Copyright 2022 Cognizant, All rights Reserved */ -package com.magenic.maqs.mongo; +package com.cognizantsoftvision.maqs.noSQL; import com.mongodb.MongoClientSettings; import com.mongodb.client.MongoClient; diff --git a/maqs-mongoDB/src/main/java/com/magenic/maqs/mongo/MongoDriverManager.java b/maqs-noSQL/src/main/java/com/cognizantsoftvision/maqs/noSQL/MongoDriverManager.java similarity index 98% rename from maqs-mongoDB/src/main/java/com/magenic/maqs/mongo/MongoDriverManager.java rename to maqs-noSQL/src/main/java/com/cognizantsoftvision/maqs/noSQL/MongoDriverManager.java index b7459a9e2..141450214 100644 --- a/maqs-mongoDB/src/main/java/com/magenic/maqs/mongo/MongoDriverManager.java +++ b/maqs-noSQL/src/main/java/com/cognizantsoftvision/maqs/noSQL/MongoDriverManager.java @@ -2,7 +2,7 @@ * Copyright 2022 Cognizant, All rights Reserved */ -package com.magenic.maqs.mongo; +package com.cognizantsoftvision.maqs.noSQL; import com.magenic.jmaqs.base.BaseTestObject; import com.magenic.jmaqs.base.DriverManager; diff --git a/maqs-mongoDB/src/main/java/com/magenic/maqs/mongo/MongoFactory.java b/maqs-noSQL/src/main/java/com/cognizantsoftvision/maqs/noSQL/MongoFactory.java similarity index 98% rename from maqs-mongoDB/src/main/java/com/magenic/maqs/mongo/MongoFactory.java rename to maqs-noSQL/src/main/java/com/cognizantsoftvision/maqs/noSQL/MongoFactory.java index aaf7f2108..8765f1107 100644 --- a/maqs-mongoDB/src/main/java/com/magenic/maqs/mongo/MongoFactory.java +++ b/maqs-noSQL/src/main/java/com/cognizantsoftvision/maqs/noSQL/MongoFactory.java @@ -2,7 +2,7 @@ * Copyright 2022 Cognizant, All rights Reserved */ -package com.magenic.maqs.mongo; +package com.cognizantsoftvision.maqs.noSQL; import com.mongodb.MongoClientException; import com.mongodb.MongoClientSettings; diff --git a/maqs-mongoDB/src/main/java/com/magenic/maqs/mongo/MongoTestObject.java b/maqs-noSQL/src/main/java/com/cognizantsoftvision/maqs/noSQL/MongoTestObject.java similarity index 98% rename from maqs-mongoDB/src/main/java/com/magenic/maqs/mongo/MongoTestObject.java rename to maqs-noSQL/src/main/java/com/cognizantsoftvision/maqs/noSQL/MongoTestObject.java index 2769d3e30..a07452e82 100644 --- a/maqs-mongoDB/src/main/java/com/magenic/maqs/mongo/MongoTestObject.java +++ b/maqs-noSQL/src/main/java/com/cognizantsoftvision/maqs/noSQL/MongoTestObject.java @@ -2,7 +2,7 @@ * Copyright 2022 Cognizant, All rights Reserved */ -package com.magenic.maqs.mongo; +package com.cognizantsoftvision.maqs.noSQL; import com.magenic.jmaqs.base.BaseTestObject; import com.magenic.jmaqs.utilities.logging.Logger; diff --git a/maqs-mongoDB/src/test/java/com/magenic/maqs/mongo/BaseMongoUnitTest.java b/maqs-noSQL/src/test/java/com/cognizantsoftvision/maqs/noSQL/BaseMongoUnitTest.java similarity index 98% rename from maqs-mongoDB/src/test/java/com/magenic/maqs/mongo/BaseMongoUnitTest.java rename to maqs-noSQL/src/test/java/com/cognizantsoftvision/maqs/noSQL/BaseMongoUnitTest.java index 96dc32467..eefade948 100644 --- a/maqs-mongoDB/src/test/java/com/magenic/maqs/mongo/BaseMongoUnitTest.java +++ b/maqs-noSQL/src/test/java/com/cognizantsoftvision/maqs/noSQL/BaseMongoUnitTest.java @@ -2,7 +2,7 @@ * Copyright 2022 Cognizant, All rights Reserved */ -package com.magenic.maqs.mongo; +package com.cognizantsoftvision.maqs.noSQL; import com.magenic.jmaqs.utilities.helper.TestCategories; import org.testng.Assert; diff --git a/maqs-mongoDB/src/test/java/com/magenic/maqs/mongo/MongoDBConfigUnitTest.java b/maqs-noSQL/src/test/java/com/cognizantsoftvision/maqs/noSQL/MongoDBConfigUnitTest.java similarity index 97% rename from maqs-mongoDB/src/test/java/com/magenic/maqs/mongo/MongoDBConfigUnitTest.java rename to maqs-noSQL/src/test/java/com/cognizantsoftvision/maqs/noSQL/MongoDBConfigUnitTest.java index c4a55baba..02e6644d1 100644 --- a/maqs-mongoDB/src/test/java/com/magenic/maqs/mongo/MongoDBConfigUnitTest.java +++ b/maqs-noSQL/src/test/java/com/cognizantsoftvision/maqs/noSQL/MongoDBConfigUnitTest.java @@ -2,7 +2,7 @@ * Copyright 2022 Cognizant, All rights Reserved */ -package com.magenic.maqs.mongo; +package com.cognizantsoftvision.maqs.noSQL; import com.magenic.jmaqs.utilities.helper.TestCategories; import org.testng.Assert; diff --git a/maqs-mongoDB/src/test/java/com/magenic/maqs/mongo/MongoDBDriverUnitTest.java b/maqs-noSQL/src/test/java/com/cognizantsoftvision/maqs/noSQL/MongoDBDriverUnitTest.java similarity index 98% rename from maqs-mongoDB/src/test/java/com/magenic/maqs/mongo/MongoDBDriverUnitTest.java rename to maqs-noSQL/src/test/java/com/cognizantsoftvision/maqs/noSQL/MongoDBDriverUnitTest.java index f7e2a8260..9ee2180b8 100644 --- a/maqs-mongoDB/src/test/java/com/magenic/maqs/mongo/MongoDBDriverUnitTest.java +++ b/maqs-noSQL/src/test/java/com/cognizantsoftvision/maqs/noSQL/MongoDBDriverUnitTest.java @@ -2,7 +2,7 @@ * Copyright 2022 Cognizant, All rights Reserved */ -package com.magenic.maqs.mongo; +package com.cognizantsoftvision.maqs.noSQL; import com.magenic.jmaqs.utilities.helper.TestCategories; import com.mongodb.client.MongoClient; diff --git a/maqs-mongoDB/src/test/java/com/magenic/maqs/mongo/MongoDBFunctionalUnitTest.java b/maqs-noSQL/src/test/java/com/cognizantsoftvision/maqs/noSQL/MongoDBFunctionalUnitTest.java similarity index 98% rename from maqs-mongoDB/src/test/java/com/magenic/maqs/mongo/MongoDBFunctionalUnitTest.java rename to maqs-noSQL/src/test/java/com/cognizantsoftvision/maqs/noSQL/MongoDBFunctionalUnitTest.java index 53b350c6d..d3c403a68 100644 --- a/maqs-mongoDB/src/test/java/com/magenic/maqs/mongo/MongoDBFunctionalUnitTest.java +++ b/maqs-noSQL/src/test/java/com/cognizantsoftvision/maqs/noSQL/MongoDBFunctionalUnitTest.java @@ -2,7 +2,7 @@ * Copyright 2022 Cognizant, All rights Reserved */ -package com.magenic.maqs.mongo; +package com.cognizantsoftvision.maqs.noSQL; import com.magenic.jmaqs.utilities.helper.TestCategories; import com.mongodb.client.model.Filters; diff --git a/maqs-mongoDB/src/test/java/com/magenic/maqs/mongo/MongoDriverManagerUnitTest.java b/maqs-noSQL/src/test/java/com/cognizantsoftvision/maqs/noSQL/MongoDriverManagerUnitTest.java similarity index 99% rename from maqs-mongoDB/src/test/java/com/magenic/maqs/mongo/MongoDriverManagerUnitTest.java rename to maqs-noSQL/src/test/java/com/cognizantsoftvision/maqs/noSQL/MongoDriverManagerUnitTest.java index 9cbc0be52..1f7410517 100644 --- a/maqs-mongoDB/src/test/java/com/magenic/maqs/mongo/MongoDriverManagerUnitTest.java +++ b/maqs-noSQL/src/test/java/com/cognizantsoftvision/maqs/noSQL/MongoDriverManagerUnitTest.java @@ -2,7 +2,7 @@ * Copyright 2022 Cognizant, All rights Reserved */ -package com.magenic.maqs.mongo; +package com.cognizantsoftvision.maqs.noSQL; import com.magenic.jmaqs.utilities.helper.TestCategories; import com.mongodb.client.MongoCollection; diff --git a/maqs-mongoDB/src/test/java/com/magenic/maqs/mongo/MongoTestObjectUnitTest.java b/maqs-noSQL/src/test/java/com/cognizantsoftvision/maqs/noSQL/MongoTestObjectUnitTest.java similarity index 98% rename from maqs-mongoDB/src/test/java/com/magenic/maqs/mongo/MongoTestObjectUnitTest.java rename to maqs-noSQL/src/test/java/com/cognizantsoftvision/maqs/noSQL/MongoTestObjectUnitTest.java index f3c426a7a..c78bad478 100644 --- a/maqs-mongoDB/src/test/java/com/magenic/maqs/mongo/MongoTestObjectUnitTest.java +++ b/maqs-noSQL/src/test/java/com/cognizantsoftvision/maqs/noSQL/MongoTestObjectUnitTest.java @@ -2,7 +2,7 @@ * Copyright 2022 Cognizant, All rights Reserved */ -package com.magenic.maqs.mongo; +package com.cognizantsoftvision.maqs.noSQL; import com.magenic.jmaqs.utilities.helper.TestCategories; import com.mongodb.ConnectionString; diff --git a/pom.xml b/pom.xml index 24913bb23..ddec80f50 100644 --- a/pom.xml +++ b/pom.xml @@ -56,7 +56,7 @@ jmaqs-database jmaqs-cucumber jmaqs-accessibility - maqs-mongoDB + maqs-noSQL @@ -332,8 +332,8 @@ ${project.version} - com.magenic.maqs.mongoDB - maqs-mongoDB + com.cognizantsoftvision.maqs.noSQL + maqs-noSQL ${project.version} From 6be5f127024a9efbeba0d4ffcb96ea8b71b78d49 Mon Sep 17 00:00:00 2001 From: jredingcvs <97762469+jredingcvs@users.noreply.github.com> Date: Mon, 24 Jan 2022 14:33:02 -0600 Subject: [PATCH 21/91] added content for mongo db --- Docker/MAQSMongoDB/docker-compose.yml | 5 +++- maqs-noSQL/pom.xml | 28 +++++++++++++++++++ .../maqs/noSQL/MongoDBDriver.java | 3 +- .../maqs/noSQL/MongoDriverManager.java | 6 ++-- .../maqs/noSQL/MongoFactory.java | 1 - 5 files changed, 37 insertions(+), 6 deletions(-) diff --git a/Docker/MAQSMongoDB/docker-compose.yml b/Docker/MAQSMongoDB/docker-compose.yml index 3f4517b9a..10479a005 100644 --- a/Docker/MAQSMongoDB/docker-compose.yml +++ b/Docker/MAQSMongoDB/docker-compose.yml @@ -17,4 +17,7 @@ services: - mongo environment: ME_CONFIG_MONGODB_ADMINUSERNAME: - ME_CONFIG_MONGODB_ADMINPASSWORD: \ No newline at end of file + ME_CONFIG_MONGODB_ADMINPASSWORD: + + # Run a custom bash script that bootstraps the database after it is started. + command: [ '/bin/bash', '/mnt/host/initialize_and_start_sqlserver.sh' ] \ No newline at end of file diff --git a/maqs-noSQL/pom.xml b/maqs-noSQL/pom.xml index 448ac29a4..896e473f5 100644 --- a/maqs-noSQL/pom.xml +++ b/maqs-noSQL/pom.xml @@ -41,4 +41,32 @@ testng + + + + io.fabric8 + docker-maven-plugin + 0.37.0 + + + + mongoDB + + compose + ../Docker/MAQSMongoDB/ + docker-compose.yml + + + + + setup-database + process-test-resources + + start + + + + + + diff --git a/maqs-noSQL/src/main/java/com/cognizantsoftvision/maqs/noSQL/MongoDBDriver.java b/maqs-noSQL/src/main/java/com/cognizantsoftvision/maqs/noSQL/MongoDBDriver.java index b9ecb816b..538884c55 100644 --- a/maqs-noSQL/src/main/java/com/cognizantsoftvision/maqs/noSQL/MongoDBDriver.java +++ b/maqs-noSQL/src/main/java/com/cognizantsoftvision/maqs/noSQL/MongoDBDriver.java @@ -107,7 +107,8 @@ public MongoDatabase getDatabase() { * @param mongoDatabase the name of the mongo database */ public void setDatabase(MongoClient mongoClient, String mongoDatabase) { - this.database = mongoClient.getDatabase(mongoDatabase); + this.client = mongoClient; + setDatabase(mongoDatabase); } /** diff --git a/maqs-noSQL/src/main/java/com/cognizantsoftvision/maqs/noSQL/MongoDriverManager.java b/maqs-noSQL/src/main/java/com/cognizantsoftvision/maqs/noSQL/MongoDriverManager.java index 141450214..d5447e90e 100644 --- a/maqs-noSQL/src/main/java/com/cognizantsoftvision/maqs/noSQL/MongoDriverManager.java +++ b/maqs-noSQL/src/main/java/com/cognizantsoftvision/maqs/noSQL/MongoDriverManager.java @@ -48,7 +48,7 @@ public MongoDriverManager(Supplier getCollection, BaseTestObject * @param overrideDriver The new Mongo driver */ public void overrideDriver(MongoDBDriver overrideDriver) { - this.driver = overrideDriver; + driver = overrideDriver; this.setBaseDriver(new MongoDBDriver(overrideDriver.getCollection())); } @@ -59,7 +59,7 @@ public void overrideDriver(MongoDBDriver overrideDriver) { * @param collectionString Collection string to use */ public void overrideDriver(String connectionString, String databaseString, String collectionString) { - this.driver = null; + driver = null; this.overrideDriverGet(() -> MongoFactory.getCollection(connectionString, databaseString, collectionString)); this.overrideDriverGet(() -> MongoFactory.getCollection(connectionString, databaseString, collectionString)); } @@ -69,7 +69,7 @@ public void overrideDriver(String connectionString, String databaseString, Strin * @param overrideCollectionConnection The new collection connection */ public void overrideDriver(Supplier> overrideCollectionConnection) { - this.driver = null; + driver = null; this.overrideDriverGet(overrideCollectionConnection); } diff --git a/maqs-noSQL/src/main/java/com/cognizantsoftvision/maqs/noSQL/MongoFactory.java b/maqs-noSQL/src/main/java/com/cognizantsoftvision/maqs/noSQL/MongoFactory.java index 8765f1107..31e4117af 100644 --- a/maqs-noSQL/src/main/java/com/cognizantsoftvision/maqs/noSQL/MongoFactory.java +++ b/maqs-noSQL/src/main/java/com/cognizantsoftvision/maqs/noSQL/MongoFactory.java @@ -63,7 +63,6 @@ public static MongoCollection getCollection( public static MongoCollection getCollection(String databaseString, String collectionString, MongoClientSettings settings) { MongoClient mongoClient; - MongoDatabase database; try { From 82aeca5a1fdb9dd45e416a5a5ae172a202a9182c Mon Sep 17 00:00:00 2001 From: jredingcvs <97762469+jredingcvs@users.noreply.github.com> Date: Fri, 18 Feb 2022 16:36:59 -0600 Subject: [PATCH 22/91] import updates new MAQS naming updates --- docker/MAQSMongoDB/docker-compose.yml | 13 ++++++++----- docker/MAQSMongoDB/seed/seed.js | 2 +- docker/docker-compose.yml | 18 +++++++----------- {maqs-noSQL => maqs-nosql}/config.xml | 0 {maqs-noSQL => maqs-nosql}/pom.xml | 12 ++++++------ .../maqs/nosql}/BaseMongoTest.java | 4 ++-- .../maqs/nosql}/MongoDBConfig.java | 6 +++--- .../maqs/nosql}/MongoDBDriver.java | 2 +- .../maqs/nosql}/MongoDriverManager.java | 7 ++++--- .../maqs/nosql}/MongoFactory.java | 2 +- .../maqs/nosql}/MongoTestObject.java | 6 +++--- .../maqs/nosql}/BaseMongoUnitTest.java | 4 ++-- .../maqs/nosql}/MongoDBConfigUnitTest.java | 4 ++-- .../maqs/nosql}/MongoDBDriverUnitTest.java | 4 ++-- .../maqs/nosql}/MongoDBFunctionalUnitTest.java | 4 ++-- .../nosql}/MongoDriverManagerUnitTest.java | 4 ++-- .../maqs/nosql}/MongoTestObjectUnitTest.java | 4 ++-- 17 files changed, 48 insertions(+), 48 deletions(-) rename {maqs-noSQL => maqs-nosql}/config.xml (100%) rename {maqs-noSQL => maqs-nosql}/pom.xml (87%) rename {maqs-noSQL/src/main/java/com/cognizantsoftvision/maqs/noSQL => maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql}/BaseMongoTest.java (96%) rename {maqs-noSQL/src/main/java/com/cognizantsoftvision/maqs/noSQL => maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql}/MongoDBConfig.java (87%) rename {maqs-noSQL/src/main/java/com/cognizantsoftvision/maqs/noSQL => maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql}/MongoDBDriver.java (99%) rename {maqs-noSQL/src/main/java/com/cognizantsoftvision/maqs/noSQL => maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql}/MongoDriverManager.java (94%) rename {maqs-noSQL/src/main/java/com/cognizantsoftvision/maqs/noSQL => maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql}/MongoFactory.java (98%) rename {maqs-noSQL/src/main/java/com/cognizantsoftvision/maqs/noSQL => maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql}/MongoTestObject.java (93%) rename {maqs-noSQL/src/test/java/com/cognizantsoftvision/maqs/noSQL => maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql}/BaseMongoUnitTest.java (94%) rename {maqs-noSQL/src/test/java/com/cognizantsoftvision/maqs/noSQL => maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql}/MongoDBConfigUnitTest.java (92%) rename {maqs-noSQL/src/test/java/com/cognizantsoftvision/maqs/noSQL => maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql}/MongoDBDriverUnitTest.java (95%) rename {maqs-noSQL/src/test/java/com/cognizantsoftvision/maqs/noSQL => maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql}/MongoDBFunctionalUnitTest.java (95%) rename {maqs-noSQL/src/test/java/com/cognizantsoftvision/maqs/noSQL => maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql}/MongoDriverManagerUnitTest.java (97%) rename {maqs-noSQL/src/test/java/com/cognizantsoftvision/maqs/noSQL => maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql}/MongoTestObjectUnitTest.java (96%) diff --git a/docker/MAQSMongoDB/docker-compose.yml b/docker/MAQSMongoDB/docker-compose.yml index 5be3b1e86..10479a005 100644 --- a/docker/MAQSMongoDB/docker-compose.yml +++ b/docker/MAQSMongoDB/docker-compose.yml @@ -3,11 +3,11 @@ version: '2' services: mongo: image: mongo - restart: always + restart: always ports: - - "27017:27017" + - "27017:27017" volumes: - - ./seed/seed.js:/docker-entrypoint-initdb.d/seed.js + - ./seed/seed.js:/docker-entrypoint-initdb.d/seed.js mongo-express: image: mongo-express restart: always @@ -16,5 +16,8 @@ services: links: - mongo environment: - ME_CONFIG_MONGODB_ADMINUSERNAME: - ME_CONFIG_MONGODB_ADMINPASSWORD: \ No newline at end of file + ME_CONFIG_MONGODB_ADMINUSERNAME: + ME_CONFIG_MONGODB_ADMINPASSWORD: + + # Run a custom bash script that bootstraps the database after it is started. + command: [ '/bin/bash', '/mnt/host/initialize_and_start_sqlserver.sh' ] \ No newline at end of file diff --git a/docker/MAQSMongoDB/seed/seed.js b/docker/MAQSMongoDB/seed/seed.js index 81d443938..badfaf331 100644 --- a/docker/MAQSMongoDB/seed/seed.js +++ b/docker/MAQSMongoDB/seed/seed.js @@ -19,4 +19,4 @@ db.MongoTestCollection.insertMany([ "lid": "test4", "isChanged": false } -]) +]) \ No newline at end of file diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index c83d21672..44c3c95f1 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -1,4 +1,4 @@ -# The extends functionality is not yet avaliable in +# The extends functionality is not yet available in # Docker config files versioned 3 and higher. # If the version is bumped, this config file will have to change. # See https://github.com/moby/moby/issues/31101. @@ -6,14 +6,10 @@ version: '2' services: mssql: - extends: + extends: file: ./MAQSSQLServer/docker-compose.yml - service: mssql -# mongo: -# extends: -# file: ./MAQSMongoDB/docker-compose.yml -# service: mongo -# imap: -# extends: -# file: ./MAQSEmail/docker-compose.yml -# service: imap + service: mssql + mongo: + extends: + file: ./MAQSMongoDB/docker-compose.yml + service: mongo \ No newline at end of file diff --git a/maqs-noSQL/config.xml b/maqs-nosql/config.xml similarity index 100% rename from maqs-noSQL/config.xml rename to maqs-nosql/config.xml diff --git a/maqs-noSQL/pom.xml b/maqs-nosql/pom.xml similarity index 87% rename from maqs-noSQL/pom.xml rename to maqs-nosql/pom.xml index 896e473f5..690a2499b 100644 --- a/maqs-noSQL/pom.xml +++ b/maqs-nosql/pom.xml @@ -5,8 +5,8 @@ 4.0.0 - com.magenic.jmaqs - jmaqs-framework + com.cognizantsoftvision.maqs + maqs-java ${revision} @@ -21,13 +21,13 @@ - com.magenic.jmaqs.base - jmaqs-base + com.cognizantsoftvision.maqs.base + maqs-base ${project.version} - com.magenic.jmaqs.utilities - jmaqs-utilities + com.cognizantsoftvision.maqs.utilities + maqs-utilities ${project.version} compile diff --git a/maqs-noSQL/src/main/java/com/cognizantsoftvision/maqs/noSQL/BaseMongoTest.java b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/BaseMongoTest.java similarity index 96% rename from maqs-noSQL/src/main/java/com/cognizantsoftvision/maqs/noSQL/BaseMongoTest.java rename to maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/BaseMongoTest.java index b5820f044..cdc3a63ba 100644 --- a/maqs-noSQL/src/main/java/com/cognizantsoftvision/maqs/noSQL/BaseMongoTest.java +++ b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/BaseMongoTest.java @@ -2,9 +2,9 @@ * Copyright 2022 Cognizant, All rights Reserved */ -package com.cognizantsoftvision.maqs.noSQL; +package com.cognizantsoftvision.maqs.nosql; -import com.magenic.jmaqs.base.BaseExtendableTest; +import com.cognizantsoftvision.maqs.base.BaseExtendableTest; import com.mongodb.client.MongoCollection; import java.util.function.Supplier; import org.bson.Document; diff --git a/maqs-noSQL/src/main/java/com/cognizantsoftvision/maqs/noSQL/MongoDBConfig.java b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDBConfig.java similarity index 87% rename from maqs-noSQL/src/main/java/com/cognizantsoftvision/maqs/noSQL/MongoDBConfig.java rename to maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDBConfig.java index c6c2dcc68..9af916d3a 100644 --- a/maqs-noSQL/src/main/java/com/cognizantsoftvision/maqs/noSQL/MongoDBConfig.java +++ b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDBConfig.java @@ -2,10 +2,10 @@ * Copyright 2022 Cognizant, All rights Reserved */ -package com.cognizantsoftvision.maqs.noSQL; +package com.cognizantsoftvision.maqs.nosql; -import com.magenic.jmaqs.utilities.helper.Config; -import com.magenic.jmaqs.utilities.helper.ConfigSection; +import com.cognizantsoftvision.maqs.utilities.helper.Config; +import com.cognizantsoftvision.maqs.utilities.helper.ConfigSection; /** * MongoDB config class. diff --git a/maqs-noSQL/src/main/java/com/cognizantsoftvision/maqs/noSQL/MongoDBDriver.java b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDBDriver.java similarity index 99% rename from maqs-noSQL/src/main/java/com/cognizantsoftvision/maqs/noSQL/MongoDBDriver.java rename to maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDBDriver.java index 538884c55..d95ae90dd 100644 --- a/maqs-noSQL/src/main/java/com/cognizantsoftvision/maqs/noSQL/MongoDBDriver.java +++ b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDBDriver.java @@ -2,7 +2,7 @@ * Copyright 2022 Cognizant, All rights Reserved */ -package com.cognizantsoftvision.maqs.noSQL; +package com.cognizantsoftvision.maqs.nosql; import com.mongodb.MongoClientSettings; import com.mongodb.client.MongoClient; diff --git a/maqs-noSQL/src/main/java/com/cognizantsoftvision/maqs/noSQL/MongoDriverManager.java b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDriverManager.java similarity index 94% rename from maqs-noSQL/src/main/java/com/cognizantsoftvision/maqs/noSQL/MongoDriverManager.java rename to maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDriverManager.java index d5447e90e..546e53eba 100644 --- a/maqs-noSQL/src/main/java/com/cognizantsoftvision/maqs/noSQL/MongoDriverManager.java +++ b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDriverManager.java @@ -2,10 +2,11 @@ * Copyright 2022 Cognizant, All rights Reserved */ -package com.cognizantsoftvision.maqs.noSQL; +package com.cognizantsoftvision.maqs.nosql; -import com.magenic.jmaqs.base.BaseTestObject; -import com.magenic.jmaqs.base.DriverManager; + +import com.cognizantsoftvision.maqs.base.BaseTestObject; +import com.cognizantsoftvision.maqs.base.DriverManager; import com.mongodb.client.MongoCollection; import java.util.function.Supplier; import org.bson.Document; diff --git a/maqs-noSQL/src/main/java/com/cognizantsoftvision/maqs/noSQL/MongoFactory.java b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoFactory.java similarity index 98% rename from maqs-noSQL/src/main/java/com/cognizantsoftvision/maqs/noSQL/MongoFactory.java rename to maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoFactory.java index 31e4117af..e06c198dc 100644 --- a/maqs-noSQL/src/main/java/com/cognizantsoftvision/maqs/noSQL/MongoFactory.java +++ b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoFactory.java @@ -2,7 +2,7 @@ * Copyright 2022 Cognizant, All rights Reserved */ -package com.cognizantsoftvision.maqs.noSQL; +package com.cognizantsoftvision.maqs.nosql; import com.mongodb.MongoClientException; import com.mongodb.MongoClientSettings; diff --git a/maqs-noSQL/src/main/java/com/cognizantsoftvision/maqs/noSQL/MongoTestObject.java b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoTestObject.java similarity index 93% rename from maqs-noSQL/src/main/java/com/cognizantsoftvision/maqs/noSQL/MongoTestObject.java rename to maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoTestObject.java index a07452e82..4d598d976 100644 --- a/maqs-noSQL/src/main/java/com/cognizantsoftvision/maqs/noSQL/MongoTestObject.java +++ b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoTestObject.java @@ -2,10 +2,10 @@ * Copyright 2022 Cognizant, All rights Reserved */ -package com.cognizantsoftvision.maqs.noSQL; +package com.cognizantsoftvision.maqs.nosql; -import com.magenic.jmaqs.base.BaseTestObject; -import com.magenic.jmaqs.utilities.logging.Logger; +import com.cognizantsoftvision.maqs.utilities.logging.Logger; +import com.cognizantsoftvision.maqs.base.BaseTestObject; import com.mongodb.client.MongoCollection; import java.util.function.Supplier; import org.bson.Document; diff --git a/maqs-noSQL/src/test/java/com/cognizantsoftvision/maqs/noSQL/BaseMongoUnitTest.java b/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/BaseMongoUnitTest.java similarity index 94% rename from maqs-noSQL/src/test/java/com/cognizantsoftvision/maqs/noSQL/BaseMongoUnitTest.java rename to maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/BaseMongoUnitTest.java index eefade948..4ae9f6cf1 100644 --- a/maqs-noSQL/src/test/java/com/cognizantsoftvision/maqs/noSQL/BaseMongoUnitTest.java +++ b/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/BaseMongoUnitTest.java @@ -2,9 +2,9 @@ * Copyright 2022 Cognizant, All rights Reserved */ -package com.cognizantsoftvision.maqs.noSQL; +package com.cognizantsoftvision.maqs.nosql; -import com.magenic.jmaqs.utilities.helper.TestCategories; +import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/maqs-noSQL/src/test/java/com/cognizantsoftvision/maqs/noSQL/MongoDBConfigUnitTest.java b/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBConfigUnitTest.java similarity index 92% rename from maqs-noSQL/src/test/java/com/cognizantsoftvision/maqs/noSQL/MongoDBConfigUnitTest.java rename to maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBConfigUnitTest.java index 02e6644d1..3b0b20276 100644 --- a/maqs-noSQL/src/test/java/com/cognizantsoftvision/maqs/noSQL/MongoDBConfigUnitTest.java +++ b/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBConfigUnitTest.java @@ -2,9 +2,9 @@ * Copyright 2022 Cognizant, All rights Reserved */ -package com.cognizantsoftvision.maqs.noSQL; +package com.cognizantsoftvision.maqs.nosql; -import com.magenic.jmaqs.utilities.helper.TestCategories; +import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/maqs-noSQL/src/test/java/com/cognizantsoftvision/maqs/noSQL/MongoDBDriverUnitTest.java b/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBDriverUnitTest.java similarity index 95% rename from maqs-noSQL/src/test/java/com/cognizantsoftvision/maqs/noSQL/MongoDBDriverUnitTest.java rename to maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBDriverUnitTest.java index 9ee2180b8..4aa68fd95 100644 --- a/maqs-noSQL/src/test/java/com/cognizantsoftvision/maqs/noSQL/MongoDBDriverUnitTest.java +++ b/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBDriverUnitTest.java @@ -2,9 +2,9 @@ * Copyright 2022 Cognizant, All rights Reserved */ -package com.cognizantsoftvision.maqs.noSQL; +package com.cognizantsoftvision.maqs.nosql; -import com.magenic.jmaqs.utilities.helper.TestCategories; +import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; import com.mongodb.client.MongoClient; import com.mongodb.client.MongoCollection; import org.bson.Document; diff --git a/maqs-noSQL/src/test/java/com/cognizantsoftvision/maqs/noSQL/MongoDBFunctionalUnitTest.java b/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBFunctionalUnitTest.java similarity index 95% rename from maqs-noSQL/src/test/java/com/cognizantsoftvision/maqs/noSQL/MongoDBFunctionalUnitTest.java rename to maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBFunctionalUnitTest.java index d3c403a68..28ae1ebf8 100644 --- a/maqs-noSQL/src/test/java/com/cognizantsoftvision/maqs/noSQL/MongoDBFunctionalUnitTest.java +++ b/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBFunctionalUnitTest.java @@ -2,9 +2,9 @@ * Copyright 2022 Cognizant, All rights Reserved */ -package com.cognizantsoftvision.maqs.noSQL; +package com.cognizantsoftvision.maqs.nosql; -import com.magenic.jmaqs.utilities.helper.TestCategories; +import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; import com.mongodb.client.model.Filters; import org.bson.Document; import org.bson.conversions.Bson; diff --git a/maqs-noSQL/src/test/java/com/cognizantsoftvision/maqs/noSQL/MongoDriverManagerUnitTest.java b/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDriverManagerUnitTest.java similarity index 97% rename from maqs-noSQL/src/test/java/com/cognizantsoftvision/maqs/noSQL/MongoDriverManagerUnitTest.java rename to maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDriverManagerUnitTest.java index 1f7410517..9388d498c 100644 --- a/maqs-noSQL/src/test/java/com/cognizantsoftvision/maqs/noSQL/MongoDriverManagerUnitTest.java +++ b/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDriverManagerUnitTest.java @@ -2,9 +2,9 @@ * Copyright 2022 Cognizant, All rights Reserved */ -package com.cognizantsoftvision.maqs.noSQL; +package com.cognizantsoftvision.maqs.nosql; -import com.magenic.jmaqs.utilities.helper.TestCategories; +import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; import com.mongodb.client.MongoCollection; import org.bson.Document; import org.testng.Assert; diff --git a/maqs-noSQL/src/test/java/com/cognizantsoftvision/maqs/noSQL/MongoTestObjectUnitTest.java b/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoTestObjectUnitTest.java similarity index 96% rename from maqs-noSQL/src/test/java/com/cognizantsoftvision/maqs/noSQL/MongoTestObjectUnitTest.java rename to maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoTestObjectUnitTest.java index c78bad478..654a365f5 100644 --- a/maqs-noSQL/src/test/java/com/cognizantsoftvision/maqs/noSQL/MongoTestObjectUnitTest.java +++ b/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoTestObjectUnitTest.java @@ -2,9 +2,9 @@ * Copyright 2022 Cognizant, All rights Reserved */ -package com.cognizantsoftvision.maqs.noSQL; +package com.cognizantsoftvision.maqs.nosql; -import com.magenic.jmaqs.utilities.helper.TestCategories; +import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; import com.mongodb.ConnectionString; import com.mongodb.MongoClientSettings; import com.mongodb.client.MongoCollection; From 645d65c44cc11f1ffa7ed09b2759213b7f6c5e98 Mon Sep 17 00:00:00 2001 From: jredingcvs <97762469+jredingcvs@users.noreply.github.com> Date: Mon, 7 Mar 2022 12:45:05 -0600 Subject: [PATCH 23/91] updated nosql comments --- .../maqs/nosql/BaseMongoTest.java | 2 +- .../maqs/nosql/MongoDBConfig.java | 2 +- .../maqs/nosql/MongoDBDriver.java | 4 +++- .../maqs/nosql/MongoDriverManager.java | 2 +- .../maqs/nosql/MongoFactory.java | 2 +- .../maqs/nosql/MongoTestObject.java | 2 +- .../maqs/nosql/BaseMongoUnitTest.java | 18 +++++++++++++---- .../maqs/nosql/MongoDBConfigUnitTest.java | 10 +++++----- .../maqs/nosql/MongoDBDriverUnitTest.java | 11 +++++++++- .../maqs/nosql/MongoDBFunctionalUnitTest.java | 15 +++++++------- .../nosql/MongoDriverManagerUnitTest.java | 20 +++++++++---------- .../maqs/nosql/MongoTestObjectUnitTest.java | 16 +++++++-------- pom.xml | 6 ++++++ 13 files changed, 69 insertions(+), 41 deletions(-) diff --git a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/BaseMongoTest.java b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/BaseMongoTest.java index cdc3a63ba..07ac74e02 100644 --- a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/BaseMongoTest.java +++ b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/BaseMongoTest.java @@ -11,7 +11,7 @@ import org.testng.ITestResult; /** - * Generic base MongoDB test class. + * The Base Mongo Test class. */ public class BaseMongoTest extends BaseExtendableTest { diff --git a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDBConfig.java b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDBConfig.java index 9af916d3a..326a128a4 100644 --- a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDBConfig.java +++ b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDBConfig.java @@ -8,7 +8,7 @@ import com.cognizantsoftvision.maqs.utilities.helper.ConfigSection; /** - * MongoDB config class. + * The MongoDB Config class. */ public class MongoDBConfig { diff --git a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDBDriver.java b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDBDriver.java index d95ae90dd..92f797dd1 100644 --- a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDBDriver.java +++ b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDBDriver.java @@ -14,7 +14,8 @@ import org.bson.Document; /** - * Class to wrap the MongoCollection and related helper functions. + * The MongoDB Driver class. + * Wraps the MongoCollection and related helper functions. */ public class MongoDBDriver implements AutoCloseable { @@ -175,5 +176,6 @@ public int countAllItemsInCollection() { @Override public void close() { + this.getMongoClient().close(); } } diff --git a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDriverManager.java b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDriverManager.java index 546e53eba..bb902fdd2 100644 --- a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDriverManager.java +++ b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDriverManager.java @@ -12,7 +12,7 @@ import org.bson.Document; /** - * Mongo database driver. + * The Mongo Driver Manager class. */ public class MongoDriverManager extends DriverManager { diff --git a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoFactory.java b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoFactory.java index e06c198dc..98afc9cd5 100644 --- a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoFactory.java +++ b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoFactory.java @@ -14,7 +14,7 @@ import org.bson.Document; /** - * Mongo database factory. + * The Mongo Factory Class. */ public class MongoFactory { diff --git a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoTestObject.java b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoTestObject.java index 4d598d976..5c4bb3df2 100644 --- a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoTestObject.java +++ b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoTestObject.java @@ -11,7 +11,7 @@ import org.bson.Document; /** - * Mongo test context data. + * The Mongo Test Object class. */ public class MongoTestObject extends BaseTestObject { diff --git a/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/BaseMongoUnitTest.java b/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/BaseMongoUnitTest.java index 4ae9f6cf1..6ff20ea8a 100644 --- a/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/BaseMongoUnitTest.java +++ b/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/BaseMongoUnitTest.java @@ -9,9 +9,13 @@ import org.testng.annotations.Test; /** - * Test the Base Mongo Test functionality. + * The Base Mongo unit test class. */ public class BaseMongoUnitTest extends BaseMongoTest { + + /** + * Test the get mongo db driver. + */ @Test(groups = TestCategories.MONGO) public void testGetMongoDBDriver() { MongoDBDriver mongoDBDriver = this.getMongoDBDriver(); @@ -19,6 +23,9 @@ public void testGetMongoDBDriver() { "Checking that MongoDB Driver is not null through BaseMongoTest"); } + /** + * Test the set mongo db driver. + */ @Test(groups = TestCategories.MONGO) public void testSetMongoDBDriver() { int hashCode = this.getMongoDBDriver().hashCode(); @@ -31,6 +38,9 @@ public void testSetMongoDBDriver() { Assert.assertNotEquals(hashCode, hashCode1); } + /** + * Test the override connection driver with the mongo db driver. + */ @Test(groups = TestCategories.MONGO) public void testOverrideConnectionDriverWithMongoDBDriver() { overrideConnectionDriver(this.getMongoDBDriver()); @@ -40,7 +50,7 @@ public void testOverrideConnectionDriverWithMongoDBDriver() { } /** - * Gets the connection string. + * Test getting the connection string. */ @Test(groups = TestCategories.MONGO) public void testGetBaseMongoConnectionStringTest() { @@ -49,7 +59,7 @@ public void testGetBaseMongoConnectionStringTest() { } /** - * Gets the database string. + * Test getting the database string. */ @Test(groups = TestCategories.MONGO) public void testGetBaseMongoStringTest() { @@ -58,7 +68,7 @@ public void testGetBaseMongoStringTest() { } /** - * Gets the connection string. + * Test getting the connection string. */ @Test(groups = TestCategories.MONGO) public void testGetBaseMongoCollectionStringTest() { diff --git a/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBConfigUnitTest.java b/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBConfigUnitTest.java index 3b0b20276..794db8a9b 100644 --- a/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBConfigUnitTest.java +++ b/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBConfigUnitTest.java @@ -9,12 +9,12 @@ import org.testng.annotations.Test; /** - * Test class for database configurations. + * The Mongo Database Config unit test class. */ public class MongoDBConfigUnitTest extends BaseMongoTest{ /** - * Gets the connection string. + * Test getting the connection string. */ @Test(groups = TestCategories.MONGO) public void testGetMongoDBConnectionStringTest() { @@ -23,7 +23,7 @@ public void testGetMongoDBConnectionStringTest() { } /** - * Gets the database string. + * Test getting the database string. */ @Test(groups = TestCategories.MONGO) public void testGetMongoDBDatabaseStringTest() { @@ -32,7 +32,7 @@ public void testGetMongoDBDatabaseStringTest() { } /** - * Gets the connection string. + * Test getting the connection string. */ @Test(groups = TestCategories.MONGO) public void testGetMongoDBCollectionStringTest() { @@ -41,7 +41,7 @@ public void testGetMongoDBCollectionStringTest() { } /** - * Gets the timeout value. + * Test getting the timeout value. */ @Test(groups = TestCategories.MONGO) public void testGetMongoDBQueryTimeout() { diff --git a/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBDriverUnitTest.java b/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBDriverUnitTest.java index 4aa68fd95..f6440afd9 100644 --- a/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBDriverUnitTest.java +++ b/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBDriverUnitTest.java @@ -13,10 +13,13 @@ import java.util.List; /** - * Test mongo base test functionality + * The Mongo Database Driver unit test class. */ public class MongoDBDriverUnitTest extends BaseMongoTest { + /** + * Test setting up the mongo db driver. + */ @Test(groups = TestCategories.MONGO) public void testMongoDBDriver() { MongoCollection collection = MongoFactory.getDefaultCollection(); @@ -31,6 +34,9 @@ public void testMongoDBDriver() { Assert.assertNotNull(driver); } + /** + * Test getting the mongo client. + */ @Test(groups = TestCategories.MONGO) public void testGetMongoClient() { this.setMongoDBDriver(new MongoDBDriver()); @@ -38,6 +44,9 @@ public void testGetMongoClient() { Assert.assertNotNull(client); } + /** + * Test setting the mongo client. + */ @Test(groups = TestCategories.MONGO) public void testSetMongoClient() { this.setMongoDBDriver(new MongoDBDriver()); diff --git a/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBFunctionalUnitTest.java b/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBFunctionalUnitTest.java index 28ae1ebf8..c52fb7b59 100644 --- a/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBFunctionalUnitTest.java +++ b/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBFunctionalUnitTest.java @@ -12,14 +12,15 @@ import org.testng.annotations.Test; import java.util.ArrayList; import java.util.List; +import java.util.Objects; /** - * Test Mongo Functionality. + * The Mongo Database Functional unit test class. */ public class MongoDBFunctionalUnitTest extends BaseMongoTest{ /** - * Test the collection works as expected. + * Test the collection works as expected when getting the login id. */ @Test(groups = TestCategories.MONGO) public void testMongoGetLoginID() { @@ -30,18 +31,18 @@ public void testMongoGetLoginID() { } /** - * Test the collection works as expected. + * Test the collection works as expected when running a query and returning the first result. */ @Test(groups = TestCategories.MONGO) public void testMongoQueryAndReturnFirst() { Bson filter = Filters.eq("lid", "test3"); - //MongoCollection document = this.getMongoDBDriver().getCollection().find(filter).ToList().First(); + // MongoCollection document = this.getMongoDBDriver().getCollection().find(filter).ToList().First(); Document document = this.getMongoDBDriver().getCollection().find(filter).first(); - Assert.assertEquals(document.get("lid").toString(), "test3"); + Assert.assertEquals(Objects.requireNonNull(document).get("lid").toString(), "test3"); } /** - * Test the collection works as expected + * Test the collection works as expected when finding a list with a key. */ @Test(groups = TestCategories.MONGO) public void testMongoFindListWithKey() { @@ -61,7 +62,7 @@ public void testMongoFindListWithKey() { @Test(groups = TestCategories.MONGO) public void testMongoLinqQuery() { /* - QueryBuilder querys = + QueryBuilder queries = from e in this.getMongoDBDriver().getCollection() where e["lid"] == "test1" select e; diff --git a/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDriverManagerUnitTest.java b/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDriverManagerUnitTest.java index 9388d498c..c433f3033 100644 --- a/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDriverManagerUnitTest.java +++ b/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDriverManagerUnitTest.java @@ -11,12 +11,12 @@ import org.testng.annotations.Test; /** - * Test the mongo driver manager functionality. + * The Mongo Driver Manager unit test class. */ public class MongoDriverManagerUnitTest extends BaseMongoTest{ /** - * Override with default driver. + * Test overriding the default driver. */ @Test(groups = TestCategories.MONGO) public void respectDefaultDriverOverride() { @@ -28,7 +28,7 @@ public void respectDefaultDriverOverride() { } /** - * Override driver with collection string. + * Override driver with the collection string. */ @Test(groups = TestCategories.MONGO) public void respectCollectionDriverOverride() { @@ -39,10 +39,10 @@ public void respectCollectionDriverOverride() { } /** - * Override drive with all 3 connection strings. + * Override drive with all 3 connection parameters. */ @Test(groups = TestCategories.MONGO) - public void RespectDriverConnectionsOverride() { + public void respectDriverConnectionsOverride() { MongoDBDriver mongoDriver = new MongoDBDriver(MongoDBConfig.getConnectionString(), MongoDBConfig.getDatabaseString(), MongoDBConfig.getCollectionString()); this.getTestObject().getMongoDBManager().overrideDriver(mongoDriver); @@ -53,7 +53,7 @@ public void RespectDriverConnectionsOverride() { * Override driver directly. */ @Test(groups = TestCategories.MONGO) - public void RespectDirectDriverOverride() { + public void respectDirectDriverOverride() { MongoDBDriver mongoDriver = new MongoDBDriver(MongoDBConfig.getCollectionString()); this.setMongoDBDriver(mongoDriver); Assert.assertEquals(mongoDriver.getCollection(), this.getMongoDBDriver().getCollection()); @@ -63,7 +63,7 @@ public void RespectDirectDriverOverride() { * Override driver with new driver. */ @Test(groups = TestCategories.MONGO) - public void RespectNewDriverOverride() { + public void respectNewDriverOverride() { MongoDBDriver mongoDriver = new MongoDBDriver(MongoDBConfig.getCollectionString()); this.getTestObject().overrideMongoDBDriver(mongoDriver); Assert.assertEquals(mongoDriver.getCollection(), this.getMongoDBDriver().getCollection()); @@ -73,7 +73,7 @@ public void RespectNewDriverOverride() { * Override drive with collection function. */ @Test(groups = TestCategories.MONGO) - public void RespectCollectionOverride() { + public void respectCollectionOverride() { MongoCollection collection = MongoFactory.getDefaultCollection(); this.getTestObject().overrideMongoDBDriver(() -> collection); Assert.assertEquals(collection, this.getMongoDBDriver().getCollection()); @@ -83,7 +83,7 @@ public void RespectCollectionOverride() { * Override drive with all 3 connection strings. */ @Test(groups = TestCategories.MONGO) - public void RespectDriverConnectionStingsOverride() { + public void respectDriverConnectionStingsOverride() { MongoCollection collection = this.getMongoDBDriver().getCollection(); this.getTestObject().overrideMongoDBDriver(MongoDBConfig.getConnectionString(), MongoDBConfig.getDatabaseString(), MongoDBConfig.getCollectionString()); @@ -94,7 +94,7 @@ public void RespectDriverConnectionStingsOverride() { * Override in base with collection function. */ @Test(groups = TestCategories.MONGO) - public void RespectCollectionOverrideInBase() { + public void respectCollectionOverrideInBase() { MongoCollection collection = MongoFactory.getDefaultCollection(); this.overrideConnectionDriver(() -> collection); Assert.assertEquals(collection, this.getMongoDBDriver().getCollection()); diff --git a/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoTestObjectUnitTest.java b/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoTestObjectUnitTest.java index 654a365f5..ac2c3a358 100644 --- a/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoTestObjectUnitTest.java +++ b/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoTestObjectUnitTest.java @@ -13,12 +13,12 @@ import org.testng.annotations.Test; /** - * Test the mongo test object functionality. + * The Mongo Test Object unit test class. */ public class MongoTestObjectUnitTest extends BaseMongoTest { /** - * Is the collection override respected. + * Tests if the collection override is respected. */ @Test(groups = TestCategories.MONGO) public void overrideCollectionFunction() { @@ -32,7 +32,7 @@ public void overrideCollectionFunction() { } /** - * Are the connection string overrides respected. + * Tests if the connection string overrides respected. */ @Test(groups = TestCategories.MONGO) public void overrideConnectionStrings() { @@ -45,7 +45,7 @@ public void overrideConnectionStrings() { } /** - * Is the driver override respected. + * Tests if the driver override respected. */ @Test(groups = TestCategories.MONGO) public void overrideDriver() { @@ -59,7 +59,7 @@ public void overrideDriver() { } /** - * Is the test overridable with a custom driver. + * Tests if the custom driver is overridable. */ @Test(groups = TestCategories.MONGO) public void overrideWithCustomDriver() { @@ -78,9 +78,9 @@ public void overrideWithCustomDriver() { Assert.assertFalse(this.getMongoDBDriver().isCollectionEmpty()); } - /// - /// Make sure the test objects map properly - /// + /** + * Make sure the test objects map properly. + */ @Test(groups = TestCategories.MONGO) public void TestMongoDBTestObjectMapCorrectly() { Assert.assertEquals(this.getTestObject().getLogger(), this.getLogger(), "Logs don't match"); diff --git a/pom.xml b/pom.xml index e006228fd..0e60d2a05 100644 --- a/pom.xml +++ b/pom.xml @@ -53,6 +53,7 @@ maqs-appium maqs-webservices maqs-database + maqs-nosql maqs-cucumber maqs-accessibility @@ -318,6 +319,11 @@ maqs-webservices ${project.version} + + com.cognizantsoftvision.maqs.nosql + maqs-nosql + ${project.version} + From 6b511ae6c21c6b6b533e00ca26db6298cc849c38 Mon Sep 17 00:00:00 2001 From: jredingcvs <97762469+jredingcvs@users.noreply.github.com> Date: Tue, 8 Mar 2022 16:07:55 -0600 Subject: [PATCH 24/91] copyright update --- .../java/com/cognizantsoftvision/maqs/nosql/BaseMongoTest.java | 2 +- .../java/com/cognizantsoftvision/maqs/nosql/MongoDBConfig.java | 2 +- .../java/com/cognizantsoftvision/maqs/nosql/MongoDBDriver.java | 2 +- .../com/cognizantsoftvision/maqs/nosql/MongoDriverManager.java | 2 +- .../java/com/cognizantsoftvision/maqs/nosql/MongoFactory.java | 2 +- .../com/cognizantsoftvision/maqs/nosql/MongoTestObject.java | 2 +- .../com/cognizantsoftvision/maqs/nosql/BaseMongoUnitTest.java | 2 +- .../cognizantsoftvision/maqs/nosql/MongoDBConfigUnitTest.java | 2 +- .../cognizantsoftvision/maqs/nosql/MongoDBDriverUnitTest.java | 2 +- .../maqs/nosql/MongoDBFunctionalUnitTest.java | 2 +- .../maqs/nosql/MongoDriverManagerUnitTest.java | 2 +- .../cognizantsoftvision/maqs/nosql/MongoTestObjectUnitTest.java | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/BaseMongoTest.java b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/BaseMongoTest.java index 07ac74e02..e6d7cda9f 100644 --- a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/BaseMongoTest.java +++ b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/BaseMongoTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 Cognizant, All rights Reserved + * Copyright 2022 Cognizant SoftVision, All rights Reserved */ package com.cognizantsoftvision.maqs.nosql; diff --git a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDBConfig.java b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDBConfig.java index 326a128a4..71d2e104a 100644 --- a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDBConfig.java +++ b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDBConfig.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 Cognizant, All rights Reserved + * Copyright 2022 Cognizant SoftVision, All rights Reserved */ package com.cognizantsoftvision.maqs.nosql; diff --git a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDBDriver.java b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDBDriver.java index 92f797dd1..48e4e9dda 100644 --- a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDBDriver.java +++ b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDBDriver.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 Cognizant, All rights Reserved + * Copyright 2022 Cognizant SoftVision, All rights Reserved */ package com.cognizantsoftvision.maqs.nosql; diff --git a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDriverManager.java b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDriverManager.java index bb902fdd2..9d9a22de6 100644 --- a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDriverManager.java +++ b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDriverManager.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 Cognizant, All rights Reserved + * Copyright 2022 Cognizant SoftVision, All rights Reserved */ package com.cognizantsoftvision.maqs.nosql; diff --git a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoFactory.java b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoFactory.java index 98afc9cd5..0179969b4 100644 --- a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoFactory.java +++ b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 Cognizant, All rights Reserved + * Copyright 2022 Cognizant SoftVision, All rights Reserved */ package com.cognizantsoftvision.maqs.nosql; diff --git a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoTestObject.java b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoTestObject.java index 5c4bb3df2..468078c52 100644 --- a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoTestObject.java +++ b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoTestObject.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 Cognizant, All rights Reserved + * Copyright 2022 Cognizant SoftVision, All rights Reserved */ package com.cognizantsoftvision.maqs.nosql; diff --git a/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/BaseMongoUnitTest.java b/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/BaseMongoUnitTest.java index 6ff20ea8a..68337b9fe 100644 --- a/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/BaseMongoUnitTest.java +++ b/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/BaseMongoUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 Cognizant, All rights Reserved + * Copyright 2022 Cognizant SoftVision, All rights Reserved */ package com.cognizantsoftvision.maqs.nosql; diff --git a/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBConfigUnitTest.java b/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBConfigUnitTest.java index 794db8a9b..ff0178477 100644 --- a/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBConfigUnitTest.java +++ b/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBConfigUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 Cognizant, All rights Reserved + * Copyright 2022 Cognizant SoftVision, All rights Reserved */ package com.cognizantsoftvision.maqs.nosql; diff --git a/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBDriverUnitTest.java b/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBDriverUnitTest.java index f6440afd9..caab8d723 100644 --- a/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBDriverUnitTest.java +++ b/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBDriverUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 Cognizant, All rights Reserved + * Copyright 2022 Cognizant SoftVision, All rights Reserved */ package com.cognizantsoftvision.maqs.nosql; diff --git a/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBFunctionalUnitTest.java b/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBFunctionalUnitTest.java index c52fb7b59..643f4526b 100644 --- a/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBFunctionalUnitTest.java +++ b/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBFunctionalUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 Cognizant, All rights Reserved + * Copyright 2022 Cognizant SoftVision, All rights Reserved */ package com.cognizantsoftvision.maqs.nosql; diff --git a/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDriverManagerUnitTest.java b/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDriverManagerUnitTest.java index c433f3033..35370bf3e 100644 --- a/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDriverManagerUnitTest.java +++ b/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDriverManagerUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 Cognizant, All rights Reserved + * Copyright 2022 Cognizant SoftVision, All rights Reserved */ package com.cognizantsoftvision.maqs.nosql; diff --git a/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoTestObjectUnitTest.java b/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoTestObjectUnitTest.java index ac2c3a358..0fad3ee52 100644 --- a/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoTestObjectUnitTest.java +++ b/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoTestObjectUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 Cognizant, All rights Reserved + * Copyright 2022 Cognizant SoftVision, All rights Reserved */ package com.cognizantsoftvision.maqs.nosql; From 4b3698c69caa4dcb2dff8e530b48186b7e535026 Mon Sep 17 00:00:00 2001 From: jredingcvs <97762469+jredingcvs@users.noreply.github.com> Date: Tue, 8 Mar 2022 16:28:28 -0600 Subject: [PATCH 25/91] copyright update --- .../com/cognizantsoftvision/maqs/nosql/BaseMongoTest.java | 2 +- .../com/cognizantsoftvision/maqs/nosql/MongoDBConfig.java | 2 +- .../com/cognizantsoftvision/maqs/nosql/MongoDBDriver.java | 2 +- .../cognizantsoftvision/maqs/nosql/MongoDriverManager.java | 4 ++-- .../java/com/cognizantsoftvision/maqs/nosql/MongoFactory.java | 2 +- .../com/cognizantsoftvision/maqs/nosql/MongoTestObject.java | 4 ++-- .../com/cognizantsoftvision/maqs/nosql/BaseMongoUnitTest.java | 2 +- .../cognizantsoftvision/maqs/nosql/MongoDBConfigUnitTest.java | 2 +- .../cognizantsoftvision/maqs/nosql/MongoDBDriverUnitTest.java | 2 +- .../maqs/nosql/MongoDBFunctionalUnitTest.java | 2 +- .../maqs/nosql/MongoDriverManagerUnitTest.java | 2 +- .../maqs/nosql/MongoTestObjectUnitTest.java | 2 +- 12 files changed, 14 insertions(+), 14 deletions(-) diff --git a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/BaseMongoTest.java b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/BaseMongoTest.java index e6d7cda9f..50ea6fc89 100644 --- a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/BaseMongoTest.java +++ b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/BaseMongoTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ package com.cognizantsoftvision.maqs.nosql; diff --git a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDBConfig.java b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDBConfig.java index 71d2e104a..5aa790599 100644 --- a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDBConfig.java +++ b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDBConfig.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ package com.cognizantsoftvision.maqs.nosql; diff --git a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDBDriver.java b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDBDriver.java index 48e4e9dda..91500c3b5 100644 --- a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDBDriver.java +++ b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDBDriver.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ package com.cognizantsoftvision.maqs.nosql; diff --git a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDriverManager.java b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDriverManager.java index 9d9a22de6..60a66b36c 100644 --- a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDriverManager.java +++ b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDriverManager.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ package com.cognizantsoftvision.maqs.nosql; @@ -34,7 +34,7 @@ public MongoDriverManager(String connectionString, String databaseString, MongoFactory.getCollection(connectionString, databaseString, collectionString)), testObject); } - /** TODO: is this needed? + /** * Initializes a new instance of the MongoDriverManager class. * @param getCollection Function for getting a Mongo collection connection * @param testObject Test object this driver is getting added to diff --git a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoFactory.java b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoFactory.java index 0179969b4..04ce3c4fd 100644 --- a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoFactory.java +++ b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ package com.cognizantsoftvision.maqs.nosql; diff --git a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoTestObject.java b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoTestObject.java index 468078c52..6c121488f 100644 --- a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoTestObject.java +++ b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoTestObject.java @@ -1,11 +1,11 @@ /* - * Copyright 2022 Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ package com.cognizantsoftvision.maqs.nosql; -import com.cognizantsoftvision.maqs.utilities.logging.Logger; import com.cognizantsoftvision.maqs.base.BaseTestObject; +import com.cognizantsoftvision.maqs.utilities.logging.Logger; import com.mongodb.client.MongoCollection; import java.util.function.Supplier; import org.bson.Document; diff --git a/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/BaseMongoUnitTest.java b/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/BaseMongoUnitTest.java index 68337b9fe..e564cb64d 100644 --- a/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/BaseMongoUnitTest.java +++ b/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/BaseMongoUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ package com.cognizantsoftvision.maqs.nosql; diff --git a/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBConfigUnitTest.java b/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBConfigUnitTest.java index ff0178477..acb1ed3e1 100644 --- a/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBConfigUnitTest.java +++ b/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBConfigUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ package com.cognizantsoftvision.maqs.nosql; diff --git a/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBDriverUnitTest.java b/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBDriverUnitTest.java index caab8d723..86acfc16c 100644 --- a/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBDriverUnitTest.java +++ b/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBDriverUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ package com.cognizantsoftvision.maqs.nosql; diff --git a/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBFunctionalUnitTest.java b/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBFunctionalUnitTest.java index 643f4526b..e2b6a7b6f 100644 --- a/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBFunctionalUnitTest.java +++ b/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBFunctionalUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ package com.cognizantsoftvision.maqs.nosql; diff --git a/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDriverManagerUnitTest.java b/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDriverManagerUnitTest.java index 35370bf3e..9bcdfd457 100644 --- a/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDriverManagerUnitTest.java +++ b/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDriverManagerUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ package com.cognizantsoftvision.maqs.nosql; diff --git a/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoTestObjectUnitTest.java b/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoTestObjectUnitTest.java index 0fad3ee52..d31890e62 100644 --- a/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoTestObjectUnitTest.java +++ b/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoTestObjectUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ package com.cognizantsoftvision.maqs.nosql; From 44373fa9d0d02925be0a76ead2521aaf2bea4905 Mon Sep 17 00:00:00 2001 From: jredingcvs <97762469+jredingcvs@users.noreply.github.com> Date: Thu, 10 Mar 2022 12:33:08 -0600 Subject: [PATCH 26/91] updated to set up mongo docker --- .github/workflows/pullrequest.yml | 2 +- maqs-nosql/pom.xml | 30 +----------------------------- 2 files changed, 2 insertions(+), 30 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index e2002e70b..61229e56c 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -24,7 +24,7 @@ jobs: path: ~/.m2 key: ${{runner.os}}-m2 - name: Build the docker-compose stack - run: docker-compose -f docker/MAQSSQLServer/docker-compose.yml -p CognizantOpenSource/maqs-java up -d + run: docker-compose -f docker/docker-compose.yml -p CognizantOpenSource/maqs-java up -d - name: Create settings file uses: InstaCode/maven-settings-xml-action@v9 with: diff --git a/maqs-nosql/pom.xml b/maqs-nosql/pom.xml index 690a2499b..4eb7307ca 100644 --- a/maqs-nosql/pom.xml +++ b/maqs-nosql/pom.xml @@ -16,7 +16,7 @@ ${revision} - 4.4.1 + 4.5.0 @@ -41,32 +41,4 @@ testng - - - - io.fabric8 - docker-maven-plugin - 0.37.0 - - - - mongoDB - - compose - ../Docker/MAQSMongoDB/ - docker-compose.yml - - - - - setup-database - process-test-resources - - start - - - - - - From d31d46d4240c7fce5c5dd481c268d6a71d1c79fb Mon Sep 17 00:00:00 2001 From: jredingcvs <97762469+jredingcvs@users.noreply.github.com> Date: Wed, 13 Apr 2022 09:40:53 -0500 Subject: [PATCH 27/91] small edits --- docker/MAQSMongoDB/docker-compose.yml | 2 +- .../maqs/nosql/IMongoTestObject.java | 46 +++++++++++++++++++ .../maqs/nosql/MongoDriverManager.java | 18 ++++---- .../maqs/nosql/MongoTestObject.java | 6 ++- .../maqs/nosql/BaseMongoUnitTest.java | 3 +- .../maqs/nosql/MongoDBConfigUnitTest.java | 2 +- 6 files changed, 64 insertions(+), 13 deletions(-) create mode 100644 maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/IMongoTestObject.java diff --git a/docker/MAQSMongoDB/docker-compose.yml b/docker/MAQSMongoDB/docker-compose.yml index 10479a005..bf458412c 100644 --- a/docker/MAQSMongoDB/docker-compose.yml +++ b/docker/MAQSMongoDB/docker-compose.yml @@ -12,7 +12,7 @@ services: image: mongo-express restart: always ports: - - 8081:8081 + - "8081:8081" links: - mongo environment: diff --git a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/IMongoTestObject.java b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/IMongoTestObject.java new file mode 100644 index 000000000..d87f234b3 --- /dev/null +++ b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/IMongoTestObject.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + */ + +package com.cognizantsoftvision.maqs.nosql; + +import com.cognizantsoftvision.maqs.base.ITestObject; +import com.mongodb.client.MongoCollection; +import java.util.function.Supplier; +import org.bson.Document; + +/// +/// Mongo test object interface +/// +public interface IMongoTestObject extends ITestObject { + + /// + /// Gets the Mongo driver + /// + MongoDBDriver getMongoDBDriver(); + + /// + /// Gets the Mongo driver manager + /// + MongoDriverManager getMongoDBManager(); + + /// + /// Override the Mongo driver a collection function + /// + /// The collection function + void overrideMongoDBDriver(Supplier> overrideCollectionConnection); + + /// + /// Override the Mongo driver settings + /// + /// New Mongo driver + void overrideMongoDBDriver(MongoDBDriver driver); + + /// + /// Override the Mongo driver settings + /// + /// Client connection string + /// Database connection string + /// Mongo collection string + void overrideMongoDBDriver(String connectionString, String databaseString, String collectionString); +} diff --git a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDriverManager.java b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDriverManager.java index 60a66b36c..6bb61b984 100644 --- a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDriverManager.java +++ b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDriverManager.java @@ -19,7 +19,7 @@ public class MongoDriverManager extends DriverManager { /** * Cached copy of the connection driver. */ - private MongoDBDriver driver; + private MongoDBDriver mongoDBDriver; /** * Initializes a new instance of the MongoDriverManager class. @@ -43,13 +43,12 @@ public MongoDriverManager(Supplier getCollection, BaseTestObject super(getCollection, testObject); } - /** * Override the Mongo driver. * @param overrideDriver The new Mongo driver */ public void overrideDriver(MongoDBDriver overrideDriver) { - driver = overrideDriver; + mongoDBDriver = overrideDriver; this.setBaseDriver(new MongoDBDriver(overrideDriver.getCollection())); } @@ -60,8 +59,7 @@ public void overrideDriver(MongoDBDriver overrideDriver) { * @param collectionString Collection string to use */ public void overrideDriver(String connectionString, String databaseString, String collectionString) { - driver = null; - this.overrideDriverGet(() -> MongoFactory.getCollection(connectionString, databaseString, collectionString)); + mongoDBDriver = null; this.overrideDriverGet(() -> MongoFactory.getCollection(connectionString, databaseString, collectionString)); } @@ -70,7 +68,7 @@ public void overrideDriver(String connectionString, String databaseString, Strin * @param overrideCollectionConnection The new collection connection */ public void overrideDriver(Supplier> overrideCollectionConnection) { - driver = null; + mongoDBDriver = null; this.overrideDriverGet(overrideCollectionConnection); } @@ -79,7 +77,11 @@ public void overrideDriver(Supplier> overrideCollectio * @return The Mongo driver */ public MongoDBDriver getMongoDriver() { - return this.getBase(); + // Create default Web Service Driver if null. + if (this.mongoDBDriver == null) { + this.mongoDBDriver = new MongoDBDriver(getBase().getCollection()); + } + return this.mongoDBDriver; } protected void overrideDriverGet(Supplier> driverGet) { @@ -90,7 +92,7 @@ public void close() { if (!this.isDriverInitialized()) { return; } - MongoDBDriver mongoDBDriver = this.getMongoDriver(); + mongoDBDriver.getMongoClient().close(); this.baseDriver = null; } diff --git a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoTestObject.java b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoTestObject.java index 6c121488f..384c31e1a 100644 --- a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoTestObject.java +++ b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoTestObject.java @@ -13,7 +13,7 @@ /** * The Mongo Test Object class. */ -public class MongoTestObject extends BaseTestObject { +public class MongoTestObject extends BaseTestObject implements IMongoTestObject { /** * Initializes a new instance of the MongoTestObject class. @@ -61,13 +61,15 @@ public void overrideMongoDBDriver(String connectionString, String databaseString * @param driver New Mongo driver */ public void overrideMongoDBDriver(MongoDBDriver driver) { - this.getMongoDBManager().overrideDriver(driver); + this.getManagerStore().put(MongoDriverManager.class.getCanonicalName(), + new MongoDriverManager(() -> driver, this)); } /** * Override the Mongo driver a collection function. * @param overrideCollectionConnection The collection function */ + @Override public void overrideMongoDBDriver(Supplier> overrideCollectionConnection) { this.getMongoDBManager().overrideDriver(overrideCollectionConnection); } diff --git a/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/BaseMongoUnitTest.java b/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/BaseMongoUnitTest.java index e564cb64d..ed029a31e 100644 --- a/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/BaseMongoUnitTest.java +++ b/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/BaseMongoUnitTest.java @@ -45,7 +45,8 @@ public void testSetMongoDBDriver() { public void testOverrideConnectionDriverWithMongoDBDriver() { overrideConnectionDriver(this.getMongoDBDriver()); Assert.assertNotNull(getMongoDBDriver()); - overrideConnectionDriver(this.getBaseConnectionString(), this.getBaseDatabaseString(), this.getBaseCollectionString()); + overrideConnectionDriver(this.getBaseConnectionString(), + this.getBaseDatabaseString(), this.getBaseCollectionString()); Assert.assertNotNull(getMongoDBDriver()); } diff --git a/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBConfigUnitTest.java b/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBConfigUnitTest.java index acb1ed3e1..eb571855b 100644 --- a/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBConfigUnitTest.java +++ b/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBConfigUnitTest.java @@ -11,7 +11,7 @@ /** * The Mongo Database Config unit test class. */ -public class MongoDBConfigUnitTest extends BaseMongoTest{ +public class MongoDBConfigUnitTest extends BaseMongoTest { /** * Test getting the connection string. From 6e53965985ad362d3c23948ea539eb75960d077f Mon Sep 17 00:00:00 2001 From: jredingcvs <97762469+jredingcvs@users.noreply.github.com> Date: Wed, 13 Apr 2022 09:43:05 -0500 Subject: [PATCH 28/91] small edits --- docker/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 0dd41e694..1b2f749d0 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -6,7 +6,7 @@ version: '2' services: mssql: - extends: + extends: file: ./MAQSSQLServer/docker-compose.yml service: mssql mongo: From c565353f1bf4e9cc431bb7194888d9e6f986e8ff Mon Sep 17 00:00:00 2001 From: jredingcvs <97762469+jredingcvs@users.noreply.github.com> Date: Wed, 13 Apr 2022 09:46:50 -0500 Subject: [PATCH 29/91] small edits --- docker/docker-compose.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 1b2f749d0..44c3c95f1 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -12,8 +12,4 @@ services: mongo: extends: file: ./MAQSMongoDB/docker-compose.yml - service: mongo -# imap: -# extends: -# file: ./MAQSEmail/docker-compose.yml -# service: imap + service: mongo \ No newline at end of file From a647e932114d16ccfd1325e9c3683c014f468492 Mon Sep 17 00:00:00 2001 From: jredingcvs <97762469+jredingcvs@users.noreply.github.com> Date: Wed, 13 Apr 2022 09:48:02 -0500 Subject: [PATCH 30/91] small edits --- docker/MAQSMongoDB/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/MAQSMongoDB/docker-compose.yml b/docker/MAQSMongoDB/docker-compose.yml index bf458412c..10479a005 100644 --- a/docker/MAQSMongoDB/docker-compose.yml +++ b/docker/MAQSMongoDB/docker-compose.yml @@ -12,7 +12,7 @@ services: image: mongo-express restart: always ports: - - "8081:8081" + - 8081:8081 links: - mongo environment: From a894a01776b68232601c8c31d0abb7acb235ea20 Mon Sep 17 00:00:00 2001 From: jredingcvs <97762469+jredingcvs@users.noreply.github.com> Date: Thu, 14 Apr 2022 08:49:26 -0500 Subject: [PATCH 31/91] update docker --- docker/docker-compose.yml | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 2b04f0b3c..44c3c95f1 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -6,18 +6,10 @@ version: '2' services: mssql: - extends: + extends: file: ./MAQSSQLServer/docker-compose.yml service: mssql mongo: extends: file: ./MAQSMongoDB/docker-compose.yml - service: mongo - imap: - extends: - file: ./MAQSEmail/docker-compose.yml - service: imap - webservice: - extends: - service: webservice - file: ./MAQSService/docker-compose.yml + service: mongo \ No newline at end of file From 04344318a5143ea8273b78a896a7a21a2351b355 Mon Sep 17 00:00:00 2001 From: jredingcvs <97762469+jredingcvs@users.noreply.github.com> Date: Fri, 15 Apr 2022 16:55:49 -0500 Subject: [PATCH 32/91] updated some stuff --- .github/labeler.yml | 4 ++ .../maqs/nosql/IMongoTestObject.java | 48 ++++++++++--------- .../maqs/nosql/MongoTestObject.java | 25 ++++------ .../maqs/nosql/MongoDBConfigUnitTest.java | 2 +- .../maqs/nosql/MongoDBFunctionalUnitTest.java | 2 +- 5 files changed, 40 insertions(+), 41 deletions(-) diff --git a/.github/labeler.yml b/.github/labeler.yml index 01febd985..880d4df3f 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -33,3 +33,7 @@ devops: accessibility: - maqs-accessibility/* - maqs-accessibility/**/* + +noSQL: + -maqs-nosql/* + -maqs-nosql/**/* diff --git a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/IMongoTestObject.java b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/IMongoTestObject.java index d87f234b3..50f45ea32 100644 --- a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/IMongoTestObject.java +++ b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/IMongoTestObject.java @@ -9,38 +9,40 @@ import java.util.function.Supplier; import org.bson.Document; -/// -/// Mongo test object interface -/// +/** + * The Mongo Test Object interface. + */ public interface IMongoTestObject extends ITestObject { - /// - /// Gets the Mongo driver - /// + /** + * Gets the Mongo driver. + * @return the mongo database driver + */ MongoDBDriver getMongoDBDriver(); - /// - /// Gets the Mongo driver manager - /// + /** + * Gets the Mongo driver manager. + * @return the mongo database manager + */ MongoDriverManager getMongoDBManager(); - /// - /// Override the Mongo driver a collection function - /// - /// The collection function + /** + * Override the Mongo driver a collection function. + * @param overrideCollectionConnection The collection function + */ void overrideMongoDBDriver(Supplier> overrideCollectionConnection); - /// - /// Override the Mongo driver settings - /// - /// New Mongo driver + /** + * Override the Mongo driver settings. + * @param driver New Mongo driver + */ void overrideMongoDBDriver(MongoDBDriver driver); - /// - /// Override the Mongo driver settings - /// - /// Client connection string - /// Database connection string - /// Mongo collection string + /** + * Override the Mongo driver settings. + * @param connectionString Client connection string + * @param databaseString Database connection string + * @param collectionString Mongo collection string + */ void overrideMongoDBDriver(String connectionString, String databaseString, String collectionString); } diff --git a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoTestObject.java b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoTestObject.java index 384c31e1a..548a8953b 100644 --- a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoTestObject.java +++ b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoTestObject.java @@ -31,34 +31,28 @@ public MongoTestObject(String connectionString, String databaseString, String co } /** - * Gets the Mongo driver manager. - * @return the mongo driver manager + * {@inheritDoc} */ - public MongoDriverManager getMongoDBManager() { - return this.getManagerStore().getDriver(MongoDriverManager.class.getCanonicalName()); + public MongoDBDriver getMongoDBDriver() { + return this.getMongoDBManager().getMongoDriver(); } /** - * Gets the Mongo driver. - * @return the stored mongoDB driver. + * {@inheritDoc} */ - public MongoDBDriver getMongoDBDriver() { - return this.getMongoDBManager().getMongoDriver(); + public MongoDriverManager getMongoDBManager() { + return this.getManagerStore().getDriver(MongoDriverManager.class.getCanonicalName()); } /** - * Override the Mongo driver settings. - * @param connectionString Client connection string - * @param databaseString Database connection string - * @param collectionString Mongo collection string + * {@inheritDoc} */ public void overrideMongoDBDriver(String connectionString, String databaseString, String collectionString) { this.getMongoDBManager().overrideDriver(connectionString, databaseString, collectionString); } /** - * Override the Mongo driver settings. - * @param driver New Mongo driver + * {@inheritDoc} */ public void overrideMongoDBDriver(MongoDBDriver driver) { this.getManagerStore().put(MongoDriverManager.class.getCanonicalName(), @@ -66,8 +60,7 @@ public void overrideMongoDBDriver(MongoDBDriver driver) { } /** - * Override the Mongo driver a collection function. - * @param overrideCollectionConnection The collection function + * {@inheritDoc} */ @Override public void overrideMongoDBDriver(Supplier> overrideCollectionConnection) { diff --git a/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBConfigUnitTest.java b/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBConfigUnitTest.java index eb571855b..d5fe4fa84 100644 --- a/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBConfigUnitTest.java +++ b/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBConfigUnitTest.java @@ -11,7 +11,7 @@ /** * The Mongo Database Config unit test class. */ -public class MongoDBConfigUnitTest extends BaseMongoTest { +public class MongoDBConfigUnitTest { /** * Test getting the connection string. diff --git a/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBFunctionalUnitTest.java b/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBFunctionalUnitTest.java index e2b6a7b6f..5e784b07f 100644 --- a/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBFunctionalUnitTest.java +++ b/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBFunctionalUnitTest.java @@ -17,7 +17,7 @@ /** * The Mongo Database Functional unit test class. */ -public class MongoDBFunctionalUnitTest extends BaseMongoTest{ +public class MongoDBFunctionalUnitTest extends BaseMongoTest { /** * Test the collection works as expected when getting the login id. From da4f6cbbca2e56bd81bf323bc000d09510f9f8e1 Mon Sep 17 00:00:00 2001 From: jredingcvs <97762469+jredingcvs@users.noreply.github.com> Date: Thu, 5 May 2022 10:34:52 -0500 Subject: [PATCH 33/91] add nosql module to maven.yml --- .github/workflows/maven.yml | 2 +- .../maqs/nosql/MongoFactory.java | 14 ++++++-------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 0ae7af879..2e2f28ee1 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -108,7 +108,7 @@ jobs: strategy: fail-fast: false matrix: - module-name: [ maqs-utilities, maqs-base, maqs-appium, maqs-selenium, maqs-webservices, maqs-cucumber, maqs-accessibility, maqs-database, maqs-playwright ] + module-name: [ maqs-utilities, maqs-base, maqs-appium, maqs-selenium, maqs-webservices, maqs-cucumber, maqs-accessibility, maqs-database, maqs-playwright, maqs-nosql ] steps: - name: Check if tests can be run if: matrix.module-name == 'maqs-appium' && github.actor == 'dependabot[bot]' diff --git a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoFactory.java b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoFactory.java index 04ce3c4fd..43b1238fb 100644 --- a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoFactory.java +++ b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoFactory.java @@ -8,11 +8,12 @@ import com.mongodb.MongoClientSettings; import com.mongodb.MongoException; import com.mongodb.client.MongoClient; -import com.mongodb.client.MongoClients; import com.mongodb.client.MongoCollection; import com.mongodb.client.MongoDatabase; import org.bson.Document; +import static com.mongodb.client.MongoClients.create; + /** * The Mongo Factory Class. */ @@ -39,18 +40,17 @@ public static MongoCollection getDefaultCollection() { */ public static MongoCollection getCollection( String connectionString, String databaseString, String collectionString) { - MongoClient mongoClient; MongoDatabase database; - try { - mongoClient = MongoClients.create(connectionString); + try (MongoClient mongoClient = create(connectionString)) { database = mongoClient.getDatabase(databaseString); + return database.getCollection(collectionString); } catch (MongoClientException e) { throw new MongoClientException("connection was not created"); } catch (MongoException e) { throw new MongoException("database does not exist"); } - return database.getCollection(collectionString); + } /** @@ -62,11 +62,9 @@ public static MongoCollection getCollection( */ public static MongoCollection getCollection(String databaseString, String collectionString, MongoClientSettings settings) { - MongoClient mongoClient; MongoDatabase database; - try { - mongoClient = MongoClients.create(settings); + try (MongoClient mongoClient = create(settings)) { database = mongoClient.getDatabase(databaseString); } catch (Exception e) { throw new MongoException("connection was not created: " + e); From 56640020b22d62cf7f0eafca21c7b8b5257ecc1f Mon Sep 17 00:00:00 2001 From: jredingcvs <97762469+jredingcvs@users.noreply.github.com> Date: Thu, 5 May 2022 10:37:32 -0500 Subject: [PATCH 34/91] checkstyle updates --- .../java/com/cognizantsoftvision/maqs/nosql/MongoFactory.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoFactory.java b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoFactory.java index 43b1238fb..c91744c75 100644 --- a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoFactory.java +++ b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoFactory.java @@ -4,6 +4,8 @@ package com.cognizantsoftvision.maqs.nosql; +import static com.mongodb.client.MongoClients.create; + import com.mongodb.MongoClientException; import com.mongodb.MongoClientSettings; import com.mongodb.MongoException; @@ -12,8 +14,6 @@ import com.mongodb.client.MongoDatabase; import org.bson.Document; -import static com.mongodb.client.MongoClients.create; - /** * The Mongo Factory Class. */ From fdc877e577e06283c1503924638172d5df97a104 Mon Sep 17 00:00:00 2001 From: jredingcvs <97762469+jredingcvs@users.noreply.github.com> Date: Wed, 14 Sep 2022 13:22:43 -0500 Subject: [PATCH 35/91] more updates --- docker/MAQSMongoDB/docker-compose.yml | 2 +- .../maqs/nosql/MongoDBDriver.java | 13 +++++---- .../maqs/nosql/MongoDriverManager.java | 29 ++++++++++++------- .../maqs/nosql/MongoFactory.java | 29 ++----------------- .../maqs/nosql/MongoTestObject.java | 8 ++--- .../maqs/nosql/BaseMongoUnitTest.java | 2 ++ .../maqs/nosql/MongoTestObjectUnitTest.java | 2 +- 7 files changed, 36 insertions(+), 49 deletions(-) diff --git a/docker/MAQSMongoDB/docker-compose.yml b/docker/MAQSMongoDB/docker-compose.yml index 10479a005..bf458412c 100644 --- a/docker/MAQSMongoDB/docker-compose.yml +++ b/docker/MAQSMongoDB/docker-compose.yml @@ -12,7 +12,7 @@ services: image: mongo-express restart: always ports: - - 8081:8081 + - "8081:8081" links: - mongo environment: diff --git a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDBDriver.java b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDBDriver.java index 91500c3b5..b68677a51 100644 --- a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDBDriver.java +++ b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDBDriver.java @@ -50,6 +50,7 @@ public MongoDBDriver(String collectionString) { /** * Initializes a new instance of the MongoDBDriver class. + * @param clientSettings the mongo client settings * @param collectionString Name of the collection */ public MongoDBDriver(MongoClientSettings clientSettings, String databaseString, String collectionString) { @@ -104,20 +105,20 @@ public MongoDatabase getDatabase() { /** * Sets the database object. - * @param mongoClient the mongo DB client of the database * @param mongoDatabase the name of the mongo database */ - public void setDatabase(MongoClient mongoClient, String mongoDatabase) { - this.client = mongoClient; - setDatabase(mongoDatabase); + public void setDatabase(String mongoDatabase) { + this.database = this.getMongoClient().getDatabase(mongoDatabase); } /** * Sets the database object. + * @param mongoClient the mongo DB client of the database * @param mongoDatabase the name of the mongo database */ - public void setDatabase(String mongoDatabase) { - this.database = this.getMongoClient().getDatabase(mongoDatabase); + public void setDatabase(MongoClient mongoClient, String mongoDatabase) { + this.client = mongoClient; + setDatabase(mongoDatabase); } /** diff --git a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDriverManager.java b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDriverManager.java index 6bb61b984..390a23207 100644 --- a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDriverManager.java +++ b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDriverManager.java @@ -4,9 +4,11 @@ package com.cognizantsoftvision.maqs.nosql; - import com.cognizantsoftvision.maqs.base.BaseTestObject; import com.cognizantsoftvision.maqs.base.DriverManager; +import com.cognizantsoftvision.maqs.utilities.logging.LoggingConfig; +import com.cognizantsoftvision.maqs.utilities.logging.LoggingEnabled; +import com.cognizantsoftvision.maqs.utilities.logging.MessageType; import com.mongodb.client.MongoCollection; import java.util.function.Supplier; import org.bson.Document; @@ -19,7 +21,7 @@ public class MongoDriverManager extends DriverManager { /** * Cached copy of the connection driver. */ - private MongoDBDriver mongoDBDriver; + private MongoDBDriver driver; /** * Initializes a new instance of the MongoDriverManager class. @@ -48,7 +50,7 @@ public MongoDriverManager(Supplier getCollection, BaseTestObject * @param overrideDriver The new Mongo driver */ public void overrideDriver(MongoDBDriver overrideDriver) { - mongoDBDriver = overrideDriver; + driver = overrideDriver; this.setBaseDriver(new MongoDBDriver(overrideDriver.getCollection())); } @@ -59,7 +61,7 @@ public void overrideDriver(MongoDBDriver overrideDriver) { * @param collectionString Collection string to use */ public void overrideDriver(String connectionString, String databaseString, String collectionString) { - mongoDBDriver = null; + driver = null; this.overrideDriverGet(() -> MongoFactory.getCollection(connectionString, databaseString, collectionString)); } @@ -68,7 +70,7 @@ public void overrideDriver(String connectionString, String databaseString, Strin * @param overrideCollectionConnection The new collection connection */ public void overrideDriver(Supplier> overrideCollectionConnection) { - mongoDBDriver = null; + driver = null; this.overrideDriverGet(overrideCollectionConnection); } @@ -78,22 +80,29 @@ public void overrideDriver(Supplier> overrideCollectio */ public MongoDBDriver getMongoDriver() { // Create default Web Service Driver if null. - if (this.mongoDBDriver == null) { - this.mongoDBDriver = new MongoDBDriver(getBase().getCollection()); + if (this.driver == null) { + MongoCollection temp = getBase().getCollection(); + + if (LoggingConfig.getLoggingEnabledSetting() == LoggingEnabled.NO) { + this.getLogger().logMessage(MessageType.INFORMATION, "Getting Mongo driver"); + } + + this.driver = new MongoDBDriver(temp); } - return this.mongoDBDriver; + return this.driver; } protected void overrideDriverGet(Supplier> driverGet) { - this.setBaseDriver(new MongoDBDriver(driverGet.get())); + this.getMongoDriver(); } + @Override public void close() { if (!this.isDriverInitialized()) { return; } - mongoDBDriver.getMongoClient().close(); + driver.getMongoClient().close(); this.baseDriver = null; } } diff --git a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoFactory.java b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoFactory.java index c91744c75..ae34995fd 100644 --- a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoFactory.java +++ b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoFactory.java @@ -10,6 +10,7 @@ import com.mongodb.MongoClientSettings; import com.mongodb.MongoException; import com.mongodb.client.MongoClient; +import com.mongodb.client.MongoClients; import com.mongodb.client.MongoCollection; import com.mongodb.client.MongoDatabase; import org.bson.Document; @@ -40,39 +41,13 @@ public static MongoCollection getDefaultCollection() { */ public static MongoCollection getCollection( String connectionString, String databaseString, String collectionString) { - MongoDatabase database; - try (MongoClient mongoClient = create(connectionString)) { - database = mongoClient.getDatabase(databaseString); + MongoDatabase database = mongoClient.getDatabase(databaseString); return database.getCollection(collectionString); } catch (MongoClientException e) { throw new MongoClientException("connection was not created"); } catch (MongoException e) { throw new MongoException("database does not exist"); } - - } - - /** - * Get the email client using connection information from the test run configuration. - * @param databaseString the database string - * @param settings the mongoDB settings to be set - * @param collectionString the collection string - * @return The email connection - */ - public static MongoCollection getCollection(String databaseString, - String collectionString, MongoClientSettings settings) { - MongoDatabase database; - - try (MongoClient mongoClient = create(settings)) { - database = mongoClient.getDatabase(databaseString); - } catch (Exception e) { - throw new MongoException("connection was not created: " + e); - } - - if (database.getName().isEmpty()) { - throw new MongoException("connection was not created"); - } - return database.getCollection(collectionString); } } diff --git a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoTestObject.java b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoTestObject.java index 548a8953b..be1c0e454 100644 --- a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoTestObject.java +++ b/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoTestObject.java @@ -33,15 +33,15 @@ public MongoTestObject(String connectionString, String databaseString, String co /** * {@inheritDoc} */ - public MongoDBDriver getMongoDBDriver() { - return this.getMongoDBManager().getMongoDriver(); + public MongoDriverManager getMongoDBManager() { + return this.getManagerStore().getDriver(MongoDriverManager.class.getCanonicalName()); } /** * {@inheritDoc} */ - public MongoDriverManager getMongoDBManager() { - return this.getManagerStore().getDriver(MongoDriverManager.class.getCanonicalName()); + public MongoDBDriver getMongoDBDriver() { + return this.getMongoDBManager().getMongoDriver(); } /** diff --git a/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/BaseMongoUnitTest.java b/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/BaseMongoUnitTest.java index ed029a31e..c6962205a 100644 --- a/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/BaseMongoUnitTest.java +++ b/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/BaseMongoUnitTest.java @@ -18,6 +18,8 @@ public class BaseMongoUnitTest extends BaseMongoTest { */ @Test(groups = TestCategories.MONGO) public void testGetMongoDBDriver() { + this.setMongoDBDriver(new MongoDBDriver( + MongoDBConfig.getConnectionString(), MongoDBConfig.getDatabaseString(), MongoDBConfig.getCollectionString())); MongoDBDriver mongoDBDriver = this.getMongoDBDriver(); Assert.assertNotNull(mongoDBDriver, "Checking that MongoDB Driver is not null through BaseMongoTest"); diff --git a/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoTestObjectUnitTest.java b/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoTestObjectUnitTest.java index d31890e62..ab5f2132d 100644 --- a/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoTestObjectUnitTest.java +++ b/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoTestObjectUnitTest.java @@ -84,7 +84,7 @@ public void overrideWithCustomDriver() { @Test(groups = TestCategories.MONGO) public void TestMongoDBTestObjectMapCorrectly() { Assert.assertEquals(this.getTestObject().getLogger(), this.getLogger(), "Logs don't match"); - Assert.assertEquals(this.getTestObject().getPerfTimerCollection(), this.getPerfTimerCollection(), "Perf Timer Collections don't match"); + //Assert.assertEquals(this.getTestObject().getPerfTimerCollection(), this.getPerfTimerCollection(), "Perf Timer Collections don't match"); Assert.assertEquals(this.getTestObject().getMongoDBDriver(), this.getMongoDBDriver(), "Web service driver don't match"); } } From d93231a364a2babb8880f24bf6073ea6a2cc531d Mon Sep 17 00:00:00 2001 From: jredingcvs <97762469+jredingcvs@users.noreply.github.com> Date: Fri, 16 Sep 2022 15:23:21 -0500 Subject: [PATCH 36/91] manage port as quotes --- docker/MAQSMongoDB/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/MAQSMongoDB/docker-compose.yml b/docker/MAQSMongoDB/docker-compose.yml index bf458412c..10479a005 100644 --- a/docker/MAQSMongoDB/docker-compose.yml +++ b/docker/MAQSMongoDB/docker-compose.yml @@ -12,7 +12,7 @@ services: image: mongo-express restart: always ports: - - "8081:8081" + - 8081:8081 links: - mongo environment: From 2e35069a1af371fd3a4f2db39367ef883b144309 Mon Sep 17 00:00:00 2001 From: Jason Edstrom Date: Fri, 9 Dec 2022 16:38:25 -0600 Subject: [PATCH 37/91] maqs-java-4 initial sweep at rebranding --- LICENSE | 2 +- README.md | 28 +++++----- docs/MAQS_1/appium/AppiumFeatures.md | 2 +- docs/MAQS_1/appium/AppiumTestObject.md | 4 +- docs/MAQS_1/database/DatabaseBaseTest.md | 4 +- docs/MAQS_1/database/DatabaseFeatures.md | 6 +-- docs/MAQS_1/general/ManagerStore.md | 10 ++-- docs/MAQS_1/selenium/SeleniumFAQ.md | 2 +- docs/MAQS_1/webservice/WebServiceFeatures.md | 16 +++--- docs/MAQS_3/appium/AppiumFeatures.md | 4 +- docs/MAQS_3/appium/AppiumTestObject.md | 4 +- docs/MAQS_3/database/DatabaseBaseTest.md | 4 +- docs/MAQS_3/database/DatabaseFeatures.md | 6 +-- docs/MAQS_3/general/ManagerStore.md | 10 ++-- docs/MAQS_3/playwright/PlaywrightFeatures.md | 4 +- .../MAQS_3/playwright/PlaywrightTestObject.md | 4 +- docs/MAQS_3/selenium/SeleniumFAQ.md | 2 +- docs/MAQS_3/webservice/WebServiceFeatures.md | 16 +++--- maqs-accessibility/pom.xml | 6 +-- .../accessibility/AccessibilityUtilities.java | 10 ++-- .../maqs/accessibility/HtmlReporter.java | 2 +- .../maqs/accessibility/SeleniumReport.java | 2 +- .../AccessibilityHTMLUnitTest.java | 16 +++--- .../accessibility/AccessibilityUnitTest.java | 14 ++--- .../accessibility/HTMLReporterUnitTest.java | 8 +-- maqs-appium/pom.xml | 8 +-- .../github}/maqs/appium/AppiumConfig.java | 12 ++--- .../maqs/appium/AppiumDriverFactory.java | 7 +-- .../github}/maqs/appium/AppiumTestObject.java | 6 +-- .../github}/maqs/appium/AppiumUtilities.java | 12 ++--- .../github}/maqs/appium/BaseAppiumTest.java | 10 ++-- .../maqs/appium/IAppiumTestObject.java | 4 +- .../maqs/appium/MobileDriverManager.java | 10 ++-- .../maqs/appium/constants/PlatformType.java | 2 +- .../exceptions/AppiumConfigException.java | 2 +- .../maqs/appium/AppiumConfigUnitTest.java | 11 ++-- .../appium/AppiumDriverFactoryUnitTest.java | 9 ++-- .../maqs/appium/AppiumTestObjectUnitTest.java | 6 +-- .../maqs/appium/AppiumUtilitiesUnitTest.java | 16 +++--- .../maqs/appium/BaseAppiumTestUnitTest.java | 4 +- .../appium/MobileDriverManagerUnitTest.java | 4 +- maqs-base/pom.xml | 6 +-- .../github}/maqs/base/BaseExtendableTest.java | 2 +- .../github}/maqs/base/BaseGenericTest.java | 2 +- .../github}/maqs/base/BaseTest.java | 26 +++++----- .../github}/maqs/base/BaseTestObject.java | 17 +++--- .../maqs/base/ConcurrentManagerHashMap.java | 2 +- .../github}/maqs/base/DriverManager.java | 4 +- .../github}/maqs/base/IDriverManager.java | 4 +- .../github}/maqs/base/IManagerStore.java | 2 +- .../github}/maqs/base/ITestObject.java | 6 +-- .../github}/maqs/base/ManagerStore.java | 4 +- .../github}/maqs/base/TestResultContent.java | 4 +- .../exceptions/DriverDisposalException.java | 2 +- .../base/exceptions/MAQSRuntimeException.java | 2 +- .../exceptions/ManagerDisposalException.java | 2 +- .../maqs/base/BaseExtendableTestUnitTest.java | 8 +-- .../maqs/base/BaseGenericTestNGUnitTest.java | 4 +- .../maqs/base/BaseTestObjectUnitTest.java | 8 +-- .../github}/maqs/base/BaseTestUnitTest.java | 8 +-- .../ConcurrentManagerHashMapUnitTest.java | 4 +- .../maqs/base/DriverManagerUnitTest.java | 4 +- .../maqs/base/ManagerStoreUnitTest.java | 4 +- .../maqs/base/TestResultContentUnitTest.java | 4 +- maqs-cucumber/pom.xml | 6 +-- .../maqs/cucumber/BaseCucumberTestNG.java | 6 +-- .../maqs/cucumber/BaseGenericCucumber.java | 6 +-- .../maqs/cucumber/BaseSeleniumCucumber.java | 6 +-- .../maqs/cucumber/ScenarioContext.java | 2 +- .../maqs/cucumber/steps/BaseGenericStep.java | 10 ++-- .../maqs/cucumber/steps/BaseSeleniumStep.java | 8 +-- .../maqs/cucumber/steps/IBaseGenericStep.java | 6 +-- .../src/test/java/TestRunnerGeneric.java | 2 +- .../src/test/java/TestRunnerSelenium.java | 2 +- .../cucumber/BaseCucumberTestNGUnitTest.java | 12 ++--- .../cucumber/BaseGenericCucumberUnitTest.java | 8 +-- .../BaseSeleniumCucumberUnitTest.java | 8 +-- .../cucumber/ScenarioContextUnitTest.java | 4 +- .../steps/BaseGenericStepUnitTest.java | 10 ++-- .../steps/BaseSeleniumStepUnitTest.java | 10 ++-- .../DummyBaseCucumberTestNG.java | 8 +-- .../DummyBaseGenericStep.java | 4 +- .../DummyBaseSeleniumStep.java | 4 +- .../unittestpagemodel/DummyTestResult.java | 2 +- .../test/java/stepdefs/generic/BaseSteps.java | 2 +- .../java/stepdefs/selenium/SeleniumSteps.java | 2 +- .../stepdefs/selenium/SeleniumSteps2.java | 2 +- .../stepdefs/selenium/SeleniumSteps3.java | 2 +- maqs-database/config.xml | 8 +-- maqs-database/pom.xml | 8 +-- .../maqs/database/BaseDatabaseTest.java | 4 +- .../maqs/database/ConnectionFactory.java | 2 +- .../github}/maqs/database/DatabaseConfig.java | 17 +++--- .../github}/maqs/database/DatabaseDriver.java | 2 +- .../maqs/database/DatabaseDriverManager.java | 6 +-- .../database/DatabasePersistenceUnitInfo.java | 2 +- .../maqs/database/DatabaseTestObject.java | 6 +-- .../database/constants/DataProviderType.java | 2 +- .../maqs/database/providers/H2Provider.java | 2 +- .../providers/IDataSourceProvider.java | 2 +- .../database/providers/MySQLProvider.java | 2 +- .../maqs/database/providers/SQLProvider.java | 7 +-- .../database/providers/SQLiteProvider.java | 5 +- .../database/BaseDatabaseTestUnitTest.java | 4 +- .../database/ConnectionFactoryUnitTest.java | 4 +- .../maqs/database/DatabaseConfigUnitTest.java | 11 ++-- .../maqs/database/DatabaseDriverUnitTest.java | 7 ++- .../database/DatabaseTestObjectUnitTest.java | 5 +- .../constants/DataProviderTypeUnitTest.java | 6 +-- .../maqs/database/entities/OrdersEntity.java | 2 +- .../database/entities/ProductsEntity.java | 2 +- .../database/entities/SqliteMasterEntity.java | 2 +- .../maqs/database/entities/StatesEntity.java | 2 +- .../maqs/database/entities/UsersEntity.java | 2 +- .../IDataSourceProviderUnitTest.java | 6 +-- .../database/providers/SQLProviderTest.java | 4 +- .../providers/SQLiteProviderUnitTest.java | 4 +- maqs-jacoco-reporting/pom.xml | 18 +++---- maqs-playwright/pom.xml | 8 +-- .../playwright/BasePlaywrightPageModel.java | 6 +-- .../maqs/playwright/BasePlaywrightTest.java | 18 +++---- .../playwright/IPlaywrightTestObject.java | 4 +- .../github}/maqs/playwright/PageDriver.java | 2 +- .../maqs/playwright/PageDriverFactory.java | 6 +-- .../maqs/playwright/PlaywrightBrowser.java | 2 +- .../maqs/playwright/PlaywrightConfig.java | 6 +-- .../playwright/PlaywrightDriverManager.java | 10 ++-- .../playwright/PlaywrightSyncElement.java | 2 +- .../maqs/playwright/PlaywrightTestObject.java | 10 ++-- .../playwright/PageDriverFactoryUnitTest.java | 8 +-- .../maqs/playwright/PageDriverUnitTest.java | 9 ++-- .../maqs/playwright/PageObjectUnitTest.java | 8 +-- .../playwright/PlaywrightConfigUnitTest.java | 8 +-- .../PlaywrightDriverManagerUnitTest.java | 6 +-- .../PlaywrightSyncElementUnitTest.java | 9 ++-- .../playwright/pageModel/AsyncPageModel.java | 3 +- .../pageModel/ElementPageModel.java | 2 +- .../playwright/pageModel/IFramePageModel.java | 8 +-- .../maqs/playwright/pageModel/PageModel.java | 18 +++---- maqs-selenium/pom.xml | 8 +-- .../maqs/selenium/AbstractLazyElement.java | 18 +++---- .../github}/maqs/selenium/ActionBuilder.java | 4 +- .../maqs/selenium/BaseSeleniumPageModel.java | 8 +-- .../maqs/selenium/BaseSeleniumTest.java | 12 ++--- .../github}/maqs/selenium/ElementHandler.java | 12 ++--- .../github}/maqs/selenium/EventHandler.java | 6 +-- .../maqs/selenium/ISeleniumTestObject.java | 4 +- .../github}/maqs/selenium/LazyWebElement.java | 4 +- .../github}/maqs/selenium/SeleniumConfig.java | 12 ++--- .../maqs/selenium/SeleniumDriverManager.java | 16 +++--- .../maqs/selenium/SeleniumTestObject.java | 10 ++-- .../maqs/selenium/SeleniumUtilities.java | 18 +++---- .../github}/maqs/selenium/UIFind.java | 4 +- .../github}/maqs/selenium/UIWait.java | 8 +-- .../maqs/selenium/WebDriverFactory.java | 13 ++--- .../maqs/selenium/constants/BrowserType.java | 2 +- .../selenium/constants/OperatingSystem.java | 2 +- .../selenium/constants/RemoteBrowserType.java | 2 +- .../exceptions/ElementHandlerException.java | 4 +- .../exceptions/WebDriverFactoryException.java | 4 +- .../selenium/factories/FluentWaitFactory.java | 5 +- .../selenium/factories/UIFindFactory.java | 4 +- .../selenium/factories/UIWaitFactory.java | 9 ++-- .../maqs/selenium/ActionBuilderUnitTest.java | 8 +-- .../BaseSeleniumPageModelUnitTest.java | 8 +-- .../selenium/BaseSeleniumTestUnitTest.java | 4 +- .../maqs/selenium/ElementHandlerUnitTest.java | 17 +++--- .../maqs/selenium/EventHandlerUnitTest.java | 13 ++--- .../selenium/FluentWaitFactoryUnitTest.java | 10 ++-- .../maqs/selenium/LazyWebElementUnitTest.java | 18 +++---- .../maqs/selenium/SeleniumConfigUnitTest.java | 9 ++-- .../SeleniumDriverManagerUnitTest.java | 6 +-- .../selenium/SeleniumTestObjectUnitTest.java | 6 +-- .../selenium/SeleniumUtilitiesUnitTest.java | 20 +++---- .../maqs/selenium/UIFindFactoryUnitTest.java | 10 ++-- .../github}/maqs/selenium/UIFindUnitTest.java | 8 +-- .../maqs/selenium/UIWaitFactoryUnitTest.java | 8 +-- .../maqs/selenium/UIWaitForUnitTest.java | 12 ++--- .../maqs/selenium/UIWaitUntilUnitTest.java | 12 ++--- .../selenium/WebDriverFactoryUnitTest.java | 13 ++--- .../constants/OperatingSystemUnitTest.java | 6 +-- .../selenium/pageModel/AsyncPageModel.java | 6 +-- .../pageModel/AutomationPageModel.java | 12 ++--- .../selenium/pageModel/HeaderPageModel.java | 10 ++-- .../selenium/pageModel/IFramePageModel.java | 6 +-- maqs-utilities/pom.xml | 4 +- .../github}/maqs/utilities/helper/Config.java | 5 +- .../maqs/utilities/helper/ConfigSection.java | 2 +- .../maqs/utilities/helper/GenericWait.java | 7 +-- .../maqs/utilities/helper/ListProcessor.java | 2 +- .../utilities/helper/PropertyManager.java | 2 +- .../utilities/helper/StringProcessor.java | 2 +- .../maqs/utilities/helper/TestCategories.java | 2 +- .../exceptions/ExecutionFailedException.java | 2 +- .../FrameworkConfigurationException.java | 2 +- .../helper/exceptions/FunctionException.java | 2 +- .../MaqsLoggingConfigException.java | 2 +- .../helper/exceptions/TimeoutException.java | 2 +- .../helper/functionalinterfaces/Action.java | 2 +- .../maqs/utilities/logging/ConsoleLogger.java | 4 +- .../maqs/utilities/logging/FileLogger.java | 4 +- .../utilities/logging/HtmlFileLogger.java | 4 +- .../maqs/utilities/logging/IFileLogger.java | 2 +- .../utilities/logging/IHtmlFileLogger.java | 2 +- .../maqs/utilities/logging/ILogger.java | 2 +- .../maqs/utilities/logging/Logger.java | 2 +- .../maqs/utilities/logging/LoggerFactory.java | 6 +-- .../maqs/utilities/logging/LoggingConfig.java | 9 ++-- .../utilities/logging/LoggingEnabled.java | 2 +- .../maqs/utilities/logging/MessageType.java | 2 +- .../utilities/logging/TestResultType.java | 2 +- .../logging/resources/BaseHtmlModel.html | 0 .../logging/resources/embedImage.html | 0 .../logging/resources/htmlLogger.css | 0 .../logging/resources/logMessage.html | 0 .../utilities/logging/resources/modalDiv.html | 0 .../performance/IPerfTimerCollection.java | 4 +- .../performance/PerfTimerCollection.java | 6 +-- .../maqs/utilities/helper/ConfigUnitTest.java | 2 +- .../GenericWaitNotParallelUnitTest.java | 2 +- .../utilities/helper/GenericWaitUnitTest.java | 5 +- .../helper/ListProcessorUnitTest.java | 2 +- .../helper/PropertyManagerUnitTest.java | 2 +- .../helper/StringProcessorUnitTest.java | 2 +- .../maqs/utilities/logger/ConsoleCopy.java | 2 +- .../logger/ConsoleLoggerUnitTest.java | 8 +-- .../utilities/logger/FileLoggerUnitTest.java | 21 ++++---- .../logger/HtmlFileLoggerUnitTest.java | 13 ++--- .../logger/LoggerFactoryUnitTest.java | 21 ++++---- .../logger/LoggingConfigUnitTest.java | 12 +++-- .../PerfTimerCollectionUnitTest.java | 8 +-- maqs-webservices/pom.xml | 8 +-- .../maqs/webservices/BaseWebServiceTest.java | 8 +-- .../maqs/webservices/HttpClientFactory.java | 2 +- .../webservices/IWebServiceTestObject.java | 4 +- .../github}/maqs/webservices/MediaType.java | 2 +- .../maqs/webservices/WebServiceConfig.java | 6 +-- .../maqs/webservices/WebServiceDriver.java | 2 +- .../webservices/WebServiceDriverManager.java | 6 +-- .../webservices/WebServiceTestObject.java | 6 +-- .../maqs/webservices/WebServiceUtilities.java | 4 +- .../BaseWebServiceTestUnitTest.java | 4 +- .../maqs/webservices/MediaTypeUnitTest.java | 2 +- .../webservices/WebServiceConfigUnitTest.java | 4 +- .../WebServiceDriverManagerUnitTest.java | 6 +-- .../WebServiceDriverDeleteUnitTest.java | 16 +++--- .../WebServiceDriverGetUnitTest.java | 19 +++---- .../WebServiceDriverPatchUnitTest.java | 16 +++--- .../WebServiceDriverPostUnitTest.java | 16 +++--- .../WebServiceDriverPutUnitTest.java | 18 +++---- .../webservices/WebServiceDriverUnitTest.java | 4 +- .../WebServiceTestObjectUnitTest.java | 6 +-- .../WebServiceUtilitiesUnitTest.java | 7 +-- .../maqs/webservices/models/Product.java | 2 +- pom.xml | 52 +++++++++---------- 255 files changed, 861 insertions(+), 836 deletions(-) rename maqs-accessibility/src/main/java/{com/cognizantsoftvision => io/github}/maqs/accessibility/AccessibilityUtilities.java (97%) rename maqs-accessibility/src/main/java/{com/cognizantsoftvision => io/github}/maqs/accessibility/HtmlReporter.java (99%) rename maqs-accessibility/src/main/java/{com/cognizantsoftvision => io/github}/maqs/accessibility/SeleniumReport.java (98%) rename maqs-accessibility/src/test/java/{com/cognizantsoftvision => io/github}/maqs/accessibility/AccessibilityHTMLUnitTest.java (95%) rename maqs-accessibility/src/test/java/{com/cognizantsoftvision => io/github}/maqs/accessibility/AccessibilityUnitTest.java (95%) rename maqs-accessibility/src/test/java/{com/cognizantsoftvision => io/github}/maqs/accessibility/HTMLReporterUnitTest.java (98%) rename maqs-appium/src/main/java/{com/cognizantsoftvision => io/github}/maqs/appium/AppiumConfig.java (91%) rename maqs-appium/src/main/java/{com/cognizantsoftvision => io/github}/maqs/appium/AppiumDriverFactory.java (97%) rename maqs-appium/src/main/java/{com/cognizantsoftvision => io/github}/maqs/appium/AppiumTestObject.java (92%) rename maqs-appium/src/main/java/{com/cognizantsoftvision => io/github}/maqs/appium/AppiumUtilities.java (95%) rename maqs-appium/src/main/java/{com/cognizantsoftvision => io/github}/maqs/appium/BaseAppiumTest.java (87%) rename maqs-appium/src/main/java/{com/cognizantsoftvision => io/github}/maqs/appium/IAppiumTestObject.java (89%) rename maqs-appium/src/main/java/{com/cognizantsoftvision => io/github}/maqs/appium/MobileDriverManager.java (85%) rename maqs-appium/src/main/java/{com/cognizantsoftvision => io/github}/maqs/appium/constants/PlatformType.java (83%) rename maqs-appium/src/main/java/{com/cognizantsoftvision => io/github}/maqs/appium/exceptions/AppiumConfigException.java (86%) rename maqs-appium/src/test/java/{com/cognizantsoftvision => io/github}/maqs/appium/AppiumConfigUnitTest.java (94%) rename maqs-appium/src/test/java/{com/cognizantsoftvision => io/github}/maqs/appium/AppiumDriverFactoryUnitTest.java (96%) rename maqs-appium/src/test/java/{com/cognizantsoftvision => io/github}/maqs/appium/AppiumTestObjectUnitTest.java (96%) rename maqs-appium/src/test/java/{com/cognizantsoftvision => io/github}/maqs/appium/AppiumUtilitiesUnitTest.java (95%) rename maqs-appium/src/test/java/{com/cognizantsoftvision => io/github}/maqs/appium/BaseAppiumTestUnitTest.java (92%) rename maqs-appium/src/test/java/{com/cognizantsoftvision => io/github}/maqs/appium/MobileDriverManagerUnitTest.java (95%) rename maqs-base/src/main/java/{com/cognizantsoftvision => io/github}/maqs/base/BaseExtendableTest.java (96%) rename maqs-base/src/main/java/{com/cognizantsoftvision => io/github}/maqs/base/BaseGenericTest.java (92%) rename maqs-base/src/main/java/{com/cognizantsoftvision => io/github}/maqs/base/BaseTest.java (92%) rename maqs-base/src/main/java/{com/cognizantsoftvision => io/github}/maqs/base/BaseTestObject.java (93%) rename maqs-base/src/main/java/{com/cognizantsoftvision => io/github}/maqs/base/ConcurrentManagerHashMap.java (98%) rename maqs-base/src/main/java/{com/cognizantsoftvision => io/github}/maqs/base/DriverManager.java (93%) rename maqs-base/src/main/java/{com/cognizantsoftvision => io/github}/maqs/base/IDriverManager.java (82%) rename maqs-base/src/main/java/{com/cognizantsoftvision => io/github}/maqs/base/IManagerStore.java (95%) rename maqs-base/src/main/java/{com/cognizantsoftvision => io/github}/maqs/base/ITestObject.java (95%) rename maqs-base/src/main/java/{com/cognizantsoftvision => io/github}/maqs/base/ManagerStore.java (93%) rename maqs-base/src/main/java/{com/cognizantsoftvision => io/github}/maqs/base/TestResultContent.java (91%) rename maqs-base/src/main/java/{com/cognizantsoftvision => io/github}/maqs/base/exceptions/DriverDisposalException.java (88%) rename maqs-base/src/main/java/{com/cognizantsoftvision => io/github}/maqs/base/exceptions/MAQSRuntimeException.java (85%) rename maqs-base/src/main/java/{com/cognizantsoftvision => io/github}/maqs/base/exceptions/ManagerDisposalException.java (86%) rename maqs-base/src/test/java/{com/cognizantsoftvision => io/github}/maqs/base/BaseExtendableTestUnitTest.java (75%) rename maqs-base/src/test/java/{com/cognizantsoftvision => io/github}/maqs/base/BaseGenericTestNGUnitTest.java (75%) rename maqs-base/src/test/java/{com/cognizantsoftvision => io/github}/maqs/base/BaseTestObjectUnitTest.java (98%) rename maqs-base/src/test/java/{com/cognizantsoftvision => io/github}/maqs/base/BaseTestUnitTest.java (95%) rename maqs-base/src/test/java/{com/cognizantsoftvision => io/github}/maqs/base/ConcurrentManagerHashMapUnitTest.java (97%) rename maqs-base/src/test/java/{com/cognizantsoftvision => io/github}/maqs/base/DriverManagerUnitTest.java (94%) rename maqs-base/src/test/java/{com/cognizantsoftvision => io/github}/maqs/base/ManagerStoreUnitTest.java (97%) rename maqs-base/src/test/java/{com/cognizantsoftvision => io/github}/maqs/base/TestResultContentUnitTest.java (93%) rename maqs-cucumber/src/main/java/{com/cognizantsoftvision => io/github}/maqs/cucumber/BaseCucumberTestNG.java (93%) rename maqs-cucumber/src/main/java/{com/cognizantsoftvision => io/github}/maqs/cucumber/BaseGenericCucumber.java (70%) rename maqs-cucumber/src/main/java/{com/cognizantsoftvision => io/github}/maqs/cucumber/BaseSeleniumCucumber.java (69%) rename maqs-cucumber/src/main/java/{com/cognizantsoftvision => io/github}/maqs/cucumber/ScenarioContext.java (98%) rename maqs-cucumber/src/main/java/{com/cognizantsoftvision => io/github}/maqs/cucumber/steps/BaseGenericStep.java (68%) rename maqs-cucumber/src/main/java/{com/cognizantsoftvision => io/github}/maqs/cucumber/steps/BaseSeleniumStep.java (72%) rename maqs-cucumber/src/main/java/{com/cognizantsoftvision => io/github}/maqs/cucumber/steps/IBaseGenericStep.java (64%) rename maqs-cucumber/src/test/java/{com/cognizantsoftvision => io/github}/maqs/cucumber/BaseCucumberTestNGUnitTest.java (87%) rename maqs-cucumber/src/test/java/{com/cognizantsoftvision => io/github}/maqs/cucumber/BaseGenericCucumberUnitTest.java (73%) rename maqs-cucumber/src/test/java/{com/cognizantsoftvision => io/github}/maqs/cucumber/BaseSeleniumCucumberUnitTest.java (73%) rename maqs-cucumber/src/test/java/{com/cognizantsoftvision => io/github}/maqs/cucumber/ScenarioContextUnitTest.java (97%) rename maqs-cucumber/src/test/java/{com/cognizantsoftvision => io/github}/maqs/cucumber/steps/BaseGenericStepUnitTest.java (76%) rename maqs-cucumber/src/test/java/{com/cognizantsoftvision => io/github}/maqs/cucumber/steps/BaseSeleniumStepUnitTest.java (76%) rename maqs-cucumber/src/test/java/{com/cognizantsoftvision => io/github}/maqs/cucumber/unittestpagemodel/DummyBaseCucumberTestNG.java (62%) rename maqs-cucumber/src/test/java/{com/cognizantsoftvision => io/github}/maqs/cucumber/unittestpagemodel/DummyBaseGenericStep.java (59%) rename maqs-cucumber/src/test/java/{com/cognizantsoftvision => io/github}/maqs/cucumber/unittestpagemodel/DummyBaseSeleniumStep.java (59%) rename maqs-cucumber/src/test/java/{com/cognizantsoftvision => io/github}/maqs/cucumber/unittestpagemodel/DummyTestResult.java (98%) rename maqs-database/src/main/java/{com/cognizantsoftvision => io/github}/maqs/database/BaseDatabaseTest.java (93%) rename maqs-database/src/main/java/{com/cognizantsoftvision => io/github}/maqs/database/ConnectionFactory.java (98%) rename maqs-database/src/main/java/{com/cognizantsoftvision => io/github}/maqs/database/DatabaseConfig.java (90%) rename maqs-database/src/main/java/{com/cognizantsoftvision => io/github}/maqs/database/DatabaseDriver.java (97%) rename maqs-database/src/main/java/{com/cognizantsoftvision => io/github}/maqs/database/DatabaseDriverManager.java (87%) rename maqs-database/src/main/java/{com/cognizantsoftvision => io/github}/maqs/database/DatabasePersistenceUnitInfo.java (98%) rename maqs-database/src/main/java/{com/cognizantsoftvision => io/github}/maqs/database/DatabaseTestObject.java (94%) rename maqs-database/src/main/java/{com/cognizantsoftvision => io/github}/maqs/database/constants/DataProviderType.java (95%) rename maqs-database/src/main/java/{com/cognizantsoftvision => io/github}/maqs/database/providers/H2Provider.java (93%) rename maqs-database/src/main/java/{com/cognizantsoftvision => io/github}/maqs/database/providers/IDataSourceProvider.java (91%) rename maqs-database/src/main/java/{com/cognizantsoftvision => io/github}/maqs/database/providers/MySQLProvider.java (86%) rename maqs-database/src/main/java/{com/cognizantsoftvision => io/github}/maqs/database/providers/SQLProvider.java (81%) rename maqs-database/src/main/java/{com/cognizantsoftvision => io/github}/maqs/database/providers/SQLiteProvider.java (86%) rename maqs-database/src/test/java/{com/cognizantsoftvision => io/github}/maqs/database/BaseDatabaseTestUnitTest.java (89%) rename maqs-database/src/test/java/{com/cognizantsoftvision => io/github}/maqs/database/ConnectionFactoryUnitTest.java (95%) rename maqs-database/src/test/java/{com/cognizantsoftvision => io/github}/maqs/database/DatabaseConfigUnitTest.java (84%) rename maqs-database/src/test/java/{com/cognizantsoftvision => io/github}/maqs/database/DatabaseDriverUnitTest.java (93%) rename maqs-database/src/test/java/{com/cognizantsoftvision => io/github}/maqs/database/DatabaseTestObjectUnitTest.java (95%) rename maqs-database/src/test/java/{com/cognizantsoftvision => io/github}/maqs/database/constants/DataProviderTypeUnitTest.java (83%) rename maqs-database/src/test/java/{com/cognizantsoftvision => io/github}/maqs/database/entities/OrdersEntity.java (97%) rename maqs-database/src/test/java/{com/cognizantsoftvision => io/github}/maqs/database/entities/ProductsEntity.java (95%) rename maqs-database/src/test/java/{com/cognizantsoftvision => io/github}/maqs/database/entities/SqliteMasterEntity.java (97%) rename maqs-database/src/test/java/{com/cognizantsoftvision => io/github}/maqs/database/entities/StatesEntity.java (92%) rename maqs-database/src/test/java/{com/cognizantsoftvision => io/github}/maqs/database/entities/UsersEntity.java (96%) rename maqs-database/src/test/java/{com/cognizantsoftvision => io/github}/maqs/database/providers/IDataSourceProviderUnitTest.java (86%) rename maqs-database/src/test/java/{com/cognizantsoftvision => io/github}/maqs/database/providers/SQLProviderTest.java (83%) rename maqs-database/src/test/java/{com/cognizantsoftvision => io/github}/maqs/database/providers/SQLiteProviderUnitTest.java (83%) rename maqs-playwright/src/main/java/{com/cognizantsoftvision => io/github}/maqs/playwright/BasePlaywrightPageModel.java (93%) rename maqs-playwright/src/main/java/{com/cognizantsoftvision => io/github}/maqs/playwright/BasePlaywrightTest.java (89%) rename maqs-playwright/src/main/java/{com/cognizantsoftvision => io/github}/maqs/playwright/IPlaywrightTestObject.java (87%) rename maqs-playwright/src/main/java/{com/cognizantsoftvision => io/github}/maqs/playwright/PageDriver.java (99%) rename maqs-playwright/src/main/java/{com/cognizantsoftvision => io/github}/maqs/playwright/PageDriverFactory.java (97%) rename maqs-playwright/src/main/java/{com/cognizantsoftvision => io/github}/maqs/playwright/PlaywrightBrowser.java (88%) rename maqs-playwright/src/main/java/{com/cognizantsoftvision => io/github}/maqs/playwright/PlaywrightConfig.java (96%) rename maqs-playwright/src/main/java/{com/cognizantsoftvision => io/github}/maqs/playwright/PlaywrightDriverManager.java (88%) rename maqs-playwright/src/main/java/{com/cognizantsoftvision => io/github}/maqs/playwright/PlaywrightSyncElement.java (99%) rename maqs-playwright/src/main/java/{com/cognizantsoftvision => io/github}/maqs/playwright/PlaywrightTestObject.java (89%) rename maqs-playwright/src/test/java/{com/cognizantsoftvision => io/github}/maqs/playwright/PageDriverFactoryUnitTest.java (89%) rename maqs-playwright/src/test/java/{com/cognizantsoftvision => io/github}/maqs/playwright/PageDriverUnitTest.java (98%) rename maqs-playwright/src/test/java/{com/cognizantsoftvision => io/github}/maqs/playwright/PageObjectUnitTest.java (93%) rename maqs-playwright/src/test/java/{com/cognizantsoftvision => io/github}/maqs/playwright/PlaywrightConfigUnitTest.java (93%) rename maqs-playwright/src/test/java/{com/cognizantsoftvision => io/github}/maqs/playwright/PlaywrightDriverManagerUnitTest.java (92%) rename maqs-playwright/src/test/java/{com/cognizantsoftvision => io/github}/maqs/playwright/PlaywrightSyncElementUnitTest.java (98%) rename maqs-playwright/src/test/java/{com/cognizantsoftvision => io/github}/maqs/playwright/pageModel/AsyncPageModel.java (95%) rename maqs-playwright/src/test/java/{com/cognizantsoftvision => io/github}/maqs/playwright/pageModel/ElementPageModel.java (98%) rename maqs-playwright/src/test/java/{com/cognizantsoftvision => io/github}/maqs/playwright/pageModel/IFramePageModel.java (86%) rename maqs-playwright/src/test/java/{com/cognizantsoftvision => io/github}/maqs/playwright/pageModel/PageModel.java (93%) rename maqs-selenium/src/main/java/{com/cognizantsoftvision => io/github}/maqs/selenium/AbstractLazyElement.java (97%) rename maqs-selenium/src/main/java/{com/cognizantsoftvision => io/github}/maqs/selenium/ActionBuilder.java (94%) rename maqs-selenium/src/main/java/{com/cognizantsoftvision => io/github}/maqs/selenium/BaseSeleniumPageModel.java (93%) rename maqs-selenium/src/main/java/{com/cognizantsoftvision => io/github}/maqs/selenium/BaseSeleniumTest.java (85%) rename maqs-selenium/src/main/java/{com/cognizantsoftvision => io/github}/maqs/selenium/ElementHandler.java (97%) rename maqs-selenium/src/main/java/{com/cognizantsoftvision => io/github}/maqs/selenium/EventHandler.java (98%) rename maqs-selenium/src/main/java/{com/cognizantsoftvision => io/github}/maqs/selenium/ISeleniumTestObject.java (88%) rename maqs-selenium/src/main/java/{com/cognizantsoftvision => io/github}/maqs/selenium/LazyWebElement.java (96%) rename maqs-selenium/src/main/java/{com/cognizantsoftvision => io/github}/maqs/selenium/SeleniumConfig.java (94%) rename maqs-selenium/src/main/java/{com/cognizantsoftvision => io/github}/maqs/selenium/SeleniumDriverManager.java (89%) rename maqs-selenium/src/main/java/{com/cognizantsoftvision => io/github}/maqs/selenium/SeleniumTestObject.java (88%) rename maqs-selenium/src/main/java/{com/cognizantsoftvision => io/github}/maqs/selenium/SeleniumUtilities.java (94%) rename maqs-selenium/src/main/java/{com/cognizantsoftvision => io/github}/maqs/selenium/UIFind.java (98%) rename maqs-selenium/src/main/java/{com/cognizantsoftvision => io/github}/maqs/selenium/UIWait.java (99%) rename maqs-selenium/src/main/java/{com/cognizantsoftvision => io/github}/maqs/selenium/WebDriverFactory.java (96%) rename maqs-selenium/src/main/java/{com/cognizantsoftvision => io/github}/maqs/selenium/constants/BrowserType.java (90%) rename maqs-selenium/src/main/java/{com/cognizantsoftvision => io/github}/maqs/selenium/constants/OperatingSystem.java (97%) rename maqs-selenium/src/main/java/{com/cognizantsoftvision => io/github}/maqs/selenium/constants/RemoteBrowserType.java (87%) rename maqs-selenium/src/main/java/{com/cognizantsoftvision => io/github}/maqs/selenium/exceptions/ElementHandlerException.java (83%) rename maqs-selenium/src/main/java/{com/cognizantsoftvision => io/github}/maqs/selenium/exceptions/WebDriverFactoryException.java (77%) rename maqs-selenium/src/main/java/{com/cognizantsoftvision => io/github}/maqs/selenium/factories/FluentWaitFactory.java (92%) rename maqs-selenium/src/main/java/{com/cognizantsoftvision => io/github}/maqs/selenium/factories/UIFindFactory.java (84%) rename maqs-selenium/src/main/java/{com/cognizantsoftvision => io/github}/maqs/selenium/factories/UIWaitFactory.java (93%) rename maqs-selenium/src/test/java/{com/cognizantsoftvision => io/github}/maqs/selenium/ActionBuilderUnitTest.java (92%) rename maqs-selenium/src/test/java/{com/cognizantsoftvision => io/github}/maqs/selenium/BaseSeleniumPageModelUnitTest.java (96%) rename maqs-selenium/src/test/java/{com/cognizantsoftvision => io/github}/maqs/selenium/BaseSeleniumTestUnitTest.java (95%) rename maqs-selenium/src/test/java/{com/cognizantsoftvision => io/github}/maqs/selenium/ElementHandlerUnitTest.java (96%) rename maqs-selenium/src/test/java/{com/cognizantsoftvision => io/github}/maqs/selenium/EventHandlerUnitTest.java (97%) rename maqs-selenium/src/test/java/{com/cognizantsoftvision => io/github}/maqs/selenium/FluentWaitFactoryUnitTest.java (77%) rename maqs-selenium/src/test/java/{com/cognizantsoftvision => io/github}/maqs/selenium/LazyWebElementUnitTest.java (97%) rename maqs-selenium/src/test/java/{com/cognizantsoftvision => io/github}/maqs/selenium/SeleniumConfigUnitTest.java (97%) rename maqs-selenium/src/test/java/{com/cognizantsoftvision => io/github}/maqs/selenium/SeleniumDriverManagerUnitTest.java (94%) rename maqs-selenium/src/test/java/{com/cognizantsoftvision => io/github}/maqs/selenium/SeleniumTestObjectUnitTest.java (96%) rename maqs-selenium/src/test/java/{com/cognizantsoftvision => io/github}/maqs/selenium/SeleniumUtilitiesUnitTest.java (97%) rename maqs-selenium/src/test/java/{com/cognizantsoftvision => io/github}/maqs/selenium/UIFindFactoryUnitTest.java (83%) rename maqs-selenium/src/test/java/{com/cognizantsoftvision => io/github}/maqs/selenium/UIFindUnitTest.java (96%) rename maqs-selenium/src/test/java/{com/cognizantsoftvision => io/github}/maqs/selenium/UIWaitFactoryUnitTest.java (94%) rename maqs-selenium/src/test/java/{com/cognizantsoftvision => io/github}/maqs/selenium/UIWaitForUnitTest.java (96%) rename maqs-selenium/src/test/java/{com/cognizantsoftvision => io/github}/maqs/selenium/UIWaitUntilUnitTest.java (96%) rename maqs-selenium/src/test/java/{com/cognizantsoftvision => io/github}/maqs/selenium/WebDriverFactoryUnitTest.java (96%) rename maqs-selenium/src/test/java/{com/cognizantsoftvision => io/github}/maqs/selenium/constants/OperatingSystemUnitTest.java (94%) rename maqs-selenium/src/test/java/{com/cognizantsoftvision => io/github}/maqs/selenium/pageModel/AsyncPageModel.java (84%) rename maqs-selenium/src/test/java/{com/cognizantsoftvision => io/github}/maqs/selenium/pageModel/AutomationPageModel.java (91%) rename maqs-selenium/src/test/java/{com/cognizantsoftvision => io/github}/maqs/selenium/pageModel/HeaderPageModel.java (84%) rename maqs-selenium/src/test/java/{com/cognizantsoftvision => io/github}/maqs/selenium/pageModel/IFramePageModel.java (79%) rename maqs-utilities/src/main/java/{com/cognizantsoftvision => io/github}/maqs/utilities/helper/Config.java (98%) rename maqs-utilities/src/main/java/{com/cognizantsoftvision => io/github}/maqs/utilities/helper/ConfigSection.java (95%) rename maqs-utilities/src/main/java/{com/cognizantsoftvision => io/github}/maqs/utilities/helper/GenericWait.java (98%) rename maqs-utilities/src/main/java/{com/cognizantsoftvision => io/github}/maqs/utilities/helper/ListProcessor.java (98%) rename maqs-utilities/src/main/java/{com/cognizantsoftvision => io/github}/maqs/utilities/helper/PropertyManager.java (94%) rename maqs-utilities/src/main/java/{com/cognizantsoftvision => io/github}/maqs/utilities/helper/StringProcessor.java (94%) rename maqs-utilities/src/main/java/{com/cognizantsoftvision => io/github}/maqs/utilities/helper/TestCategories.java (96%) rename maqs-utilities/src/main/java/{com/cognizantsoftvision => io/github}/maqs/utilities/helper/exceptions/ExecutionFailedException.java (90%) rename maqs-utilities/src/main/java/{com/cognizantsoftvision => io/github}/maqs/utilities/helper/exceptions/FrameworkConfigurationException.java (85%) rename maqs-utilities/src/main/java/{com/cognizantsoftvision => io/github}/maqs/utilities/helper/exceptions/FunctionException.java (89%) rename maqs-utilities/src/main/java/{com/cognizantsoftvision => io/github}/maqs/utilities/helper/exceptions/MaqsLoggingConfigException.java (86%) rename maqs-utilities/src/main/java/{com/cognizantsoftvision => io/github}/maqs/utilities/helper/exceptions/TimeoutException.java (92%) rename maqs-utilities/src/main/java/{com/cognizantsoftvision => io/github}/maqs/utilities/helper/functionalinterfaces/Action.java (78%) rename maqs-utilities/src/main/java/{com/cognizantsoftvision => io/github}/maqs/utilities/logging/ConsoleLogger.java (96%) rename maqs-utilities/src/main/java/{com/cognizantsoftvision => io/github}/maqs/utilities/logging/FileLogger.java (98%) rename maqs-utilities/src/main/java/{com/cognizantsoftvision => io/github}/maqs/utilities/logging/HtmlFileLogger.java (98%) rename maqs-utilities/src/main/java/{com/cognizantsoftvision => io/github}/maqs/utilities/logging/IFileLogger.java (91%) rename maqs-utilities/src/main/java/{com/cognizantsoftvision => io/github}/maqs/utilities/logging/IHtmlFileLogger.java (82%) rename maqs-utilities/src/main/java/{com/cognizantsoftvision => io/github}/maqs/utilities/logging/ILogger.java (94%) rename maqs-utilities/src/main/java/{com/cognizantsoftvision => io/github}/maqs/utilities/logging/Logger.java (98%) rename maqs-utilities/src/main/java/{com/cognizantsoftvision => io/github}/maqs/utilities/logging/LoggerFactory.java (90%) rename maqs-utilities/src/main/java/{com/cognizantsoftvision => io/github}/maqs/utilities/logging/LoggingConfig.java (92%) rename maqs-utilities/src/main/java/{com/cognizantsoftvision => io/github}/maqs/utilities/logging/LoggingEnabled.java (85%) rename maqs-utilities/src/main/java/{com/cognizantsoftvision => io/github}/maqs/utilities/logging/MessageType.java (95%) rename maqs-utilities/src/main/java/{com/cognizantsoftvision => io/github}/maqs/utilities/logging/TestResultType.java (87%) rename maqs-utilities/src/main/java/{com/cognizantsoftvision => io/github}/maqs/utilities/logging/resources/BaseHtmlModel.html (100%) rename maqs-utilities/src/main/java/{com/cognizantsoftvision => io/github}/maqs/utilities/logging/resources/embedImage.html (100%) rename maqs-utilities/src/main/java/{com/cognizantsoftvision => io/github}/maqs/utilities/logging/resources/htmlLogger.css (100%) rename maqs-utilities/src/main/java/{com/cognizantsoftvision => io/github}/maqs/utilities/logging/resources/logMessage.html (100%) rename maqs-utilities/src/main/java/{com/cognizantsoftvision => io/github}/maqs/utilities/logging/resources/modalDiv.html (100%) rename maqs-utilities/src/main/java/{com/cognizantsoftvision => io/github}/maqs/utilities/performance/IPerfTimerCollection.java (80%) rename maqs-utilities/src/main/java/{com/cognizantsoftvision => io/github}/maqs/utilities/performance/PerfTimerCollection.java (87%) rename maqs-utilities/src/test/java/{com/cognizantsoftvision => io/github}/maqs/utilities/helper/ConfigUnitTest.java (98%) rename maqs-utilities/src/test/java/{com/cognizantsoftvision => io/github}/maqs/utilities/helper/GenericWaitNotParallelUnitTest.java (98%) rename maqs-utilities/src/test/java/{com/cognizantsoftvision => io/github}/maqs/utilities/helper/GenericWaitUnitTest.java (98%) rename maqs-utilities/src/test/java/{com/cognizantsoftvision => io/github}/maqs/utilities/helper/ListProcessorUnitTest.java (99%) rename maqs-utilities/src/test/java/{com/cognizantsoftvision => io/github}/maqs/utilities/helper/PropertyManagerUnitTest.java (97%) rename maqs-utilities/src/test/java/{com/cognizantsoftvision => io/github}/maqs/utilities/helper/StringProcessorUnitTest.java (97%) rename maqs-utilities/src/test/java/{com/cognizantsoftvision => io/github}/maqs/utilities/logger/ConsoleCopy.java (98%) rename maqs-utilities/src/test/java/{com/cognizantsoftvision => io/github}/maqs/utilities/logger/ConsoleLoggerUnitTest.java (90%) rename maqs-utilities/src/test/java/{com/cognizantsoftvision => io/github}/maqs/utilities/logger/FileLoggerUnitTest.java (97%) rename maqs-utilities/src/test/java/{com/cognizantsoftvision => io/github}/maqs/utilities/logger/HtmlFileLoggerUnitTest.java (98%) rename maqs-utilities/src/test/java/{com/cognizantsoftvision => io/github}/maqs/utilities/logger/LoggerFactoryUnitTest.java (76%) rename maqs-utilities/src/test/java/{com/cognizantsoftvision => io/github}/maqs/utilities/logger/LoggingConfigUnitTest.java (96%) rename maqs-utilities/src/test/java/{com/cognizantsoftvision => io/github}/maqs/utilities/performance/PerfTimerCollectionUnitTest.java (87%) rename maqs-webservices/src/main/java/{com/cognizantsoftvision => io/github}/maqs/webservices/BaseWebServiceTest.java (87%) rename maqs-webservices/src/main/java/{com/cognizantsoftvision => io/github}/maqs/webservices/HttpClientFactory.java (96%) rename maqs-webservices/src/main/java/{com/cognizantsoftvision => io/github}/maqs/webservices/IWebServiceTestObject.java (91%) rename maqs-webservices/src/main/java/{com/cognizantsoftvision => io/github}/maqs/webservices/MediaType.java (95%) rename maqs-webservices/src/main/java/{com/cognizantsoftvision => io/github}/maqs/webservices/WebServiceConfig.java (89%) rename maqs-webservices/src/main/java/{com/cognizantsoftvision => io/github}/maqs/webservices/WebServiceDriver.java (99%) rename maqs-webservices/src/main/java/{com/cognizantsoftvision => io/github}/maqs/webservices/WebServiceDriverManager.java (91%) rename maqs-webservices/src/main/java/{com/cognizantsoftvision => io/github}/maqs/webservices/WebServiceTestObject.java (94%) rename maqs-webservices/src/main/java/{com/cognizantsoftvision => io/github}/maqs/webservices/WebServiceUtilities.java (97%) rename maqs-webservices/src/test/java/{com/cognizantsoftvision => io/github}/maqs/webservices/BaseWebServiceTestUnitTest.java (92%) rename maqs-webservices/src/test/java/{com/cognizantsoftvision => io/github}/maqs/webservices/MediaTypeUnitTest.java (95%) rename maqs-webservices/src/test/java/{com/cognizantsoftvision => io/github}/maqs/webservices/WebServiceConfigUnitTest.java (92%) rename maqs-webservices/src/test/java/{com/cognizantsoftvision => io/github}/maqs/webservices/WebServiceDriverManagerUnitTest.java (95%) rename maqs-webservices/src/test/java/{com/cognizantsoftvision => io/github}/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverDeleteUnitTest.java (93%) rename maqs-webservices/src/test/java/{com/cognizantsoftvision => io/github}/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverGetUnitTest.java (94%) rename maqs-webservices/src/test/java/{com/cognizantsoftvision => io/github}/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverPatchUnitTest.java (94%) rename maqs-webservices/src/test/java/{com/cognizantsoftvision => io/github}/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverPostUnitTest.java (95%) rename maqs-webservices/src/test/java/{com/cognizantsoftvision => io/github}/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverPutUnitTest.java (94%) rename maqs-webservices/src/test/java/{com/cognizantsoftvision => io/github}/maqs/webservices/WebServiceDriverUnitTest.java (91%) rename maqs-webservices/src/test/java/{com/cognizantsoftvision => io/github}/maqs/webservices/WebServiceTestObjectUnitTest.java (96%) rename maqs-webservices/src/test/java/{com/cognizantsoftvision => io/github}/maqs/webservices/WebServiceUtilitiesUnitTest.java (97%) rename maqs-webservices/src/test/java/{com/cognizantsoftvision => io/github}/maqs/webservices/models/Product.java (97%) diff --git a/LICENSE b/LICENSE index 754c717af..d421526eb 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2022 Cognizant +Copyright (c) 2022 MAQS Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index ca8850e1c..1d4d91200 100644 --- a/README.md +++ b/README.md @@ -1,32 +1,32 @@ -![MAQS Logo](https://github.com/CognizantOpenSource/maqs-java/blob/main/docs/resources/maqsfull.png?raw=true) - -| Check | Status | -|-------|--------| -|**Pipeline**|[![MAQS Java Pipeline](https://img.shields.io/github/workflow/status/CognizantOpenSource/maqs-java/MAQS%20Java%20Pipeline?event=push&label=Build&logo=github)](https://github.com/CognizantOpenSource/maqs-java/actions/workflows/maven.yml)| -|**Code Quality**|[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=CognizantOpenSource_maqs-java&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=CognizantOpenSource_maqs-java)| -|**License**|[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://raw.githubusercontent.com/CognizantOpenSource/maqs-java/main/LICENSE)| -|**Latest Release**|Coming soon| -|**Release**|Coming soon| -|**SnapShot**|Coming soon| +![MAQS Logo](https://github.com/MAQS-Framework/maqs-java/blob/main/docs/resources/maqsfull.png?raw=true) + +| Check | Status | +|-------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +|**Pipeline**| [![MAQS Java Pipeline](https://img.shields.io/github/workflow/status/MAQS-Framework/maqs-java/MAQS%20Java%20Pipeline?event=push&label=Build&logo=github)](https://github.com/MAQS-Framework/maqs-java/actions/workflows/maven.yml) | +|**Code Quality**| [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=MAQS-Framework_maqs-java&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=MAQS-Framework_maqs-java) | +|**License**| [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://raw.githubusercontent.com/MAQS-Framework/maqs-java/main/LICENSE) | +|**Latest Release**| Coming soon | +|**Release**| Coming soon | +|**SnapShot**| Coming soon | [![Testing Powered By Sauce Labs](https://opensource.saucelabs.com/images/opensauce/powered-by-saucelabs-badge-white.png?sanitize=true "Testing Powered By Sauce Labs")](https://saucelabs.com) ## Introduction -MAQS stands for Modular Automation Quick Start - Java Edition. +MAQS stands for Modular Automation Quick Start (Java Edition). It … - is a modular test automation framework - can be used as the base for your automation project or individual pieces can be used to enhance existing frameworks - - is maintained/extended by Cognizant Softvision volunteers + - is maintained/extended by volunteers The main idea behind MAQS is to avoid **reinventing the wheel**. Most automation engagements have you doing the same basic steps to get a functioning framework implemented. Utilizing project templates, Maven, and utility libraries we are able to have a functioning framework up and running in minutes, almost entirely removing on the initial time investment on implementating an automation solution. ## Documentation -[MAQS docs](https://cognizantopensource.github.io/maqs-java//#/) +[MAQS docs](https://maqs-framework.github.io/maqs-java//#/) ## License -The MIT License (MIT) Copyright (c) 2022 Cognizant +The MIT License (MIT) Copyright (c) 2022 MAQS Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/docs/MAQS_1/appium/AppiumFeatures.md b/docs/MAQS_1/appium/AppiumFeatures.md index 2f922706a..b1f6cb175 100644 --- a/docs/MAQS_1/appium/AppiumFeatures.md +++ b/docs/MAQS_1/appium/AppiumFeatures.md @@ -51,7 +51,7 @@ Stores methods for interacting with the config.xml ```java package com.cognizantsoftvision.maqs.appium; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; +import helper.io.github.maqs.utilities.TestCategories; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/docs/MAQS_1/appium/AppiumTestObject.md b/docs/MAQS_1/appium/AppiumTestObject.md index ea8b521cb..bf5751b92 100644 --- a/docs/MAQS_1/appium/AppiumTestObject.md +++ b/docs/MAQS_1/appium/AppiumTestObject.md @@ -3,10 +3,10 @@ ## Inheritance Hierarchy ```java BaseTestObject - com.cognizantsoftvision.maqs.appium.AppiumTestObject + io.github.maqs.appium.AppiumTestObject ``` Package: com.cognizantsoftvision.maqs.appium; -Assembly: import com.cognizantsoftvision.maqs.appium.AppiumTestObject +Assembly: import io.github.maqs.appium.AppiumTestObject ## Syntax java diff --git a/docs/MAQS_1/database/DatabaseBaseTest.md b/docs/MAQS_1/database/DatabaseBaseTest.md index 864e23ec0..ed088880e 100644 --- a/docs/MAQS_1/database/DatabaseBaseTest.md +++ b/docs/MAQS_1/database/DatabaseBaseTest.md @@ -36,9 +36,9 @@ this.getTestObject().getLogger().logMessage("I am testing with MAQS"); ## Sample code ```java -import com.cognizantsoftvision.maqs.database.BaseDatabaseTest; +import io.github.maqs.database.BaseDatabaseTest; import com.cognizantsoftvision.maqs.utilites.helper.logger; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; +import helper.io.github.maqs.utilities.TestCategories; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/docs/MAQS_1/database/DatabaseFeatures.md b/docs/MAQS_1/database/DatabaseFeatures.md index f9c19dac5..456208b62 100644 --- a/docs/MAQS_1/database/DatabaseFeatures.md +++ b/docs/MAQS_1/database/DatabaseFeatures.md @@ -50,9 +50,9 @@ Gets a database connection based on configuration values ## Sample code ```java -import com.cognizantsoftvision.maqs.base.BaseGenericTest; -import com.cognizantsoftvision.maqs.database.entities.StatesEntity; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; +import io.github.maqs.base.BaseGenericTest; +import entities.io.github.maqs.database.StatesEntity; +import helper.io.github.maqs.utilities.TestCategories; import java.util.List; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/docs/MAQS_1/general/ManagerStore.md b/docs/MAQS_1/general/ManagerStore.md index fe0ae73e4..79731b76e 100644 --- a/docs/MAQS_1/general/ManagerStore.md +++ b/docs/MAQS_1/general/ManagerStore.md @@ -58,11 +58,11 @@ DatabaseDriver dbNamed = this.getManagerStore().getDriver("NAMEDB"); ```java package com.cognizantsoftvision.maqs.selenium.unittestpagemodel; -import com.cognizantsoftvision.maqs.database.DatabaseConfig; -import com.cognizantsoftvision.maqs.database.DatabaseDriver; -import com.cognizantsoftvision.maqs.database.DatabaseDriverManager; -import com.cognizantsoftvision.maqs.selenium.BaseSeleniumTest; -import com.cognizantsoftvision.maqs.selenium.SeleniumConfig; +import io.github.maqs.database.DatabaseConfig; +import io.github.maqs.database.DatabaseDriver; +import io.github.maqs.database.DatabaseDriverManager; +import io.github.maqs.selenium.BaseSeleniumTest; +import io.github.maqs.selenium.SeleniumConfig; import org.openqa.selenium.WebDriver; import org.testng.Assert; import org.testng.annotations.BeforeTest; diff --git a/docs/MAQS_1/selenium/SeleniumFAQ.md b/docs/MAQS_1/selenium/SeleniumFAQ.md index f231ad824..eefd9eb43 100644 --- a/docs/MAQS_1/selenium/SeleniumFAQ.md +++ b/docs/MAQS_1/selenium/SeleniumFAQ.md @@ -17,7 +17,7 @@ Find the configuration of browsers within the app.config file and define one and ## How do I fix common user errors? ### My code can't find the config class -- Make sure you've imported the Full namespace such as com.cognizantsoftvision.maqs.utilities.helper.Config +- Make sure you've imported the Full namespace such as helper.io.github.maqs.utilities.Config ### Test can't find the page element for a test, errors indicate something is wrong with Selenium - Kill the existing Chrome processes spawned and orphaned from the test kick off then update Browser and start fresh ### Test fails on driver, such as Chrome diff --git a/docs/MAQS_1/webservice/WebServiceFeatures.md b/docs/MAQS_1/webservice/WebServiceFeatures.md index 210bd1aea..dc02183de 100644 --- a/docs/MAQS_1/webservice/WebServiceFeatures.md +++ b/docs/MAQS_1/webservice/WebServiceFeatures.md @@ -41,14 +41,14 @@ this.getTestObject().getLog().logMessage("I am testing with MAQS"); ```java package com.cognizantsoftvision.maqs.webservices; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; -import com.cognizantsoftvision.maqs.webservices.BaseWebServiceTest; -import com.cognizantsoftvision.maqs.webservices.HttpClientFactory; -import com.cognizantsoftvision.maqs.webservices.MediaType; -import com.cognizantsoftvision.maqs.webservices.WebServiceConfig; -import com.cognizantsoftvision.maqs.webservices.WebServiceDriver; -import com.cognizantsoftvision.maqs.webservices.WebServiceUtilities; -import com.cognizantsoftvision.maqs.webservices.models.Product; +import helper.io.github.maqs.utilities.TestCategories; +import io.github.maqs.webservices.BaseWebServiceTest; +import io.github.maqs.webservices.HttpClientFactory; +import io.github.maqs.webservices.MediaType; +import io.github.maqs.webservices.WebServiceConfig; +import io.github.maqs.webservices.WebServiceDriver; +import io.github.maqs.webservices.WebServiceUtilities; +import models.io.github.maqs.webservices.Product; import java.io.IOException; import java.net.http.HttpResponse; import org.springframework.http.HttpStatus; diff --git a/docs/MAQS_3/appium/AppiumFeatures.md b/docs/MAQS_3/appium/AppiumFeatures.md index d623998cb..7675c9f40 100644 --- a/docs/MAQS_3/appium/AppiumFeatures.md +++ b/docs/MAQS_3/appium/AppiumFeatures.md @@ -51,8 +51,8 @@ Stores methods for interacting with the config.xml ```java package com.COMPANY.TESTING; -import com.cognizantsoftvision.maqs.appium.BaseAppiumTest; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; +import io.github.maqs.appium.BaseAppiumTest; +import helper.io.github.maqs.utilities.TestCategories; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/docs/MAQS_3/appium/AppiumTestObject.md b/docs/MAQS_3/appium/AppiumTestObject.md index ea8b521cb..bf5751b92 100644 --- a/docs/MAQS_3/appium/AppiumTestObject.md +++ b/docs/MAQS_3/appium/AppiumTestObject.md @@ -3,10 +3,10 @@ ## Inheritance Hierarchy ```java BaseTestObject - com.cognizantsoftvision.maqs.appium.AppiumTestObject + io.github.maqs.appium.AppiumTestObject ``` Package: com.cognizantsoftvision.maqs.appium; -Assembly: import com.cognizantsoftvision.maqs.appium.AppiumTestObject +Assembly: import io.github.maqs.appium.AppiumTestObject ## Syntax java diff --git a/docs/MAQS_3/database/DatabaseBaseTest.md b/docs/MAQS_3/database/DatabaseBaseTest.md index 864e23ec0..ed088880e 100644 --- a/docs/MAQS_3/database/DatabaseBaseTest.md +++ b/docs/MAQS_3/database/DatabaseBaseTest.md @@ -36,9 +36,9 @@ this.getTestObject().getLogger().logMessage("I am testing with MAQS"); ## Sample code ```java -import com.cognizantsoftvision.maqs.database.BaseDatabaseTest; +import io.github.maqs.database.BaseDatabaseTest; import com.cognizantsoftvision.maqs.utilites.helper.logger; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; +import helper.io.github.maqs.utilities.TestCategories; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/docs/MAQS_3/database/DatabaseFeatures.md b/docs/MAQS_3/database/DatabaseFeatures.md index f9c19dac5..456208b62 100644 --- a/docs/MAQS_3/database/DatabaseFeatures.md +++ b/docs/MAQS_3/database/DatabaseFeatures.md @@ -50,9 +50,9 @@ Gets a database connection based on configuration values ## Sample code ```java -import com.cognizantsoftvision.maqs.base.BaseGenericTest; -import com.cognizantsoftvision.maqs.database.entities.StatesEntity; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; +import io.github.maqs.base.BaseGenericTest; +import entities.io.github.maqs.database.StatesEntity; +import helper.io.github.maqs.utilities.TestCategories; import java.util.List; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/docs/MAQS_3/general/ManagerStore.md b/docs/MAQS_3/general/ManagerStore.md index d6099d370..ccd56f47a 100644 --- a/docs/MAQS_3/general/ManagerStore.md +++ b/docs/MAQS_3/general/ManagerStore.md @@ -58,11 +58,11 @@ DatabaseDriver dbNamed = this.getManagerStore().getDriver("NAMEDB"); ```java package com.cognizantsoftvision.maqs.selenium.unittestpagemodel; -import com.cognizantsoftvision.maqs.database.DatabaseConfig; -import com.cognizantsoftvision.maqs.database.DatabaseDriver; -import com.cognizantsoftvision.maqs.database.DatabaseDriverManager; -import com.cognizantsoftvision.maqs.selenium.BaseSeleniumTest; -import com.cognizantsoftvision.maqs.selenium.SeleniumConfig; +import io.github.maqs.database.DatabaseConfig; +import io.github.maqs.database.DatabaseDriver; +import io.github.maqs.database.DatabaseDriverManager; +import io.github.maqs.selenium.BaseSeleniumTest; +import io.github.maqs.selenium.SeleniumConfig; import org.junit.Test; import org.openqa.selenium.WebDriver; import org.testng.Assert; diff --git a/docs/MAQS_3/playwright/PlaywrightFeatures.md b/docs/MAQS_3/playwright/PlaywrightFeatures.md index 57e0e6195..aa6026adf 100644 --- a/docs/MAQS_3/playwright/PlaywrightFeatures.md +++ b/docs/MAQS_3/playwright/PlaywrightFeatures.md @@ -48,8 +48,8 @@ Stores methods for interacting with the config.xml ```java package com.COMPANY.TESTING; -import com.cognizantsoftvision.maqs.playwright.BasePlaywrightTest; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; +import io.github.maqs.playwright.BasePlaywrightTest; +import helper.io.github.maqs.utilities.TestCategories; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/docs/MAQS_3/playwright/PlaywrightTestObject.md b/docs/MAQS_3/playwright/PlaywrightTestObject.md index 5702bfedb..9cc1a50fb 100644 --- a/docs/MAQS_3/playwright/PlaywrightTestObject.md +++ b/docs/MAQS_3/playwright/PlaywrightTestObject.md @@ -3,10 +3,10 @@ ## Inheritance Hierarchy ```java BaseTestObject - com.cognizantsoftvision.maqs.playwright.PlaywrightTestObject + io.github.maqs.playwright.PlaywrightTestObject ``` Package: com.cognizantsoftvision.maqs.playwright; -Assembly: import com.cognizantsoftvision.maqs.playwright.PlaywrightTestObject +Assembly: import io.github.maqs.playwright.PlaywrightTestObject ## Syntax java diff --git a/docs/MAQS_3/selenium/SeleniumFAQ.md b/docs/MAQS_3/selenium/SeleniumFAQ.md index f231ad824..eefd9eb43 100644 --- a/docs/MAQS_3/selenium/SeleniumFAQ.md +++ b/docs/MAQS_3/selenium/SeleniumFAQ.md @@ -17,7 +17,7 @@ Find the configuration of browsers within the app.config file and define one and ## How do I fix common user errors? ### My code can't find the config class -- Make sure you've imported the Full namespace such as com.cognizantsoftvision.maqs.utilities.helper.Config +- Make sure you've imported the Full namespace such as helper.io.github.maqs.utilities.Config ### Test can't find the page element for a test, errors indicate something is wrong with Selenium - Kill the existing Chrome processes spawned and orphaned from the test kick off then update Browser and start fresh ### Test fails on driver, such as Chrome diff --git a/docs/MAQS_3/webservice/WebServiceFeatures.md b/docs/MAQS_3/webservice/WebServiceFeatures.md index 210bd1aea..dc02183de 100644 --- a/docs/MAQS_3/webservice/WebServiceFeatures.md +++ b/docs/MAQS_3/webservice/WebServiceFeatures.md @@ -41,14 +41,14 @@ this.getTestObject().getLog().logMessage("I am testing with MAQS"); ```java package com.cognizantsoftvision.maqs.webservices; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; -import com.cognizantsoftvision.maqs.webservices.BaseWebServiceTest; -import com.cognizantsoftvision.maqs.webservices.HttpClientFactory; -import com.cognizantsoftvision.maqs.webservices.MediaType; -import com.cognizantsoftvision.maqs.webservices.WebServiceConfig; -import com.cognizantsoftvision.maqs.webservices.WebServiceDriver; -import com.cognizantsoftvision.maqs.webservices.WebServiceUtilities; -import com.cognizantsoftvision.maqs.webservices.models.Product; +import helper.io.github.maqs.utilities.TestCategories; +import io.github.maqs.webservices.BaseWebServiceTest; +import io.github.maqs.webservices.HttpClientFactory; +import io.github.maqs.webservices.MediaType; +import io.github.maqs.webservices.WebServiceConfig; +import io.github.maqs.webservices.WebServiceDriver; +import io.github.maqs.webservices.WebServiceUtilities; +import models.io.github.maqs.webservices.Product; import java.io.IOException; import java.net.http.HttpResponse; import org.springframework.http.HttpStatus; diff --git a/maqs-accessibility/pom.xml b/maqs-accessibility/pom.xml index 278bc6157..da939664e 100644 --- a/maqs-accessibility/pom.xml +++ b/maqs-accessibility/pom.xml @@ -4,12 +4,12 @@ 4.0.0 - com.cognizantsoftvision.maqs + io.github.maqs maqs-java ${revision} - com.cognizantsoftvision.maqs.accessibility + io.github.maqs.accessibility maqs-accessibility ${revision} MAQS Accessibility Testing Module @@ -23,7 +23,7 @@ - com.cognizantsoftvision.maqs.selenium + io.github.maqs.selenium maqs-selenium diff --git a/maqs-accessibility/src/main/java/com/cognizantsoftvision/maqs/accessibility/AccessibilityUtilities.java b/maqs-accessibility/src/main/java/io/github/maqs/accessibility/AccessibilityUtilities.java similarity index 97% rename from maqs-accessibility/src/main/java/com/cognizantsoftvision/maqs/accessibility/AccessibilityUtilities.java rename to maqs-accessibility/src/main/java/io/github/maqs/accessibility/AccessibilityUtilities.java index 9a471eb8f..e5f68a59c 100644 --- a/maqs-accessibility/src/main/java/com/cognizantsoftvision/maqs/accessibility/AccessibilityUtilities.java +++ b/maqs-accessibility/src/main/java/io/github/maqs/accessibility/AccessibilityUtilities.java @@ -2,12 +2,12 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.accessibility; +package io.github.maqs.accessibility; -import com.cognizantsoftvision.maqs.selenium.ISeleniumTestObject; -import com.cognizantsoftvision.maqs.utilities.logging.FileLogger; -import com.cognizantsoftvision.maqs.utilities.logging.ILogger; -import com.cognizantsoftvision.maqs.utilities.logging.MessageType; +import io.github.maqs.selenium.ISeleniumTestObject; +import io.github.maqs.utilities.logging.FileLogger; +import io.github.maqs.utilities.logging.ILogger; +import io.github.maqs.utilities.logging.MessageType; import com.deque.html.axecore.results.AxeRuntimeException; import com.deque.html.axecore.results.Results; import com.deque.html.axecore.results.Rule; diff --git a/maqs-accessibility/src/main/java/com/cognizantsoftvision/maqs/accessibility/HtmlReporter.java b/maqs-accessibility/src/main/java/io/github/maqs/accessibility/HtmlReporter.java similarity index 99% rename from maqs-accessibility/src/main/java/com/cognizantsoftvision/maqs/accessibility/HtmlReporter.java rename to maqs-accessibility/src/main/java/io/github/maqs/accessibility/HtmlReporter.java index 876bed6de..747cd5f19 100644 --- a/maqs-accessibility/src/main/java/com/cognizantsoftvision/maqs/accessibility/HtmlReporter.java +++ b/maqs-accessibility/src/main/java/io/github/maqs/accessibility/HtmlReporter.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.accessibility; +package io.github.maqs.accessibility; import com.deque.html.axecore.results.Check; import com.deque.html.axecore.results.CheckedNode; diff --git a/maqs-accessibility/src/main/java/com/cognizantsoftvision/maqs/accessibility/SeleniumReport.java b/maqs-accessibility/src/main/java/io/github/maqs/accessibility/SeleniumReport.java similarity index 98% rename from maqs-accessibility/src/main/java/com/cognizantsoftvision/maqs/accessibility/SeleniumReport.java rename to maqs-accessibility/src/main/java/io/github/maqs/accessibility/SeleniumReport.java index c368d80ec..39d40088b 100644 --- a/maqs-accessibility/src/main/java/com/cognizantsoftvision/maqs/accessibility/SeleniumReport.java +++ b/maqs-accessibility/src/main/java/io/github/maqs/accessibility/SeleniumReport.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.accessibility; +package io.github.maqs.accessibility; import com.deque.html.axecore.results.Results; import com.deque.html.axecore.selenium.AxeBuilder; diff --git a/maqs-accessibility/src/test/java/com/cognizantsoftvision/maqs/accessibility/AccessibilityHTMLUnitTest.java b/maqs-accessibility/src/test/java/io/github/maqs/accessibility/AccessibilityHTMLUnitTest.java similarity index 95% rename from maqs-accessibility/src/test/java/com/cognizantsoftvision/maqs/accessibility/AccessibilityHTMLUnitTest.java rename to maqs-accessibility/src/test/java/io/github/maqs/accessibility/AccessibilityHTMLUnitTest.java index ec734fc19..db427c0df 100644 --- a/maqs-accessibility/src/test/java/com/cognizantsoftvision/maqs/accessibility/AccessibilityHTMLUnitTest.java +++ b/maqs-accessibility/src/test/java/io/github/maqs/accessibility/AccessibilityHTMLUnitTest.java @@ -2,20 +2,20 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.accessibility; +package io.github.maqs.accessibility; import com.deque.html.axecore.results.AxeRuntimeException; import com.deque.html.axecore.results.Results; import com.deque.html.axecore.selenium.AxeBuilder; import com.deque.html.axecore.selenium.ResultType; import com.fasterxml.jackson.databind.ObjectMapper; -import com.cognizantsoftvision.maqs.selenium.BaseSeleniumTest; -import com.cognizantsoftvision.maqs.selenium.LazyWebElement; -import com.cognizantsoftvision.maqs.selenium.SeleniumConfig; -import com.cognizantsoftvision.maqs.selenium.factories.UIWaitFactory; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; -import com.cognizantsoftvision.maqs.utilities.logging.FileLogger; -import com.cognizantsoftvision.maqs.utilities.logging.MessageType; +import io.github.maqs.selenium.BaseSeleniumTest; +import io.github.maqs.selenium.LazyWebElement; +import io.github.maqs.selenium.SeleniumConfig; +import io.github.maqs.selenium.factories.UIWaitFactory; +import io.github.maqs.utilities.helper.TestCategories; +import io.github.maqs.utilities.logging.FileLogger; +import io.github.maqs.utilities.logging.MessageType; import java.io.File; import java.io.FileInputStream; import java.io.IOException; diff --git a/maqs-accessibility/src/test/java/com/cognizantsoftvision/maqs/accessibility/AccessibilityUnitTest.java b/maqs-accessibility/src/test/java/io/github/maqs/accessibility/AccessibilityUnitTest.java similarity index 95% rename from maqs-accessibility/src/test/java/com/cognizantsoftvision/maqs/accessibility/AccessibilityUnitTest.java rename to maqs-accessibility/src/test/java/io/github/maqs/accessibility/AccessibilityUnitTest.java index 4750c51db..e1f2fe518 100644 --- a/maqs-accessibility/src/test/java/com/cognizantsoftvision/maqs/accessibility/AccessibilityUnitTest.java +++ b/maqs-accessibility/src/test/java/io/github/maqs/accessibility/AccessibilityUnitTest.java @@ -2,16 +2,16 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.accessibility; +package io.github.maqs.accessibility; import com.deque.html.axecore.selenium.AxeBuilder; import com.deque.html.axecore.selenium.AxeReporter; -import com.cognizantsoftvision.maqs.selenium.BaseSeleniumTest; -import com.cognizantsoftvision.maqs.selenium.SeleniumConfig; -import com.cognizantsoftvision.maqs.selenium.factories.UIWaitFactory; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; -import com.cognizantsoftvision.maqs.utilities.logging.FileLogger; -import com.cognizantsoftvision.maqs.utilities.logging.MessageType; +import io.github.maqs.selenium.BaseSeleniumTest; +import io.github.maqs.selenium.SeleniumConfig; +import io.github.maqs.selenium.factories.UIWaitFactory; +import io.github.maqs.utilities.helper.TestCategories; +import io.github.maqs.utilities.logging.FileLogger; +import io.github.maqs.utilities.logging.MessageType; import java.io.File; import java.io.IOException; import java.nio.file.Files; diff --git a/maqs-accessibility/src/test/java/com/cognizantsoftvision/maqs/accessibility/HTMLReporterUnitTest.java b/maqs-accessibility/src/test/java/io/github/maqs/accessibility/HTMLReporterUnitTest.java similarity index 98% rename from maqs-accessibility/src/test/java/com/cognizantsoftvision/maqs/accessibility/HTMLReporterUnitTest.java rename to maqs-accessibility/src/test/java/io/github/maqs/accessibility/HTMLReporterUnitTest.java index 591fb4064..b85c7807d 100644 --- a/maqs-accessibility/src/test/java/com/cognizantsoftvision/maqs/accessibility/HTMLReporterUnitTest.java +++ b/maqs-accessibility/src/test/java/io/github/maqs/accessibility/HTMLReporterUnitTest.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.accessibility; +package io.github.maqs.accessibility; import com.deque.html.axecore.axeargs.AxeRunOptions; import com.deque.html.axecore.results.Check; @@ -12,9 +12,9 @@ import com.deque.html.axecore.selenium.AxeBuilder; import com.deque.html.axecore.selenium.ResultType; import com.fasterxml.jackson.databind.ObjectMapper; -import com.cognizantsoftvision.maqs.selenium.BaseSeleniumTest; -import com.cognizantsoftvision.maqs.selenium.factories.UIWaitFactory; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; +import io.github.maqs.selenium.BaseSeleniumTest; +import io.github.maqs.selenium.factories.UIWaitFactory; +import io.github.maqs.utilities.helper.TestCategories; import java.io.File; import java.io.IOException; import java.nio.file.FileSystems; diff --git a/maqs-appium/pom.xml b/maqs-appium/pom.xml index f67bb63c4..eaa516b61 100644 --- a/maqs-appium/pom.xml +++ b/maqs-appium/pom.xml @@ -5,12 +5,12 @@ 4.0.0 - com.cognizantsoftvision.maqs + io.github.maqs maqs-java ${revision} - com.cognizantsoftvision.maqs.appium + io.github.maqs.appium maqs-appium ${revision} MAQS Appium Testing Module @@ -41,11 +41,11 @@ testng - com.cognizantsoftvision.maqs.utilities + io.github.maqs.utilities maqs-utilities - com.cognizantsoftvision.maqs.base + io.github.maqs.base maqs-base diff --git a/maqs-appium/src/main/java/com/cognizantsoftvision/maqs/appium/AppiumConfig.java b/maqs-appium/src/main/java/io/github/maqs/appium/AppiumConfig.java similarity index 91% rename from maqs-appium/src/main/java/com/cognizantsoftvision/maqs/appium/AppiumConfig.java rename to maqs-appium/src/main/java/io/github/maqs/appium/AppiumConfig.java index 7f1a719c3..b5a578a0c 100644 --- a/maqs-appium/src/main/java/com/cognizantsoftvision/maqs/appium/AppiumConfig.java +++ b/maqs-appium/src/main/java/io/github/maqs/appium/AppiumConfig.java @@ -2,13 +2,13 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.appium; +package io.github.maqs.appium; -import com.cognizantsoftvision.maqs.appium.constants.PlatformType; -import com.cognizantsoftvision.maqs.appium.exceptions.AppiumConfigException; -import com.cognizantsoftvision.maqs.utilities.helper.Config; -import com.cognizantsoftvision.maqs.utilities.helper.ConfigSection; -import com.cognizantsoftvision.maqs.utilities.helper.StringProcessor; +import io.github.maqs.appium.constants.PlatformType; +import io.github.maqs.appium.exceptions.AppiumConfigException; +import io.github.maqs.utilities.helper.Config; +import io.github.maqs.utilities.helper.ConfigSection; +import io.github.maqs.utilities.helper.StringProcessor; import java.net.MalformedURLException; import java.net.URL; import java.time.Duration; diff --git a/maqs-appium/src/main/java/com/cognizantsoftvision/maqs/appium/AppiumDriverFactory.java b/maqs-appium/src/main/java/io/github/maqs/appium/AppiumDriverFactory.java similarity index 97% rename from maqs-appium/src/main/java/com/cognizantsoftvision/maqs/appium/AppiumDriverFactory.java rename to maqs-appium/src/main/java/io/github/maqs/appium/AppiumDriverFactory.java index 6e0fc04f4..fa607f08a 100644 --- a/maqs-appium/src/main/java/com/cognizantsoftvision/maqs/appium/AppiumDriverFactory.java +++ b/maqs-appium/src/main/java/io/github/maqs/appium/AppiumDriverFactory.java @@ -2,10 +2,10 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.appium; +package io.github.maqs.appium; -import com.cognizantsoftvision.maqs.appium.constants.PlatformType; -import com.cognizantsoftvision.maqs.utilities.helper.StringProcessor; +import io.github.maqs.appium.constants.PlatformType; +import io.github.maqs.utilities.helper.StringProcessor; import io.appium.java_client.AppiumDriver; import io.appium.java_client.android.AndroidDriver; import io.appium.java_client.ios.IOSDriver; @@ -18,6 +18,7 @@ import java.util.concurrent.TimeUnit; import java.util.function.Consumer; import java.util.function.Supplier; + import org.openqa.selenium.WebDriverException; import org.openqa.selenium.WebElement; import org.openqa.selenium.remote.CapabilityType; diff --git a/maqs-appium/src/main/java/com/cognizantsoftvision/maqs/appium/AppiumTestObject.java b/maqs-appium/src/main/java/io/github/maqs/appium/AppiumTestObject.java similarity index 92% rename from maqs-appium/src/main/java/com/cognizantsoftvision/maqs/appium/AppiumTestObject.java rename to maqs-appium/src/main/java/io/github/maqs/appium/AppiumTestObject.java index 12ad526d7..978873f74 100644 --- a/maqs-appium/src/main/java/com/cognizantsoftvision/maqs/appium/AppiumTestObject.java +++ b/maqs-appium/src/main/java/io/github/maqs/appium/AppiumTestObject.java @@ -2,10 +2,10 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.appium; +package io.github.maqs.appium; -import com.cognizantsoftvision.maqs.base.BaseTestObject; -import com.cognizantsoftvision.maqs.utilities.logging.ILogger; +import io.github.maqs.base.BaseTestObject; +import io.github.maqs.utilities.logging.ILogger; import io.appium.java_client.AppiumDriver; import java.util.function.Supplier; import org.openqa.selenium.WebElement; diff --git a/maqs-appium/src/main/java/com/cognizantsoftvision/maqs/appium/AppiumUtilities.java b/maqs-appium/src/main/java/io/github/maqs/appium/AppiumUtilities.java similarity index 95% rename from maqs-appium/src/main/java/com/cognizantsoftvision/maqs/appium/AppiumUtilities.java rename to maqs-appium/src/main/java/io/github/maqs/appium/AppiumUtilities.java index 29d32b556..fac59a60e 100644 --- a/maqs-appium/src/main/java/com/cognizantsoftvision/maqs/appium/AppiumUtilities.java +++ b/maqs-appium/src/main/java/io/github/maqs/appium/AppiumUtilities.java @@ -2,13 +2,13 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.appium; +package io.github.maqs.appium; -import com.cognizantsoftvision.maqs.utilities.helper.StringProcessor; -import com.cognizantsoftvision.maqs.utilities.logging.FileLogger; -import com.cognizantsoftvision.maqs.utilities.logging.Logger; -import com.cognizantsoftvision.maqs.utilities.logging.LoggingConfig; -import com.cognizantsoftvision.maqs.utilities.logging.MessageType; +import io.github.maqs.utilities.helper.StringProcessor; +import io.github.maqs.utilities.logging.FileLogger; +import io.github.maqs.utilities.logging.Logger; +import io.github.maqs.utilities.logging.LoggingConfig; +import io.github.maqs.utilities.logging.MessageType; import io.appium.java_client.AppiumDriver; import java.io.File; import java.io.FileWriter; diff --git a/maqs-appium/src/main/java/com/cognizantsoftvision/maqs/appium/BaseAppiumTest.java b/maqs-appium/src/main/java/io/github/maqs/appium/BaseAppiumTest.java similarity index 87% rename from maqs-appium/src/main/java/com/cognizantsoftvision/maqs/appium/BaseAppiumTest.java rename to maqs-appium/src/main/java/io/github/maqs/appium/BaseAppiumTest.java index 8bc3c3f72..d159fd37e 100644 --- a/maqs-appium/src/main/java/com/cognizantsoftvision/maqs/appium/BaseAppiumTest.java +++ b/maqs-appium/src/main/java/io/github/maqs/appium/BaseAppiumTest.java @@ -2,12 +2,12 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.appium; +package io.github.maqs.appium; -import com.cognizantsoftvision.maqs.base.BaseExtendableTest; -import com.cognizantsoftvision.maqs.utilities.logging.FileLogger; -import com.cognizantsoftvision.maqs.utilities.logging.LoggingEnabled; -import com.cognizantsoftvision.maqs.utilities.logging.MessageType; +import io.github.maqs.base.BaseExtendableTest; +import io.github.maqs.utilities.logging.FileLogger; +import io.github.maqs.utilities.logging.LoggingEnabled; +import io.github.maqs.utilities.logging.MessageType; import io.appium.java_client.AppiumDriver; import org.openqa.selenium.WebElement; import org.testng.ITestResult; diff --git a/maqs-appium/src/main/java/com/cognizantsoftvision/maqs/appium/IAppiumTestObject.java b/maqs-appium/src/main/java/io/github/maqs/appium/IAppiumTestObject.java similarity index 89% rename from maqs-appium/src/main/java/com/cognizantsoftvision/maqs/appium/IAppiumTestObject.java rename to maqs-appium/src/main/java/io/github/maqs/appium/IAppiumTestObject.java index 06a0e6147..e04ae6b20 100644 --- a/maqs-appium/src/main/java/com/cognizantsoftvision/maqs/appium/IAppiumTestObject.java +++ b/maqs-appium/src/main/java/io/github/maqs/appium/IAppiumTestObject.java @@ -2,9 +2,9 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.appium; +package io.github.maqs.appium; -import com.cognizantsoftvision.maqs.base.ITestObject; +import io.github.maqs.base.ITestObject; import io.appium.java_client.AppiumDriver; import java.util.function.Supplier; import org.openqa.selenium.WebElement; diff --git a/maqs-appium/src/main/java/com/cognizantsoftvision/maqs/appium/MobileDriverManager.java b/maqs-appium/src/main/java/io/github/maqs/appium/MobileDriverManager.java similarity index 85% rename from maqs-appium/src/main/java/com/cognizantsoftvision/maqs/appium/MobileDriverManager.java rename to maqs-appium/src/main/java/io/github/maqs/appium/MobileDriverManager.java index a15426f7f..b882160c7 100644 --- a/maqs-appium/src/main/java/com/cognizantsoftvision/maqs/appium/MobileDriverManager.java +++ b/maqs-appium/src/main/java/io/github/maqs/appium/MobileDriverManager.java @@ -2,12 +2,12 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.appium; +package io.github.maqs.appium; -import com.cognizantsoftvision.maqs.base.DriverManager; -import com.cognizantsoftvision.maqs.base.ITestObject; -import com.cognizantsoftvision.maqs.utilities.helper.StringProcessor; -import com.cognizantsoftvision.maqs.utilities.logging.MessageType; +import io.github.maqs.base.DriverManager; +import io.github.maqs.base.ITestObject; +import io.github.maqs.utilities.helper.StringProcessor; +import io.github.maqs.utilities.logging.MessageType; import io.appium.java_client.AppiumDriver; import java.util.function.Supplier; import org.openqa.selenium.WebElement; diff --git a/maqs-appium/src/main/java/com/cognizantsoftvision/maqs/appium/constants/PlatformType.java b/maqs-appium/src/main/java/io/github/maqs/appium/constants/PlatformType.java similarity index 83% rename from maqs-appium/src/main/java/com/cognizantsoftvision/maqs/appium/constants/PlatformType.java rename to maqs-appium/src/main/java/io/github/maqs/appium/constants/PlatformType.java index 0a795b793..e9945a12e 100644 --- a/maqs-appium/src/main/java/com/cognizantsoftvision/maqs/appium/constants/PlatformType.java +++ b/maqs-appium/src/main/java/io/github/maqs/appium/constants/PlatformType.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.appium.constants; +package io.github.maqs.appium.constants; /** * The Platform Type enum class. diff --git a/maqs-appium/src/main/java/com/cognizantsoftvision/maqs/appium/exceptions/AppiumConfigException.java b/maqs-appium/src/main/java/io/github/maqs/appium/exceptions/AppiumConfigException.java similarity index 86% rename from maqs-appium/src/main/java/com/cognizantsoftvision/maqs/appium/exceptions/AppiumConfigException.java rename to maqs-appium/src/main/java/io/github/maqs/appium/exceptions/AppiumConfigException.java index e16e01855..a2b6d0fe5 100644 --- a/maqs-appium/src/main/java/com/cognizantsoftvision/maqs/appium/exceptions/AppiumConfigException.java +++ b/maqs-appium/src/main/java/io/github/maqs/appium/exceptions/AppiumConfigException.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.appium.exceptions; +package io.github.maqs.appium.exceptions; /** * The Appium Config Exception class. diff --git a/maqs-appium/src/test/java/com/cognizantsoftvision/maqs/appium/AppiumConfigUnitTest.java b/maqs-appium/src/test/java/io/github/maqs/appium/AppiumConfigUnitTest.java similarity index 94% rename from maqs-appium/src/test/java/com/cognizantsoftvision/maqs/appium/AppiumConfigUnitTest.java rename to maqs-appium/src/test/java/io/github/maqs/appium/AppiumConfigUnitTest.java index c8e49c132..1c66f275c 100644 --- a/maqs-appium/src/test/java/com/cognizantsoftvision/maqs/appium/AppiumConfigUnitTest.java +++ b/maqs-appium/src/test/java/io/github/maqs/appium/AppiumConfigUnitTest.java @@ -2,14 +2,15 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.appium; +package io.github.maqs.appium; -import com.cognizantsoftvision.maqs.appium.constants.PlatformType; -import com.cognizantsoftvision.maqs.utilities.helper.Config; -import com.cognizantsoftvision.maqs.utilities.helper.ConfigSection; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; +import io.github.maqs.appium.constants.PlatformType; +import io.github.maqs.utilities.helper.Config; +import io.github.maqs.utilities.helper.ConfigSection; +import io.github.maqs.utilities.helper.TestCategories; import java.util.HashMap; import java.util.Map; + import org.testng.Assert; import org.testng.annotations.Ignore; import org.testng.annotations.Test; diff --git a/maqs-appium/src/test/java/com/cognizantsoftvision/maqs/appium/AppiumDriverFactoryUnitTest.java b/maqs-appium/src/test/java/io/github/maqs/appium/AppiumDriverFactoryUnitTest.java similarity index 96% rename from maqs-appium/src/test/java/com/cognizantsoftvision/maqs/appium/AppiumDriverFactoryUnitTest.java rename to maqs-appium/src/test/java/io/github/maqs/appium/AppiumDriverFactoryUnitTest.java index 98f6b6c59..fc786009a 100644 --- a/maqs-appium/src/test/java/com/cognizantsoftvision/maqs/appium/AppiumDriverFactoryUnitTest.java +++ b/maqs-appium/src/test/java/io/github/maqs/appium/AppiumDriverFactoryUnitTest.java @@ -2,11 +2,11 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.appium; +package io.github.maqs.appium; -import com.cognizantsoftvision.maqs.appium.constants.PlatformType; -import com.cognizantsoftvision.maqs.base.BaseGenericTest; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; +import io.github.maqs.appium.constants.PlatformType; +import io.github.maqs.base.BaseGenericTest; +import io.github.maqs.utilities.helper.TestCategories; import io.appium.java_client.AppiumDriver; import io.appium.java_client.remote.MobileCapabilityType; import java.net.MalformedURLException; @@ -14,6 +14,7 @@ import java.util.Map; import java.util.function.Consumer; import java.util.function.Supplier; + import org.openqa.selenium.WebDriverException; import org.openqa.selenium.WebElement; import org.openqa.selenium.remote.DesiredCapabilities; diff --git a/maqs-appium/src/test/java/com/cognizantsoftvision/maqs/appium/AppiumTestObjectUnitTest.java b/maqs-appium/src/test/java/io/github/maqs/appium/AppiumTestObjectUnitTest.java similarity index 96% rename from maqs-appium/src/test/java/com/cognizantsoftvision/maqs/appium/AppiumTestObjectUnitTest.java rename to maqs-appium/src/test/java/io/github/maqs/appium/AppiumTestObjectUnitTest.java index 521d3ad43..b8bd7266a 100644 --- a/maqs-appium/src/test/java/com/cognizantsoftvision/maqs/appium/AppiumTestObjectUnitTest.java +++ b/maqs-appium/src/test/java/io/github/maqs/appium/AppiumTestObjectUnitTest.java @@ -2,10 +2,10 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.appium; +package io.github.maqs.appium; -import com.cognizantsoftvision.maqs.base.BaseGenericTest; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; +import io.github.maqs.base.BaseGenericTest; +import io.github.maqs.utilities.helper.TestCategories; import io.appium.java_client.AppiumDriver; import org.openqa.selenium.WebElement; import org.testng.Assert; diff --git a/maqs-appium/src/test/java/com/cognizantsoftvision/maqs/appium/AppiumUtilitiesUnitTest.java b/maqs-appium/src/test/java/io/github/maqs/appium/AppiumUtilitiesUnitTest.java similarity index 95% rename from maqs-appium/src/test/java/com/cognizantsoftvision/maqs/appium/AppiumUtilitiesUnitTest.java rename to maqs-appium/src/test/java/io/github/maqs/appium/AppiumUtilitiesUnitTest.java index fb34b07b6..aaed0b5f3 100644 --- a/maqs-appium/src/test/java/com/cognizantsoftvision/maqs/appium/AppiumUtilitiesUnitTest.java +++ b/maqs-appium/src/test/java/io/github/maqs/appium/AppiumUtilitiesUnitTest.java @@ -2,14 +2,14 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.appium; - -import com.cognizantsoftvision.maqs.base.BaseGenericTest; -import com.cognizantsoftvision.maqs.utilities.helper.StringProcessor; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; -import com.cognizantsoftvision.maqs.utilities.logging.ConsoleLogger; -import com.cognizantsoftvision.maqs.utilities.logging.FileLogger; -import com.cognizantsoftvision.maqs.utilities.logging.Logger; +package io.github.maqs.appium; + +import io.github.maqs.base.BaseGenericTest; +import io.github.maqs.utilities.helper.StringProcessor; +import io.github.maqs.utilities.helper.TestCategories; +import io.github.maqs.utilities.logging.ConsoleLogger; +import io.github.maqs.utilities.logging.FileLogger; +import io.github.maqs.utilities.logging.Logger; import io.appium.java_client.AppiumDriver; import java.io.File; import java.nio.file.Paths; diff --git a/maqs-appium/src/test/java/com/cognizantsoftvision/maqs/appium/BaseAppiumTestUnitTest.java b/maqs-appium/src/test/java/io/github/maqs/appium/BaseAppiumTestUnitTest.java similarity index 92% rename from maqs-appium/src/test/java/com/cognizantsoftvision/maqs/appium/BaseAppiumTestUnitTest.java rename to maqs-appium/src/test/java/io/github/maqs/appium/BaseAppiumTestUnitTest.java index 0328bd85c..95292c4cd 100644 --- a/maqs-appium/src/test/java/com/cognizantsoftvision/maqs/appium/BaseAppiumTestUnitTest.java +++ b/maqs-appium/src/test/java/io/github/maqs/appium/BaseAppiumTestUnitTest.java @@ -2,9 +2,9 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.appium; +package io.github.maqs.appium; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; +import io.github.maqs.utilities.helper.TestCategories; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/maqs-appium/src/test/java/com/cognizantsoftvision/maqs/appium/MobileDriverManagerUnitTest.java b/maqs-appium/src/test/java/io/github/maqs/appium/MobileDriverManagerUnitTest.java similarity index 95% rename from maqs-appium/src/test/java/com/cognizantsoftvision/maqs/appium/MobileDriverManagerUnitTest.java rename to maqs-appium/src/test/java/io/github/maqs/appium/MobileDriverManagerUnitTest.java index 1c73d8e08..84f95084d 100644 --- a/maqs-appium/src/test/java/com/cognizantsoftvision/maqs/appium/MobileDriverManagerUnitTest.java +++ b/maqs-appium/src/test/java/io/github/maqs/appium/MobileDriverManagerUnitTest.java @@ -2,9 +2,9 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.appium; +package io.github.maqs.appium; -import com.cognizantsoftvision.maqs.base.BaseGenericTest; +import io.github.maqs.base.BaseGenericTest; import io.appium.java_client.AppiumDriver; import java.util.function.Supplier; import org.openqa.selenium.WebElement; diff --git a/maqs-base/pom.xml b/maqs-base/pom.xml index 6c08f6fb6..6380da385 100644 --- a/maqs-base/pom.xml +++ b/maqs-base/pom.xml @@ -4,12 +4,12 @@ 4.0.0 - com.cognizantsoftvision.maqs + io.github.maqs maqs-java ${revision} - com.cognizantsoftvision.maqs.base + io.github.maqs.base maqs-base MAQS Base Testing Module ${revision} @@ -17,7 +17,7 @@ - com.cognizantsoftvision.maqs.utilities + io.github.maqs.utilities maqs-utilities diff --git a/maqs-base/src/main/java/com/cognizantsoftvision/maqs/base/BaseExtendableTest.java b/maqs-base/src/main/java/io/github/maqs/base/BaseExtendableTest.java similarity index 96% rename from maqs-base/src/main/java/com/cognizantsoftvision/maqs/base/BaseExtendableTest.java rename to maqs-base/src/main/java/io/github/maqs/base/BaseExtendableTest.java index dfdce783e..872ba71a4 100644 --- a/maqs-base/src/main/java/com/cognizantsoftvision/maqs/base/BaseExtendableTest.java +++ b/maqs-base/src/main/java/io/github/maqs/base/BaseExtendableTest.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.base; +package io.github.maqs.base; import java.lang.reflect.Method; import org.testng.ITestContext; diff --git a/maqs-base/src/main/java/com/cognizantsoftvision/maqs/base/BaseGenericTest.java b/maqs-base/src/main/java/io/github/maqs/base/BaseGenericTest.java similarity index 92% rename from maqs-base/src/main/java/com/cognizantsoftvision/maqs/base/BaseGenericTest.java rename to maqs-base/src/main/java/io/github/maqs/base/BaseGenericTest.java index 4efbffdd1..440a84df0 100644 --- a/maqs-base/src/main/java/com/cognizantsoftvision/maqs/base/BaseGenericTest.java +++ b/maqs-base/src/main/java/io/github/maqs/base/BaseGenericTest.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.base; +package io.github.maqs.base; import org.testng.ITestResult; diff --git a/maqs-base/src/main/java/com/cognizantsoftvision/maqs/base/BaseTest.java b/maqs-base/src/main/java/io/github/maqs/base/BaseTest.java similarity index 92% rename from maqs-base/src/main/java/com/cognizantsoftvision/maqs/base/BaseTest.java rename to maqs-base/src/main/java/io/github/maqs/base/BaseTest.java index 835ca9ae4..6186db96c 100644 --- a/maqs-base/src/main/java/com/cognizantsoftvision/maqs/base/BaseTest.java +++ b/maqs-base/src/main/java/io/github/maqs/base/BaseTest.java @@ -2,22 +2,22 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.base; +package io.github.maqs.base; import static java.lang.System.out; -import com.cognizantsoftvision.maqs.base.exceptions.MAQSRuntimeException; -import com.cognizantsoftvision.maqs.utilities.helper.StringProcessor; -import com.cognizantsoftvision.maqs.utilities.logging.ConsoleLogger; -import com.cognizantsoftvision.maqs.utilities.logging.FileLogger; -import com.cognizantsoftvision.maqs.utilities.logging.ILogger; -import com.cognizantsoftvision.maqs.utilities.logging.Logger; -import com.cognizantsoftvision.maqs.utilities.logging.LoggerFactory; -import com.cognizantsoftvision.maqs.utilities.logging.LoggingConfig; -import com.cognizantsoftvision.maqs.utilities.logging.LoggingEnabled; -import com.cognizantsoftvision.maqs.utilities.logging.MessageType; -import com.cognizantsoftvision.maqs.utilities.performance.IPerfTimerCollection; -import com.cognizantsoftvision.maqs.utilities.performance.PerfTimerCollection; +import io.github.maqs.base.exceptions.MAQSRuntimeException; +import io.github.maqs.utilities.helper.StringProcessor; +import io.github.maqs.utilities.logging.ConsoleLogger; +import io.github.maqs.utilities.logging.FileLogger; +import io.github.maqs.utilities.logging.ILogger; +import io.github.maqs.utilities.logging.Logger; +import io.github.maqs.utilities.logging.LoggerFactory; +import io.github.maqs.utilities.logging.LoggingConfig; +import io.github.maqs.utilities.logging.LoggingEnabled; +import io.github.maqs.utilities.logging.MessageType; +import io.github.maqs.utilities.performance.IPerfTimerCollection; +import io.github.maqs.utilities.performance.PerfTimerCollection; import java.lang.reflect.Method; import java.nio.file.Files; import java.nio.file.Paths; diff --git a/maqs-base/src/main/java/com/cognizantsoftvision/maqs/base/BaseTestObject.java b/maqs-base/src/main/java/io/github/maqs/base/BaseTestObject.java similarity index 93% rename from maqs-base/src/main/java/com/cognizantsoftvision/maqs/base/BaseTestObject.java rename to maqs-base/src/main/java/io/github/maqs/base/BaseTestObject.java index 862edc84c..1942931a2 100644 --- a/maqs-base/src/main/java/com/cognizantsoftvision/maqs/base/BaseTestObject.java +++ b/maqs-base/src/main/java/io/github/maqs/base/BaseTestObject.java @@ -2,14 +2,15 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.base; - -import com.cognizantsoftvision.maqs.base.exceptions.DriverDisposalException; -import com.cognizantsoftvision.maqs.utilities.helper.StringProcessor; -import com.cognizantsoftvision.maqs.utilities.logging.ILogger; -import com.cognizantsoftvision.maqs.utilities.logging.MessageType; -import com.cognizantsoftvision.maqs.utilities.performance.IPerfTimerCollection; -import com.cognizantsoftvision.maqs.utilities.performance.PerfTimerCollection; +package io.github.maqs.base; + +import io.github.maqs.base.exceptions.DriverDisposalException; +import io.github.maqs.utilities.helper.StringProcessor; +import io.github.maqs.utilities.logging.ILogger; +import io.github.maqs.utilities.logging.MessageType; +import io.github.maqs.utilities.performance.IPerfTimerCollection; +import io.github.maqs.utilities.performance.PerfTimerCollection; + import java.io.File; import java.util.ArrayList; import java.util.List; diff --git a/maqs-base/src/main/java/com/cognizantsoftvision/maqs/base/ConcurrentManagerHashMap.java b/maqs-base/src/main/java/io/github/maqs/base/ConcurrentManagerHashMap.java similarity index 98% rename from maqs-base/src/main/java/com/cognizantsoftvision/maqs/base/ConcurrentManagerHashMap.java rename to maqs-base/src/main/java/io/github/maqs/base/ConcurrentManagerHashMap.java index b3a46bbe1..f3c75fdb7 100644 --- a/maqs-base/src/main/java/com/cognizantsoftvision/maqs/base/ConcurrentManagerHashMap.java +++ b/maqs-base/src/main/java/io/github/maqs/base/ConcurrentManagerHashMap.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.base; +package io.github.maqs.base; import java.util.concurrent.ConcurrentHashMap; diff --git a/maqs-base/src/main/java/com/cognizantsoftvision/maqs/base/DriverManager.java b/maqs-base/src/main/java/io/github/maqs/base/DriverManager.java similarity index 93% rename from maqs-base/src/main/java/com/cognizantsoftvision/maqs/base/DriverManager.java rename to maqs-base/src/main/java/io/github/maqs/base/DriverManager.java index 906b02a15..886e0aacc 100644 --- a/maqs-base/src/main/java/com/cognizantsoftvision/maqs/base/DriverManager.java +++ b/maqs-base/src/main/java/io/github/maqs/base/DriverManager.java @@ -2,9 +2,9 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.base; +package io.github.maqs.base; -import com.cognizantsoftvision.maqs.utilities.logging.ILogger; +import io.github.maqs.utilities.logging.ILogger; import java.util.function.Supplier; /** diff --git a/maqs-base/src/main/java/com/cognizantsoftvision/maqs/base/IDriverManager.java b/maqs-base/src/main/java/io/github/maqs/base/IDriverManager.java similarity index 82% rename from maqs-base/src/main/java/com/cognizantsoftvision/maqs/base/IDriverManager.java rename to maqs-base/src/main/java/io/github/maqs/base/IDriverManager.java index 89fc03a1f..4af36d236 100644 --- a/maqs-base/src/main/java/com/cognizantsoftvision/maqs/base/IDriverManager.java +++ b/maqs-base/src/main/java/io/github/maqs/base/IDriverManager.java @@ -2,9 +2,9 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.base; +package io.github.maqs.base; -import com.cognizantsoftvision.maqs.utilities.logging.ILogger; +import io.github.maqs.utilities.logging.ILogger; /** * The Driver Manager interface class. diff --git a/maqs-base/src/main/java/com/cognizantsoftvision/maqs/base/IManagerStore.java b/maqs-base/src/main/java/io/github/maqs/base/IManagerStore.java similarity index 95% rename from maqs-base/src/main/java/com/cognizantsoftvision/maqs/base/IManagerStore.java rename to maqs-base/src/main/java/io/github/maqs/base/IManagerStore.java index 1920464dc..b4cf202eb 100644 --- a/maqs-base/src/main/java/com/cognizantsoftvision/maqs/base/IManagerStore.java +++ b/maqs-base/src/main/java/io/github/maqs/base/IManagerStore.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.base; +package io.github.maqs.base; /** * The Manager Dictionary interface class. diff --git a/maqs-base/src/main/java/com/cognizantsoftvision/maqs/base/ITestObject.java b/maqs-base/src/main/java/io/github/maqs/base/ITestObject.java similarity index 95% rename from maqs-base/src/main/java/com/cognizantsoftvision/maqs/base/ITestObject.java rename to maqs-base/src/main/java/io/github/maqs/base/ITestObject.java index 08dcdf8ac..a930d547a 100644 --- a/maqs-base/src/main/java/com/cognizantsoftvision/maqs/base/ITestObject.java +++ b/maqs-base/src/main/java/io/github/maqs/base/ITestObject.java @@ -2,10 +2,10 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.base; +package io.github.maqs.base; -import com.cognizantsoftvision.maqs.utilities.logging.ILogger; -import com.cognizantsoftvision.maqs.utilities.performance.IPerfTimerCollection; +import io.github.maqs.utilities.logging.ILogger; +import io.github.maqs.utilities.performance.IPerfTimerCollection; import java.util.List; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; diff --git a/maqs-base/src/main/java/com/cognizantsoftvision/maqs/base/ManagerStore.java b/maqs-base/src/main/java/io/github/maqs/base/ManagerStore.java similarity index 93% rename from maqs-base/src/main/java/com/cognizantsoftvision/maqs/base/ManagerStore.java rename to maqs-base/src/main/java/io/github/maqs/base/ManagerStore.java index a079f534a..ea7b8daf3 100644 --- a/maqs-base/src/main/java/com/cognizantsoftvision/maqs/base/ManagerStore.java +++ b/maqs-base/src/main/java/io/github/maqs/base/ManagerStore.java @@ -2,9 +2,9 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.base; +package io.github.maqs.base; -import com.cognizantsoftvision.maqs.base.exceptions.ManagerDisposalException; +import io.github.maqs.base.exceptions.ManagerDisposalException; import java.util.HashMap; import java.util.Map; diff --git a/maqs-base/src/main/java/com/cognizantsoftvision/maqs/base/TestResultContent.java b/maqs-base/src/main/java/io/github/maqs/base/TestResultContent.java similarity index 91% rename from maqs-base/src/main/java/com/cognizantsoftvision/maqs/base/TestResultContent.java rename to maqs-base/src/main/java/io/github/maqs/base/TestResultContent.java index b80b4bda7..9d514441d 100644 --- a/maqs-base/src/main/java/com/cognizantsoftvision/maqs/base/TestResultContent.java +++ b/maqs-base/src/main/java/io/github/maqs/base/TestResultContent.java @@ -2,9 +2,9 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.base; +package io.github.maqs.base; -import com.cognizantsoftvision.maqs.utilities.logging.TestResultType; +import io.github.maqs.utilities.logging.TestResultType; import org.testng.ITestResult; /** diff --git a/maqs-base/src/main/java/com/cognizantsoftvision/maqs/base/exceptions/DriverDisposalException.java b/maqs-base/src/main/java/io/github/maqs/base/exceptions/DriverDisposalException.java similarity index 88% rename from maqs-base/src/main/java/com/cognizantsoftvision/maqs/base/exceptions/DriverDisposalException.java rename to maqs-base/src/main/java/io/github/maqs/base/exceptions/DriverDisposalException.java index 057ac2e26..5debd1029 100644 --- a/maqs-base/src/main/java/com/cognizantsoftvision/maqs/base/exceptions/DriverDisposalException.java +++ b/maqs-base/src/main/java/io/github/maqs/base/exceptions/DriverDisposalException.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.base.exceptions; +package io.github.maqs.base.exceptions; /** * The type Driver disposal exception. diff --git a/maqs-base/src/main/java/com/cognizantsoftvision/maqs/base/exceptions/MAQSRuntimeException.java b/maqs-base/src/main/java/io/github/maqs/base/exceptions/MAQSRuntimeException.java similarity index 85% rename from maqs-base/src/main/java/com/cognizantsoftvision/maqs/base/exceptions/MAQSRuntimeException.java rename to maqs-base/src/main/java/io/github/maqs/base/exceptions/MAQSRuntimeException.java index 16c0884d0..32465ab18 100644 --- a/maqs-base/src/main/java/com/cognizantsoftvision/maqs/base/exceptions/MAQSRuntimeException.java +++ b/maqs-base/src/main/java/io/github/maqs/base/exceptions/MAQSRuntimeException.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.base.exceptions; +package io.github.maqs.base.exceptions; public class MAQSRuntimeException extends RuntimeException { diff --git a/maqs-base/src/main/java/com/cognizantsoftvision/maqs/base/exceptions/ManagerDisposalException.java b/maqs-base/src/main/java/io/github/maqs/base/exceptions/ManagerDisposalException.java similarity index 86% rename from maqs-base/src/main/java/com/cognizantsoftvision/maqs/base/exceptions/ManagerDisposalException.java rename to maqs-base/src/main/java/io/github/maqs/base/exceptions/ManagerDisposalException.java index 03a12a331..d854cfa9b 100644 --- a/maqs-base/src/main/java/com/cognizantsoftvision/maqs/base/exceptions/ManagerDisposalException.java +++ b/maqs-base/src/main/java/io/github/maqs/base/exceptions/ManagerDisposalException.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.base.exceptions; +package io.github.maqs.base.exceptions; /** * The type Manager disposal exception. diff --git a/maqs-base/src/test/java/com/cognizantsoftvision/maqs/base/BaseExtendableTestUnitTest.java b/maqs-base/src/test/java/io/github/maqs/base/BaseExtendableTestUnitTest.java similarity index 75% rename from maqs-base/src/test/java/com/cognizantsoftvision/maqs/base/BaseExtendableTestUnitTest.java rename to maqs-base/src/test/java/io/github/maqs/base/BaseExtendableTestUnitTest.java index 00ff4adb8..b34c0a699 100644 --- a/maqs-base/src/test/java/com/cognizantsoftvision/maqs/base/BaseExtendableTestUnitTest.java +++ b/maqs-base/src/test/java/io/github/maqs/base/BaseExtendableTestUnitTest.java @@ -1,8 +1,8 @@ -package com.cognizantsoftvision.maqs.base; +package io.github.maqs.base; -import com.cognizantsoftvision.maqs.utilities.helper.Config; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; -import com.cognizantsoftvision.maqs.utilities.logging.ConsoleLogger; +import io.github.maqs.utilities.helper.Config; +import io.github.maqs.utilities.helper.TestCategories; +import io.github.maqs.utilities.logging.ConsoleLogger; import java.util.HashMap; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/maqs-base/src/test/java/com/cognizantsoftvision/maqs/base/BaseGenericTestNGUnitTest.java b/maqs-base/src/test/java/io/github/maqs/base/BaseGenericTestNGUnitTest.java similarity index 75% rename from maqs-base/src/test/java/com/cognizantsoftvision/maqs/base/BaseGenericTestNGUnitTest.java rename to maqs-base/src/test/java/io/github/maqs/base/BaseGenericTestNGUnitTest.java index af847eb9e..67d7a0945 100644 --- a/maqs-base/src/test/java/com/cognizantsoftvision/maqs/base/BaseGenericTestNGUnitTest.java +++ b/maqs-base/src/test/java/io/github/maqs/base/BaseGenericTestNGUnitTest.java @@ -2,9 +2,9 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.base; +package io.github.maqs.base; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; +import io.github.maqs.utilities.helper.TestCategories; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/maqs-base/src/test/java/com/cognizantsoftvision/maqs/base/BaseTestObjectUnitTest.java b/maqs-base/src/test/java/io/github/maqs/base/BaseTestObjectUnitTest.java similarity index 98% rename from maqs-base/src/test/java/com/cognizantsoftvision/maqs/base/BaseTestObjectUnitTest.java rename to maqs-base/src/test/java/io/github/maqs/base/BaseTestObjectUnitTest.java index e41e0816d..b3dc9d31f 100644 --- a/maqs-base/src/test/java/com/cognizantsoftvision/maqs/base/BaseTestObjectUnitTest.java +++ b/maqs-base/src/test/java/io/github/maqs/base/BaseTestObjectUnitTest.java @@ -2,11 +2,11 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.base; +package io.github.maqs.base; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; -import com.cognizantsoftvision.maqs.utilities.logging.ILogger; -import com.cognizantsoftvision.maqs.utilities.performance.PerfTimerCollection; +import io.github.maqs.utilities.helper.TestCategories; +import io.github.maqs.utilities.logging.ILogger; +import io.github.maqs.utilities.performance.PerfTimerCollection; import java.io.File; import java.io.IOException; import java.util.concurrent.ConcurrentHashMap; diff --git a/maqs-base/src/test/java/com/cognizantsoftvision/maqs/base/BaseTestUnitTest.java b/maqs-base/src/test/java/io/github/maqs/base/BaseTestUnitTest.java similarity index 95% rename from maqs-base/src/test/java/com/cognizantsoftvision/maqs/base/BaseTestUnitTest.java rename to maqs-base/src/test/java/io/github/maqs/base/BaseTestUnitTest.java index 4d1ee9448..8c7a14213 100644 --- a/maqs-base/src/test/java/com/cognizantsoftvision/maqs/base/BaseTestUnitTest.java +++ b/maqs-base/src/test/java/io/github/maqs/base/BaseTestUnitTest.java @@ -2,11 +2,11 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.base; +package io.github.maqs.base; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; -import com.cognizantsoftvision.maqs.utilities.logging.*; -import com.cognizantsoftvision.maqs.utilities.performance.PerfTimerCollection; +import io.github.maqs.utilities.helper.TestCategories; +import io.github.maqs.utilities.logging.*; +import io.github.maqs.utilities.performance.PerfTimerCollection; import java.util.ArrayList; import org.testng.Assert; import org.testng.ITestContext; diff --git a/maqs-base/src/test/java/com/cognizantsoftvision/maqs/base/ConcurrentManagerHashMapUnitTest.java b/maqs-base/src/test/java/io/github/maqs/base/ConcurrentManagerHashMapUnitTest.java similarity index 97% rename from maqs-base/src/test/java/com/cognizantsoftvision/maqs/base/ConcurrentManagerHashMapUnitTest.java rename to maqs-base/src/test/java/io/github/maqs/base/ConcurrentManagerHashMapUnitTest.java index 137a68a43..ace51e850 100644 --- a/maqs-base/src/test/java/com/cognizantsoftvision/maqs/base/ConcurrentManagerHashMapUnitTest.java +++ b/maqs-base/src/test/java/io/github/maqs/base/ConcurrentManagerHashMapUnitTest.java @@ -2,9 +2,9 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.base; +package io.github.maqs.base; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; +import io.github.maqs.utilities.helper.TestCategories; import org.testng.Assert; import org.testng.ITestResult; import org.testng.annotations.Test; diff --git a/maqs-base/src/test/java/com/cognizantsoftvision/maqs/base/DriverManagerUnitTest.java b/maqs-base/src/test/java/io/github/maqs/base/DriverManagerUnitTest.java similarity index 94% rename from maqs-base/src/test/java/com/cognizantsoftvision/maqs/base/DriverManagerUnitTest.java rename to maqs-base/src/test/java/io/github/maqs/base/DriverManagerUnitTest.java index 8fae72222..ca3775db4 100644 --- a/maqs-base/src/test/java/com/cognizantsoftvision/maqs/base/DriverManagerUnitTest.java +++ b/maqs-base/src/test/java/io/github/maqs/base/DriverManagerUnitTest.java @@ -2,9 +2,9 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.base; +package io.github.maqs.base; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; +import io.github.maqs.utilities.helper.TestCategories; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/maqs-base/src/test/java/com/cognizantsoftvision/maqs/base/ManagerStoreUnitTest.java b/maqs-base/src/test/java/io/github/maqs/base/ManagerStoreUnitTest.java similarity index 97% rename from maqs-base/src/test/java/com/cognizantsoftvision/maqs/base/ManagerStoreUnitTest.java rename to maqs-base/src/test/java/io/github/maqs/base/ManagerStoreUnitTest.java index fdd0ec68c..a1cf39f2b 100644 --- a/maqs-base/src/test/java/com/cognizantsoftvision/maqs/base/ManagerStoreUnitTest.java +++ b/maqs-base/src/test/java/io/github/maqs/base/ManagerStoreUnitTest.java @@ -2,11 +2,11 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.base; +package io.github.maqs.base; import static org.testng.Assert.assertNotNull; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; +import io.github.maqs.utilities.helper.TestCategories; import java.util.function.Supplier; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/maqs-base/src/test/java/com/cognizantsoftvision/maqs/base/TestResultContentUnitTest.java b/maqs-base/src/test/java/io/github/maqs/base/TestResultContentUnitTest.java similarity index 93% rename from maqs-base/src/test/java/com/cognizantsoftvision/maqs/base/TestResultContentUnitTest.java rename to maqs-base/src/test/java/io/github/maqs/base/TestResultContentUnitTest.java index f9cdfd715..8574b773f 100644 --- a/maqs-base/src/test/java/com/cognizantsoftvision/maqs/base/TestResultContentUnitTest.java +++ b/maqs-base/src/test/java/io/github/maqs/base/TestResultContentUnitTest.java @@ -1,6 +1,6 @@ -package com.cognizantsoftvision.maqs.base; +package io.github.maqs.base; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; +import io.github.maqs.utilities.helper.TestCategories; import org.testng.Assert; import org.testng.ITestResult; import org.testng.annotations.Test; diff --git a/maqs-cucumber/pom.xml b/maqs-cucumber/pom.xml index 9db1f264d..0c1625409 100644 --- a/maqs-cucumber/pom.xml +++ b/maqs-cucumber/pom.xml @@ -1,12 +1,12 @@ 4.0.0 - com.cognizantsoftvision.maqs + io.github.maqs maqs-java ${revision} - com.cognizantsoftvision.maqs.cucumber + io.github.maqs.cucumber maqs-cucumber ${revision} MAQS Cucumber Module @@ -21,7 +21,7 @@ - com.cognizantsoftvision.maqs.selenium + io.github.maqs.selenium maqs-selenium diff --git a/maqs-cucumber/src/main/java/com/cognizantsoftvision/maqs/cucumber/BaseCucumberTestNG.java b/maqs-cucumber/src/main/java/io/github/maqs/cucumber/BaseCucumberTestNG.java similarity index 93% rename from maqs-cucumber/src/main/java/com/cognizantsoftvision/maqs/cucumber/BaseCucumberTestNG.java rename to maqs-cucumber/src/main/java/io/github/maqs/cucumber/BaseCucumberTestNG.java index 33f31b8e9..e00d64dc7 100644 --- a/maqs-cucumber/src/main/java/com/cognizantsoftvision/maqs/cucumber/BaseCucumberTestNG.java +++ b/maqs-cucumber/src/main/java/io/github/maqs/cucumber/BaseCucumberTestNG.java @@ -2,10 +2,10 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.cucumber; +package io.github.maqs.cucumber; -import com.cognizantsoftvision.maqs.base.BaseTest; -import com.cognizantsoftvision.maqs.utilities.logging.MessageType; +import io.github.maqs.base.BaseTest; +import io.github.maqs.utilities.logging.MessageType; import io.cucumber.testng.AbstractTestNGCucumberTests; import java.lang.reflect.Method; import org.testng.ITest; diff --git a/maqs-cucumber/src/main/java/com/cognizantsoftvision/maqs/cucumber/BaseGenericCucumber.java b/maqs-cucumber/src/main/java/io/github/maqs/cucumber/BaseGenericCucumber.java similarity index 70% rename from maqs-cucumber/src/main/java/com/cognizantsoftvision/maqs/cucumber/BaseGenericCucumber.java rename to maqs-cucumber/src/main/java/io/github/maqs/cucumber/BaseGenericCucumber.java index 165b50cf2..089e44ac1 100644 --- a/maqs-cucumber/src/main/java/com/cognizantsoftvision/maqs/cucumber/BaseGenericCucumber.java +++ b/maqs-cucumber/src/main/java/io/github/maqs/cucumber/BaseGenericCucumber.java @@ -2,10 +2,10 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.cucumber; +package io.github.maqs.cucumber; -import com.cognizantsoftvision.maqs.base.BaseGenericTest; -import com.cognizantsoftvision.maqs.base.BaseTest; +import io.github.maqs.base.BaseGenericTest; +import io.github.maqs.base.BaseTest; /** * The base generic cucumber object. diff --git a/maqs-cucumber/src/main/java/com/cognizantsoftvision/maqs/cucumber/BaseSeleniumCucumber.java b/maqs-cucumber/src/main/java/io/github/maqs/cucumber/BaseSeleniumCucumber.java similarity index 69% rename from maqs-cucumber/src/main/java/com/cognizantsoftvision/maqs/cucumber/BaseSeleniumCucumber.java rename to maqs-cucumber/src/main/java/io/github/maqs/cucumber/BaseSeleniumCucumber.java index f2ce269e4..94aad957f 100644 --- a/maqs-cucumber/src/main/java/com/cognizantsoftvision/maqs/cucumber/BaseSeleniumCucumber.java +++ b/maqs-cucumber/src/main/java/io/github/maqs/cucumber/BaseSeleniumCucumber.java @@ -2,10 +2,10 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.cucumber; +package io.github.maqs.cucumber; -import com.cognizantsoftvision.maqs.base.BaseTest; -import com.cognizantsoftvision.maqs.selenium.BaseSeleniumTest; +import io.github.maqs.base.BaseTest; +import io.github.maqs.selenium.BaseSeleniumTest; /** * The base Selenium cucumber object. diff --git a/maqs-cucumber/src/main/java/com/cognizantsoftvision/maqs/cucumber/ScenarioContext.java b/maqs-cucumber/src/main/java/io/github/maqs/cucumber/ScenarioContext.java similarity index 98% rename from maqs-cucumber/src/main/java/com/cognizantsoftvision/maqs/cucumber/ScenarioContext.java rename to maqs-cucumber/src/main/java/io/github/maqs/cucumber/ScenarioContext.java index 5fd539ce6..be82e797a 100644 --- a/maqs-cucumber/src/main/java/com/cognizantsoftvision/maqs/cucumber/ScenarioContext.java +++ b/maqs-cucumber/src/main/java/io/github/maqs/cucumber/ScenarioContext.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.cucumber; +package io.github.maqs.cucumber; import java.util.HashMap; import java.util.Map; diff --git a/maqs-cucumber/src/main/java/com/cognizantsoftvision/maqs/cucumber/steps/BaseGenericStep.java b/maqs-cucumber/src/main/java/io/github/maqs/cucumber/steps/BaseGenericStep.java similarity index 68% rename from maqs-cucumber/src/main/java/com/cognizantsoftvision/maqs/cucumber/steps/BaseGenericStep.java rename to maqs-cucumber/src/main/java/io/github/maqs/cucumber/steps/BaseGenericStep.java index 704d961f3..280d740ea 100644 --- a/maqs-cucumber/src/main/java/com/cognizantsoftvision/maqs/cucumber/steps/BaseGenericStep.java +++ b/maqs-cucumber/src/main/java/io/github/maqs/cucumber/steps/BaseGenericStep.java @@ -2,12 +2,12 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.cucumber.steps; +package io.github.maqs.cucumber.steps; -import com.cognizantsoftvision.maqs.base.BaseTest; -import com.cognizantsoftvision.maqs.base.BaseTestObject; -import com.cognizantsoftvision.maqs.cucumber.ScenarioContext; -import com.cognizantsoftvision.maqs.utilities.logging.ILogger; +import io.github.maqs.base.BaseTest; +import io.github.maqs.base.BaseTestObject; +import io.github.maqs.cucumber.ScenarioContext; +import io.github.maqs.utilities.logging.ILogger; /** * Base generic cucumber step. diff --git a/maqs-cucumber/src/main/java/com/cognizantsoftvision/maqs/cucumber/steps/BaseSeleniumStep.java b/maqs-cucumber/src/main/java/io/github/maqs/cucumber/steps/BaseSeleniumStep.java similarity index 72% rename from maqs-cucumber/src/main/java/com/cognizantsoftvision/maqs/cucumber/steps/BaseSeleniumStep.java rename to maqs-cucumber/src/main/java/io/github/maqs/cucumber/steps/BaseSeleniumStep.java index 3782d07c2..7d322bac1 100644 --- a/maqs-cucumber/src/main/java/com/cognizantsoftvision/maqs/cucumber/steps/BaseSeleniumStep.java +++ b/maqs-cucumber/src/main/java/io/github/maqs/cucumber/steps/BaseSeleniumStep.java @@ -2,11 +2,11 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.cucumber.steps; +package io.github.maqs.cucumber.steps; -import com.cognizantsoftvision.maqs.cucumber.ScenarioContext; -import com.cognizantsoftvision.maqs.selenium.BaseSeleniumTest; -import com.cognizantsoftvision.maqs.selenium.SeleniumTestObject; +import io.github.maqs.cucumber.ScenarioContext; +import io.github.maqs.selenium.BaseSeleniumTest; +import io.github.maqs.selenium.SeleniumTestObject; import org.openqa.selenium.WebDriver; /** diff --git a/maqs-cucumber/src/main/java/com/cognizantsoftvision/maqs/cucumber/steps/IBaseGenericStep.java b/maqs-cucumber/src/main/java/io/github/maqs/cucumber/steps/IBaseGenericStep.java similarity index 64% rename from maqs-cucumber/src/main/java/com/cognizantsoftvision/maqs/cucumber/steps/IBaseGenericStep.java rename to maqs-cucumber/src/main/java/io/github/maqs/cucumber/steps/IBaseGenericStep.java index 1c93544e1..645b532f3 100644 --- a/maqs-cucumber/src/main/java/com/cognizantsoftvision/maqs/cucumber/steps/IBaseGenericStep.java +++ b/maqs-cucumber/src/main/java/io/github/maqs/cucumber/steps/IBaseGenericStep.java @@ -2,10 +2,10 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.cucumber.steps; +package io.github.maqs.cucumber.steps; -import com.cognizantsoftvision.maqs.base.BaseTestObject; -import com.cognizantsoftvision.maqs.utilities.logging.ILogger; +import io.github.maqs.base.BaseTestObject; +import io.github.maqs.utilities.logging.ILogger; public interface IBaseGenericStep { diff --git a/maqs-cucumber/src/test/java/TestRunnerGeneric.java b/maqs-cucumber/src/test/java/TestRunnerGeneric.java index 1dab111c6..be9ef5b97 100644 --- a/maqs-cucumber/src/test/java/TestRunnerGeneric.java +++ b/maqs-cucumber/src/test/java/TestRunnerGeneric.java @@ -2,7 +2,7 @@ * Copyright 2021 (C) Magenic, All rights Reserved */ -import com.cognizantsoftvision.maqs.cucumber.BaseGenericCucumber; +import io.github.maqs.cucumber.BaseGenericCucumber; import io.cucumber.testng.CucumberOptions; diff --git a/maqs-cucumber/src/test/java/TestRunnerSelenium.java b/maqs-cucumber/src/test/java/TestRunnerSelenium.java index c19000cb0..a74c18d22 100644 --- a/maqs-cucumber/src/test/java/TestRunnerSelenium.java +++ b/maqs-cucumber/src/test/java/TestRunnerSelenium.java @@ -2,7 +2,7 @@ * Copyright 2021 (C) Magenic, All rights Reserved */ -import com.cognizantsoftvision.maqs.cucumber.BaseSeleniumCucumber; +import io.github.maqs.cucumber.BaseSeleniumCucumber; import io.cucumber.testng.CucumberOptions; diff --git a/maqs-cucumber/src/test/java/com/cognizantsoftvision/maqs/cucumber/BaseCucumberTestNGUnitTest.java b/maqs-cucumber/src/test/java/io/github/maqs/cucumber/BaseCucumberTestNGUnitTest.java similarity index 87% rename from maqs-cucumber/src/test/java/com/cognizantsoftvision/maqs/cucumber/BaseCucumberTestNGUnitTest.java rename to maqs-cucumber/src/test/java/io/github/maqs/cucumber/BaseCucumberTestNGUnitTest.java index f10bca7cb..09c77efd8 100644 --- a/maqs-cucumber/src/test/java/com/cognizantsoftvision/maqs/cucumber/BaseCucumberTestNGUnitTest.java +++ b/maqs-cucumber/src/test/java/io/github/maqs/cucumber/BaseCucumberTestNGUnitTest.java @@ -2,13 +2,13 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.cucumber; +package io.github.maqs.cucumber; -import com.cognizantsoftvision.maqs.base.BaseGenericTest; -import com.cognizantsoftvision.maqs.base.BaseTest; -import com.cognizantsoftvision.maqs.cucumber.unittestpagemodel.DummyBaseCucumberTestNG; -import com.cognizantsoftvision.maqs.cucumber.unittestpagemodel.DummyTestResult; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; +import io.github.maqs.base.BaseGenericTest; +import io.github.maqs.base.BaseTest; +import io.github.maqs.cucumber.unittestpagemodel.DummyBaseCucumberTestNG; +import io.github.maqs.cucumber.unittestpagemodel.DummyTestResult; +import io.github.maqs.utilities.helper.TestCategories; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/maqs-cucumber/src/test/java/com/cognizantsoftvision/maqs/cucumber/BaseGenericCucumberUnitTest.java b/maqs-cucumber/src/test/java/io/github/maqs/cucumber/BaseGenericCucumberUnitTest.java similarity index 73% rename from maqs-cucumber/src/test/java/com/cognizantsoftvision/maqs/cucumber/BaseGenericCucumberUnitTest.java rename to maqs-cucumber/src/test/java/io/github/maqs/cucumber/BaseGenericCucumberUnitTest.java index 7ccd2f3dd..8ec132d90 100644 --- a/maqs-cucumber/src/test/java/com/cognizantsoftvision/maqs/cucumber/BaseGenericCucumberUnitTest.java +++ b/maqs-cucumber/src/test/java/io/github/maqs/cucumber/BaseGenericCucumberUnitTest.java @@ -2,11 +2,11 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.cucumber; +package io.github.maqs.cucumber; -import com.cognizantsoftvision.maqs.base.BaseGenericTest; -import com.cognizantsoftvision.maqs.base.BaseTest; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; +import io.github.maqs.base.BaseGenericTest; +import io.github.maqs.base.BaseTest; +import io.github.maqs.utilities.helper.TestCategories; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/maqs-cucumber/src/test/java/com/cognizantsoftvision/maqs/cucumber/BaseSeleniumCucumberUnitTest.java b/maqs-cucumber/src/test/java/io/github/maqs/cucumber/BaseSeleniumCucumberUnitTest.java similarity index 73% rename from maqs-cucumber/src/test/java/com/cognizantsoftvision/maqs/cucumber/BaseSeleniumCucumberUnitTest.java rename to maqs-cucumber/src/test/java/io/github/maqs/cucumber/BaseSeleniumCucumberUnitTest.java index 6b11c0685..cdc032ff8 100644 --- a/maqs-cucumber/src/test/java/com/cognizantsoftvision/maqs/cucumber/BaseSeleniumCucumberUnitTest.java +++ b/maqs-cucumber/src/test/java/io/github/maqs/cucumber/BaseSeleniumCucumberUnitTest.java @@ -2,11 +2,11 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.cucumber; +package io.github.maqs.cucumber; -import com.cognizantsoftvision.maqs.base.BaseTest; -import com.cognizantsoftvision.maqs.selenium.BaseSeleniumTest; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; +import io.github.maqs.base.BaseTest; +import io.github.maqs.selenium.BaseSeleniumTest; +import io.github.maqs.utilities.helper.TestCategories; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/maqs-cucumber/src/test/java/com/cognizantsoftvision/maqs/cucumber/ScenarioContextUnitTest.java b/maqs-cucumber/src/test/java/io/github/maqs/cucumber/ScenarioContextUnitTest.java similarity index 97% rename from maqs-cucumber/src/test/java/com/cognizantsoftvision/maqs/cucumber/ScenarioContextUnitTest.java rename to maqs-cucumber/src/test/java/io/github/maqs/cucumber/ScenarioContextUnitTest.java index 5c331ff98..7a35f9f2a 100644 --- a/maqs-cucumber/src/test/java/com/cognizantsoftvision/maqs/cucumber/ScenarioContextUnitTest.java +++ b/maqs-cucumber/src/test/java/io/github/maqs/cucumber/ScenarioContextUnitTest.java @@ -2,9 +2,9 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.cucumber; +package io.github.maqs.cucumber; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; +import io.github.maqs.utilities.helper.TestCategories; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/maqs-cucumber/src/test/java/com/cognizantsoftvision/maqs/cucumber/steps/BaseGenericStepUnitTest.java b/maqs-cucumber/src/test/java/io/github/maqs/cucumber/steps/BaseGenericStepUnitTest.java similarity index 76% rename from maqs-cucumber/src/test/java/com/cognizantsoftvision/maqs/cucumber/steps/BaseGenericStepUnitTest.java rename to maqs-cucumber/src/test/java/io/github/maqs/cucumber/steps/BaseGenericStepUnitTest.java index 6d2a0d340..74f406734 100644 --- a/maqs-cucumber/src/test/java/com/cognizantsoftvision/maqs/cucumber/steps/BaseGenericStepUnitTest.java +++ b/maqs-cucumber/src/test/java/io/github/maqs/cucumber/steps/BaseGenericStepUnitTest.java @@ -2,12 +2,12 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.cucumber.steps; +package io.github.maqs.cucumber.steps; -import com.cognizantsoftvision.maqs.base.BaseGenericTest; -import com.cognizantsoftvision.maqs.cucumber.ScenarioContext; -import com.cognizantsoftvision.maqs.cucumber.unittestpagemodel.DummyBaseGenericStep; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; +import io.github.maqs.base.BaseGenericTest; +import io.github.maqs.cucumber.ScenarioContext; +import io.github.maqs.cucumber.unittestpagemodel.DummyBaseGenericStep; +import io.github.maqs.utilities.helper.TestCategories; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/maqs-cucumber/src/test/java/com/cognizantsoftvision/maqs/cucumber/steps/BaseSeleniumStepUnitTest.java b/maqs-cucumber/src/test/java/io/github/maqs/cucumber/steps/BaseSeleniumStepUnitTest.java similarity index 76% rename from maqs-cucumber/src/test/java/com/cognizantsoftvision/maqs/cucumber/steps/BaseSeleniumStepUnitTest.java rename to maqs-cucumber/src/test/java/io/github/maqs/cucumber/steps/BaseSeleniumStepUnitTest.java index 5f66f940c..b15e84ab3 100644 --- a/maqs-cucumber/src/test/java/com/cognizantsoftvision/maqs/cucumber/steps/BaseSeleniumStepUnitTest.java +++ b/maqs-cucumber/src/test/java/io/github/maqs/cucumber/steps/BaseSeleniumStepUnitTest.java @@ -2,12 +2,12 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.cucumber.steps; +package io.github.maqs.cucumber.steps; -import com.cognizantsoftvision.maqs.cucumber.ScenarioContext; -import com.cognizantsoftvision.maqs.cucumber.unittestpagemodel.DummyBaseSeleniumStep; -import com.cognizantsoftvision.maqs.selenium.BaseSeleniumTest; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; +import io.github.maqs.cucumber.ScenarioContext; +import io.github.maqs.cucumber.unittestpagemodel.DummyBaseSeleniumStep; +import io.github.maqs.selenium.BaseSeleniumTest; +import io.github.maqs.utilities.helper.TestCategories; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/maqs-cucumber/src/test/java/com/cognizantsoftvision/maqs/cucumber/unittestpagemodel/DummyBaseCucumberTestNG.java b/maqs-cucumber/src/test/java/io/github/maqs/cucumber/unittestpagemodel/DummyBaseCucumberTestNG.java similarity index 62% rename from maqs-cucumber/src/test/java/com/cognizantsoftvision/maqs/cucumber/unittestpagemodel/DummyBaseCucumberTestNG.java rename to maqs-cucumber/src/test/java/io/github/maqs/cucumber/unittestpagemodel/DummyBaseCucumberTestNG.java index 3ae0af62d..88454e4cc 100644 --- a/maqs-cucumber/src/test/java/com/cognizantsoftvision/maqs/cucumber/unittestpagemodel/DummyBaseCucumberTestNG.java +++ b/maqs-cucumber/src/test/java/io/github/maqs/cucumber/unittestpagemodel/DummyBaseCucumberTestNG.java @@ -2,11 +2,11 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.cucumber.unittestpagemodel; +package io.github.maqs.cucumber.unittestpagemodel; -import com.cognizantsoftvision.maqs.base.BaseGenericTest; -import com.cognizantsoftvision.maqs.base.BaseTest; -import com.cognizantsoftvision.maqs.cucumber.BaseCucumberTestNG; +import io.github.maqs.base.BaseGenericTest; +import io.github.maqs.base.BaseTest; +import io.github.maqs.cucumber.BaseCucumberTestNG; /** * A Dummy BaseCucumberTestNG class for testing diff --git a/maqs-cucumber/src/test/java/com/cognizantsoftvision/maqs/cucumber/unittestpagemodel/DummyBaseGenericStep.java b/maqs-cucumber/src/test/java/io/github/maqs/cucumber/unittestpagemodel/DummyBaseGenericStep.java similarity index 59% rename from maqs-cucumber/src/test/java/com/cognizantsoftvision/maqs/cucumber/unittestpagemodel/DummyBaseGenericStep.java rename to maqs-cucumber/src/test/java/io/github/maqs/cucumber/unittestpagemodel/DummyBaseGenericStep.java index 00083d161..10760d084 100644 --- a/maqs-cucumber/src/test/java/com/cognizantsoftvision/maqs/cucumber/unittestpagemodel/DummyBaseGenericStep.java +++ b/maqs-cucumber/src/test/java/io/github/maqs/cucumber/unittestpagemodel/DummyBaseGenericStep.java @@ -2,9 +2,9 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.cucumber.unittestpagemodel; +package io.github.maqs.cucumber.unittestpagemodel; -import com.cognizantsoftvision.maqs.cucumber.steps.BaseGenericStep; +import io.github.maqs.cucumber.steps.BaseGenericStep; /** * A Dummy DummyBaseGenericStep class for testing diff --git a/maqs-cucumber/src/test/java/com/cognizantsoftvision/maqs/cucumber/unittestpagemodel/DummyBaseSeleniumStep.java b/maqs-cucumber/src/test/java/io/github/maqs/cucumber/unittestpagemodel/DummyBaseSeleniumStep.java similarity index 59% rename from maqs-cucumber/src/test/java/com/cognizantsoftvision/maqs/cucumber/unittestpagemodel/DummyBaseSeleniumStep.java rename to maqs-cucumber/src/test/java/io/github/maqs/cucumber/unittestpagemodel/DummyBaseSeleniumStep.java index fc1d11b11..86a851a18 100644 --- a/maqs-cucumber/src/test/java/com/cognizantsoftvision/maqs/cucumber/unittestpagemodel/DummyBaseSeleniumStep.java +++ b/maqs-cucumber/src/test/java/io/github/maqs/cucumber/unittestpagemodel/DummyBaseSeleniumStep.java @@ -2,9 +2,9 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.cucumber.unittestpagemodel; +package io.github.maqs.cucumber.unittestpagemodel; -import com.cognizantsoftvision.maqs.cucumber.steps.BaseSeleniumStep; +import io.github.maqs.cucumber.steps.BaseSeleniumStep; /** * A Dummy DummyBaseSeleniumStep class for testing diff --git a/maqs-cucumber/src/test/java/com/cognizantsoftvision/maqs/cucumber/unittestpagemodel/DummyTestResult.java b/maqs-cucumber/src/test/java/io/github/maqs/cucumber/unittestpagemodel/DummyTestResult.java similarity index 98% rename from maqs-cucumber/src/test/java/com/cognizantsoftvision/maqs/cucumber/unittestpagemodel/DummyTestResult.java rename to maqs-cucumber/src/test/java/io/github/maqs/cucumber/unittestpagemodel/DummyTestResult.java index 619897ba7..ccb11b3b8 100644 --- a/maqs-cucumber/src/test/java/com/cognizantsoftvision/maqs/cucumber/unittestpagemodel/DummyTestResult.java +++ b/maqs-cucumber/src/test/java/io/github/maqs/cucumber/unittestpagemodel/DummyTestResult.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.cucumber.unittestpagemodel; +package io.github.maqs.cucumber.unittestpagemodel; import org.testng.IClass; import org.testng.ITestContext; diff --git a/maqs-cucumber/src/test/java/stepdefs/generic/BaseSteps.java b/maqs-cucumber/src/test/java/stepdefs/generic/BaseSteps.java index 35b93b238..532f8e53d 100644 --- a/maqs-cucumber/src/test/java/stepdefs/generic/BaseSteps.java +++ b/maqs-cucumber/src/test/java/stepdefs/generic/BaseSteps.java @@ -4,7 +4,7 @@ package stepdefs.generic; -import com.cognizantsoftvision.maqs.cucumber.steps.BaseGenericStep; +import io.github.maqs.cucumber.steps.BaseGenericStep; import io.cucumber.java.en.Given; import io.cucumber.java.en.Then; import io.cucumber.java.en.When; diff --git a/maqs-cucumber/src/test/java/stepdefs/selenium/SeleniumSteps.java b/maqs-cucumber/src/test/java/stepdefs/selenium/SeleniumSteps.java index 9e83eefd7..7f5ac4eb9 100644 --- a/maqs-cucumber/src/test/java/stepdefs/selenium/SeleniumSteps.java +++ b/maqs-cucumber/src/test/java/stepdefs/selenium/SeleniumSteps.java @@ -4,7 +4,7 @@ package stepdefs.selenium; -import com.cognizantsoftvision.maqs.cucumber.steps.BaseSeleniumStep; +import io.github.maqs.cucumber.steps.BaseSeleniumStep; import io.cucumber.java.en.Given; public class SeleniumSteps extends BaseSeleniumStep { diff --git a/maqs-cucumber/src/test/java/stepdefs/selenium/SeleniumSteps2.java b/maqs-cucumber/src/test/java/stepdefs/selenium/SeleniumSteps2.java index 9d269b3ca..2357fcdd8 100644 --- a/maqs-cucumber/src/test/java/stepdefs/selenium/SeleniumSteps2.java +++ b/maqs-cucumber/src/test/java/stepdefs/selenium/SeleniumSteps2.java @@ -4,7 +4,7 @@ package stepdefs.selenium; -import com.cognizantsoftvision.maqs.cucumber.steps.BaseSeleniumStep; +import io.github.maqs.cucumber.steps.BaseSeleniumStep; import io.cucumber.java.en.When; public class SeleniumSteps2 extends BaseSeleniumStep { diff --git a/maqs-cucumber/src/test/java/stepdefs/selenium/SeleniumSteps3.java b/maqs-cucumber/src/test/java/stepdefs/selenium/SeleniumSteps3.java index b5460081e..11fa0c2c8 100644 --- a/maqs-cucumber/src/test/java/stepdefs/selenium/SeleniumSteps3.java +++ b/maqs-cucumber/src/test/java/stepdefs/selenium/SeleniumSteps3.java @@ -4,7 +4,7 @@ package stepdefs.selenium; -import com.cognizantsoftvision.maqs.cucumber.steps.BaseSeleniumStep; +import io.github.maqs.cucumber.steps.BaseSeleniumStep; import io.cucumber.java.en.Then; public class SeleniumSteps3 extends BaseSeleniumStep { diff --git a/maqs-database/config.xml b/maqs-database/config.xml index e78650359..1a7018c5e 100644 --- a/maqs-database/config.xml +++ b/maqs-database/config.xml @@ -69,10 +69,10 @@ - - - - + + + + diff --git a/maqs-database/pom.xml b/maqs-database/pom.xml index 26fc420c8..40eb0ee95 100644 --- a/maqs-database/pom.xml +++ b/maqs-database/pom.xml @@ -4,11 +4,11 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - com.cognizantsoftvision.maqs + io.github.maqs maqs-java ${revision} - com.cognizantsoftvision.maqs.database + io.github.maqs.database maqs-database ${revision} MAQS Database Testing Module @@ -28,12 +28,12 @@ ${sqlite-dialect.version} - com.cognizantsoftvision.maqs.base + io.github.maqs.base maqs-base ${project.version} - com.cognizantsoftvision.maqs.utilities + io.github.maqs.utilities maqs-utilities diff --git a/maqs-database/src/main/java/com/cognizantsoftvision/maqs/database/BaseDatabaseTest.java b/maqs-database/src/main/java/io/github/maqs/database/BaseDatabaseTest.java similarity index 93% rename from maqs-database/src/main/java/com/cognizantsoftvision/maqs/database/BaseDatabaseTest.java rename to maqs-database/src/main/java/io/github/maqs/database/BaseDatabaseTest.java index 338e10803..40af2c1cf 100644 --- a/maqs-database/src/main/java/com/cognizantsoftvision/maqs/database/BaseDatabaseTest.java +++ b/maqs-database/src/main/java/io/github/maqs/database/BaseDatabaseTest.java @@ -2,9 +2,9 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.database; +package io.github.maqs.database; -import com.cognizantsoftvision.maqs.base.BaseExtendableTest; +import io.github.maqs.base.BaseExtendableTest; import org.testng.ITestResult; /** diff --git a/maqs-database/src/main/java/com/cognizantsoftvision/maqs/database/ConnectionFactory.java b/maqs-database/src/main/java/io/github/maqs/database/ConnectionFactory.java similarity index 98% rename from maqs-database/src/main/java/com/cognizantsoftvision/maqs/database/ConnectionFactory.java rename to maqs-database/src/main/java/io/github/maqs/database/ConnectionFactory.java index 6d9838b9f..dce0d3c1b 100644 --- a/maqs-database/src/main/java/com/cognizantsoftvision/maqs/database/ConnectionFactory.java +++ b/maqs-database/src/main/java/io/github/maqs/database/ConnectionFactory.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.database; +package io.github.maqs.database; import java.io.File; import java.util.Arrays; diff --git a/maqs-database/src/main/java/com/cognizantsoftvision/maqs/database/DatabaseConfig.java b/maqs-database/src/main/java/io/github/maqs/database/DatabaseConfig.java similarity index 90% rename from maqs-database/src/main/java/com/cognizantsoftvision/maqs/database/DatabaseConfig.java rename to maqs-database/src/main/java/io/github/maqs/database/DatabaseConfig.java index 9b8bdc4ce..b205f23f5 100644 --- a/maqs-database/src/main/java/com/cognizantsoftvision/maqs/database/DatabaseConfig.java +++ b/maqs-database/src/main/java/io/github/maqs/database/DatabaseConfig.java @@ -2,14 +2,15 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.database; - -import com.cognizantsoftvision.maqs.database.constants.DataProviderType; -import com.cognizantsoftvision.maqs.database.providers.IDataSourceProvider; -import com.cognizantsoftvision.maqs.database.providers.SQLProvider; -import com.cognizantsoftvision.maqs.database.providers.SQLiteProvider; -import com.cognizantsoftvision.maqs.utilities.helper.Config; -import com.cognizantsoftvision.maqs.utilities.helper.ConfigSection; +package io.github.maqs.database; + +import io.github.maqs.database.constants.DataProviderType; +import io.github.maqs.database.providers.IDataSourceProvider; +import io.github.maqs.database.providers.SQLProvider; +import io.github.maqs.database.providers.SQLiteProvider; +import io.github.maqs.utilities.helper.Config; +import io.github.maqs.utilities.helper.ConfigSection; + import java.util.HashMap; import java.util.Map; diff --git a/maqs-database/src/main/java/com/cognizantsoftvision/maqs/database/DatabaseDriver.java b/maqs-database/src/main/java/io/github/maqs/database/DatabaseDriver.java similarity index 97% rename from maqs-database/src/main/java/com/cognizantsoftvision/maqs/database/DatabaseDriver.java rename to maqs-database/src/main/java/io/github/maqs/database/DatabaseDriver.java index af2294ad1..8cf798189 100644 --- a/maqs-database/src/main/java/com/cognizantsoftvision/maqs/database/DatabaseDriver.java +++ b/maqs-database/src/main/java/io/github/maqs/database/DatabaseDriver.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.database; +package io.github.maqs.database; import java.util.List; import javax.persistence.EntityManager; diff --git a/maqs-database/src/main/java/com/cognizantsoftvision/maqs/database/DatabaseDriverManager.java b/maqs-database/src/main/java/io/github/maqs/database/DatabaseDriverManager.java similarity index 87% rename from maqs-database/src/main/java/com/cognizantsoftvision/maqs/database/DatabaseDriverManager.java rename to maqs-database/src/main/java/io/github/maqs/database/DatabaseDriverManager.java index 9c30a4c64..f75a6af9f 100644 --- a/maqs-database/src/main/java/com/cognizantsoftvision/maqs/database/DatabaseDriverManager.java +++ b/maqs-database/src/main/java/io/github/maqs/database/DatabaseDriverManager.java @@ -2,10 +2,10 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.database; +package io.github.maqs.database; -import com.cognizantsoftvision.maqs.base.BaseTestObject; -import com.cognizantsoftvision.maqs.base.DriverManager; +import io.github.maqs.base.BaseTestObject; +import io.github.maqs.base.DriverManager; import java.util.function.Supplier; public class DatabaseDriverManager extends DriverManager { diff --git a/maqs-database/src/main/java/com/cognizantsoftvision/maqs/database/DatabasePersistenceUnitInfo.java b/maqs-database/src/main/java/io/github/maqs/database/DatabasePersistenceUnitInfo.java similarity index 98% rename from maqs-database/src/main/java/com/cognizantsoftvision/maqs/database/DatabasePersistenceUnitInfo.java rename to maqs-database/src/main/java/io/github/maqs/database/DatabasePersistenceUnitInfo.java index 7b8b6708c..ecf0a4e75 100644 --- a/maqs-database/src/main/java/com/cognizantsoftvision/maqs/database/DatabasePersistenceUnitInfo.java +++ b/maqs-database/src/main/java/io/github/maqs/database/DatabasePersistenceUnitInfo.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.database; +package io.github.maqs.database; import java.net.URL; import java.util.ArrayList; diff --git a/maqs-database/src/main/java/com/cognizantsoftvision/maqs/database/DatabaseTestObject.java b/maqs-database/src/main/java/io/github/maqs/database/DatabaseTestObject.java similarity index 94% rename from maqs-database/src/main/java/com/cognizantsoftvision/maqs/database/DatabaseTestObject.java rename to maqs-database/src/main/java/io/github/maqs/database/DatabaseTestObject.java index 1d7b7ea0a..2478d4dde 100644 --- a/maqs-database/src/main/java/com/cognizantsoftvision/maqs/database/DatabaseTestObject.java +++ b/maqs-database/src/main/java/io/github/maqs/database/DatabaseTestObject.java @@ -2,10 +2,10 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.database; +package io.github.maqs.database; -import com.cognizantsoftvision.maqs.base.BaseTestObject; -import com.cognizantsoftvision.maqs.utilities.logging.ILogger; +import io.github.maqs.base.BaseTestObject; +import io.github.maqs.utilities.logging.ILogger; import java.util.function.Supplier; /** diff --git a/maqs-database/src/main/java/com/cognizantsoftvision/maqs/database/constants/DataProviderType.java b/maqs-database/src/main/java/io/github/maqs/database/constants/DataProviderType.java similarity index 95% rename from maqs-database/src/main/java/com/cognizantsoftvision/maqs/database/constants/DataProviderType.java rename to maqs-database/src/main/java/io/github/maqs/database/constants/DataProviderType.java index 12cb654fc..83a148496 100644 --- a/maqs-database/src/main/java/com/cognizantsoftvision/maqs/database/constants/DataProviderType.java +++ b/maqs-database/src/main/java/io/github/maqs/database/constants/DataProviderType.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.database.constants; +package io.github.maqs.database.constants; public enum DataProviderType { H2("H2", "org.hibernate.dialect.H2Dialect"), diff --git a/maqs-database/src/main/java/com/cognizantsoftvision/maqs/database/providers/H2Provider.java b/maqs-database/src/main/java/io/github/maqs/database/providers/H2Provider.java similarity index 93% rename from maqs-database/src/main/java/com/cognizantsoftvision/maqs/database/providers/H2Provider.java rename to maqs-database/src/main/java/io/github/maqs/database/providers/H2Provider.java index f05282da4..ee15eab1b 100644 --- a/maqs-database/src/main/java/com/cognizantsoftvision/maqs/database/providers/H2Provider.java +++ b/maqs-database/src/main/java/io/github/maqs/database/providers/H2Provider.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.database.providers; +package io.github.maqs.database.providers; import javax.sql.DataSource; diff --git a/maqs-database/src/main/java/com/cognizantsoftvision/maqs/database/providers/IDataSourceProvider.java b/maqs-database/src/main/java/io/github/maqs/database/providers/IDataSourceProvider.java similarity index 91% rename from maqs-database/src/main/java/com/cognizantsoftvision/maqs/database/providers/IDataSourceProvider.java rename to maqs-database/src/main/java/io/github/maqs/database/providers/IDataSourceProvider.java index 384c9a625..62e9d9fda 100644 --- a/maqs-database/src/main/java/com/cognizantsoftvision/maqs/database/providers/IDataSourceProvider.java +++ b/maqs-database/src/main/java/io/github/maqs/database/providers/IDataSourceProvider.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.database.providers; +package io.github.maqs.database.providers; import javax.sql.DataSource; diff --git a/maqs-database/src/main/java/com/cognizantsoftvision/maqs/database/providers/MySQLProvider.java b/maqs-database/src/main/java/io/github/maqs/database/providers/MySQLProvider.java similarity index 86% rename from maqs-database/src/main/java/com/cognizantsoftvision/maqs/database/providers/MySQLProvider.java rename to maqs-database/src/main/java/io/github/maqs/database/providers/MySQLProvider.java index 362c5f291..aa0d25831 100644 --- a/maqs-database/src/main/java/com/cognizantsoftvision/maqs/database/providers/MySQLProvider.java +++ b/maqs-database/src/main/java/io/github/maqs/database/providers/MySQLProvider.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.database.providers; +package io.github.maqs.database.providers; import javax.sql.DataSource; diff --git a/maqs-database/src/main/java/com/cognizantsoftvision/maqs/database/providers/SQLProvider.java b/maqs-database/src/main/java/io/github/maqs/database/providers/SQLProvider.java similarity index 81% rename from maqs-database/src/main/java/com/cognizantsoftvision/maqs/database/providers/SQLProvider.java rename to maqs-database/src/main/java/io/github/maqs/database/providers/SQLProvider.java index bc3d5556c..04aff02a7 100644 --- a/maqs-database/src/main/java/com/cognizantsoftvision/maqs/database/providers/SQLProvider.java +++ b/maqs-database/src/main/java/io/github/maqs/database/providers/SQLProvider.java @@ -2,11 +2,12 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.database.providers; +package io.github.maqs.database.providers; -import com.cognizantsoftvision.maqs.database.DatabaseConfig; -import com.cognizantsoftvision.maqs.database.constants.DataProviderType; +import io.github.maqs.database.DatabaseConfig; +import io.github.maqs.database.constants.DataProviderType; import com.microsoft.sqlserver.jdbc.SQLServerDataSource; + import javax.sql.DataSource; public class SQLProvider implements IDataSourceProvider { diff --git a/maqs-database/src/main/java/com/cognizantsoftvision/maqs/database/providers/SQLiteProvider.java b/maqs-database/src/main/java/io/github/maqs/database/providers/SQLiteProvider.java similarity index 86% rename from maqs-database/src/main/java/com/cognizantsoftvision/maqs/database/providers/SQLiteProvider.java rename to maqs-database/src/main/java/io/github/maqs/database/providers/SQLiteProvider.java index 4c1f99e12..f813f7448 100644 --- a/maqs-database/src/main/java/com/cognizantsoftvision/maqs/database/providers/SQLiteProvider.java +++ b/maqs-database/src/main/java/io/github/maqs/database/providers/SQLiteProvider.java @@ -2,10 +2,11 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.database.providers; +package io.github.maqs.database.providers; -import com.cognizantsoftvision.maqs.database.constants.DataProviderType; +import io.github.maqs.database.constants.DataProviderType; import javax.sql.DataSource; + import org.sqlite.SQLiteDataSource; /** diff --git a/maqs-database/src/test/java/com/cognizantsoftvision/maqs/database/BaseDatabaseTestUnitTest.java b/maqs-database/src/test/java/io/github/maqs/database/BaseDatabaseTestUnitTest.java similarity index 89% rename from maqs-database/src/test/java/com/cognizantsoftvision/maqs/database/BaseDatabaseTestUnitTest.java rename to maqs-database/src/test/java/io/github/maqs/database/BaseDatabaseTestUnitTest.java index 6289f6481..7384013ab 100644 --- a/maqs-database/src/test/java/com/cognizantsoftvision/maqs/database/BaseDatabaseTestUnitTest.java +++ b/maqs-database/src/test/java/io/github/maqs/database/BaseDatabaseTestUnitTest.java @@ -2,9 +2,9 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.database; +package io.github.maqs.database; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; +import io.github.maqs.utilities.helper.TestCategories; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/maqs-database/src/test/java/com/cognizantsoftvision/maqs/database/ConnectionFactoryUnitTest.java b/maqs-database/src/test/java/io/github/maqs/database/ConnectionFactoryUnitTest.java similarity index 95% rename from maqs-database/src/test/java/com/cognizantsoftvision/maqs/database/ConnectionFactoryUnitTest.java rename to maqs-database/src/test/java/io/github/maqs/database/ConnectionFactoryUnitTest.java index cdaed56b0..5cbd8ad05 100644 --- a/maqs-database/src/test/java/com/cognizantsoftvision/maqs/database/ConnectionFactoryUnitTest.java +++ b/maqs-database/src/test/java/io/github/maqs/database/ConnectionFactoryUnitTest.java @@ -2,9 +2,9 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.database; +package io.github.maqs.database; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; +import io.github.maqs.utilities.helper.TestCategories; import java.io.File; import java.io.IOException; import java.net.URL; diff --git a/maqs-database/src/test/java/com/cognizantsoftvision/maqs/database/DatabaseConfigUnitTest.java b/maqs-database/src/test/java/io/github/maqs/database/DatabaseConfigUnitTest.java similarity index 84% rename from maqs-database/src/test/java/com/cognizantsoftvision/maqs/database/DatabaseConfigUnitTest.java rename to maqs-database/src/test/java/io/github/maqs/database/DatabaseConfigUnitTest.java index b6b844bf7..871762061 100644 --- a/maqs-database/src/test/java/com/cognizantsoftvision/maqs/database/DatabaseConfigUnitTest.java +++ b/maqs-database/src/test/java/io/github/maqs/database/DatabaseConfigUnitTest.java @@ -2,13 +2,12 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.database; +package io.github.maqs.database; -import com.cognizantsoftvision.maqs.base.BaseGenericTest; -import com.cognizantsoftvision.maqs.database.constants.DataProviderType; -import com.cognizantsoftvision.maqs.database.providers.IDataSourceProvider; -import com.cognizantsoftvision.maqs.database.providers.SQLProvider; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; +import io.github.maqs.database.constants.DataProviderType; +import io.github.maqs.database.providers.IDataSourceProvider; +import io.github.maqs.database.providers.SQLProvider; +import io.github.maqs.utilities.helper.TestCategories; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/maqs-database/src/test/java/com/cognizantsoftvision/maqs/database/DatabaseDriverUnitTest.java b/maqs-database/src/test/java/io/github/maqs/database/DatabaseDriverUnitTest.java similarity index 93% rename from maqs-database/src/test/java/com/cognizantsoftvision/maqs/database/DatabaseDriverUnitTest.java rename to maqs-database/src/test/java/io/github/maqs/database/DatabaseDriverUnitTest.java index e939d3437..1da453c2c 100644 --- a/maqs-database/src/test/java/com/cognizantsoftvision/maqs/database/DatabaseDriverUnitTest.java +++ b/maqs-database/src/test/java/io/github/maqs/database/DatabaseDriverUnitTest.java @@ -2,11 +2,10 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.database; +package io.github.maqs.database; -import com.cognizantsoftvision.maqs.base.BaseGenericTest; -import com.cognizantsoftvision.maqs.database.entities.StatesEntity; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; +import io.github.maqs.database.entities.StatesEntity; +import io.github.maqs.utilities.helper.TestCategories; import java.util.List; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/maqs-database/src/test/java/com/cognizantsoftvision/maqs/database/DatabaseTestObjectUnitTest.java b/maqs-database/src/test/java/io/github/maqs/database/DatabaseTestObjectUnitTest.java similarity index 95% rename from maqs-database/src/test/java/com/cognizantsoftvision/maqs/database/DatabaseTestObjectUnitTest.java rename to maqs-database/src/test/java/io/github/maqs/database/DatabaseTestObjectUnitTest.java index 345bac603..c80aa102f 100644 --- a/maqs-database/src/test/java/com/cognizantsoftvision/maqs/database/DatabaseTestObjectUnitTest.java +++ b/maqs-database/src/test/java/io/github/maqs/database/DatabaseTestObjectUnitTest.java @@ -2,10 +2,9 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.database; +package io.github.maqs.database; -import com.cognizantsoftvision.maqs.base.BaseGenericTest; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; +import io.github.maqs.utilities.helper.TestCategories; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/maqs-database/src/test/java/com/cognizantsoftvision/maqs/database/constants/DataProviderTypeUnitTest.java b/maqs-database/src/test/java/io/github/maqs/database/constants/DataProviderTypeUnitTest.java similarity index 83% rename from maqs-database/src/test/java/com/cognizantsoftvision/maqs/database/constants/DataProviderTypeUnitTest.java rename to maqs-database/src/test/java/io/github/maqs/database/constants/DataProviderTypeUnitTest.java index a46abe29d..03cb3ca4b 100644 --- a/maqs-database/src/test/java/com/cognizantsoftvision/maqs/database/constants/DataProviderTypeUnitTest.java +++ b/maqs-database/src/test/java/io/github/maqs/database/constants/DataProviderTypeUnitTest.java @@ -2,10 +2,10 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.database.constants; +package io.github.maqs.database.constants; -import com.cognizantsoftvision.maqs.base.BaseGenericTest; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; +import io.github.maqs.base.BaseGenericTest; +import io.github.maqs.utilities.helper.TestCategories; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/maqs-database/src/test/java/com/cognizantsoftvision/maqs/database/entities/OrdersEntity.java b/maqs-database/src/test/java/io/github/maqs/database/entities/OrdersEntity.java similarity index 97% rename from maqs-database/src/test/java/com/cognizantsoftvision/maqs/database/entities/OrdersEntity.java rename to maqs-database/src/test/java/io/github/maqs/database/entities/OrdersEntity.java index 05e2931fd..81bc458b2 100644 --- a/maqs-database/src/test/java/com/cognizantsoftvision/maqs/database/entities/OrdersEntity.java +++ b/maqs-database/src/test/java/io/github/maqs/database/entities/OrdersEntity.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.database.entities; +package io.github.maqs.database.entities; import java.util.Objects; import javax.persistence.Basic; diff --git a/maqs-database/src/test/java/com/cognizantsoftvision/maqs/database/entities/ProductsEntity.java b/maqs-database/src/test/java/io/github/maqs/database/entities/ProductsEntity.java similarity index 95% rename from maqs-database/src/test/java/com/cognizantsoftvision/maqs/database/entities/ProductsEntity.java rename to maqs-database/src/test/java/io/github/maqs/database/entities/ProductsEntity.java index b6b668354..2f38f05c9 100644 --- a/maqs-database/src/test/java/com/cognizantsoftvision/maqs/database/entities/ProductsEntity.java +++ b/maqs-database/src/test/java/io/github/maqs/database/entities/ProductsEntity.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.database.entities; +package io.github.maqs.database.entities; import java.util.Objects; import javax.persistence.Basic; diff --git a/maqs-database/src/test/java/com/cognizantsoftvision/maqs/database/entities/SqliteMasterEntity.java b/maqs-database/src/test/java/io/github/maqs/database/entities/SqliteMasterEntity.java similarity index 97% rename from maqs-database/src/test/java/com/cognizantsoftvision/maqs/database/entities/SqliteMasterEntity.java rename to maqs-database/src/test/java/io/github/maqs/database/entities/SqliteMasterEntity.java index cef26e3e9..90c29fdb4 100644 --- a/maqs-database/src/test/java/com/cognizantsoftvision/maqs/database/entities/SqliteMasterEntity.java +++ b/maqs-database/src/test/java/io/github/maqs/database/entities/SqliteMasterEntity.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.database.entities; +package io.github.maqs.database.entities; import java.util.Objects; import javax.persistence.Basic; diff --git a/maqs-database/src/test/java/com/cognizantsoftvision/maqs/database/entities/StatesEntity.java b/maqs-database/src/test/java/io/github/maqs/database/entities/StatesEntity.java similarity index 92% rename from maqs-database/src/test/java/com/cognizantsoftvision/maqs/database/entities/StatesEntity.java rename to maqs-database/src/test/java/io/github/maqs/database/entities/StatesEntity.java index e75fbeae7..4365e85de 100644 --- a/maqs-database/src/test/java/com/cognizantsoftvision/maqs/database/entities/StatesEntity.java +++ b/maqs-database/src/test/java/io/github/maqs/database/entities/StatesEntity.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.database.entities; +package io.github.maqs.database.entities; import javax.persistence.Entity; import javax.persistence.Id; diff --git a/maqs-database/src/test/java/com/cognizantsoftvision/maqs/database/entities/UsersEntity.java b/maqs-database/src/test/java/io/github/maqs/database/entities/UsersEntity.java similarity index 96% rename from maqs-database/src/test/java/com/cognizantsoftvision/maqs/database/entities/UsersEntity.java rename to maqs-database/src/test/java/io/github/maqs/database/entities/UsersEntity.java index a6a97687f..a4c183690 100644 --- a/maqs-database/src/test/java/com/cognizantsoftvision/maqs/database/entities/UsersEntity.java +++ b/maqs-database/src/test/java/io/github/maqs/database/entities/UsersEntity.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.database.entities; +package io.github.maqs.database.entities; import java.util.Objects; import javax.persistence.Basic; diff --git a/maqs-database/src/test/java/com/cognizantsoftvision/maqs/database/providers/IDataSourceProviderUnitTest.java b/maqs-database/src/test/java/io/github/maqs/database/providers/IDataSourceProviderUnitTest.java similarity index 86% rename from maqs-database/src/test/java/com/cognizantsoftvision/maqs/database/providers/IDataSourceProviderUnitTest.java rename to maqs-database/src/test/java/io/github/maqs/database/providers/IDataSourceProviderUnitTest.java index f47006f8b..662c7d1c1 100644 --- a/maqs-database/src/test/java/com/cognizantsoftvision/maqs/database/providers/IDataSourceProviderUnitTest.java +++ b/maqs-database/src/test/java/io/github/maqs/database/providers/IDataSourceProviderUnitTest.java @@ -2,10 +2,10 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.database.providers; +package io.github.maqs.database.providers; -import com.cognizantsoftvision.maqs.base.BaseGenericTest; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; +import io.github.maqs.base.BaseGenericTest; +import io.github.maqs.utilities.helper.TestCategories; import java.util.Iterator; import org.testng.annotations.DataProvider; import org.testng.annotations.Ignore; diff --git a/maqs-database/src/test/java/com/cognizantsoftvision/maqs/database/providers/SQLProviderTest.java b/maqs-database/src/test/java/io/github/maqs/database/providers/SQLProviderTest.java similarity index 83% rename from maqs-database/src/test/java/com/cognizantsoftvision/maqs/database/providers/SQLProviderTest.java rename to maqs-database/src/test/java/io/github/maqs/database/providers/SQLProviderTest.java index 3d288d93b..79e6682d8 100644 --- a/maqs-database/src/test/java/com/cognizantsoftvision/maqs/database/providers/SQLProviderTest.java +++ b/maqs-database/src/test/java/io/github/maqs/database/providers/SQLProviderTest.java @@ -2,9 +2,9 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.database.providers; +package io.github.maqs.database.providers; -import com.cognizantsoftvision.maqs.base.BaseGenericTest; +import io.github.maqs.base.BaseGenericTest; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/maqs-database/src/test/java/com/cognizantsoftvision/maqs/database/providers/SQLiteProviderUnitTest.java b/maqs-database/src/test/java/io/github/maqs/database/providers/SQLiteProviderUnitTest.java similarity index 83% rename from maqs-database/src/test/java/com/cognizantsoftvision/maqs/database/providers/SQLiteProviderUnitTest.java rename to maqs-database/src/test/java/io/github/maqs/database/providers/SQLiteProviderUnitTest.java index bcb39b024..a6183aa52 100644 --- a/maqs-database/src/test/java/com/cognizantsoftvision/maqs/database/providers/SQLiteProviderUnitTest.java +++ b/maqs-database/src/test/java/io/github/maqs/database/providers/SQLiteProviderUnitTest.java @@ -2,9 +2,9 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.database.providers; +package io.github.maqs.database.providers; -import com.cognizantsoftvision.maqs.base.BaseGenericTest; +import io.github.maqs.base.BaseGenericTest; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/maqs-jacoco-reporting/pom.xml b/maqs-jacoco-reporting/pom.xml index c96035deb..41588732f 100644 --- a/maqs-jacoco-reporting/pom.xml +++ b/maqs-jacoco-reporting/pom.xml @@ -4,7 +4,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> maqs-java - com.cognizantsoftvision.maqs + io.github.maqs ${revision} 4.0.0 @@ -55,35 +55,35 @@ - com.cognizantsoftvision.maqs.appium + io.github.maqs.appium maqs-appium - com.cognizantsoftvision.maqs.accessibility + io.github.maqs.accessibility maqs-accessibility - com.cognizantsoftvision.maqs.base + io.github.maqs.base maqs-base - com.cognizantsoftvision.maqs.utilities + io.github.maqs.utilities maqs-utilities - com.cognizantsoftvision.maqs.database + io.github.maqs.database maqs-database - com.cognizantsoftvision.maqs.selenium + io.github.maqs.selenium maqs-selenium - com.cognizantsoftvision.maqs.cucumber + io.github.maqs.cucumber maqs-cucumber - com.cognizantsoftvision.maqs.webservices + io.github.maqs.webservices maqs-webservices diff --git a/maqs-playwright/pom.xml b/maqs-playwright/pom.xml index 5ec8c6aa8..128694ee1 100644 --- a/maqs-playwright/pom.xml +++ b/maqs-playwright/pom.xml @@ -5,12 +5,12 @@ 4.0.0 - com.cognizantsoftvision.maqs + io.github.maqs maqs-java ${revision} - com.cognizantsoftvision.maqs.playwright + io.github.maqs.playwright maqs-playwright MAQS Playwright Testing Module ${revision} @@ -21,11 +21,11 @@ - com.cognizantsoftvision.maqs.base + io.github.maqs.base maqs-base - com.cognizantsoftvision.maqs.utilities + io.github.maqs.utilities maqs-utilities diff --git a/maqs-playwright/src/main/java/com/cognizantsoftvision/maqs/playwright/BasePlaywrightPageModel.java b/maqs-playwright/src/main/java/io/github/maqs/playwright/BasePlaywrightPageModel.java similarity index 93% rename from maqs-playwright/src/main/java/com/cognizantsoftvision/maqs/playwright/BasePlaywrightPageModel.java rename to maqs-playwright/src/main/java/io/github/maqs/playwright/BasePlaywrightPageModel.java index f61322ebb..cf1086bca 100644 --- a/maqs-playwright/src/main/java/com/cognizantsoftvision/maqs/playwright/BasePlaywrightPageModel.java +++ b/maqs-playwright/src/main/java/io/github/maqs/playwright/BasePlaywrightPageModel.java @@ -2,10 +2,10 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.playwright; +package io.github.maqs.playwright; -import com.cognizantsoftvision.maqs.utilities.logging.ILogger; -import com.cognizantsoftvision.maqs.utilities.performance.IPerfTimerCollection; +import io.github.maqs.utilities.logging.ILogger; +import io.github.maqs.utilities.performance.IPerfTimerCollection; /** * The Base Playwright page model class. diff --git a/maqs-playwright/src/main/java/com/cognizantsoftvision/maqs/playwright/BasePlaywrightTest.java b/maqs-playwright/src/main/java/io/github/maqs/playwright/BasePlaywrightTest.java similarity index 89% rename from maqs-playwright/src/main/java/com/cognizantsoftvision/maqs/playwright/BasePlaywrightTest.java rename to maqs-playwright/src/main/java/io/github/maqs/playwright/BasePlaywrightTest.java index 132e6788d..d2644b624 100644 --- a/maqs-playwright/src/main/java/com/cognizantsoftvision/maqs/playwright/BasePlaywrightTest.java +++ b/maqs-playwright/src/main/java/io/github/maqs/playwright/BasePlaywrightTest.java @@ -2,15 +2,15 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.playwright; - -import com.cognizantsoftvision.maqs.base.BaseExtendableTest; -import com.cognizantsoftvision.maqs.utilities.helper.StringProcessor; -import com.cognizantsoftvision.maqs.utilities.logging.IFileLogger; -import com.cognizantsoftvision.maqs.utilities.logging.ILogger; -import com.cognizantsoftvision.maqs.utilities.logging.LoggingConfig; -import com.cognizantsoftvision.maqs.utilities.logging.LoggingEnabled; -import com.cognizantsoftvision.maqs.utilities.logging.MessageType; +package io.github.maqs.playwright; + +import io.github.maqs.base.BaseExtendableTest; +import io.github.maqs.utilities.helper.StringProcessor; +import io.github.maqs.utilities.logging.IFileLogger; +import io.github.maqs.utilities.logging.ILogger; +import io.github.maqs.utilities.logging.LoggingConfig; +import io.github.maqs.utilities.logging.LoggingEnabled; +import io.github.maqs.utilities.logging.MessageType; import com.microsoft.playwright.Browser; import com.microsoft.playwright.BrowserContext; import com.microsoft.playwright.Page; diff --git a/maqs-playwright/src/main/java/com/cognizantsoftvision/maqs/playwright/IPlaywrightTestObject.java b/maqs-playwright/src/main/java/io/github/maqs/playwright/IPlaywrightTestObject.java similarity index 87% rename from maqs-playwright/src/main/java/com/cognizantsoftvision/maqs/playwright/IPlaywrightTestObject.java rename to maqs-playwright/src/main/java/io/github/maqs/playwright/IPlaywrightTestObject.java index e74e3281a..e17cfff6b 100644 --- a/maqs-playwright/src/main/java/com/cognizantsoftvision/maqs/playwright/IPlaywrightTestObject.java +++ b/maqs-playwright/src/main/java/io/github/maqs/playwright/IPlaywrightTestObject.java @@ -2,9 +2,9 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.playwright; +package io.github.maqs.playwright; -import com.cognizantsoftvision.maqs.base.ITestObject; +import io.github.maqs.base.ITestObject; /** * The Playwright Test Object interface. diff --git a/maqs-playwright/src/main/java/com/cognizantsoftvision/maqs/playwright/PageDriver.java b/maqs-playwright/src/main/java/io/github/maqs/playwright/PageDriver.java similarity index 99% rename from maqs-playwright/src/main/java/com/cognizantsoftvision/maqs/playwright/PageDriver.java rename to maqs-playwright/src/main/java/io/github/maqs/playwright/PageDriver.java index 8bdacef63..ec2799508 100644 --- a/maqs-playwright/src/main/java/com/cognizantsoftvision/maqs/playwright/PageDriver.java +++ b/maqs-playwright/src/main/java/io/github/maqs/playwright/PageDriver.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.playwright; +package io.github.maqs.playwright; import com.microsoft.playwright.Browser; import com.microsoft.playwright.ElementHandle; diff --git a/maqs-playwright/src/main/java/com/cognizantsoftvision/maqs/playwright/PageDriverFactory.java b/maqs-playwright/src/main/java/io/github/maqs/playwright/PageDriverFactory.java similarity index 97% rename from maqs-playwright/src/main/java/com/cognizantsoftvision/maqs/playwright/PageDriverFactory.java rename to maqs-playwright/src/main/java/io/github/maqs/playwright/PageDriverFactory.java index 74081fe4f..073ce7fe5 100644 --- a/maqs-playwright/src/main/java/com/cognizantsoftvision/maqs/playwright/PageDriverFactory.java +++ b/maqs-playwright/src/main/java/io/github/maqs/playwright/PageDriverFactory.java @@ -2,10 +2,10 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.playwright; +package io.github.maqs.playwright; -import com.cognizantsoftvision.maqs.utilities.logging.LoggingConfig; -import com.cognizantsoftvision.maqs.utilities.logging.LoggingEnabled; +import io.github.maqs.utilities.logging.LoggingConfig; +import io.github.maqs.utilities.logging.LoggingEnabled; import com.microsoft.playwright.Browser; import com.microsoft.playwright.BrowserContext; import com.microsoft.playwright.BrowserType; diff --git a/maqs-playwright/src/main/java/com/cognizantsoftvision/maqs/playwright/PlaywrightBrowser.java b/maqs-playwright/src/main/java/io/github/maqs/playwright/PlaywrightBrowser.java similarity index 88% rename from maqs-playwright/src/main/java/com/cognizantsoftvision/maqs/playwright/PlaywrightBrowser.java rename to maqs-playwright/src/main/java/io/github/maqs/playwright/PlaywrightBrowser.java index 82206db2e..1f164375d 100644 --- a/maqs-playwright/src/main/java/com/cognizantsoftvision/maqs/playwright/PlaywrightBrowser.java +++ b/maqs-playwright/src/main/java/io/github/maqs/playwright/PlaywrightBrowser.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.playwright; +package io.github.maqs.playwright; /** * Known Playwright browser types. diff --git a/maqs-playwright/src/main/java/com/cognizantsoftvision/maqs/playwright/PlaywrightConfig.java b/maqs-playwright/src/main/java/io/github/maqs/playwright/PlaywrightConfig.java similarity index 96% rename from maqs-playwright/src/main/java/com/cognizantsoftvision/maqs/playwright/PlaywrightConfig.java rename to maqs-playwright/src/main/java/io/github/maqs/playwright/PlaywrightConfig.java index b783df2a7..a0041e684 100644 --- a/maqs-playwright/src/main/java/com/cognizantsoftvision/maqs/playwright/PlaywrightConfig.java +++ b/maqs-playwright/src/main/java/io/github/maqs/playwright/PlaywrightConfig.java @@ -2,10 +2,10 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.playwright; +package io.github.maqs.playwright; -import com.cognizantsoftvision.maqs.utilities.helper.Config; -import com.cognizantsoftvision.maqs.utilities.helper.ConfigSection; +import io.github.maqs.utilities.helper.Config; +import io.github.maqs.utilities.helper.ConfigSection; import java.awt.Dimension; /** diff --git a/maqs-playwright/src/main/java/com/cognizantsoftvision/maqs/playwright/PlaywrightDriverManager.java b/maqs-playwright/src/main/java/io/github/maqs/playwright/PlaywrightDriverManager.java similarity index 88% rename from maqs-playwright/src/main/java/com/cognizantsoftvision/maqs/playwright/PlaywrightDriverManager.java rename to maqs-playwright/src/main/java/io/github/maqs/playwright/PlaywrightDriverManager.java index 7eae37381..98e821ca6 100644 --- a/maqs-playwright/src/main/java/com/cognizantsoftvision/maqs/playwright/PlaywrightDriverManager.java +++ b/maqs-playwright/src/main/java/io/github/maqs/playwright/PlaywrightDriverManager.java @@ -2,12 +2,12 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.playwright; +package io.github.maqs.playwright; -import com.cognizantsoftvision.maqs.base.DriverManager; -import com.cognizantsoftvision.maqs.base.ITestObject; -import com.cognizantsoftvision.maqs.utilities.helper.StringProcessor; -import com.cognizantsoftvision.maqs.utilities.logging.MessageType; +import io.github.maqs.base.DriverManager; +import io.github.maqs.base.ITestObject; +import io.github.maqs.utilities.helper.StringProcessor; +import io.github.maqs.utilities.logging.MessageType; import java.util.function.Supplier; /** diff --git a/maqs-playwright/src/main/java/com/cognizantsoftvision/maqs/playwright/PlaywrightSyncElement.java b/maqs-playwright/src/main/java/io/github/maqs/playwright/PlaywrightSyncElement.java similarity index 99% rename from maqs-playwright/src/main/java/com/cognizantsoftvision/maqs/playwright/PlaywrightSyncElement.java rename to maqs-playwright/src/main/java/io/github/maqs/playwright/PlaywrightSyncElement.java index 8a84d5b2c..c0804f01d 100644 --- a/maqs-playwright/src/main/java/com/cognizantsoftvision/maqs/playwright/PlaywrightSyncElement.java +++ b/maqs-playwright/src/main/java/io/github/maqs/playwright/PlaywrightSyncElement.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.playwright; +package io.github.maqs.playwright; import com.microsoft.playwright.ElementHandle; import com.microsoft.playwright.FrameLocator; diff --git a/maqs-playwright/src/main/java/com/cognizantsoftvision/maqs/playwright/PlaywrightTestObject.java b/maqs-playwright/src/main/java/io/github/maqs/playwright/PlaywrightTestObject.java similarity index 89% rename from maqs-playwright/src/main/java/com/cognizantsoftvision/maqs/playwright/PlaywrightTestObject.java rename to maqs-playwright/src/main/java/io/github/maqs/playwright/PlaywrightTestObject.java index 6cb2f3f47..6344d1100 100644 --- a/maqs-playwright/src/main/java/com/cognizantsoftvision/maqs/playwright/PlaywrightTestObject.java +++ b/maqs-playwright/src/main/java/io/github/maqs/playwright/PlaywrightTestObject.java @@ -2,12 +2,12 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.playwright; +package io.github.maqs.playwright; -import com.cognizantsoftvision.maqs.base.BaseTestObject; -import com.cognizantsoftvision.maqs.base.exceptions.MAQSRuntimeException; -import com.cognizantsoftvision.maqs.utilities.logging.ILogger; -import com.cognizantsoftvision.maqs.utilities.logging.MessageType; +import io.github.maqs.base.BaseTestObject; +import io.github.maqs.base.exceptions.MAQSRuntimeException; +import io.github.maqs.utilities.logging.ILogger; +import io.github.maqs.utilities.logging.MessageType; import java.util.function.Supplier; /** diff --git a/maqs-playwright/src/test/java/com/cognizantsoftvision/maqs/playwright/PageDriverFactoryUnitTest.java b/maqs-playwright/src/test/java/io/github/maqs/playwright/PageDriverFactoryUnitTest.java similarity index 89% rename from maqs-playwright/src/test/java/com/cognizantsoftvision/maqs/playwright/PageDriverFactoryUnitTest.java rename to maqs-playwright/src/test/java/io/github/maqs/playwright/PageDriverFactoryUnitTest.java index a34d41860..bd0dae8ce 100644 --- a/maqs-playwright/src/test/java/com/cognizantsoftvision/maqs/playwright/PageDriverFactoryUnitTest.java +++ b/maqs-playwright/src/test/java/io/github/maqs/playwright/PageDriverFactoryUnitTest.java @@ -2,11 +2,11 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.playwright; +package io.github.maqs.playwright; -import com.cognizantsoftvision.maqs.utilities.helper.Config; -import com.cognizantsoftvision.maqs.utilities.helper.ConfigSection; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; +import io.github.maqs.utilities.helper.Config; +import io.github.maqs.utilities.helper.ConfigSection; +import io.github.maqs.utilities.helper.TestCategories; import com.microsoft.playwright.Browser; import java.util.ArrayList; import java.util.Collections; diff --git a/maqs-playwright/src/test/java/com/cognizantsoftvision/maqs/playwright/PageDriverUnitTest.java b/maqs-playwright/src/test/java/io/github/maqs/playwright/PageDriverUnitTest.java similarity index 98% rename from maqs-playwright/src/test/java/com/cognizantsoftvision/maqs/playwright/PageDriverUnitTest.java rename to maqs-playwright/src/test/java/io/github/maqs/playwright/PageDriverUnitTest.java index 1e0cef1eb..8612661a0 100644 --- a/maqs-playwright/src/test/java/com/cognizantsoftvision/maqs/playwright/PageDriverUnitTest.java +++ b/maqs-playwright/src/test/java/io/github/maqs/playwright/PageDriverUnitTest.java @@ -2,11 +2,11 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.playwright; +package io.github.maqs.playwright; -import com.cognizantsoftvision.maqs.playwright.pageModel.ElementPageModel; -import com.cognizantsoftvision.maqs.playwright.pageModel.PageModel; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; +import io.github.maqs.playwright.pageModel.ElementPageModel; +import io.github.maqs.playwright.pageModel.PageModel; +import io.github.maqs.utilities.helper.TestCategories; import com.microsoft.playwright.Browser; import com.microsoft.playwright.BrowserContext; import com.microsoft.playwright.ElementHandle; @@ -21,6 +21,7 @@ import java.util.Collections; import java.util.List; import java.util.UUID; + import org.testng.Assert; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; diff --git a/maqs-playwright/src/test/java/com/cognizantsoftvision/maqs/playwright/PageObjectUnitTest.java b/maqs-playwright/src/test/java/io/github/maqs/playwright/PageObjectUnitTest.java similarity index 93% rename from maqs-playwright/src/test/java/com/cognizantsoftvision/maqs/playwright/PageObjectUnitTest.java rename to maqs-playwright/src/test/java/io/github/maqs/playwright/PageObjectUnitTest.java index 8acde70ac..51268f8aa 100644 --- a/maqs-playwright/src/test/java/com/cognizantsoftvision/maqs/playwright/PageObjectUnitTest.java +++ b/maqs-playwright/src/test/java/io/github/maqs/playwright/PageObjectUnitTest.java @@ -1,8 +1,8 @@ -package com.cognizantsoftvision.maqs.playwright; +package io.github.maqs.playwright; -import com.cognizantsoftvision.maqs.playwright.pageModel.PageModel; -import com.cognizantsoftvision.maqs.playwright.pageModel.AsyncPageModel; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; +import io.github.maqs.playwright.pageModel.PageModel; +import io.github.maqs.playwright.pageModel.AsyncPageModel; +import io.github.maqs.utilities.helper.TestCategories; import org.testng.Assert; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; diff --git a/maqs-playwright/src/test/java/com/cognizantsoftvision/maqs/playwright/PlaywrightConfigUnitTest.java b/maqs-playwright/src/test/java/io/github/maqs/playwright/PlaywrightConfigUnitTest.java similarity index 93% rename from maqs-playwright/src/test/java/com/cognizantsoftvision/maqs/playwright/PlaywrightConfigUnitTest.java rename to maqs-playwright/src/test/java/io/github/maqs/playwright/PlaywrightConfigUnitTest.java index 36b650c64..a13fc40a1 100644 --- a/maqs-playwright/src/test/java/com/cognizantsoftvision/maqs/playwright/PlaywrightConfigUnitTest.java +++ b/maqs-playwright/src/test/java/io/github/maqs/playwright/PlaywrightConfigUnitTest.java @@ -2,11 +2,11 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.playwright; +package io.github.maqs.playwright; -import com.cognizantsoftvision.maqs.utilities.helper.Config; -import com.cognizantsoftvision.maqs.utilities.helper.ConfigSection; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; +import io.github.maqs.utilities.helper.Config; +import io.github.maqs.utilities.helper.ConfigSection; +import io.github.maqs.utilities.helper.TestCategories; import java.util.ArrayList; import java.util.Collections; import java.util.Map; diff --git a/maqs-playwright/src/test/java/com/cognizantsoftvision/maqs/playwright/PlaywrightDriverManagerUnitTest.java b/maqs-playwright/src/test/java/io/github/maqs/playwright/PlaywrightDriverManagerUnitTest.java similarity index 92% rename from maqs-playwright/src/test/java/com/cognizantsoftvision/maqs/playwright/PlaywrightDriverManagerUnitTest.java rename to maqs-playwright/src/test/java/io/github/maqs/playwright/PlaywrightDriverManagerUnitTest.java index 36965db4d..8781cb036 100644 --- a/maqs-playwright/src/test/java/com/cognizantsoftvision/maqs/playwright/PlaywrightDriverManagerUnitTest.java +++ b/maqs-playwright/src/test/java/io/github/maqs/playwright/PlaywrightDriverManagerUnitTest.java @@ -2,10 +2,10 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.playwright; +package io.github.maqs.playwright; -import com.cognizantsoftvision.maqs.base.BaseGenericTest; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; +import io.github.maqs.base.BaseGenericTest; +import io.github.maqs.utilities.helper.TestCategories; import com.microsoft.playwright.Page; import org.testng.Assert; import org.testng.annotations.Ignore; diff --git a/maqs-playwright/src/test/java/com/cognizantsoftvision/maqs/playwright/PlaywrightSyncElementUnitTest.java b/maqs-playwright/src/test/java/io/github/maqs/playwright/PlaywrightSyncElementUnitTest.java similarity index 98% rename from maqs-playwright/src/test/java/com/cognizantsoftvision/maqs/playwright/PlaywrightSyncElementUnitTest.java rename to maqs-playwright/src/test/java/io/github/maqs/playwright/PlaywrightSyncElementUnitTest.java index 0132bac2b..f963b787a 100644 --- a/maqs-playwright/src/test/java/com/cognizantsoftvision/maqs/playwright/PlaywrightSyncElementUnitTest.java +++ b/maqs-playwright/src/test/java/io/github/maqs/playwright/PlaywrightSyncElementUnitTest.java @@ -2,11 +2,11 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.playwright; +package io.github.maqs.playwright; -import com.cognizantsoftvision.maqs.playwright.pageModel.PageModel; -import com.cognizantsoftvision.maqs.playwright.pageModel.IFramePageModel; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; +import io.github.maqs.playwright.pageModel.PageModel; +import io.github.maqs.playwright.pageModel.IFramePageModel; +import io.github.maqs.utilities.helper.TestCategories; import com.microsoft.playwright.Browser; import com.microsoft.playwright.BrowserContext; import com.microsoft.playwright.ElementHandle; @@ -17,6 +17,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; + import org.testng.Assert; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeMethod; diff --git a/maqs-playwright/src/test/java/com/cognizantsoftvision/maqs/playwright/pageModel/AsyncPageModel.java b/maqs-playwright/src/test/java/io/github/maqs/playwright/pageModel/AsyncPageModel.java similarity index 95% rename from maqs-playwright/src/test/java/com/cognizantsoftvision/maqs/playwright/pageModel/AsyncPageModel.java rename to maqs-playwright/src/test/java/io/github/maqs/playwright/pageModel/AsyncPageModel.java index 113ed8ba1..3d490a4e3 100644 --- a/maqs-playwright/src/test/java/com/cognizantsoftvision/maqs/playwright/pageModel/AsyncPageModel.java +++ b/maqs-playwright/src/test/java/io/github/maqs/playwright/pageModel/AsyncPageModel.java @@ -2,9 +2,10 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.playwright.pageModel; +package io.github.maqs.playwright.pageModel; import com.cognizantsoftvision.maqs.playwright.*; +import io.github.maqs.playwright.*; /** * The Other Playwright page model class for testing. diff --git a/maqs-playwright/src/test/java/com/cognizantsoftvision/maqs/playwright/pageModel/ElementPageModel.java b/maqs-playwright/src/test/java/io/github/maqs/playwright/pageModel/ElementPageModel.java similarity index 98% rename from maqs-playwright/src/test/java/com/cognizantsoftvision/maqs/playwright/pageModel/ElementPageModel.java rename to maqs-playwright/src/test/java/io/github/maqs/playwright/pageModel/ElementPageModel.java index da853e3b9..79c566dbf 100644 --- a/maqs-playwright/src/test/java/com/cognizantsoftvision/maqs/playwright/pageModel/ElementPageModel.java +++ b/maqs-playwright/src/test/java/io/github/maqs/playwright/pageModel/ElementPageModel.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.playwright.pageModel; +package io.github.maqs.playwright.pageModel; import java.io.File; import java.nio.file.Path; diff --git a/maqs-playwright/src/test/java/com/cognizantsoftvision/maqs/playwright/pageModel/IFramePageModel.java b/maqs-playwright/src/test/java/io/github/maqs/playwright/pageModel/IFramePageModel.java similarity index 86% rename from maqs-playwright/src/test/java/com/cognizantsoftvision/maqs/playwright/pageModel/IFramePageModel.java rename to maqs-playwright/src/test/java/io/github/maqs/playwright/pageModel/IFramePageModel.java index b25617071..5e5ca3d8b 100644 --- a/maqs-playwright/src/test/java/com/cognizantsoftvision/maqs/playwright/pageModel/IFramePageModel.java +++ b/maqs-playwright/src/test/java/io/github/maqs/playwright/pageModel/IFramePageModel.java @@ -2,11 +2,11 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.playwright.pageModel; +package io.github.maqs.playwright.pageModel; -import com.cognizantsoftvision.maqs.playwright.IPlaywrightTestObject; -import com.cognizantsoftvision.maqs.playwright.PlaywrightConfig; -import com.cognizantsoftvision.maqs.playwright.PlaywrightSyncElement; +import io.github.maqs.playwright.IPlaywrightTestObject; +import io.github.maqs.playwright.PlaywrightConfig; +import io.github.maqs.playwright.PlaywrightSyncElement; import com.microsoft.playwright.FrameLocator; /** diff --git a/maqs-playwright/src/test/java/com/cognizantsoftvision/maqs/playwright/pageModel/PageModel.java b/maqs-playwright/src/test/java/io/github/maqs/playwright/pageModel/PageModel.java similarity index 93% rename from maqs-playwright/src/test/java/com/cognizantsoftvision/maqs/playwright/pageModel/PageModel.java rename to maqs-playwright/src/test/java/io/github/maqs/playwright/pageModel/PageModel.java index a637689b4..b60742193 100644 --- a/maqs-playwright/src/test/java/com/cognizantsoftvision/maqs/playwright/pageModel/PageModel.java +++ b/maqs-playwright/src/test/java/io/github/maqs/playwright/pageModel/PageModel.java @@ -2,15 +2,15 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.playwright.pageModel; - -import com.cognizantsoftvision.maqs.playwright.BasePlaywrightPageModel; -import com.cognizantsoftvision.maqs.playwright.IPlaywrightTestObject; -import com.cognizantsoftvision.maqs.playwright.PageDriver; -import com.cognizantsoftvision.maqs.playwright.PlaywrightConfig; -import com.cognizantsoftvision.maqs.playwright.PlaywrightSyncElement; -import com.cognizantsoftvision.maqs.utilities.logging.ILogger; -import com.cognizantsoftvision.maqs.utilities.performance.IPerfTimerCollection; +package io.github.maqs.playwright.pageModel; + +import io.github.maqs.playwright.BasePlaywrightPageModel; +import io.github.maqs.playwright.IPlaywrightTestObject; +import io.github.maqs.playwright.PageDriver; +import io.github.maqs.playwright.PlaywrightConfig; +import io.github.maqs.playwright.PlaywrightSyncElement; +import io.github.maqs.utilities.logging.ILogger; +import io.github.maqs.utilities.performance.IPerfTimerCollection; /** * The Playwright Page Model class for testing. diff --git a/maqs-selenium/pom.xml b/maqs-selenium/pom.xml index 7e881af9b..4b5f229fb 100644 --- a/maqs-selenium/pom.xml +++ b/maqs-selenium/pom.xml @@ -2,12 +2,12 @@ 4.0.0 - com.cognizantsoftvision.maqs + io.github.maqs maqs-java ${revision} - com.cognizantsoftvision.maqs.selenium + io.github.maqs.selenium maqs-selenium MAQS Selenium Testing Module ${revision} @@ -20,11 +20,11 @@ - com.cognizantsoftvision.maqs.utilities + io.github.maqs.utilities maqs-utilities - com.cognizantsoftvision.maqs.base + io.github.maqs.base maqs-base diff --git a/maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/AbstractLazyElement.java b/maqs-selenium/src/main/java/io/github/maqs/selenium/AbstractLazyElement.java similarity index 97% rename from maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/AbstractLazyElement.java rename to maqs-selenium/src/main/java/io/github/maqs/selenium/AbstractLazyElement.java index 7bdf77320..bc20b5013 100644 --- a/maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/AbstractLazyElement.java +++ b/maqs-selenium/src/main/java/io/github/maqs/selenium/AbstractLazyElement.java @@ -2,15 +2,15 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.selenium; - -import com.cognizantsoftvision.maqs.selenium.factories.FluentWaitFactory; -import com.cognizantsoftvision.maqs.selenium.factories.UIWaitFactory; -import com.cognizantsoftvision.maqs.utilities.helper.GenericWait; -import com.cognizantsoftvision.maqs.utilities.helper.exceptions.ExecutionFailedException; -import com.cognizantsoftvision.maqs.utilities.helper.exceptions.TimeoutException; -import com.cognizantsoftvision.maqs.utilities.helper.functionalinterfaces.Action; -import com.cognizantsoftvision.maqs.utilities.logging.MessageType; +package io.github.maqs.selenium; + +import io.github.maqs.selenium.factories.FluentWaitFactory; +import io.github.maqs.selenium.factories.UIWaitFactory; +import io.github.maqs.utilities.helper.GenericWait; +import io.github.maqs.utilities.helper.exceptions.ExecutionFailedException; +import io.github.maqs.utilities.helper.exceptions.TimeoutException; +import io.github.maqs.utilities.helper.functionalinterfaces.Action; +import io.github.maqs.utilities.logging.MessageType; import java.util.List; import java.util.Objects; import java.util.function.Predicate; diff --git a/maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/ActionBuilder.java b/maqs-selenium/src/main/java/io/github/maqs/selenium/ActionBuilder.java similarity index 94% rename from maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/ActionBuilder.java rename to maqs-selenium/src/main/java/io/github/maqs/selenium/ActionBuilder.java index 6f2143130..94d654405 100644 --- a/maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/ActionBuilder.java +++ b/maqs-selenium/src/main/java/io/github/maqs/selenium/ActionBuilder.java @@ -2,9 +2,9 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.selenium; +package io.github.maqs.selenium; -import com.cognizantsoftvision.maqs.selenium.factories.UIWaitFactory; +import io.github.maqs.selenium.factories.UIWaitFactory; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; diff --git a/maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/BaseSeleniumPageModel.java b/maqs-selenium/src/main/java/io/github/maqs/selenium/BaseSeleniumPageModel.java similarity index 93% rename from maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/BaseSeleniumPageModel.java rename to maqs-selenium/src/main/java/io/github/maqs/selenium/BaseSeleniumPageModel.java index 8dc630e19..7ab507cba 100644 --- a/maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/BaseSeleniumPageModel.java +++ b/maqs-selenium/src/main/java/io/github/maqs/selenium/BaseSeleniumPageModel.java @@ -2,11 +2,11 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.selenium; +package io.github.maqs.selenium; -import com.cognizantsoftvision.maqs.selenium.factories.UIWaitFactory; -import com.cognizantsoftvision.maqs.utilities.logging.ILogger; -import com.cognizantsoftvision.maqs.utilities.performance.IPerfTimerCollection; +import io.github.maqs.selenium.factories.UIWaitFactory; +import io.github.maqs.utilities.logging.ILogger; +import io.github.maqs.utilities.performance.IPerfTimerCollection; import java.util.HashMap; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; diff --git a/maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/BaseSeleniumTest.java b/maqs-selenium/src/main/java/io/github/maqs/selenium/BaseSeleniumTest.java similarity index 85% rename from maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/BaseSeleniumTest.java rename to maqs-selenium/src/main/java/io/github/maqs/selenium/BaseSeleniumTest.java index 2b3ee49c0..4c33773ea 100644 --- a/maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/BaseSeleniumTest.java +++ b/maqs-selenium/src/main/java/io/github/maqs/selenium/BaseSeleniumTest.java @@ -2,13 +2,13 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.selenium; +package io.github.maqs.selenium; -import com.cognizantsoftvision.maqs.base.BaseExtendableTest; -import com.cognizantsoftvision.maqs.selenium.exceptions.WebDriverFactoryException; -import com.cognizantsoftvision.maqs.utilities.helper.StringProcessor; -import com.cognizantsoftvision.maqs.utilities.logging.LoggingEnabled; -import com.cognizantsoftvision.maqs.utilities.logging.MessageType; +import io.github.maqs.base.BaseExtendableTest; +import io.github.maqs.selenium.exceptions.WebDriverFactoryException; +import io.github.maqs.utilities.helper.StringProcessor; +import io.github.maqs.utilities.logging.LoggingEnabled; +import io.github.maqs.utilities.logging.MessageType; import org.openqa.selenium.WebDriver; import org.testng.ITestResult; diff --git a/maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/ElementHandler.java b/maqs-selenium/src/main/java/io/github/maqs/selenium/ElementHandler.java similarity index 97% rename from maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/ElementHandler.java rename to maqs-selenium/src/main/java/io/github/maqs/selenium/ElementHandler.java index 292f49c50..975c883f1 100644 --- a/maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/ElementHandler.java +++ b/maqs-selenium/src/main/java/io/github/maqs/selenium/ElementHandler.java @@ -2,13 +2,13 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.selenium; +package io.github.maqs.selenium; -import com.cognizantsoftvision.maqs.selenium.exceptions.ElementHandlerException; -import com.cognizantsoftvision.maqs.selenium.factories.UIWaitFactory; -import com.cognizantsoftvision.maqs.utilities.helper.ListProcessor; -import com.cognizantsoftvision.maqs.utilities.logging.ILogger; -import com.cognizantsoftvision.maqs.utilities.logging.MessageType; +import io.github.maqs.selenium.exceptions.ElementHandlerException; +import io.github.maqs.selenium.factories.UIWaitFactory; +import io.github.maqs.utilities.helper.ListProcessor; +import io.github.maqs.utilities.logging.ILogger; +import io.github.maqs.utilities.logging.MessageType; import java.io.PrintWriter; import java.io.StringWriter; import java.util.ArrayList; diff --git a/maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/EventHandler.java b/maqs-selenium/src/main/java/io/github/maqs/selenium/EventHandler.java similarity index 98% rename from maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/EventHandler.java rename to maqs-selenium/src/main/java/io/github/maqs/selenium/EventHandler.java index ffb741883..e95121032 100644 --- a/maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/EventHandler.java +++ b/maqs-selenium/src/main/java/io/github/maqs/selenium/EventHandler.java @@ -2,10 +2,10 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.selenium; +package io.github.maqs.selenium; -import com.cognizantsoftvision.maqs.utilities.logging.ILogger; -import com.cognizantsoftvision.maqs.utilities.logging.MessageType; +import io.github.maqs.utilities.logging.ILogger; +import io.github.maqs.utilities.logging.MessageType; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.List; diff --git a/maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/ISeleniumTestObject.java b/maqs-selenium/src/main/java/io/github/maqs/selenium/ISeleniumTestObject.java similarity index 88% rename from maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/ISeleniumTestObject.java rename to maqs-selenium/src/main/java/io/github/maqs/selenium/ISeleniumTestObject.java index e059deed1..801b9bc29 100644 --- a/maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/ISeleniumTestObject.java +++ b/maqs-selenium/src/main/java/io/github/maqs/selenium/ISeleniumTestObject.java @@ -2,9 +2,9 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.selenium; +package io.github.maqs.selenium; -import com.cognizantsoftvision.maqs.base.ITestObject; +import io.github.maqs.base.ITestObject; import java.util.function.Supplier; import org.openqa.selenium.WebDriver; diff --git a/maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/LazyWebElement.java b/maqs-selenium/src/main/java/io/github/maqs/selenium/LazyWebElement.java similarity index 96% rename from maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/LazyWebElement.java rename to maqs-selenium/src/main/java/io/github/maqs/selenium/LazyWebElement.java index 6861fc173..11db6d158 100644 --- a/maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/LazyWebElement.java +++ b/maqs-selenium/src/main/java/io/github/maqs/selenium/LazyWebElement.java @@ -2,9 +2,9 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.selenium; +package io.github.maqs.selenium; -import com.cognizantsoftvision.maqs.utilities.helper.exceptions.TimeoutException; +import io.github.maqs.utilities.helper.exceptions.TimeoutException; import java.util.ArrayList; import java.util.List; import org.openqa.selenium.By; diff --git a/maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/SeleniumConfig.java b/maqs-selenium/src/main/java/io/github/maqs/selenium/SeleniumConfig.java similarity index 94% rename from maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/SeleniumConfig.java rename to maqs-selenium/src/main/java/io/github/maqs/selenium/SeleniumConfig.java index 84c1e2453..612c77562 100644 --- a/maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/SeleniumConfig.java +++ b/maqs-selenium/src/main/java/io/github/maqs/selenium/SeleniumConfig.java @@ -2,13 +2,13 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.selenium; +package io.github.maqs.selenium; -import com.cognizantsoftvision.maqs.selenium.constants.BrowserType; -import com.cognizantsoftvision.maqs.selenium.constants.RemoteBrowserType; -import com.cognizantsoftvision.maqs.utilities.helper.Config; -import com.cognizantsoftvision.maqs.utilities.helper.ConfigSection; -import com.cognizantsoftvision.maqs.utilities.helper.StringProcessor; +import io.github.maqs.selenium.constants.BrowserType; +import io.github.maqs.selenium.constants.RemoteBrowserType; +import io.github.maqs.utilities.helper.Config; +import io.github.maqs.utilities.helper.ConfigSection; +import io.github.maqs.utilities.helper.StringProcessor; import java.time.Duration; import java.util.HashMap; import java.util.Map; diff --git a/maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/SeleniumDriverManager.java b/maqs-selenium/src/main/java/io/github/maqs/selenium/SeleniumDriverManager.java similarity index 89% rename from maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/SeleniumDriverManager.java rename to maqs-selenium/src/main/java/io/github/maqs/selenium/SeleniumDriverManager.java index db4d29e1c..afdd1d7ed 100644 --- a/maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/SeleniumDriverManager.java +++ b/maqs-selenium/src/main/java/io/github/maqs/selenium/SeleniumDriverManager.java @@ -2,14 +2,14 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.selenium; - -import com.cognizantsoftvision.maqs.base.DriverManager; -import com.cognizantsoftvision.maqs.base.ITestObject; -import com.cognizantsoftvision.maqs.utilities.helper.StringProcessor; -import com.cognizantsoftvision.maqs.utilities.logging.LoggingConfig; -import com.cognizantsoftvision.maqs.utilities.logging.LoggingEnabled; -import com.cognizantsoftvision.maqs.utilities.logging.MessageType; +package io.github.maqs.selenium; + +import io.github.maqs.base.DriverManager; +import io.github.maqs.base.ITestObject; +import io.github.maqs.utilities.helper.StringProcessor; +import io.github.maqs.utilities.logging.LoggingConfig; +import io.github.maqs.utilities.logging.LoggingEnabled; +import io.github.maqs.utilities.logging.MessageType; import java.util.function.Supplier; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WrapsDriver; diff --git a/maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/SeleniumTestObject.java b/maqs-selenium/src/main/java/io/github/maqs/selenium/SeleniumTestObject.java similarity index 88% rename from maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/SeleniumTestObject.java rename to maqs-selenium/src/main/java/io/github/maqs/selenium/SeleniumTestObject.java index c0838cd0f..72312bf35 100644 --- a/maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/SeleniumTestObject.java +++ b/maqs-selenium/src/main/java/io/github/maqs/selenium/SeleniumTestObject.java @@ -2,12 +2,12 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.selenium; +package io.github.maqs.selenium; -import com.cognizantsoftvision.maqs.base.BaseTestObject; -import com.cognizantsoftvision.maqs.base.exceptions.MAQSRuntimeException; -import com.cognizantsoftvision.maqs.utilities.logging.ILogger; -import com.cognizantsoftvision.maqs.utilities.logging.MessageType; +import io.github.maqs.base.BaseTestObject; +import io.github.maqs.base.exceptions.MAQSRuntimeException; +import io.github.maqs.utilities.logging.ILogger; +import io.github.maqs.utilities.logging.MessageType; import java.util.function.Supplier; import org.openqa.selenium.WebDriver; diff --git a/maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/SeleniumUtilities.java b/maqs-selenium/src/main/java/io/github/maqs/selenium/SeleniumUtilities.java similarity index 94% rename from maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/SeleniumUtilities.java rename to maqs-selenium/src/main/java/io/github/maqs/selenium/SeleniumUtilities.java index 40f4879dd..c77fb447a 100644 --- a/maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/SeleniumUtilities.java +++ b/maqs-selenium/src/main/java/io/github/maqs/selenium/SeleniumUtilities.java @@ -2,15 +2,15 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.selenium; - -import com.cognizantsoftvision.maqs.base.exceptions.MAQSRuntimeException; -import com.cognizantsoftvision.maqs.utilities.helper.StringProcessor; -import com.cognizantsoftvision.maqs.utilities.logging.FileLogger; -import com.cognizantsoftvision.maqs.utilities.logging.HtmlFileLogger; -import com.cognizantsoftvision.maqs.utilities.logging.Logger; -import com.cognizantsoftvision.maqs.utilities.logging.LoggingConfig; -import com.cognizantsoftvision.maqs.utilities.logging.MessageType; +package io.github.maqs.selenium; + +import io.github.maqs.base.exceptions.MAQSRuntimeException; +import io.github.maqs.utilities.helper.StringProcessor; +import io.github.maqs.utilities.logging.FileLogger; +import io.github.maqs.utilities.logging.HtmlFileLogger; +import io.github.maqs.utilities.logging.Logger; +import io.github.maqs.utilities.logging.LoggingConfig; +import io.github.maqs.utilities.logging.MessageType; import java.io.File; import java.io.FileWriter; import java.io.IOException; diff --git a/maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/UIFind.java b/maqs-selenium/src/main/java/io/github/maqs/selenium/UIFind.java similarity index 98% rename from maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/UIFind.java rename to maqs-selenium/src/main/java/io/github/maqs/selenium/UIFind.java index 0cd66b164..f5f9ab122 100644 --- a/maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/UIFind.java +++ b/maqs-selenium/src/main/java/io/github/maqs/selenium/UIFind.java @@ -2,9 +2,9 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.selenium; +package io.github.maqs.selenium; -import com.cognizantsoftvision.maqs.utilities.helper.StringProcessor; +import io.github.maqs.utilities.helper.StringProcessor; import java.util.List; import org.openqa.selenium.By; import org.openqa.selenium.NotFoundException; diff --git a/maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/UIWait.java b/maqs-selenium/src/main/java/io/github/maqs/selenium/UIWait.java similarity index 99% rename from maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/UIWait.java rename to maqs-selenium/src/main/java/io/github/maqs/selenium/UIWait.java index d1eeaed73..33ba7c1b8 100644 --- a/maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/UIWait.java +++ b/maqs-selenium/src/main/java/io/github/maqs/selenium/UIWait.java @@ -2,11 +2,11 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.selenium; +package io.github.maqs.selenium; -import com.cognizantsoftvision.maqs.selenium.factories.FluentWaitFactory; -import com.cognizantsoftvision.maqs.utilities.helper.Config; -import com.cognizantsoftvision.maqs.utilities.helper.ConfigSection; +import io.github.maqs.selenium.factories.FluentWaitFactory; +import io.github.maqs.utilities.helper.Config; +import io.github.maqs.utilities.helper.ConfigSection; import java.text.MessageFormat; import java.time.Duration; import java.util.List; diff --git a/maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/WebDriverFactory.java b/maqs-selenium/src/main/java/io/github/maqs/selenium/WebDriverFactory.java similarity index 96% rename from maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/WebDriverFactory.java rename to maqs-selenium/src/main/java/io/github/maqs/selenium/WebDriverFactory.java index 34f91bbad..3b70a9596 100644 --- a/maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/WebDriverFactory.java +++ b/maqs-selenium/src/main/java/io/github/maqs/selenium/WebDriverFactory.java @@ -2,17 +2,18 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.selenium; +package io.github.maqs.selenium; -import com.cognizantsoftvision.maqs.selenium.constants.BrowserType; -import com.cognizantsoftvision.maqs.selenium.constants.OperatingSystem; -import com.cognizantsoftvision.maqs.selenium.constants.RemoteBrowserType; -import com.cognizantsoftvision.maqs.selenium.exceptions.WebDriverFactoryException; -import com.cognizantsoftvision.maqs.utilities.helper.StringProcessor; +import io.github.maqs.selenium.constants.BrowserType; +import io.github.maqs.selenium.constants.OperatingSystem; +import io.github.maqs.selenium.constants.RemoteBrowserType; +import io.github.maqs.selenium.exceptions.WebDriverFactoryException; +import io.github.maqs.utilities.helper.StringProcessor; import io.github.bonigarcia.wdm.WebDriverManager; import java.net.URL; import java.util.HashMap; import java.util.Map; + import org.openqa.selenium.Dimension; import org.openqa.selenium.MutableCapabilities; import org.openqa.selenium.PageLoadStrategy; diff --git a/maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/constants/BrowserType.java b/maqs-selenium/src/main/java/io/github/maqs/selenium/constants/BrowserType.java similarity index 90% rename from maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/constants/BrowserType.java rename to maqs-selenium/src/main/java/io/github/maqs/selenium/constants/BrowserType.java index b8a0d5523..93d2c9382 100644 --- a/maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/constants/BrowserType.java +++ b/maqs-selenium/src/main/java/io/github/maqs/selenium/constants/BrowserType.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.selenium.constants; +package io.github.maqs.selenium.constants; /** * Known browser types. diff --git a/maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/constants/OperatingSystem.java b/maqs-selenium/src/main/java/io/github/maqs/selenium/constants/OperatingSystem.java similarity index 97% rename from maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/constants/OperatingSystem.java rename to maqs-selenium/src/main/java/io/github/maqs/selenium/constants/OperatingSystem.java index 8b9759f91..0cfcb312e 100644 --- a/maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/constants/OperatingSystem.java +++ b/maqs-selenium/src/main/java/io/github/maqs/selenium/constants/OperatingSystem.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.selenium.constants; +package io.github.maqs.selenium.constants; import java.util.ArrayList; import java.util.Arrays; diff --git a/maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/constants/RemoteBrowserType.java b/maqs-selenium/src/main/java/io/github/maqs/selenium/constants/RemoteBrowserType.java similarity index 87% rename from maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/constants/RemoteBrowserType.java rename to maqs-selenium/src/main/java/io/github/maqs/selenium/constants/RemoteBrowserType.java index 6ce6c7d0a..0792d7b2d 100644 --- a/maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/constants/RemoteBrowserType.java +++ b/maqs-selenium/src/main/java/io/github/maqs/selenium/constants/RemoteBrowserType.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.selenium.constants; +package io.github.maqs.selenium.constants; /** * Known remote browser types. diff --git a/maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/exceptions/ElementHandlerException.java b/maqs-selenium/src/main/java/io/github/maqs/selenium/exceptions/ElementHandlerException.java similarity index 83% rename from maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/exceptions/ElementHandlerException.java rename to maqs-selenium/src/main/java/io/github/maqs/selenium/exceptions/ElementHandlerException.java index e0a4840f6..4964075bc 100644 --- a/maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/exceptions/ElementHandlerException.java +++ b/maqs-selenium/src/main/java/io/github/maqs/selenium/exceptions/ElementHandlerException.java @@ -2,9 +2,9 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.selenium.exceptions; +package io.github.maqs.selenium.exceptions; -import com.cognizantsoftvision.maqs.base.exceptions.MAQSRuntimeException; +import io.github.maqs.base.exceptions.MAQSRuntimeException; /** * The type Element handler exception. diff --git a/maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/exceptions/WebDriverFactoryException.java b/maqs-selenium/src/main/java/io/github/maqs/selenium/exceptions/WebDriverFactoryException.java similarity index 77% rename from maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/exceptions/WebDriverFactoryException.java rename to maqs-selenium/src/main/java/io/github/maqs/selenium/exceptions/WebDriverFactoryException.java index 0228a3ae9..af6ad9ec1 100644 --- a/maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/exceptions/WebDriverFactoryException.java +++ b/maqs-selenium/src/main/java/io/github/maqs/selenium/exceptions/WebDriverFactoryException.java @@ -2,9 +2,9 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.selenium.exceptions; +package io.github.maqs.selenium.exceptions; -import com.cognizantsoftvision.maqs.base.exceptions.MAQSRuntimeException; +import io.github.maqs.base.exceptions.MAQSRuntimeException; /** * The type Web driver factory exception. diff --git a/maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/factories/FluentWaitFactory.java b/maqs-selenium/src/main/java/io/github/maqs/selenium/factories/FluentWaitFactory.java similarity index 92% rename from maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/factories/FluentWaitFactory.java rename to maqs-selenium/src/main/java/io/github/maqs/selenium/factories/FluentWaitFactory.java index 168b4db55..a29db0611 100644 --- a/maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/factories/FluentWaitFactory.java +++ b/maqs-selenium/src/main/java/io/github/maqs/selenium/factories/FluentWaitFactory.java @@ -2,10 +2,11 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.selenium.factories; +package io.github.maqs.selenium.factories; -import com.cognizantsoftvision.maqs.selenium.SeleniumConfig; +import io.github.maqs.selenium.SeleniumConfig; import java.time.Duration; + import org.openqa.selenium.NotFoundException; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.ui.FluentWait; diff --git a/maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/factories/UIFindFactory.java b/maqs-selenium/src/main/java/io/github/maqs/selenium/factories/UIFindFactory.java similarity index 84% rename from maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/factories/UIFindFactory.java rename to maqs-selenium/src/main/java/io/github/maqs/selenium/factories/UIFindFactory.java index 97a5ff4e6..bde4787df 100644 --- a/maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/factories/UIFindFactory.java +++ b/maqs-selenium/src/main/java/io/github/maqs/selenium/factories/UIFindFactory.java @@ -2,9 +2,9 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.selenium.factories; +package io.github.maqs.selenium.factories; -import com.cognizantsoftvision.maqs.selenium.UIFind; +import io.github.maqs.selenium.UIFind; import org.openqa.selenium.SearchContext; /** diff --git a/maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/factories/UIWaitFactory.java b/maqs-selenium/src/main/java/io/github/maqs/selenium/factories/UIWaitFactory.java similarity index 93% rename from maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/factories/UIWaitFactory.java rename to maqs-selenium/src/main/java/io/github/maqs/selenium/factories/UIWaitFactory.java index eeb6d03e3..23e6a8c11 100644 --- a/maqs-selenium/src/main/java/com/cognizantsoftvision/maqs/selenium/factories/UIWaitFactory.java +++ b/maqs-selenium/src/main/java/io/github/maqs/selenium/factories/UIWaitFactory.java @@ -2,13 +2,14 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.selenium.factories; +package io.github.maqs.selenium.factories; -import com.cognizantsoftvision.maqs.selenium.SeleniumConfig; -import com.cognizantsoftvision.maqs.selenium.SeleniumUtilities; -import com.cognizantsoftvision.maqs.selenium.UIWait; +import io.github.maqs.selenium.SeleniumConfig; +import io.github.maqs.selenium.SeleniumUtilities; +import io.github.maqs.selenium.UIWait; import java.time.Duration; import java.util.concurrent.ConcurrentHashMap; + import org.openqa.selenium.SearchContext; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; diff --git a/maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/ActionBuilderUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/ActionBuilderUnitTest.java similarity index 92% rename from maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/ActionBuilderUnitTest.java rename to maqs-selenium/src/test/java/io/github/maqs/selenium/ActionBuilderUnitTest.java index 3d914aece..973f39686 100644 --- a/maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/ActionBuilderUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/ActionBuilderUnitTest.java @@ -2,11 +2,11 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.selenium; +package io.github.maqs.selenium; -import com.cognizantsoftvision.maqs.selenium.factories.UIWaitFactory; -import com.cognizantsoftvision.maqs.selenium.pageModel.AutomationPageModel; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; +import io.github.maqs.selenium.factories.UIWaitFactory; +import io.github.maqs.selenium.pageModel.AutomationPageModel; +import io.github.maqs.utilities.helper.TestCategories; import org.openqa.selenium.Keys; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/BaseSeleniumPageModelUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/BaseSeleniumPageModelUnitTest.java similarity index 96% rename from maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/BaseSeleniumPageModelUnitTest.java rename to maqs-selenium/src/test/java/io/github/maqs/selenium/BaseSeleniumPageModelUnitTest.java index 6ed0fff81..ce950e30b 100644 --- a/maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/BaseSeleniumPageModelUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/BaseSeleniumPageModelUnitTest.java @@ -2,11 +2,11 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.selenium; +package io.github.maqs.selenium; -import com.cognizantsoftvision.maqs.selenium.pageModel.AutomationPageModel; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; -import com.cognizantsoftvision.maqs.utilities.helper.exceptions.TimeoutException; +import io.github.maqs.selenium.pageModel.AutomationPageModel; +import io.github.maqs.utilities.helper.TestCategories; +import io.github.maqs.utilities.helper.exceptions.TimeoutException; import org.openqa.selenium.WebDriver; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/BaseSeleniumTestUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/BaseSeleniumTestUnitTest.java similarity index 95% rename from maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/BaseSeleniumTestUnitTest.java rename to maqs-selenium/src/test/java/io/github/maqs/selenium/BaseSeleniumTestUnitTest.java index cba1cb3f5..42291e5c5 100644 --- a/maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/BaseSeleniumTestUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/BaseSeleniumTestUnitTest.java @@ -2,9 +2,9 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.selenium; +package io.github.maqs.selenium; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; +import io.github.maqs.utilities.helper.TestCategories; import org.openqa.selenium.WebDriver; import org.testng.Assert; import org.testng.annotations.DataProvider; diff --git a/maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/ElementHandlerUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/ElementHandlerUnitTest.java similarity index 96% rename from maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/ElementHandlerUnitTest.java rename to maqs-selenium/src/test/java/io/github/maqs/selenium/ElementHandlerUnitTest.java index c5c8c28ac..eb93be3bc 100644 --- a/maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/ElementHandlerUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/ElementHandlerUnitTest.java @@ -2,18 +2,19 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.selenium; - -import com.cognizantsoftvision.maqs.selenium.exceptions.ElementHandlerException; -import com.cognizantsoftvision.maqs.selenium.factories.UIWaitFactory; -import com.cognizantsoftvision.maqs.selenium.pageModel.AutomationPageModel; -import com.cognizantsoftvision.maqs.utilities.helper.ListProcessor; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; -import com.cognizantsoftvision.maqs.utilities.logging.FileLogger; +package io.github.maqs.selenium; + +import io.github.maqs.selenium.exceptions.ElementHandlerException; +import io.github.maqs.selenium.factories.UIWaitFactory; +import io.github.maqs.selenium.pageModel.AutomationPageModel; +import io.github.maqs.utilities.helper.ListProcessor; +import io.github.maqs.utilities.helper.TestCategories; +import io.github.maqs.utilities.logging.FileLogger; import java.io.File; import java.io.IOException; import java.nio.charset.StandardCharsets; import java.util.ArrayList; + import org.apache.commons.io.FileUtils; import org.openqa.selenium.By; import org.openqa.selenium.NoSuchElementException; diff --git a/maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/EventHandlerUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/EventHandlerUnitTest.java similarity index 97% rename from maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/EventHandlerUnitTest.java rename to maqs-selenium/src/test/java/io/github/maqs/selenium/EventHandlerUnitTest.java index ae3a90031..01c12763c 100644 --- a/maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/EventHandlerUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/EventHandlerUnitTest.java @@ -2,15 +2,16 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.selenium; +package io.github.maqs.selenium; -import com.cognizantsoftvision.maqs.base.exceptions.MAQSRuntimeException; -import com.cognizantsoftvision.maqs.selenium.factories.UIWaitFactory; -import com.cognizantsoftvision.maqs.selenium.pageModel.AutomationPageModel; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; -import com.cognizantsoftvision.maqs.utilities.logging.FileLogger; +import io.github.maqs.base.exceptions.MAQSRuntimeException; +import io.github.maqs.selenium.factories.UIWaitFactory; +import io.github.maqs.selenium.pageModel.AutomationPageModel; +import io.github.maqs.utilities.helper.TestCategories; +import io.github.maqs.utilities.logging.FileLogger; import java.nio.file.Files; import java.nio.file.Paths; + import org.openqa.selenium.Alert; import org.openqa.selenium.JavascriptExecutor; import org.openqa.selenium.WebDriver; diff --git a/maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/FluentWaitFactoryUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/FluentWaitFactoryUnitTest.java similarity index 77% rename from maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/FluentWaitFactoryUnitTest.java rename to maqs-selenium/src/test/java/io/github/maqs/selenium/FluentWaitFactoryUnitTest.java index 2363cb7db..b3b8e1ccd 100644 --- a/maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/FluentWaitFactoryUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/FluentWaitFactoryUnitTest.java @@ -2,12 +2,12 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.selenium; +package io.github.maqs.selenium; -import com.cognizantsoftvision.maqs.selenium.pageModel.AutomationPageModel; -import com.cognizantsoftvision.maqs.selenium.factories.FluentWaitFactory; -import com.cognizantsoftvision.maqs.selenium.factories.UIWaitFactory; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; +import io.github.maqs.selenium.pageModel.AutomationPageModel; +import io.github.maqs.selenium.factories.FluentWaitFactory; +import io.github.maqs.selenium.factories.UIWaitFactory; +import io.github.maqs.utilities.helper.TestCategories; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.ui.FluentWait; import org.testng.Assert; diff --git a/maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/LazyWebElementUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/LazyWebElementUnitTest.java similarity index 97% rename from maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/LazyWebElementUnitTest.java rename to maqs-selenium/src/test/java/io/github/maqs/selenium/LazyWebElementUnitTest.java index 6ad2a49a0..4b08c6dfe 100644 --- a/maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/LazyWebElementUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/LazyWebElementUnitTest.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.selenium; +package io.github.maqs.selenium; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; @@ -12,11 +12,11 @@ import static org.testng.Assert.assertNull; import static org.testng.Assert.assertTrue; -import com.cognizantsoftvision.maqs.selenium.factories.UIWaitFactory; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; -import com.cognizantsoftvision.maqs.utilities.helper.exceptions.ExecutionFailedException; -import com.cognizantsoftvision.maqs.utilities.helper.exceptions.TimeoutException; -import com.cognizantsoftvision.maqs.utilities.logging.FileLogger; +import io.github.maqs.selenium.factories.UIWaitFactory; +import io.github.maqs.utilities.helper.TestCategories; +import io.github.maqs.utilities.helper.exceptions.ExecutionFailedException; +import io.github.maqs.utilities.helper.exceptions.TimeoutException; +import io.github.maqs.utilities.logging.FileLogger; import java.io.FileNotFoundException; import java.io.IOException; import java.nio.file.Files; @@ -24,6 +24,7 @@ import java.nio.file.Paths; import java.time.Duration; import java.util.List; + import org.openqa.selenium.By; import org.openqa.selenium.Dimension; import org.openqa.selenium.Keys; @@ -31,7 +32,6 @@ import org.openqa.selenium.WebElement; import org.openqa.selenium.interactions.Actions; import org.openqa.selenium.support.ui.WebDriverWait; -import org.testng.Assert; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; import org.testng.asserts.SoftAssert; @@ -491,10 +491,10 @@ public void lazyElementSendSecretKeys() public void lazyElementSubmit() throws TimeoutException, InterruptedException, ExecutionFailedException { String newText = "Test"; this.getSubmitText().sendKeys(newText); - Assert.assertNotEquals(newText, getSubmittedValue().getText(), "Should not be set yet"); + assertNotEquals(newText, getSubmittedValue().getText(), "Should not be set yet"); this.getSubmitButton().submit(); - Assert.assertEquals(newText, getSubmittedValue().getText()); + assertEquals(newText, getSubmittedValue().getText()); } /** diff --git a/maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/SeleniumConfigUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumConfigUnitTest.java similarity index 97% rename from maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/SeleniumConfigUnitTest.java rename to maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumConfigUnitTest.java index e11b10bb8..7e62fbd97 100644 --- a/maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/SeleniumConfigUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumConfigUnitTest.java @@ -2,13 +2,14 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.selenium; +package io.github.maqs.selenium; -import com.cognizantsoftvision.maqs.selenium.constants.BrowserType; -import com.cognizantsoftvision.maqs.selenium.constants.RemoteBrowserType; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; +import io.github.maqs.selenium.constants.BrowserType; +import io.github.maqs.selenium.constants.RemoteBrowserType; +import io.github.maqs.utilities.helper.TestCategories; import java.time.Duration; import java.util.Map; + import org.testng.Assert; import org.testng.annotations.Test; import org.testng.asserts.SoftAssert; diff --git a/maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/SeleniumDriverManagerUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumDriverManagerUnitTest.java similarity index 94% rename from maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/SeleniumDriverManagerUnitTest.java rename to maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumDriverManagerUnitTest.java index a45107aba..6a8c817d7 100644 --- a/maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/SeleniumDriverManagerUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumDriverManagerUnitTest.java @@ -2,10 +2,10 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.selenium; +package io.github.maqs.selenium; -import com.cognizantsoftvision.maqs.base.BaseGenericTest; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; +import io.github.maqs.base.BaseGenericTest; +import io.github.maqs.utilities.helper.TestCategories; import java.util.function.Supplier; import org.openqa.selenium.WebDriver; import org.testng.Assert; diff --git a/maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/SeleniumTestObjectUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumTestObjectUnitTest.java similarity index 96% rename from maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/SeleniumTestObjectUnitTest.java rename to maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumTestObjectUnitTest.java index dc6b83307..5af75ba96 100644 --- a/maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/SeleniumTestObjectUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumTestObjectUnitTest.java @@ -2,10 +2,10 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.selenium; +package io.github.maqs.selenium; -import com.cognizantsoftvision.maqs.base.BaseGenericTest; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; +import io.github.maqs.base.BaseGenericTest; +import io.github.maqs.utilities.helper.TestCategories; import org.openqa.selenium.WebDriver; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/SeleniumUtilitiesUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumUtilitiesUnitTest.java similarity index 97% rename from maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/SeleniumUtilitiesUnitTest.java rename to maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumUtilitiesUnitTest.java index 217a84a6a..5dad45c29 100644 --- a/maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/SeleniumUtilitiesUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumUtilitiesUnitTest.java @@ -2,22 +2,22 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.selenium; - -import com.cognizantsoftvision.maqs.base.BaseGenericTest; -import com.cognizantsoftvision.maqs.selenium.factories.UIWaitFactory; -import com.cognizantsoftvision.maqs.utilities.helper.StringProcessor; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; -import com.cognizantsoftvision.maqs.utilities.logging.ConsoleLogger; -import com.cognizantsoftvision.maqs.utilities.logging.FileLogger; +package io.github.maqs.selenium; + +import io.github.maqs.base.BaseGenericTest; +import io.github.maqs.selenium.factories.UIWaitFactory; +import io.github.maqs.utilities.helper.StringProcessor; +import io.github.maqs.utilities.helper.TestCategories; +import io.github.maqs.utilities.logging.ConsoleLogger; +import io.github.maqs.utilities.logging.FileLogger; import java.io.File; import java.nio.file.Paths; import java.time.Clock; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; import java.util.Locale; -import com.cognizantsoftvision.maqs.utilities.logging.HtmlFileLogger; -import com.cognizantsoftvision.maqs.utilities.logging.Logger; +import io.github.maqs.utilities.logging.HtmlFileLogger; +import io.github.maqs.utilities.logging.Logger; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; diff --git a/maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/UIFindFactoryUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/UIFindFactoryUnitTest.java similarity index 83% rename from maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/UIFindFactoryUnitTest.java rename to maqs-selenium/src/test/java/io/github/maqs/selenium/UIFindFactoryUnitTest.java index 07330a157..08983cf4b 100644 --- a/maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/UIFindFactoryUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/UIFindFactoryUnitTest.java @@ -2,12 +2,12 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.selenium; +package io.github.maqs.selenium; -import com.cognizantsoftvision.maqs.selenium.pageModel.AutomationPageModel; -import com.cognizantsoftvision.maqs.selenium.factories.UIFindFactory; -import com.cognizantsoftvision.maqs.selenium.factories.UIWaitFactory; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; +import io.github.maqs.selenium.pageModel.AutomationPageModel; +import io.github.maqs.selenium.factories.UIFindFactory; +import io.github.maqs.selenium.factories.UIWaitFactory; +import io.github.maqs.utilities.helper.TestCategories; import org.openqa.selenium.WebElement; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/UIFindUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/UIFindUnitTest.java similarity index 96% rename from maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/UIFindUnitTest.java rename to maqs-selenium/src/test/java/io/github/maqs/selenium/UIFindUnitTest.java index 8b6a6a4fd..47865d99d 100644 --- a/maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/UIFindUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/UIFindUnitTest.java @@ -2,11 +2,11 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.selenium; +package io.github.maqs.selenium; -import com.cognizantsoftvision.maqs.selenium.factories.UIFindFactory; -import com.cognizantsoftvision.maqs.selenium.pageModel.AutomationPageModel; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; +import io.github.maqs.selenium.factories.UIFindFactory; +import io.github.maqs.selenium.pageModel.AutomationPageModel; +import io.github.maqs.utilities.helper.TestCategories; import java.util.List; import org.openqa.selenium.NotFoundException; diff --git a/maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/UIWaitFactoryUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/UIWaitFactoryUnitTest.java similarity index 94% rename from maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/UIWaitFactoryUnitTest.java rename to maqs-selenium/src/test/java/io/github/maqs/selenium/UIWaitFactoryUnitTest.java index ee0596301..1da50b47a 100644 --- a/maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/UIWaitFactoryUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/UIWaitFactoryUnitTest.java @@ -2,11 +2,11 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.selenium; +package io.github.maqs.selenium; -import com.cognizantsoftvision.maqs.selenium.pageModel.AutomationPageModel; -import com.cognizantsoftvision.maqs.selenium.factories.UIWaitFactory; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; +import io.github.maqs.selenium.pageModel.AutomationPageModel; +import io.github.maqs.selenium.factories.UIWaitFactory; +import io.github.maqs.utilities.helper.TestCategories; import org.openqa.selenium.WebElement; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/UIWaitForUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/UIWaitForUnitTest.java similarity index 96% rename from maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/UIWaitForUnitTest.java rename to maqs-selenium/src/test/java/io/github/maqs/selenium/UIWaitForUnitTest.java index ef9aadcda..fbf4b0a32 100644 --- a/maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/UIWaitForUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/UIWaitForUnitTest.java @@ -1,10 +1,10 @@ -package com.cognizantsoftvision.maqs.selenium; +package io.github.maqs.selenium; -import com.cognizantsoftvision.maqs.selenium.factories.UIWaitFactory; -import com.cognizantsoftvision.maqs.selenium.pageModel.AsyncPageModel; -import com.cognizantsoftvision.maqs.selenium.pageModel.AutomationPageModel; -import com.cognizantsoftvision.maqs.selenium.pageModel.IFramePageModel; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; +import io.github.maqs.selenium.factories.UIWaitFactory; +import io.github.maqs.selenium.pageModel.AsyncPageModel; +import io.github.maqs.selenium.pageModel.AutomationPageModel; +import io.github.maqs.selenium.pageModel.IFramePageModel; +import io.github.maqs.utilities.helper.TestCategories; import org.openqa.selenium.NotFoundException; import org.openqa.selenium.TimeoutException; import org.openqa.selenium.WebElement; diff --git a/maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/UIWaitUntilUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/UIWaitUntilUnitTest.java similarity index 96% rename from maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/UIWaitUntilUnitTest.java rename to maqs-selenium/src/test/java/io/github/maqs/selenium/UIWaitUntilUnitTest.java index a23aefb52..8aa098a55 100644 --- a/maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/UIWaitUntilUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/UIWaitUntilUnitTest.java @@ -2,13 +2,13 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.selenium; +package io.github.maqs.selenium; -import com.cognizantsoftvision.maqs.selenium.factories.UIWaitFactory; -import com.cognizantsoftvision.maqs.selenium.pageModel.AsyncPageModel; -import com.cognizantsoftvision.maqs.selenium.pageModel.AutomationPageModel; -import com.cognizantsoftvision.maqs.selenium.pageModel.IFramePageModel; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; +import io.github.maqs.selenium.factories.UIWaitFactory; +import io.github.maqs.selenium.pageModel.AsyncPageModel; +import io.github.maqs.selenium.pageModel.AutomationPageModel; +import io.github.maqs.selenium.pageModel.IFramePageModel; +import io.github.maqs.utilities.helper.TestCategories; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/WebDriverFactoryUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/WebDriverFactoryUnitTest.java similarity index 96% rename from maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/WebDriverFactoryUnitTest.java rename to maqs-selenium/src/test/java/io/github/maqs/selenium/WebDriverFactoryUnitTest.java index 9e5b848fe..0bfb264fe 100644 --- a/maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/WebDriverFactoryUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/WebDriverFactoryUnitTest.java @@ -2,14 +2,15 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.selenium; +package io.github.maqs.selenium; -import com.cognizantsoftvision.maqs.base.BaseGenericTest; -import com.cognizantsoftvision.maqs.selenium.constants.BrowserType; -import com.cognizantsoftvision.maqs.selenium.constants.RemoteBrowserType; -import com.cognizantsoftvision.maqs.selenium.exceptions.WebDriverFactoryException; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; +import io.github.maqs.base.BaseGenericTest; +import io.github.maqs.selenium.constants.BrowserType; +import io.github.maqs.selenium.constants.RemoteBrowserType; +import io.github.maqs.selenium.exceptions.WebDriverFactoryException; +import io.github.maqs.utilities.helper.TestCategories; import java.util.HashMap; + import org.openqa.selenium.Dimension; import org.openqa.selenium.MutableCapabilities; import org.openqa.selenium.WebDriver; diff --git a/maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/constants/OperatingSystemUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/constants/OperatingSystemUnitTest.java similarity index 94% rename from maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/constants/OperatingSystemUnitTest.java rename to maqs-selenium/src/test/java/io/github/maqs/selenium/constants/OperatingSystemUnitTest.java index 3919bb7bf..692872e5c 100644 --- a/maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/constants/OperatingSystemUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/constants/OperatingSystemUnitTest.java @@ -2,10 +2,10 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.selenium.constants; +package io.github.maqs.selenium.constants; -import com.cognizantsoftvision.maqs.base.BaseGenericTest; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; +import io.github.maqs.base.BaseGenericTest; +import io.github.maqs.utilities.helper.TestCategories; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/pageModel/AsyncPageModel.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/pageModel/AsyncPageModel.java similarity index 84% rename from maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/pageModel/AsyncPageModel.java rename to maqs-selenium/src/test/java/io/github/maqs/selenium/pageModel/AsyncPageModel.java index d4f21f3b3..578958ef4 100644 --- a/maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/pageModel/AsyncPageModel.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/pageModel/AsyncPageModel.java @@ -2,10 +2,10 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.selenium.pageModel; +package io.github.maqs.selenium.pageModel; -import com.cognizantsoftvision.maqs.selenium.ISeleniumTestObject; -import com.cognizantsoftvision.maqs.selenium.SeleniumConfig; +import io.github.maqs.selenium.ISeleniumTestObject; +import io.github.maqs.selenium.SeleniumConfig; import org.openqa.selenium.By; /** diff --git a/maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/pageModel/AutomationPageModel.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/pageModel/AutomationPageModel.java similarity index 91% rename from maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/pageModel/AutomationPageModel.java rename to maqs-selenium/src/test/java/io/github/maqs/selenium/pageModel/AutomationPageModel.java index 9adef9db9..786429866 100644 --- a/maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/pageModel/AutomationPageModel.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/pageModel/AutomationPageModel.java @@ -2,13 +2,13 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.selenium.pageModel; +package io.github.maqs.selenium.pageModel; -import com.cognizantsoftvision.maqs.selenium.ISeleniumTestObject; -import com.cognizantsoftvision.maqs.selenium.LazyWebElement; -import com.cognizantsoftvision.maqs.selenium.SeleniumConfig; -import com.cognizantsoftvision.maqs.selenium.UIWait; -import com.cognizantsoftvision.maqs.utilities.helper.exceptions.TimeoutException; +import io.github.maqs.selenium.ISeleniumTestObject; +import io.github.maqs.selenium.LazyWebElement; +import io.github.maqs.selenium.SeleniumConfig; +import io.github.maqs.selenium.UIWait; +import io.github.maqs.utilities.helper.exceptions.TimeoutException; import org.openqa.selenium.By; /** diff --git a/maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/pageModel/HeaderPageModel.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/pageModel/HeaderPageModel.java similarity index 84% rename from maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/pageModel/HeaderPageModel.java rename to maqs-selenium/src/test/java/io/github/maqs/selenium/pageModel/HeaderPageModel.java index d0732991b..1ebd7c2a6 100644 --- a/maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/pageModel/HeaderPageModel.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/pageModel/HeaderPageModel.java @@ -2,12 +2,12 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.selenium.pageModel; +package io.github.maqs.selenium.pageModel; -import com.cognizantsoftvision.maqs.selenium.BaseSeleniumPageModel; -import com.cognizantsoftvision.maqs.selenium.ISeleniumTestObject; -import com.cognizantsoftvision.maqs.selenium.SeleniumConfig; -import com.cognizantsoftvision.maqs.selenium.UIWait; +import io.github.maqs.selenium.BaseSeleniumPageModel; +import io.github.maqs.selenium.ISeleniumTestObject; +import io.github.maqs.selenium.SeleniumConfig; +import io.github.maqs.selenium.UIWait; import org.openqa.selenium.By; /** diff --git a/maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/pageModel/IFramePageModel.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/pageModel/IFramePageModel.java similarity index 79% rename from maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/pageModel/IFramePageModel.java rename to maqs-selenium/src/test/java/io/github/maqs/selenium/pageModel/IFramePageModel.java index b7dad713c..883a81dbf 100644 --- a/maqs-selenium/src/test/java/com/cognizantsoftvision/maqs/selenium/pageModel/IFramePageModel.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/pageModel/IFramePageModel.java @@ -2,10 +2,10 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.selenium.pageModel; +package io.github.maqs.selenium.pageModel; -import com.cognizantsoftvision.maqs.selenium.ISeleniumTestObject; -import com.cognizantsoftvision.maqs.selenium.SeleniumConfig; +import io.github.maqs.selenium.ISeleniumTestObject; +import io.github.maqs.selenium.SeleniumConfig; import org.openqa.selenium.By; /** diff --git a/maqs-utilities/pom.xml b/maqs-utilities/pom.xml index 3c0b0dbda..2b307e765 100644 --- a/maqs-utilities/pom.xml +++ b/maqs-utilities/pom.xml @@ -5,12 +5,12 @@ 4.0.0 - com.cognizantsoftvision.maqs + io.github.maqs maqs-java ${revision} - com.cognizantsoftvision.maqs.utilities + io.github.maqs.utilities maqs-utilities MAQS Utilities Testing Module ${revision} diff --git a/maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/helper/Config.java b/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/Config.java similarity index 98% rename from maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/helper/Config.java rename to maqs-utilities/src/main/java/io/github/maqs/utilities/helper/Config.java index 706551e05..6cffff5db 100644 --- a/maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/helper/Config.java +++ b/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/Config.java @@ -2,13 +2,14 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.utilities.helper; +package io.github.maqs.utilities.helper; -import com.cognizantsoftvision.maqs.utilities.helper.exceptions.FrameworkConfigurationException; +import io.github.maqs.utilities.helper.exceptions.FrameworkConfigurationException; import java.io.File; import java.util.HashMap; import java.util.Iterator; import java.util.Map; + import org.apache.commons.configuration2.XMLConfiguration; import org.apache.commons.configuration2.builder.FileBasedConfigurationBuilder; import org.apache.commons.configuration2.builder.fluent.Configurations; diff --git a/maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/helper/ConfigSection.java b/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/ConfigSection.java similarity index 95% rename from maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/helper/ConfigSection.java rename to maqs-utilities/src/main/java/io/github/maqs/utilities/helper/ConfigSection.java index c126b38ea..669b065d4 100644 --- a/maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/helper/ConfigSection.java +++ b/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/ConfigSection.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.utilities.helper; +package io.github.maqs.utilities.helper; /** * The Config Section enum class. diff --git a/maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/helper/GenericWait.java b/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/GenericWait.java similarity index 98% rename from maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/helper/GenericWait.java rename to maqs-utilities/src/main/java/io/github/maqs/utilities/helper/GenericWait.java index b0c3749f2..d0836cadc 100644 --- a/maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/helper/GenericWait.java +++ b/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/GenericWait.java @@ -2,10 +2,11 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.utilities.helper; +package io.github.maqs.utilities.helper; + +import io.github.maqs.utilities.helper.exceptions.FunctionException; +import io.github.maqs.utilities.helper.exceptions.TimeoutException; -import com.cognizantsoftvision.maqs.utilities.helper.exceptions.FunctionException; -import com.cognizantsoftvision.maqs.utilities.helper.exceptions.TimeoutException; import java.time.LocalDateTime; import java.time.temporal.ChronoUnit; import java.util.function.BooleanSupplier; diff --git a/maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/helper/ListProcessor.java b/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/ListProcessor.java similarity index 98% rename from maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/helper/ListProcessor.java rename to maqs-utilities/src/main/java/io/github/maqs/utilities/helper/ListProcessor.java index 67ae75fd5..ae39a610c 100644 --- a/maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/helper/ListProcessor.java +++ b/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/ListProcessor.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.utilities.helper; +package io.github.maqs.utilities.helper; import java.util.ArrayList; import java.util.Collections; diff --git a/maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/helper/PropertyManager.java b/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/PropertyManager.java similarity index 94% rename from maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/helper/PropertyManager.java rename to maqs-utilities/src/main/java/io/github/maqs/utilities/helper/PropertyManager.java index 8820472f4..92e625524 100644 --- a/maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/helper/PropertyManager.java +++ b/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/PropertyManager.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.utilities.helper; +package io.github.maqs.utilities.helper; /** * The Property Manager class. diff --git a/maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/helper/StringProcessor.java b/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/StringProcessor.java similarity index 94% rename from maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/helper/StringProcessor.java rename to maqs-utilities/src/main/java/io/github/maqs/utilities/helper/StringProcessor.java index 22ed8d3d9..d353f29e7 100644 --- a/maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/helper/StringProcessor.java +++ b/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/StringProcessor.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.utilities.helper; +package io.github.maqs.utilities.helper; /** * The String Processor class. diff --git a/maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/helper/TestCategories.java b/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/TestCategories.java similarity index 96% rename from maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/helper/TestCategories.java rename to maqs-utilities/src/main/java/io/github/maqs/utilities/helper/TestCategories.java index 21ac714fa..568a8b4c0 100644 --- a/maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/helper/TestCategories.java +++ b/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/TestCategories.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.utilities.helper; +package io.github.maqs.utilities.helper; /** * The Test Category class. diff --git a/maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/helper/exceptions/ExecutionFailedException.java b/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/exceptions/ExecutionFailedException.java similarity index 90% rename from maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/helper/exceptions/ExecutionFailedException.java rename to maqs-utilities/src/main/java/io/github/maqs/utilities/helper/exceptions/ExecutionFailedException.java index 4351f9ceb..568dfe1e9 100644 --- a/maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/helper/exceptions/ExecutionFailedException.java +++ b/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/exceptions/ExecutionFailedException.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.utilities.helper.exceptions; +package io.github.maqs.utilities.helper.exceptions; /** * The Execution Failed Exception class. diff --git a/maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/helper/exceptions/FrameworkConfigurationException.java b/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/exceptions/FrameworkConfigurationException.java similarity index 85% rename from maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/helper/exceptions/FrameworkConfigurationException.java rename to maqs-utilities/src/main/java/io/github/maqs/utilities/helper/exceptions/FrameworkConfigurationException.java index d946a75aa..3cba9441a 100644 --- a/maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/helper/exceptions/FrameworkConfigurationException.java +++ b/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/exceptions/FrameworkConfigurationException.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.utilities.helper.exceptions; +package io.github.maqs.utilities.helper.exceptions; /** * The Framework Configuration Exception class. diff --git a/maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/helper/exceptions/FunctionException.java b/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/exceptions/FunctionException.java similarity index 89% rename from maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/helper/exceptions/FunctionException.java rename to maqs-utilities/src/main/java/io/github/maqs/utilities/helper/exceptions/FunctionException.java index 3adabf3f1..4a379f1aa 100644 --- a/maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/helper/exceptions/FunctionException.java +++ b/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/exceptions/FunctionException.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.utilities.helper.exceptions; +package io.github.maqs.utilities.helper.exceptions; /** * The Custom Function Exception class. diff --git a/maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/helper/exceptions/MaqsLoggingConfigException.java b/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/exceptions/MaqsLoggingConfigException.java similarity index 86% rename from maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/helper/exceptions/MaqsLoggingConfigException.java rename to maqs-utilities/src/main/java/io/github/maqs/utilities/helper/exceptions/MaqsLoggingConfigException.java index 6caf464ed..6ad2b6f49 100644 --- a/maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/helper/exceptions/MaqsLoggingConfigException.java +++ b/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/exceptions/MaqsLoggingConfigException.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.utilities.helper.exceptions; +package io.github.maqs.utilities.helper.exceptions; /** * Definition of exceptions which will be thrown when there is a problem with loading elements of the MAQS app config. diff --git a/maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/helper/exceptions/TimeoutException.java b/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/exceptions/TimeoutException.java similarity index 92% rename from maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/helper/exceptions/TimeoutException.java rename to maqs-utilities/src/main/java/io/github/maqs/utilities/helper/exceptions/TimeoutException.java index 27ef56285..a86388674 100644 --- a/maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/helper/exceptions/TimeoutException.java +++ b/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/exceptions/TimeoutException.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.utilities.helper.exceptions; +package io.github.maqs.utilities.helper.exceptions; /** * The Custom Timeout Exception. diff --git a/maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/helper/functionalinterfaces/Action.java b/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/functionalinterfaces/Action.java similarity index 78% rename from maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/helper/functionalinterfaces/Action.java rename to maqs-utilities/src/main/java/io/github/maqs/utilities/helper/functionalinterfaces/Action.java index 51f098d15..dac51c29b 100644 --- a/maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/helper/functionalinterfaces/Action.java +++ b/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/functionalinterfaces/Action.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.utilities.helper.functionalinterfaces; +package io.github.maqs.utilities.helper.functionalinterfaces; /** * The Action interface. diff --git a/maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/logging/ConsoleLogger.java b/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/ConsoleLogger.java similarity index 96% rename from maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/logging/ConsoleLogger.java rename to maqs-utilities/src/main/java/io/github/maqs/utilities/logging/ConsoleLogger.java index 83323d60d..026ed30e0 100644 --- a/maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/logging/ConsoleLogger.java +++ b/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/ConsoleLogger.java @@ -2,9 +2,9 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.utilities.logging; +package io.github.maqs.utilities.logging; -import com.cognizantsoftvision.maqs.utilities.helper.StringProcessor; +import io.github.maqs.utilities.helper.StringProcessor; /** * The Console Logger class. diff --git a/maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/logging/FileLogger.java b/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/FileLogger.java similarity index 98% rename from maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/logging/FileLogger.java rename to maqs-utilities/src/main/java/io/github/maqs/utilities/logging/FileLogger.java index eddb8eced..54d60447a 100644 --- a/maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/logging/FileLogger.java +++ b/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/FileLogger.java @@ -2,9 +2,9 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.utilities.logging; +package io.github.maqs.utilities.logging; -import com.cognizantsoftvision.maqs.utilities.helper.StringProcessor; +import io.github.maqs.utilities.helper.StringProcessor; import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; diff --git a/maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/logging/HtmlFileLogger.java b/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/HtmlFileLogger.java similarity index 98% rename from maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/logging/HtmlFileLogger.java rename to maqs-utilities/src/main/java/io/github/maqs/utilities/logging/HtmlFileLogger.java index 3e0112f10..2dd259724 100644 --- a/maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/logging/HtmlFileLogger.java +++ b/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/HtmlFileLogger.java @@ -2,9 +2,9 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.utilities.logging; +package io.github.maqs.utilities.logging; -import com.cognizantsoftvision.maqs.utilities.helper.StringProcessor; +import io.github.maqs.utilities.helper.StringProcessor; import java.io.File; import java.io.FileWriter; import java.io.IOException; diff --git a/maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/logging/IFileLogger.java b/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/IFileLogger.java similarity index 91% rename from maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/logging/IFileLogger.java rename to maqs-utilities/src/main/java/io/github/maqs/utilities/logging/IFileLogger.java index 04331de7f..bcbec2109 100644 --- a/maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/logging/IFileLogger.java +++ b/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/IFileLogger.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.utilities.logging; +package io.github.maqs.utilities.logging; /** * The File Logger interface class. diff --git a/maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/logging/IHtmlFileLogger.java b/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/IHtmlFileLogger.java similarity index 82% rename from maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/logging/IHtmlFileLogger.java rename to maqs-utilities/src/main/java/io/github/maqs/utilities/logging/IHtmlFileLogger.java index c993f2222..b9050b965 100644 --- a/maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/logging/IHtmlFileLogger.java +++ b/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/IHtmlFileLogger.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.utilities.logging; +package io.github.maqs.utilities.logging; public interface IHtmlFileLogger extends IFileLogger { diff --git a/maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/logging/ILogger.java b/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/ILogger.java similarity index 94% rename from maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/logging/ILogger.java rename to maqs-utilities/src/main/java/io/github/maqs/utilities/logging/ILogger.java index 420602716..32692dbce 100644 --- a/maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/logging/ILogger.java +++ b/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/ILogger.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.utilities.logging; +package io.github.maqs.utilities.logging; /** * The Logging interface class. diff --git a/maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/logging/Logger.java b/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/Logger.java similarity index 98% rename from maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/logging/Logger.java rename to maqs-utilities/src/main/java/io/github/maqs/utilities/logging/Logger.java index 5aea378e3..c296de252 100644 --- a/maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/logging/Logger.java +++ b/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/Logger.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.utilities.logging; +package io.github.maqs.utilities.logging; import java.text.SimpleDateFormat; import java.util.Date; diff --git a/maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/logging/LoggerFactory.java b/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/LoggerFactory.java similarity index 90% rename from maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/logging/LoggerFactory.java rename to maqs-utilities/src/main/java/io/github/maqs/utilities/logging/LoggerFactory.java index 88f9c846c..9c3768c79 100644 --- a/maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/logging/LoggerFactory.java +++ b/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/LoggerFactory.java @@ -2,10 +2,10 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.utilities.logging; +package io.github.maqs.utilities.logging; -import com.cognizantsoftvision.maqs.utilities.helper.Config; -import com.cognizantsoftvision.maqs.utilities.helper.exceptions.MaqsLoggingConfigException; +import io.github.maqs.utilities.helper.Config; +import io.github.maqs.utilities.helper.exceptions.MaqsLoggingConfigException; /** * The Logger Factory class. diff --git a/maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/logging/LoggingConfig.java b/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/LoggingConfig.java similarity index 92% rename from maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/logging/LoggingConfig.java rename to maqs-utilities/src/main/java/io/github/maqs/utilities/logging/LoggingConfig.java index 205e34b7d..177a7bb26 100644 --- a/maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/logging/LoggingConfig.java +++ b/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/LoggingConfig.java @@ -2,11 +2,12 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.utilities.logging; +package io.github.maqs.utilities.logging; + +import io.github.maqs.utilities.helper.Config; +import io.github.maqs.utilities.helper.StringProcessor; +import io.github.maqs.utilities.helper.exceptions.MaqsLoggingConfigException; -import com.cognizantsoftvision.maqs.utilities.helper.Config; -import com.cognizantsoftvision.maqs.utilities.helper.StringProcessor; -import com.cognizantsoftvision.maqs.utilities.helper.exceptions.MaqsLoggingConfigException; import java.io.File; /** diff --git a/maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/logging/LoggingEnabled.java b/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/LoggingEnabled.java similarity index 85% rename from maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/logging/LoggingEnabled.java rename to maqs-utilities/src/main/java/io/github/maqs/utilities/logging/LoggingEnabled.java index 14c311ce6..3c097a348 100644 --- a/maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/logging/LoggingEnabled.java +++ b/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/LoggingEnabled.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.utilities.logging; +package io.github.maqs.utilities.logging; /** * The Logging Enabled enum class. diff --git a/maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/logging/MessageType.java b/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/MessageType.java similarity index 95% rename from maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/logging/MessageType.java rename to maqs-utilities/src/main/java/io/github/maqs/utilities/logging/MessageType.java index 7eedc1156..8e731eb02 100644 --- a/maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/logging/MessageType.java +++ b/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/MessageType.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.utilities.logging; +package io.github.maqs.utilities.logging; /** * The Message Type enum class. diff --git a/maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/logging/TestResultType.java b/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/TestResultType.java similarity index 87% rename from maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/logging/TestResultType.java rename to maqs-utilities/src/main/java/io/github/maqs/utilities/logging/TestResultType.java index 1ab5abfec..f7e5bfa0d 100644 --- a/maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/logging/TestResultType.java +++ b/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/TestResultType.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.utilities.logging; +package io.github.maqs.utilities.logging; /** * The Test Result Type enum class. diff --git a/maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/logging/resources/BaseHtmlModel.html b/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/resources/BaseHtmlModel.html similarity index 100% rename from maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/logging/resources/BaseHtmlModel.html rename to maqs-utilities/src/main/java/io/github/maqs/utilities/logging/resources/BaseHtmlModel.html diff --git a/maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/logging/resources/embedImage.html b/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/resources/embedImage.html similarity index 100% rename from maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/logging/resources/embedImage.html rename to maqs-utilities/src/main/java/io/github/maqs/utilities/logging/resources/embedImage.html diff --git a/maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/logging/resources/htmlLogger.css b/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/resources/htmlLogger.css similarity index 100% rename from maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/logging/resources/htmlLogger.css rename to maqs-utilities/src/main/java/io/github/maqs/utilities/logging/resources/htmlLogger.css diff --git a/maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/logging/resources/logMessage.html b/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/resources/logMessage.html similarity index 100% rename from maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/logging/resources/logMessage.html rename to maqs-utilities/src/main/java/io/github/maqs/utilities/logging/resources/logMessage.html diff --git a/maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/logging/resources/modalDiv.html b/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/resources/modalDiv.html similarity index 100% rename from maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/logging/resources/modalDiv.html rename to maqs-utilities/src/main/java/io/github/maqs/utilities/logging/resources/modalDiv.html diff --git a/maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/performance/IPerfTimerCollection.java b/maqs-utilities/src/main/java/io/github/maqs/utilities/performance/IPerfTimerCollection.java similarity index 80% rename from maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/performance/IPerfTimerCollection.java rename to maqs-utilities/src/main/java/io/github/maqs/utilities/performance/IPerfTimerCollection.java index 1fa64acec..123ac1b22 100644 --- a/maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/performance/IPerfTimerCollection.java +++ b/maqs-utilities/src/main/java/io/github/maqs/utilities/performance/IPerfTimerCollection.java @@ -2,9 +2,9 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.utilities.performance; +package io.github.maqs.utilities.performance; -import com.cognizantsoftvision.maqs.utilities.logging.Logger; +import io.github.maqs.utilities.logging.Logger; /** * The Performance Timer Collection interface class. diff --git a/maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/performance/PerfTimerCollection.java b/maqs-utilities/src/main/java/io/github/maqs/utilities/performance/PerfTimerCollection.java similarity index 87% rename from maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/performance/PerfTimerCollection.java rename to maqs-utilities/src/main/java/io/github/maqs/utilities/performance/PerfTimerCollection.java index c9e1578a6..870274231 100644 --- a/maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/performance/PerfTimerCollection.java +++ b/maqs-utilities/src/main/java/io/github/maqs/utilities/performance/PerfTimerCollection.java @@ -2,10 +2,10 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.utilities.performance; +package io.github.maqs.utilities.performance; -import com.cognizantsoftvision.maqs.utilities.logging.ILogger; -import com.cognizantsoftvision.maqs.utilities.logging.Logger; +import io.github.maqs.utilities.logging.ILogger; +import io.github.maqs.utilities.logging.Logger; /** * The Performance Timer Collection class. diff --git a/maqs-utilities/src/test/java/com/cognizantsoftvision/maqs/utilities/helper/ConfigUnitTest.java b/maqs-utilities/src/test/java/io/github/maqs/utilities/helper/ConfigUnitTest.java similarity index 98% rename from maqs-utilities/src/test/java/com/cognizantsoftvision/maqs/utilities/helper/ConfigUnitTest.java rename to maqs-utilities/src/test/java/io/github/maqs/utilities/helper/ConfigUnitTest.java index ef01e012c..68ef468bf 100644 --- a/maqs-utilities/src/test/java/com/cognizantsoftvision/maqs/utilities/helper/ConfigUnitTest.java +++ b/maqs-utilities/src/test/java/io/github/maqs/utilities/helper/ConfigUnitTest.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.utilities.helper; +package io.github.maqs.utilities.helper; import java.util.HashMap; import java.util.Map; diff --git a/maqs-utilities/src/test/java/com/cognizantsoftvision/maqs/utilities/helper/GenericWaitNotParallelUnitTest.java b/maqs-utilities/src/test/java/io/github/maqs/utilities/helper/GenericWaitNotParallelUnitTest.java similarity index 98% rename from maqs-utilities/src/test/java/com/cognizantsoftvision/maqs/utilities/helper/GenericWaitNotParallelUnitTest.java rename to maqs-utilities/src/test/java/io/github/maqs/utilities/helper/GenericWaitNotParallelUnitTest.java index 126dabc72..79aec4bc5 100644 --- a/maqs-utilities/src/test/java/com/cognizantsoftvision/maqs/utilities/helper/GenericWaitNotParallelUnitTest.java +++ b/maqs-utilities/src/test/java/io/github/maqs/utilities/helper/GenericWaitNotParallelUnitTest.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.utilities.helper; +package io.github.maqs.utilities.helper; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/maqs-utilities/src/test/java/com/cognizantsoftvision/maqs/utilities/helper/GenericWaitUnitTest.java b/maqs-utilities/src/test/java/io/github/maqs/utilities/helper/GenericWaitUnitTest.java similarity index 98% rename from maqs-utilities/src/test/java/com/cognizantsoftvision/maqs/utilities/helper/GenericWaitUnitTest.java rename to maqs-utilities/src/test/java/io/github/maqs/utilities/helper/GenericWaitUnitTest.java index f8b373427..02f08e16c 100644 --- a/maqs-utilities/src/test/java/com/cognizantsoftvision/maqs/utilities/helper/GenericWaitUnitTest.java +++ b/maqs-utilities/src/test/java/io/github/maqs/utilities/helper/GenericWaitUnitTest.java @@ -2,14 +2,15 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.utilities.helper; +package io.github.maqs.utilities.helper; -import com.cognizantsoftvision.maqs.utilities.helper.exceptions.TimeoutException; +import io.github.maqs.utilities.helper.exceptions.TimeoutException; import java.time.LocalDateTime; import java.time.temporal.ChronoUnit; import java.util.ArrayList; import java.util.HashMap; import java.util.UUID; + import org.testng.Assert; import org.testng.annotations.Test; diff --git a/maqs-utilities/src/test/java/com/cognizantsoftvision/maqs/utilities/helper/ListProcessorUnitTest.java b/maqs-utilities/src/test/java/io/github/maqs/utilities/helper/ListProcessorUnitTest.java similarity index 99% rename from maqs-utilities/src/test/java/com/cognizantsoftvision/maqs/utilities/helper/ListProcessorUnitTest.java rename to maqs-utilities/src/test/java/io/github/maqs/utilities/helper/ListProcessorUnitTest.java index 053bc5f00..110a1f020 100644 --- a/maqs-utilities/src/test/java/com/cognizantsoftvision/maqs/utilities/helper/ListProcessorUnitTest.java +++ b/maqs-utilities/src/test/java/io/github/maqs/utilities/helper/ListProcessorUnitTest.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.utilities.helper; +package io.github.maqs.utilities.helper; import java.util.ArrayList; import org.testng.Assert; diff --git a/maqs-utilities/src/test/java/com/cognizantsoftvision/maqs/utilities/helper/PropertyManagerUnitTest.java b/maqs-utilities/src/test/java/io/github/maqs/utilities/helper/PropertyManagerUnitTest.java similarity index 97% rename from maqs-utilities/src/test/java/com/cognizantsoftvision/maqs/utilities/helper/PropertyManagerUnitTest.java rename to maqs-utilities/src/test/java/io/github/maqs/utilities/helper/PropertyManagerUnitTest.java index abdef7bb3..852d4e9d0 100644 --- a/maqs-utilities/src/test/java/com/cognizantsoftvision/maqs/utilities/helper/PropertyManagerUnitTest.java +++ b/maqs-utilities/src/test/java/io/github/maqs/utilities/helper/PropertyManagerUnitTest.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.utilities.helper; +package io.github.maqs.utilities.helper; import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; diff --git a/maqs-utilities/src/test/java/com/cognizantsoftvision/maqs/utilities/helper/StringProcessorUnitTest.java b/maqs-utilities/src/test/java/io/github/maqs/utilities/helper/StringProcessorUnitTest.java similarity index 97% rename from maqs-utilities/src/test/java/com/cognizantsoftvision/maqs/utilities/helper/StringProcessorUnitTest.java rename to maqs-utilities/src/test/java/io/github/maqs/utilities/helper/StringProcessorUnitTest.java index 2d7b2bd61..2e9b17e54 100644 --- a/maqs-utilities/src/test/java/com/cognizantsoftvision/maqs/utilities/helper/StringProcessorUnitTest.java +++ b/maqs-utilities/src/test/java/io/github/maqs/utilities/helper/StringProcessorUnitTest.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.utilities.helper; +package io.github.maqs.utilities.helper; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/maqs-utilities/src/test/java/com/cognizantsoftvision/maqs/utilities/logger/ConsoleCopy.java b/maqs-utilities/src/test/java/io/github/maqs/utilities/logger/ConsoleCopy.java similarity index 98% rename from maqs-utilities/src/test/java/com/cognizantsoftvision/maqs/utilities/logger/ConsoleCopy.java rename to maqs-utilities/src/test/java/io/github/maqs/utilities/logger/ConsoleCopy.java index 0ed3d64fb..ee72fe150 100644 --- a/maqs-utilities/src/test/java/com/cognizantsoftvision/maqs/utilities/logger/ConsoleCopy.java +++ b/maqs-utilities/src/test/java/io/github/maqs/utilities/logger/ConsoleCopy.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.utilities.logger; +package io.github.maqs.utilities.logger; import java.io.FileOutputStream; import java.io.PrintStream; diff --git a/maqs-utilities/src/test/java/com/cognizantsoftvision/maqs/utilities/logger/ConsoleLoggerUnitTest.java b/maqs-utilities/src/test/java/io/github/maqs/utilities/logger/ConsoleLoggerUnitTest.java similarity index 90% rename from maqs-utilities/src/test/java/com/cognizantsoftvision/maqs/utilities/logger/ConsoleLoggerUnitTest.java rename to maqs-utilities/src/test/java/io/github/maqs/utilities/logger/ConsoleLoggerUnitTest.java index 53ceb5725..447f37113 100644 --- a/maqs-utilities/src/test/java/com/cognizantsoftvision/maqs/utilities/logger/ConsoleLoggerUnitTest.java +++ b/maqs-utilities/src/test/java/io/github/maqs/utilities/logger/ConsoleLoggerUnitTest.java @@ -2,11 +2,11 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.utilities.logger; +package io.github.maqs.utilities.logger; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; -import com.cognizantsoftvision.maqs.utilities.logging.ConsoleLogger; -import com.cognizantsoftvision.maqs.utilities.logging.MessageType; +import io.github.maqs.utilities.helper.TestCategories; +import io.github.maqs.utilities.logging.ConsoleLogger; +import io.github.maqs.utilities.logging.MessageType; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/maqs-utilities/src/test/java/com/cognizantsoftvision/maqs/utilities/logger/FileLoggerUnitTest.java b/maqs-utilities/src/test/java/io/github/maqs/utilities/logger/FileLoggerUnitTest.java similarity index 97% rename from maqs-utilities/src/test/java/com/cognizantsoftvision/maqs/utilities/logger/FileLoggerUnitTest.java rename to maqs-utilities/src/test/java/io/github/maqs/utilities/logger/FileLoggerUnitTest.java index 667f9d288..434e81971 100644 --- a/maqs-utilities/src/test/java/com/cognizantsoftvision/maqs/utilities/logger/FileLoggerUnitTest.java +++ b/maqs-utilities/src/test/java/io/github/maqs/utilities/logger/FileLoggerUnitTest.java @@ -2,22 +2,23 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.utilities.logger; - -import com.cognizantsoftvision.maqs.utilities.helper.StringProcessor; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; -import com.cognizantsoftvision.maqs.utilities.logging.ConsoleLogger; -import com.cognizantsoftvision.maqs.utilities.logging.FileLogger; -import com.cognizantsoftvision.maqs.utilities.logging.HtmlFileLogger; -import com.cognizantsoftvision.maqs.utilities.logging.Logger; -import com.cognizantsoftvision.maqs.utilities.logging.LoggingConfig; -import com.cognizantsoftvision.maqs.utilities.logging.MessageType; +package io.github.maqs.utilities.logger; + +import io.github.maqs.utilities.helper.StringProcessor; +import io.github.maqs.utilities.helper.TestCategories; +import io.github.maqs.utilities.logging.ConsoleLogger; +import io.github.maqs.utilities.logging.FileLogger; +import io.github.maqs.utilities.logging.HtmlFileLogger; +import io.github.maqs.utilities.logging.Logger; +import io.github.maqs.utilities.logging.LoggingConfig; +import io.github.maqs.utilities.logging.MessageType; import java.io.File; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Paths; import java.util.HashMap; import java.util.UUID; + import org.testng.Assert; import org.testng.annotations.DataProvider; import org.testng.annotations.Ignore; diff --git a/maqs-utilities/src/test/java/com/cognizantsoftvision/maqs/utilities/logger/HtmlFileLoggerUnitTest.java b/maqs-utilities/src/test/java/io/github/maqs/utilities/logger/HtmlFileLoggerUnitTest.java similarity index 98% rename from maqs-utilities/src/test/java/com/cognizantsoftvision/maqs/utilities/logger/HtmlFileLoggerUnitTest.java rename to maqs-utilities/src/test/java/io/github/maqs/utilities/logger/HtmlFileLoggerUnitTest.java index 9bdcb153a..4620464e5 100644 --- a/maqs-utilities/src/test/java/com/cognizantsoftvision/maqs/utilities/logger/HtmlFileLoggerUnitTest.java +++ b/maqs-utilities/src/test/java/io/github/maqs/utilities/logger/HtmlFileLoggerUnitTest.java @@ -2,16 +2,17 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.utilities.logger; +package io.github.maqs.utilities.logger; -import com.cognizantsoftvision.maqs.utilities.helper.StringProcessor; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; -import com.cognizantsoftvision.maqs.utilities.logging.HtmlFileLogger; -import com.cognizantsoftvision.maqs.utilities.logging.LoggingConfig; -import com.cognizantsoftvision.maqs.utilities.logging.MessageType; +import io.github.maqs.utilities.helper.StringProcessor; +import io.github.maqs.utilities.helper.TestCategories; +import io.github.maqs.utilities.logging.HtmlFileLogger; +import io.github.maqs.utilities.logging.LoggingConfig; +import io.github.maqs.utilities.logging.MessageType; import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; + import org.testng.Assert; import org.testng.annotations.Test; import org.testng.asserts.SoftAssert; diff --git a/maqs-utilities/src/test/java/com/cognizantsoftvision/maqs/utilities/logger/LoggerFactoryUnitTest.java b/maqs-utilities/src/test/java/io/github/maqs/utilities/logger/LoggerFactoryUnitTest.java similarity index 76% rename from maqs-utilities/src/test/java/com/cognizantsoftvision/maqs/utilities/logger/LoggerFactoryUnitTest.java rename to maqs-utilities/src/test/java/io/github/maqs/utilities/logger/LoggerFactoryUnitTest.java index 216756ad9..0b4c7dae5 100644 --- a/maqs-utilities/src/test/java/com/cognizantsoftvision/maqs/utilities/logger/LoggerFactoryUnitTest.java +++ b/maqs-utilities/src/test/java/io/github/maqs/utilities/logger/LoggerFactoryUnitTest.java @@ -2,20 +2,21 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.utilities.logger; +package io.github.maqs.utilities.logger; -import com.cognizantsoftvision.maqs.utilities.helper.Config; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; -import com.cognizantsoftvision.maqs.utilities.helper.exceptions.MaqsLoggingConfigException; -import com.cognizantsoftvision.maqs.utilities.logging.ConsoleLogger; -import com.cognizantsoftvision.maqs.utilities.logging.FileLogger; -import com.cognizantsoftvision.maqs.utilities.logging.HtmlFileLogger; -import com.cognizantsoftvision.maqs.utilities.logging.ILogger; -import com.cognizantsoftvision.maqs.utilities.logging.LoggerFactory; -import com.cognizantsoftvision.maqs.utilities.logging.MessageType; +import io.github.maqs.utilities.helper.Config; +import io.github.maqs.utilities.helper.TestCategories; +import io.github.maqs.utilities.helper.exceptions.MaqsLoggingConfigException; +import io.github.maqs.utilities.logging.ConsoleLogger; +import io.github.maqs.utilities.logging.FileLogger; +import io.github.maqs.utilities.logging.HtmlFileLogger; +import io.github.maqs.utilities.logging.ILogger; +import io.github.maqs.utilities.logging.LoggerFactory; +import io.github.maqs.utilities.logging.MessageType; import java.util.ArrayList; import java.util.HashMap; import java.util.List; + import org.testng.Assert; import org.testng.annotations.Test; diff --git a/maqs-utilities/src/test/java/com/cognizantsoftvision/maqs/utilities/logger/LoggingConfigUnitTest.java b/maqs-utilities/src/test/java/io/github/maqs/utilities/logger/LoggingConfigUnitTest.java similarity index 96% rename from maqs-utilities/src/test/java/com/cognizantsoftvision/maqs/utilities/logger/LoggingConfigUnitTest.java rename to maqs-utilities/src/test/java/io/github/maqs/utilities/logger/LoggingConfigUnitTest.java index 56506bd1f..7767535b6 100644 --- a/maqs-utilities/src/test/java/com/cognizantsoftvision/maqs/utilities/logger/LoggingConfigUnitTest.java +++ b/maqs-utilities/src/test/java/io/github/maqs/utilities/logger/LoggingConfigUnitTest.java @@ -2,15 +2,17 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.utilities.logger; +package io.github.maqs.utilities.logger; -import com.cognizantsoftvision.maqs.utilities.helper.Config; -import com.cognizantsoftvision.maqs.utilities.helper.StringProcessor; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; -import com.cognizantsoftvision.maqs.utilities.helper.exceptions.MaqsLoggingConfigException; +import io.github.maqs.utilities.helper.Config; +import io.github.maqs.utilities.helper.StringProcessor; +import io.github.maqs.utilities.helper.TestCategories; +import io.github.maqs.utilities.helper.exceptions.MaqsLoggingConfigException; import com.cognizantsoftvision.maqs.utilities.logging.*; import java.io.File; import java.util.HashMap; + +import io.github.maqs.utilities.logging.*; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/maqs-utilities/src/test/java/com/cognizantsoftvision/maqs/utilities/performance/PerfTimerCollectionUnitTest.java b/maqs-utilities/src/test/java/io/github/maqs/utilities/performance/PerfTimerCollectionUnitTest.java similarity index 87% rename from maqs-utilities/src/test/java/com/cognizantsoftvision/maqs/utilities/performance/PerfTimerCollectionUnitTest.java rename to maqs-utilities/src/test/java/io/github/maqs/utilities/performance/PerfTimerCollectionUnitTest.java index 16e30e1e4..2fab6d23d 100644 --- a/maqs-utilities/src/test/java/com/cognizantsoftvision/maqs/utilities/performance/PerfTimerCollectionUnitTest.java +++ b/maqs-utilities/src/test/java/io/github/maqs/utilities/performance/PerfTimerCollectionUnitTest.java @@ -2,11 +2,11 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.utilities.performance; +package io.github.maqs.utilities.performance; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; -import com.cognizantsoftvision.maqs.utilities.logging.ConsoleLogger; -import com.cognizantsoftvision.maqs.utilities.logging.FileLogger; +import io.github.maqs.utilities.helper.TestCategories; +import io.github.maqs.utilities.logging.ConsoleLogger; +import io.github.maqs.utilities.logging.FileLogger; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/maqs-webservices/pom.xml b/maqs-webservices/pom.xml index ef9e23d8a..0f40a8a04 100644 --- a/maqs-webservices/pom.xml +++ b/maqs-webservices/pom.xml @@ -5,12 +5,12 @@ 4.0.0 - com.cognizantsoftvision.maqs + io.github.maqs maqs-java ${revision} - com.cognizantsoftvision.maqs.webservices + io.github.maqs.webservices maqs-webservices MAQS WebServices Testing Module ${revision} @@ -21,7 +21,7 @@ - com.cognizantsoftvision.maqs.base + io.github.maqs.base maqs-base @@ -29,7 +29,7 @@ testng - com.cognizantsoftvision.maqs.utilities + io.github.maqs.utilities maqs-utilities diff --git a/maqs-webservices/src/main/java/com/cognizantsoftvision/maqs/webservices/BaseWebServiceTest.java b/maqs-webservices/src/main/java/io/github/maqs/webservices/BaseWebServiceTest.java similarity index 87% rename from maqs-webservices/src/main/java/com/cognizantsoftvision/maqs/webservices/BaseWebServiceTest.java rename to maqs-webservices/src/main/java/io/github/maqs/webservices/BaseWebServiceTest.java index 99572d85a..ed0618896 100644 --- a/maqs-webservices/src/main/java/com/cognizantsoftvision/maqs/webservices/BaseWebServiceTest.java +++ b/maqs-webservices/src/main/java/io/github/maqs/webservices/BaseWebServiceTest.java @@ -2,11 +2,11 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.webservices; +package io.github.maqs.webservices; -import com.cognizantsoftvision.maqs.base.BaseExtendableTest; -import com.cognizantsoftvision.maqs.utilities.helper.StringProcessor; -import com.cognizantsoftvision.maqs.utilities.logging.ILogger; +import io.github.maqs.base.BaseExtendableTest; +import io.github.maqs.utilities.helper.StringProcessor; +import io.github.maqs.utilities.logging.ILogger; import java.net.URI; import java.net.URISyntaxException; import java.net.http.HttpRequest; diff --git a/maqs-webservices/src/main/java/com/cognizantsoftvision/maqs/webservices/HttpClientFactory.java b/maqs-webservices/src/main/java/io/github/maqs/webservices/HttpClientFactory.java similarity index 96% rename from maqs-webservices/src/main/java/com/cognizantsoftvision/maqs/webservices/HttpClientFactory.java rename to maqs-webservices/src/main/java/io/github/maqs/webservices/HttpClientFactory.java index d3e294c6c..94eaed971 100644 --- a/maqs-webservices/src/main/java/com/cognizantsoftvision/maqs/webservices/HttpClientFactory.java +++ b/maqs-webservices/src/main/java/io/github/maqs/webservices/HttpClientFactory.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.webservices; +package io.github.maqs.webservices; import java.net.InetSocketAddress; import java.net.ProxySelector; diff --git a/maqs-webservices/src/main/java/com/cognizantsoftvision/maqs/webservices/IWebServiceTestObject.java b/maqs-webservices/src/main/java/io/github/maqs/webservices/IWebServiceTestObject.java similarity index 91% rename from maqs-webservices/src/main/java/com/cognizantsoftvision/maqs/webservices/IWebServiceTestObject.java rename to maqs-webservices/src/main/java/io/github/maqs/webservices/IWebServiceTestObject.java index 9c593861e..3712e1cc1 100644 --- a/maqs-webservices/src/main/java/com/cognizantsoftvision/maqs/webservices/IWebServiceTestObject.java +++ b/maqs-webservices/src/main/java/io/github/maqs/webservices/IWebServiceTestObject.java @@ -2,9 +2,9 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.webservices; +package io.github.maqs.webservices; -import com.cognizantsoftvision.maqs.base.ITestObject; +import io.github.maqs.base.ITestObject; import java.net.http.HttpClient; import java.util.function.Supplier; diff --git a/maqs-webservices/src/main/java/com/cognizantsoftvision/maqs/webservices/MediaType.java b/maqs-webservices/src/main/java/io/github/maqs/webservices/MediaType.java similarity index 95% rename from maqs-webservices/src/main/java/com/cognizantsoftvision/maqs/webservices/MediaType.java rename to maqs-webservices/src/main/java/io/github/maqs/webservices/MediaType.java index d79777a03..25ea2b94a 100644 --- a/maqs-webservices/src/main/java/com/cognizantsoftvision/maqs/webservices/MediaType.java +++ b/maqs-webservices/src/main/java/io/github/maqs/webservices/MediaType.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.webservices; +package io.github.maqs.webservices; /** * The Media Type enum class. diff --git a/maqs-webservices/src/main/java/com/cognizantsoftvision/maqs/webservices/WebServiceConfig.java b/maqs-webservices/src/main/java/io/github/maqs/webservices/WebServiceConfig.java similarity index 89% rename from maqs-webservices/src/main/java/com/cognizantsoftvision/maqs/webservices/WebServiceConfig.java rename to maqs-webservices/src/main/java/io/github/maqs/webservices/WebServiceConfig.java index bfa07af29..9bcee2033 100644 --- a/maqs-webservices/src/main/java/com/cognizantsoftvision/maqs/webservices/WebServiceConfig.java +++ b/maqs-webservices/src/main/java/io/github/maqs/webservices/WebServiceConfig.java @@ -2,10 +2,10 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.webservices; +package io.github.maqs.webservices; -import com.cognizantsoftvision.maqs.utilities.helper.Config; -import com.cognizantsoftvision.maqs.utilities.helper.ConfigSection; +import io.github.maqs.utilities.helper.Config; +import io.github.maqs.utilities.helper.ConfigSection; /** * The Web Service Configuration class. diff --git a/maqs-webservices/src/main/java/com/cognizantsoftvision/maqs/webservices/WebServiceDriver.java b/maqs-webservices/src/main/java/io/github/maqs/webservices/WebServiceDriver.java similarity index 99% rename from maqs-webservices/src/main/java/com/cognizantsoftvision/maqs/webservices/WebServiceDriver.java rename to maqs-webservices/src/main/java/io/github/maqs/webservices/WebServiceDriver.java index 17fcb3e7d..e163683b0 100644 --- a/maqs-webservices/src/main/java/com/cognizantsoftvision/maqs/webservices/WebServiceDriver.java +++ b/maqs-webservices/src/main/java/io/github/maqs/webservices/WebServiceDriver.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.webservices; +package io.github.maqs.webservices; import java.io.IOException; import java.lang.reflect.Type; diff --git a/maqs-webservices/src/main/java/com/cognizantsoftvision/maqs/webservices/WebServiceDriverManager.java b/maqs-webservices/src/main/java/io/github/maqs/webservices/WebServiceDriverManager.java similarity index 91% rename from maqs-webservices/src/main/java/com/cognizantsoftvision/maqs/webservices/WebServiceDriverManager.java rename to maqs-webservices/src/main/java/io/github/maqs/webservices/WebServiceDriverManager.java index e5642ae98..51d01bc68 100644 --- a/maqs-webservices/src/main/java/com/cognizantsoftvision/maqs/webservices/WebServiceDriverManager.java +++ b/maqs-webservices/src/main/java/io/github/maqs/webservices/WebServiceDriverManager.java @@ -2,10 +2,10 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.webservices; +package io.github.maqs.webservices; -import com.cognizantsoftvision.maqs.base.DriverManager; -import com.cognizantsoftvision.maqs.base.ITestObject; +import io.github.maqs.base.DriverManager; +import io.github.maqs.base.ITestObject; import java.net.http.HttpClient; import java.util.function.Supplier; diff --git a/maqs-webservices/src/main/java/com/cognizantsoftvision/maqs/webservices/WebServiceTestObject.java b/maqs-webservices/src/main/java/io/github/maqs/webservices/WebServiceTestObject.java similarity index 94% rename from maqs-webservices/src/main/java/com/cognizantsoftvision/maqs/webservices/WebServiceTestObject.java rename to maqs-webservices/src/main/java/io/github/maqs/webservices/WebServiceTestObject.java index afbeba370..bc9de592e 100644 --- a/maqs-webservices/src/main/java/com/cognizantsoftvision/maqs/webservices/WebServiceTestObject.java +++ b/maqs-webservices/src/main/java/io/github/maqs/webservices/WebServiceTestObject.java @@ -2,10 +2,10 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.webservices; +package io.github.maqs.webservices; -import com.cognizantsoftvision.maqs.base.BaseTestObject; -import com.cognizantsoftvision.maqs.utilities.logging.ILogger; +import io.github.maqs.base.BaseTestObject; +import io.github.maqs.utilities.logging.ILogger; import java.net.http.HttpClient; import java.util.function.Supplier; diff --git a/maqs-webservices/src/main/java/com/cognizantsoftvision/maqs/webservices/WebServiceUtilities.java b/maqs-webservices/src/main/java/io/github/maqs/webservices/WebServiceUtilities.java similarity index 97% rename from maqs-webservices/src/main/java/com/cognizantsoftvision/maqs/webservices/WebServiceUtilities.java rename to maqs-webservices/src/main/java/io/github/maqs/webservices/WebServiceUtilities.java index 67d3dcebb..b716d6b69 100644 --- a/maqs-webservices/src/main/java/com/cognizantsoftvision/maqs/webservices/WebServiceUtilities.java +++ b/maqs-webservices/src/main/java/io/github/maqs/webservices/WebServiceUtilities.java @@ -2,9 +2,9 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.webservices; +package io.github.maqs.webservices; -import com.cognizantsoftvision.maqs.utilities.helper.StringProcessor; +import io.github.maqs.utilities.helper.StringProcessor; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.dataformat.xml.XmlMapper; diff --git a/maqs-webservices/src/test/java/com/cognizantsoftvision/maqs/webservices/BaseWebServiceTestUnitTest.java b/maqs-webservices/src/test/java/io/github/maqs/webservices/BaseWebServiceTestUnitTest.java similarity index 92% rename from maqs-webservices/src/test/java/com/cognizantsoftvision/maqs/webservices/BaseWebServiceTestUnitTest.java rename to maqs-webservices/src/test/java/io/github/maqs/webservices/BaseWebServiceTestUnitTest.java index 86478ef0d..86d734158 100644 --- a/maqs-webservices/src/test/java/com/cognizantsoftvision/maqs/webservices/BaseWebServiceTestUnitTest.java +++ b/maqs-webservices/src/test/java/io/github/maqs/webservices/BaseWebServiceTestUnitTest.java @@ -2,9 +2,9 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.webservices; +package io.github.maqs.webservices; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; +import io.github.maqs.utilities.helper.TestCategories; import java.net.URISyntaxException; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/maqs-webservices/src/test/java/com/cognizantsoftvision/maqs/webservices/MediaTypeUnitTest.java b/maqs-webservices/src/test/java/io/github/maqs/webservices/MediaTypeUnitTest.java similarity index 95% rename from maqs-webservices/src/test/java/com/cognizantsoftvision/maqs/webservices/MediaTypeUnitTest.java rename to maqs-webservices/src/test/java/io/github/maqs/webservices/MediaTypeUnitTest.java index 86ded5539..7e168bc17 100644 --- a/maqs-webservices/src/test/java/com/cognizantsoftvision/maqs/webservices/MediaTypeUnitTest.java +++ b/maqs-webservices/src/test/java/io/github/maqs/webservices/MediaTypeUnitTest.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.webservices; +package io.github.maqs.webservices; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/maqs-webservices/src/test/java/com/cognizantsoftvision/maqs/webservices/WebServiceConfigUnitTest.java b/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceConfigUnitTest.java similarity index 92% rename from maqs-webservices/src/test/java/com/cognizantsoftvision/maqs/webservices/WebServiceConfigUnitTest.java rename to maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceConfigUnitTest.java index f30240a11..2ec4d0014 100644 --- a/maqs-webservices/src/test/java/com/cognizantsoftvision/maqs/webservices/WebServiceConfigUnitTest.java +++ b/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceConfigUnitTest.java @@ -3,9 +3,9 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.webservices; +package io.github.maqs.webservices; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; +import io.github.maqs.utilities.helper.TestCategories; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/maqs-webservices/src/test/java/com/cognizantsoftvision/maqs/webservices/WebServiceDriverManagerUnitTest.java b/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverManagerUnitTest.java similarity index 95% rename from maqs-webservices/src/test/java/com/cognizantsoftvision/maqs/webservices/WebServiceDriverManagerUnitTest.java rename to maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverManagerUnitTest.java index 659d2ff4c..92a7d3de9 100644 --- a/maqs-webservices/src/test/java/com/cognizantsoftvision/maqs/webservices/WebServiceDriverManagerUnitTest.java +++ b/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverManagerUnitTest.java @@ -2,10 +2,10 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.webservices; +package io.github.maqs.webservices; -import com.cognizantsoftvision.maqs.base.BaseGenericTest; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; +import io.github.maqs.base.BaseGenericTest; +import io.github.maqs.utilities.helper.TestCategories; import java.net.URI; import java.net.http.HttpRequest; import org.testng.Assert; diff --git a/maqs-webservices/src/test/java/com/cognizantsoftvision/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverDeleteUnitTest.java b/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverDeleteUnitTest.java similarity index 93% rename from maqs-webservices/src/test/java/com/cognizantsoftvision/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverDeleteUnitTest.java rename to maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverDeleteUnitTest.java index ee69141b9..04c39d5b1 100644 --- a/maqs-webservices/src/test/java/com/cognizantsoftvision/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverDeleteUnitTest.java +++ b/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverDeleteUnitTest.java @@ -2,14 +2,14 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.webservices.WebServiceDriverRequestUnitTest; - -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; -import com.cognizantsoftvision.maqs.webservices.HttpClientFactory; -import com.cognizantsoftvision.maqs.webservices.MediaType; -import com.cognizantsoftvision.maqs.webservices.WebServiceConfig; -import com.cognizantsoftvision.maqs.webservices.WebServiceDriver; -import com.cognizantsoftvision.maqs.webservices.models.Product; +package io.github.maqs.webservices.WebServiceDriverRequestUnitTest; + +import io.github.maqs.utilities.helper.TestCategories; +import io.github.maqs.webservices.HttpClientFactory; +import io.github.maqs.webservices.MediaType; +import io.github.maqs.webservices.WebServiceConfig; +import io.github.maqs.webservices.WebServiceDriver; +import io.github.maqs.webservices.models.Product; import org.springframework.http.HttpStatus; import org.testng.Assert; import org.testng.annotations.Ignore; diff --git a/maqs-webservices/src/test/java/com/cognizantsoftvision/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverGetUnitTest.java b/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverGetUnitTest.java similarity index 94% rename from maqs-webservices/src/test/java/com/cognizantsoftvision/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverGetUnitTest.java rename to maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverGetUnitTest.java index 41bb9cdf6..09ed9a95a 100644 --- a/maqs-webservices/src/test/java/com/cognizantsoftvision/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverGetUnitTest.java +++ b/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverGetUnitTest.java @@ -2,17 +2,18 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.webservices.WebServiceDriverRequestUnitTest; - -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; -import com.cognizantsoftvision.maqs.webservices.HttpClientFactory; -import com.cognizantsoftvision.maqs.webservices.MediaType; -import com.cognizantsoftvision.maqs.webservices.WebServiceConfig; -import com.cognizantsoftvision.maqs.webservices.WebServiceDriver; -import com.cognizantsoftvision.maqs.webservices.WebServiceUtilities; -import com.cognizantsoftvision.maqs.webservices.models.Product; +package io.github.maqs.webservices.WebServiceDriverRequestUnitTest; + +import io.github.maqs.utilities.helper.TestCategories; +import io.github.maqs.webservices.HttpClientFactory; +import io.github.maqs.webservices.MediaType; +import io.github.maqs.webservices.WebServiceConfig; +import io.github.maqs.webservices.WebServiceDriver; +import io.github.maqs.webservices.WebServiceUtilities; +import io.github.maqs.webservices.models.Product; import java.io.IOException; import java.net.http.HttpResponse; + import org.springframework.http.HttpStatus; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/maqs-webservices/src/test/java/com/cognizantsoftvision/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverPatchUnitTest.java b/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverPatchUnitTest.java similarity index 94% rename from maqs-webservices/src/test/java/com/cognizantsoftvision/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverPatchUnitTest.java rename to maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverPatchUnitTest.java index 7a8afaa45..fdb23ad21 100644 --- a/maqs-webservices/src/test/java/com/cognizantsoftvision/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverPatchUnitTest.java +++ b/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverPatchUnitTest.java @@ -2,16 +2,16 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.webservices.WebServiceDriverRequestUnitTest; +package io.github.maqs.webservices.WebServiceDriverRequestUnitTest; -import com.cognizantsoftvision.maqs.webservices.HttpClientFactory; -import com.cognizantsoftvision.maqs.webservices.MediaType; -import com.cognizantsoftvision.maqs.webservices.WebServiceConfig; -import com.cognizantsoftvision.maqs.webservices.WebServiceDriver; -import com.cognizantsoftvision.maqs.webservices.WebServiceUtilities; -import com.cognizantsoftvision.maqs.webservices.models.Product; +import io.github.maqs.webservices.HttpClientFactory; +import io.github.maqs.webservices.MediaType; +import io.github.maqs.webservices.WebServiceConfig; +import io.github.maqs.webservices.WebServiceDriver; +import io.github.maqs.webservices.WebServiceUtilities; +import io.github.maqs.webservices.models.Product; import com.fasterxml.jackson.core.JsonProcessingException; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; +import io.github.maqs.utilities.helper.TestCategories; import java.io.IOException; import java.math.BigDecimal; import java.net.http.HttpResponse; diff --git a/maqs-webservices/src/test/java/com/cognizantsoftvision/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverPostUnitTest.java b/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverPostUnitTest.java similarity index 95% rename from maqs-webservices/src/test/java/com/cognizantsoftvision/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverPostUnitTest.java rename to maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverPostUnitTest.java index e56cdac2f..b127b45d8 100644 --- a/maqs-webservices/src/test/java/com/cognizantsoftvision/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverPostUnitTest.java +++ b/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverPostUnitTest.java @@ -2,15 +2,15 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.webservices.WebServiceDriverRequestUnitTest; +package io.github.maqs.webservices.WebServiceDriverRequestUnitTest; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; -import com.cognizantsoftvision.maqs.webservices.HttpClientFactory; -import com.cognizantsoftvision.maqs.webservices.MediaType; -import com.cognizantsoftvision.maqs.webservices.WebServiceConfig; -import com.cognizantsoftvision.maqs.webservices.WebServiceDriver; -import com.cognizantsoftvision.maqs.webservices.WebServiceUtilities; -import com.cognizantsoftvision.maqs.webservices.models.Product; +import io.github.maqs.utilities.helper.TestCategories; +import io.github.maqs.webservices.HttpClientFactory; +import io.github.maqs.webservices.MediaType; +import io.github.maqs.webservices.WebServiceConfig; +import io.github.maqs.webservices.WebServiceDriver; +import io.github.maqs.webservices.WebServiceUtilities; +import io.github.maqs.webservices.models.Product; import java.io.IOException; import java.math.BigDecimal; import java.net.http.HttpRequest; diff --git a/maqs-webservices/src/test/java/com/cognizantsoftvision/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverPutUnitTest.java b/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverPutUnitTest.java similarity index 94% rename from maqs-webservices/src/test/java/com/cognizantsoftvision/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverPutUnitTest.java rename to maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverPutUnitTest.java index 4372b1373..f4b5937fc 100644 --- a/maqs-webservices/src/test/java/com/cognizantsoftvision/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverPutUnitTest.java +++ b/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverPutUnitTest.java @@ -2,15 +2,15 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.webservices.WebServiceDriverRequestUnitTest; - -import com.cognizantsoftvision.maqs.webservices.HttpClientFactory; -import com.cognizantsoftvision.maqs.webservices.MediaType; -import com.cognizantsoftvision.maqs.webservices.WebServiceConfig; -import com.cognizantsoftvision.maqs.webservices.WebServiceDriver; -import com.cognizantsoftvision.maqs.webservices.WebServiceUtilities; -import com.cognizantsoftvision.maqs.webservices.models.Product; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; +package io.github.maqs.webservices.WebServiceDriverRequestUnitTest; + +import io.github.maqs.webservices.HttpClientFactory; +import io.github.maqs.webservices.MediaType; +import io.github.maqs.webservices.WebServiceConfig; +import io.github.maqs.webservices.WebServiceDriver; +import io.github.maqs.webservices.WebServiceUtilities; +import io.github.maqs.webservices.models.Product; +import io.github.maqs.utilities.helper.TestCategories; import java.io.IOException; import java.math.BigDecimal; import java.net.http.HttpRequest; diff --git a/maqs-webservices/src/test/java/com/cognizantsoftvision/maqs/webservices/WebServiceDriverUnitTest.java b/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverUnitTest.java similarity index 91% rename from maqs-webservices/src/test/java/com/cognizantsoftvision/maqs/webservices/WebServiceDriverUnitTest.java rename to maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverUnitTest.java index 12db542b0..ae080f64d 100644 --- a/maqs-webservices/src/test/java/com/cognizantsoftvision/maqs/webservices/WebServiceDriverUnitTest.java +++ b/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverUnitTest.java @@ -2,9 +2,9 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.webservices; +package io.github.maqs.webservices; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; +import io.github.maqs.utilities.helper.TestCategories; import java.net.http.HttpRequest; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/maqs-webservices/src/test/java/com/cognizantsoftvision/maqs/webservices/WebServiceTestObjectUnitTest.java b/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceTestObjectUnitTest.java similarity index 96% rename from maqs-webservices/src/test/java/com/cognizantsoftvision/maqs/webservices/WebServiceTestObjectUnitTest.java rename to maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceTestObjectUnitTest.java index ea268ccbf..b9d15c975 100644 --- a/maqs-webservices/src/test/java/com/cognizantsoftvision/maqs/webservices/WebServiceTestObjectUnitTest.java +++ b/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceTestObjectUnitTest.java @@ -2,10 +2,10 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.webservices; +package io.github.maqs.webservices; -import com.cognizantsoftvision.maqs.base.BaseGenericTest; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; +import io.github.maqs.base.BaseGenericTest; +import io.github.maqs.utilities.helper.TestCategories; import java.net.URI; import java.net.http.HttpClient; import java.net.http.HttpRequest; diff --git a/maqs-webservices/src/test/java/com/cognizantsoftvision/maqs/webservices/WebServiceUtilitiesUnitTest.java b/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceUtilitiesUnitTest.java similarity index 97% rename from maqs-webservices/src/test/java/com/cognizantsoftvision/maqs/webservices/WebServiceUtilitiesUnitTest.java rename to maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceUtilitiesUnitTest.java index 3cf51a4f1..8f5e68847 100644 --- a/maqs-webservices/src/test/java/com/cognizantsoftvision/maqs/webservices/WebServiceUtilitiesUnitTest.java +++ b/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceUtilitiesUnitTest.java @@ -2,13 +2,14 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.webservices; +package io.github.maqs.webservices; -import com.cognizantsoftvision.maqs.webservices.models.Product; +import io.github.maqs.webservices.models.Product; import com.fasterxml.jackson.core.JsonProcessingException; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; +import io.github.maqs.utilities.helper.TestCategories; import java.math.BigDecimal; import java.net.http.HttpResponse; + import org.testng.Assert; import org.testng.annotations.Test; diff --git a/maqs-webservices/src/test/java/com/cognizantsoftvision/maqs/webservices/models/Product.java b/maqs-webservices/src/test/java/io/github/maqs/webservices/models/Product.java similarity index 97% rename from maqs-webservices/src/test/java/com/cognizantsoftvision/maqs/webservices/models/Product.java rename to maqs-webservices/src/test/java/io/github/maqs/webservices/models/Product.java index ca59d2465..29b442ec0 100644 --- a/maqs-webservices/src/test/java/com/cognizantsoftvision/maqs/webservices/models/Product.java +++ b/maqs-webservices/src/test/java/io/github/maqs/webservices/models/Product.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved */ -package com.cognizantsoftvision.maqs.webservices.models; +package io.github.maqs.webservices.models; import com.fasterxml.jackson.annotation.JsonAlias; import com.fasterxml.jackson.annotation.JsonPropertyOrder; diff --git a/pom.xml b/pom.xml index 1dcd162f8..b7dff30ea 100644 --- a/pom.xml +++ b/pom.xml @@ -3,44 +3,44 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - com.cognizantsoftvision.maqs + io.github.maqs maqs-java ${revision} MAQS Framework - A collection of testing libraries and convenience classes to accelerate startup - automation efforts + + A collection of testing libraries and convenience classes to accelerate startup automation efforts pom - https://github.com/CognizantOpenSource/maqs-java + https://github.com/MAQS-Framework/maqs-java 2017 - Cognizant Softvision - https://www.cognizantsoftvision.com/ + MAQS + https://maqs-framework.github.io/ - Cognizant Softvision - https://www.cognizantsoftvision.com/ + MAQS Team + https://maqs-framework.github.io/ GitHub - https://github.com/CognizantOpenSource/maqs-java/issues + https://github.com/MAQS-Framework/maqs-java/issues GitHub Actions - https://github.com/CognizantOpenSource/maqs-java/actions + https://github.com/MAQS-Framework/maqs-java/actions MIT - https://github.com/CognizantOpenSource/maqs-java/blob/main/LICENSE + https://github.com/MAQS-Framework/maqs-java/blob/main/LICENSE - scm:git:git://github.com/CognizantOpenSource/maqs-java.git - scm:git:git@github.com:CognizantOpenSource/maqs-java.git - https://github.com/CognizantOpenSource/maqs-java + scm:git:git://github.com/MAQS-Framework/maqs-java.git + scm:git:git@github.com:MAQS-Framework/maqs-java.git + https://github.com/MAQS-Framework/maqs-java HEAD @@ -92,11 +92,11 @@ github - https://maven.pkg.github.com/CognizantOpenSource/maqs-java + https://maven.pkg.github.com/MAQS-Framework/maqs-java github - https://maven.pkg.github.com/CognizantOpenSource/maqs-java + https://maven.pkg.github.com/MAQS-Framework/maqs-java true @@ -179,7 +179,7 @@ true https://sonarcloud.io - cognizantopensource + maqs-framework @@ -292,47 +292,47 @@ ${testng.version} - com.cognizantsoftvision.maqs.accessibility + io.github.maqs.accessibility maqs-accessibility ${project.version} - com.cognizantsoftvision.maqs.appium + io.github.maqs.appium maqs-appium ${project.version} - com.cognizantsoftvision.maqs.base + io.github.maqs.base maqs-base ${project.version} - com.cognizantsoftvision.maqs.cucumber + io.github.maqs.cucumber maqs-cucumber ${project.version} - com.cognizantsoftvision.maqs.database + io.github.maqs.database maqs-database ${project.version} - com.cognizantsoftvision.maqs.selenium + io.github.maqs.selenium maqs-selenium ${project.version} - com.cognizantsoftvision.maqs.utilities + io.github.maqs.utilities maqs-utilities ${project.version} - com.cognizantsoftvision.maqs.webservices + io.github.maqs.webservices maqs-webservices ${project.version} - com.cognizantsoftvision.maqs.playwright + io.github.maqs.playwright maqs-playwright ${project.version} From e0983c948de0e08bc6c17a1732d90be37b2805b2 Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Tue, 13 Dec 2022 20:18:49 -0600 Subject: [PATCH 38/91] replace org name --- .github/workflows/maven.yml | 4 ++-- .github/workflows/startdeps-action/action.yml | 4 ++-- CODEOWNERS | 2 +- docs/MAQS_1/ContributionSetUp.md | 2 +- docs/MAQS_1/IntelliJ.md | 2 +- docs/MAQS_1/Introduction.md | 4 ++-- docs/MAQS_1/License.md | 2 +- docs/MAQS_1/VS_Code.md | 2 +- docs/MAQS_1/appium/AppiumConfig.md | 2 +- docs/MAQS_1/appium/AppiumFAQ.md | 2 +- docs/MAQS_1/appium/AppiumFeatures.md | 2 +- docs/MAQS_1/appium/AppiumTestObject.md | 2 +- docs/MAQS_1/database/DatabaseBaseTest.md | 2 +- docs/MAQS_1/general/Configurations.md | 4 ++-- docs/MAQS_1/general/ManagerStore.md | 2 +- docs/MAQS_1/selenium/SeleniumFeatures.md | 2 +- docs/MAQS_1/webservice/WebServiceFeatures.md | 2 +- docs/MAQS_3/ContributionSetUp.md | 2 +- docs/MAQS_3/IntelliJ.md | 2 +- docs/MAQS_3/Introduction.md | 4 ++-- docs/MAQS_3/License.md | 2 +- docs/MAQS_3/VS_Code.md | 2 +- docs/MAQS_3/appium/AppiumConfig.md | 2 +- docs/MAQS_3/appium/AppiumFAQ.md | 2 +- docs/MAQS_3/appium/AppiumTestObject.md | 2 +- docs/MAQS_3/database/DatabaseBaseTest.md | 2 +- docs/MAQS_3/general/Configurations.md | 4 ++-- docs/MAQS_3/general/ManagerStore.md | 2 +- docs/MAQS_3/playwright/PlaywrightConfig.md | 2 +- docs/MAQS_3/playwright/PlaywrightTestObject.md | 2 +- docs/MAQS_3/selenium/SeleniumFeatures.md | 2 +- docs/MAQS_3/webservice/WebServiceFeatures.md | 2 +- docs/index.html | 2 +- maqs-accessibility/config.xml | 2 +- .../maqs/accessibility/AccessibilityUtilities.java | 2 +- .../io/github/maqs/accessibility/HtmlReporter.java | 2 +- .../io/github/maqs/accessibility/SeleniumReport.java | 2 +- .../maqs/accessibility/AccessibilityHTMLUnitTest.java | 2 +- .../maqs/accessibility/AccessibilityUnitTest.java | 2 +- .../maqs/accessibility/HTMLReporterUnitTest.java | 2 +- .../testFiles/integration-test-target-complex.html | 2 +- .../resources/testFiles/integration-test-target.html | 2 +- .../main/java/io/github/maqs/appium/AppiumConfig.java | 2 +- .../io/github/maqs/appium/AppiumDriverFactory.java | 2 +- .../java/io/github/maqs/appium/AppiumTestObject.java | 2 +- .../java/io/github/maqs/appium/AppiumUtilities.java | 2 +- .../java/io/github/maqs/appium/BaseAppiumTest.java | 2 +- .../java/io/github/maqs/appium/IAppiumTestObject.java | 2 +- .../io/github/maqs/appium/MobileDriverManager.java | 2 +- .../io/github/maqs/appium/constants/PlatformType.java | 2 +- .../maqs/appium/exceptions/AppiumConfigException.java | 2 +- .../io/github/maqs/appium/AppiumConfigUnitTest.java | 2 +- .../maqs/appium/AppiumDriverFactoryUnitTest.java | 2 +- .../github/maqs/appium/AppiumTestObjectUnitTest.java | 2 +- .../io/github/maqs/appium/AppiumUtilitiesUnitTest.java | 2 +- .../io/github/maqs/appium/BaseAppiumTestUnitTest.java | 2 +- .../maqs/appium/MobileDriverManagerUnitTest.java | 2 +- .../java/io/github/maqs/base/BaseExtendableTest.java | 2 +- .../main/java/io/github/maqs/base/BaseGenericTest.java | 2 +- .../src/main/java/io/github/maqs/base/BaseTest.java | 4 ++-- .../main/java/io/github/maqs/base/BaseTestObject.java | 2 +- .../io/github/maqs/base/ConcurrentManagerHashMap.java | 2 +- .../main/java/io/github/maqs/base/DriverManager.java | 2 +- .../main/java/io/github/maqs/base/IDriverManager.java | 2 +- .../main/java/io/github/maqs/base/IManagerStore.java | 2 +- .../src/main/java/io/github/maqs/base/ITestObject.java | 2 +- .../main/java/io/github/maqs/base/ManagerStore.java | 2 +- .../java/io/github/maqs/base/TestResultContent.java | 2 +- .../maqs/base/exceptions/DriverDisposalException.java | 2 +- .../maqs/base/exceptions/MAQSRuntimeException.java | 2 +- .../maqs/base/exceptions/ManagerDisposalException.java | 2 +- .../io/github/maqs/base/BaseGenericTestNGUnitTest.java | 2 +- .../io/github/maqs/base/BaseTestObjectUnitTest.java | 2 +- .../java/io/github/maqs/base/BaseTestUnitTest.java | 6 +++--- .../maqs/base/ConcurrentManagerHashMapUnitTest.java | 2 +- .../io/github/maqs/base/DriverManagerUnitTest.java | 2 +- .../java/io/github/maqs/base/ManagerStoreUnitTest.java | 2 +- .../io/github/maqs/cucumber/BaseCucumberTestNG.java | 2 +- .../io/github/maqs/cucumber/BaseGenericCucumber.java | 2 +- .../io/github/maqs/cucumber/BaseSeleniumCucumber.java | 2 +- .../java/io/github/maqs/cucumber/ScenarioContext.java | 2 +- .../io/github/maqs/cucumber/steps/BaseGenericStep.java | 2 +- .../github/maqs/cucumber/steps/BaseSeleniumStep.java | 2 +- .../github/maqs/cucumber/steps/IBaseGenericStep.java | 2 +- .../maqs/cucumber/BaseCucumberTestNGUnitTest.java | 2 +- .../maqs/cucumber/BaseGenericCucumberUnitTest.java | 2 +- .../maqs/cucumber/BaseSeleniumCucumberUnitTest.java | 2 +- .../github/maqs/cucumber/ScenarioContextUnitTest.java | 2 +- .../maqs/cucumber/steps/BaseGenericStepUnitTest.java | 2 +- .../maqs/cucumber/steps/BaseSeleniumStepUnitTest.java | 2 +- .../unittestpagemodel/DummyBaseCucumberTestNG.java | 2 +- .../unittestpagemodel/DummyBaseGenericStep.java | 2 +- .../unittestpagemodel/DummyBaseSeleniumStep.java | 2 +- .../cucumber/unittestpagemodel/DummyTestResult.java | 2 +- .../src/test/java/stepdefs/generic/BaseSteps.java | 2 +- .../src/test/java/stepdefs/selenium/SeleniumSteps.java | 2 +- .../test/java/stepdefs/selenium/SeleniumSteps2.java | 2 +- .../test/java/stepdefs/selenium/SeleniumSteps3.java | 2 +- maqs-database/config.xml | 4 ++-- .../java/io/github/maqs/database/BaseDatabaseTest.java | 2 +- .../io/github/maqs/database/ConnectionFactory.java | 2 +- .../java/io/github/maqs/database/DatabaseConfig.java | 2 +- .../java/io/github/maqs/database/DatabaseDriver.java | 2 +- .../io/github/maqs/database/DatabaseDriverManager.java | 2 +- .../maqs/database/DatabasePersistenceUnitInfo.java | 2 +- .../io/github/maqs/database/DatabaseTestObject.java | 2 +- .../maqs/database/constants/DataProviderType.java | 2 +- .../io/github/maqs/database/providers/H2Provider.java | 2 +- .../maqs/database/providers/IDataSourceProvider.java | 2 +- .../github/maqs/database/providers/MySQLProvider.java | 2 +- .../io/github/maqs/database/providers/SQLProvider.java | 2 +- .../github/maqs/database/providers/SQLiteProvider.java | 2 +- .../github/maqs/database/BaseDatabaseTestUnitTest.java | 2 +- .../maqs/database/ConnectionFactoryUnitTest.java | 2 +- .../github/maqs/database/DatabaseConfigUnitTest.java | 6 +++--- .../github/maqs/database/DatabaseDriverUnitTest.java | 2 +- .../maqs/database/DatabaseTestObjectUnitTest.java | 2 +- .../database/constants/DataProviderTypeUnitTest.java | 2 +- .../io/github/maqs/database/entities/OrdersEntity.java | 2 +- .../github/maqs/database/entities/ProductsEntity.java | 2 +- .../maqs/database/entities/SqliteMasterEntity.java | 2 +- .../io/github/maqs/database/entities/StatesEntity.java | 2 +- .../io/github/maqs/database/entities/UsersEntity.java | 2 +- .../providers/IDataSourceProviderUnitTest.java | 2 +- .../maqs/database/providers/SQLProviderTest.java | 2 +- .../database/providers/SQLiteProviderUnitTest.java | 2 +- maqs-playwright/config.xml | 2 +- .../maqs/playwright/BasePlaywrightPageModel.java | 2 +- .../io/github/maqs/playwright/BasePlaywrightTest.java | 2 +- .../github/maqs/playwright/IPlaywrightTestObject.java | 2 +- .../java/io/github/maqs/playwright/PageDriver.java | 2 +- .../io/github/maqs/playwright/PageDriverFactory.java | 2 +- .../io/github/maqs/playwright/PlaywrightBrowser.java | 2 +- .../io/github/maqs/playwright/PlaywrightConfig.java | 2 +- .../maqs/playwright/PlaywrightDriverManager.java | 2 +- .../github/maqs/playwright/PlaywrightSyncElement.java | 2 +- .../github/maqs/playwright/PlaywrightTestObject.java | 2 +- .../maqs/playwright/PageDriverFactoryUnitTest.java | 2 +- .../io/github/maqs/playwright/PageDriverUnitTest.java | 10 +++++----- .../maqs/playwright/PlaywrightConfigUnitTest.java | 2 +- .../playwright/PlaywrightDriverManagerUnitTest.java | 2 +- .../maqs/playwright/PlaywrightSyncElementUnitTest.java | 6 +++--- .../maqs/playwright/pageModel/AsyncPageModel.java | 9 ++++++--- .../maqs/playwright/pageModel/ElementPageModel.java | 2 +- .../maqs/playwright/pageModel/IFramePageModel.java | 2 +- .../io/github/maqs/playwright/pageModel/PageModel.java | 2 +- maqs-selenium/config.xml | 2 +- .../io/github/maqs/selenium/AbstractLazyElement.java | 2 +- .../java/io/github/maqs/selenium/ActionBuilder.java | 2 +- .../io/github/maqs/selenium/BaseSeleniumPageModel.java | 2 +- .../java/io/github/maqs/selenium/BaseSeleniumTest.java | 2 +- .../java/io/github/maqs/selenium/ElementHandler.java | 2 +- .../java/io/github/maqs/selenium/EventHandler.java | 2 +- .../io/github/maqs/selenium/ISeleniumTestObject.java | 2 +- .../java/io/github/maqs/selenium/LazyWebElement.java | 2 +- .../java/io/github/maqs/selenium/SeleniumConfig.java | 2 +- .../io/github/maqs/selenium/SeleniumDriverManager.java | 2 +- .../io/github/maqs/selenium/SeleniumTestObject.java | 2 +- .../io/github/maqs/selenium/SeleniumUtilities.java | 2 +- .../src/main/java/io/github/maqs/selenium/UIFind.java | 2 +- .../src/main/java/io/github/maqs/selenium/UIWait.java | 2 +- .../java/io/github/maqs/selenium/WebDriverFactory.java | 2 +- .../io/github/maqs/selenium/constants/BrowserType.java | 2 +- .../maqs/selenium/constants/OperatingSystem.java | 2 +- .../maqs/selenium/constants/RemoteBrowserType.java | 2 +- .../selenium/exceptions/ElementHandlerException.java | 2 +- .../selenium/exceptions/WebDriverFactoryException.java | 2 +- .../maqs/selenium/factories/FluentWaitFactory.java | 2 +- .../github/maqs/selenium/factories/UIFindFactory.java | 2 +- .../github/maqs/selenium/factories/UIWaitFactory.java | 2 +- .../io/github/maqs/selenium/ActionBuilderUnitTest.java | 2 +- .../maqs/selenium/BaseSeleniumPageModelUnitTest.java | 2 +- .../github/maqs/selenium/BaseSeleniumTestUnitTest.java | 2 +- .../github/maqs/selenium/ElementHandlerUnitTest.java | 2 +- .../io/github/maqs/selenium/EventHandlerUnitTest.java | 2 +- .../maqs/selenium/FluentWaitFactoryUnitTest.java | 2 +- .../github/maqs/selenium/LazyWebElementUnitTest.java | 2 +- .../github/maqs/selenium/SeleniumConfigUnitTest.java | 4 ++-- .../maqs/selenium/SeleniumDriverManagerUnitTest.java | 2 +- .../maqs/selenium/SeleniumTestObjectUnitTest.java | 2 +- .../maqs/selenium/SeleniumUtilitiesUnitTest.java | 2 +- .../io/github/maqs/selenium/UIFindFactoryUnitTest.java | 2 +- .../java/io/github/maqs/selenium/UIFindUnitTest.java | 2 +- .../io/github/maqs/selenium/UIWaitFactoryUnitTest.java | 2 +- .../io/github/maqs/selenium/UIWaitUntilUnitTest.java | 2 +- .../github/maqs/selenium/WebDriverFactoryUnitTest.java | 2 +- .../selenium/constants/OperatingSystemUnitTest.java | 6 +++--- .../github/maqs/selenium/pageModel/AsyncPageModel.java | 2 +- .../maqs/selenium/pageModel/AutomationPageModel.java | 2 +- .../maqs/selenium/pageModel/HeaderPageModel.java | 2 +- .../maqs/selenium/pageModel/IFramePageModel.java | 2 +- .../java/io/github/maqs/utilities/helper/Config.java | 2 +- .../io/github/maqs/utilities/helper/ConfigSection.java | 2 +- .../io/github/maqs/utilities/helper/GenericWait.java | 2 +- .../io/github/maqs/utilities/helper/ListProcessor.java | 2 +- .../github/maqs/utilities/helper/PropertyManager.java | 2 +- .../github/maqs/utilities/helper/StringProcessor.java | 2 +- .../github/maqs/utilities/helper/TestCategories.java | 2 +- .../helper/exceptions/ExecutionFailedException.java | 2 +- .../exceptions/FrameworkConfigurationException.java | 2 +- .../utilities/helper/exceptions/FunctionException.java | 2 +- .../helper/exceptions/MaqsLoggingConfigException.java | 2 +- .../utilities/helper/exceptions/TimeoutException.java | 2 +- .../utilities/helper/functionalinterfaces/Action.java | 2 +- .../github/maqs/utilities/logging/ConsoleLogger.java | 2 +- .../io/github/maqs/utilities/logging/FileLogger.java | 2 +- .../github/maqs/utilities/logging/HtmlFileLogger.java | 4 ++-- .../io/github/maqs/utilities/logging/IFileLogger.java | 2 +- .../github/maqs/utilities/logging/IHtmlFileLogger.java | 2 +- .../java/io/github/maqs/utilities/logging/ILogger.java | 2 +- .../java/io/github/maqs/utilities/logging/Logger.java | 2 +- .../github/maqs/utilities/logging/LoggerFactory.java | 2 +- .../github/maqs/utilities/logging/LoggingConfig.java | 2 +- .../github/maqs/utilities/logging/LoggingEnabled.java | 2 +- .../io/github/maqs/utilities/logging/MessageType.java | 2 +- .../github/maqs/utilities/logging/TestResultType.java | 2 +- .../utilities/performance/IPerfTimerCollection.java | 2 +- .../utilities/performance/PerfTimerCollection.java | 2 +- .../github/maqs/utilities/helper/ConfigUnitTest.java | 2 +- .../helper/GenericWaitNotParallelUnitTest.java | 2 +- .../maqs/utilities/helper/GenericWaitUnitTest.java | 2 +- .../maqs/utilities/helper/ListProcessorUnitTest.java | 2 +- .../maqs/utilities/helper/PropertyManagerUnitTest.java | 2 +- .../maqs/utilities/helper/StringProcessorUnitTest.java | 2 +- .../io/github/maqs/utilities/logger/ConsoleCopy.java | 2 +- .../maqs/utilities/logger/ConsoleLoggerUnitTest.java | 2 +- .../maqs/utilities/logger/FileLoggerUnitTest.java | 2 +- .../maqs/utilities/logger/HtmlFileLoggerUnitTest.java | 2 +- .../maqs/utilities/logger/LoggerFactoryUnitTest.java | 2 +- .../maqs/utilities/logger/LoggingConfigUnitTest.java | 4 ++-- .../performance/PerfTimerCollectionUnitTest.java | 2 +- .../io/github/maqs/webservices/BaseWebServiceTest.java | 2 +- .../io/github/maqs/webservices/HttpClientFactory.java | 2 +- .../github/maqs/webservices/IWebServiceTestObject.java | 2 +- .../java/io/github/maqs/webservices/MediaType.java | 2 +- .../io/github/maqs/webservices/WebServiceConfig.java | 2 +- .../io/github/maqs/webservices/WebServiceDriver.java | 2 +- .../maqs/webservices/WebServiceDriverManager.java | 2 +- .../github/maqs/webservices/WebServiceTestObject.java | 2 +- .../github/maqs/webservices/WebServiceUtilities.java | 2 +- .../maqs/webservices/BaseWebServiceTestUnitTest.java | 2 +- .../io/github/maqs/webservices/MediaTypeUnitTest.java | 2 +- .../maqs/webservices/WebServiceConfigUnitTest.java | 2 +- .../webservices/WebServiceDriverManagerUnitTest.java | 2 +- .../WebServiceDriverDeleteUnitTest.java | 2 +- .../WebServiceDriverGetUnitTest.java | 2 +- .../WebServiceDriverPatchUnitTest.java | 2 +- .../WebServiceDriverPostUnitTest.java | 2 +- .../WebServiceDriverPutUnitTest.java | 2 +- .../maqs/webservices/WebServiceDriverUnitTest.java | 2 +- .../maqs/webservices/WebServiceTestObjectUnitTest.java | 2 +- .../maqs/webservices/WebServiceUtilitiesUnitTest.java | 2 +- .../io/github/maqs/webservices/models/Product.java | 2 +- maqs_checks.xml | 2 +- 254 files changed, 282 insertions(+), 279 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 601766868..a0acdb2cb 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -157,8 +157,8 @@ jobs: runs-on: ubuntu-latest needs: [test-modules, getVersion] env: - SONAR_ORG: "cognizantopensource" - SONAR_PROJECT: "CognizantOpenSource_maqs-java" + SONAR_ORG: "MAQS" + SONAR_PROJECT: "MAQS_maqs-java" GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{secrets.SONAR_TOKEN}} VERSION: ${{ needs.getVersion.outputs.buildNumber }} diff --git a/.github/workflows/startdeps-action/action.yml b/.github/workflows/startdeps-action/action.yml index 39be2e565..6b69054ea 100644 --- a/.github/workflows/startdeps-action/action.yml +++ b/.github/workflows/startdeps-action/action.yml @@ -18,9 +18,9 @@ runs: - name: Start MAQS test services container if: inputs.module-name == 'maqs-webservices' shell: pwsh - #run: docker-compose -f docker/MAQSService/docker-compose.yml -p CognizantOpenSource/maqs-java up -d + #run: docker-compose -f docker/MAQSService/docker-compose.yml -p MAQS-Framework/maqs-java up -d run: Start-Process -FilePath "dotnet" -ArgumentList "run --project docker/MAQSService/MainTestService/MainTestService.csproj" - name: Build the docker-compose stack if: inputs.module-name == 'maqs-database' shell: bash - run: docker-compose -f docker/MAQSSQLServer/docker-compose.yml -p CognizantOpenSource/maqs-java up -d + run: docker-compose -f docker/MAQSSQLServer/docker-compose.yml -p MAQS-Framework/maqs-java up -d diff --git a/CODEOWNERS b/CODEOWNERS index dde5c0241..f43d859f1 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -2,4 +2,4 @@ # the repo. Unless a later match takes precedence, # @global-owner1 and @global-owner2 will be requested for # review when someone opens a pull request. -* @CognizantOpenSource/maqs-architects +* @MAQS-Framework/maqs-architects diff --git a/docs/MAQS_1/ContributionSetUp.md b/docs/MAQS_1/ContributionSetUp.md index f98bc2251..718398f62 100644 --- a/docs/MAQS_1/ContributionSetUp.md +++ b/docs/MAQS_1/ContributionSetUp.md @@ -18,7 +18,7 @@ are instructions to clone the project through either VS Code or IntelliJ. ## Clone MAQS with GitHub Desktop Download Git Desktop here: [https://desktop.github.com/](https://desktop.github.com/) -1. Navigate to [https://github.com/CognizantOpenSource/maqs-java](https://github.com/CognizantOpenSource/maqs-java) +1. Navigate to [https://github.com/MAQS-Framework/maqs-java](https://github.com/MAQS-Framework/maqs-java) 2. Click the **Clone** button 3. Click the **Open with GitHub Desktop** button ![alt text](../resources/installationImages/githubDesktop/CopyMAQS.png) diff --git a/docs/MAQS_1/IntelliJ.md b/docs/MAQS_1/IntelliJ.md index d62c43710..df34928cb 100644 --- a/docs/MAQS_1/IntelliJ.md +++ b/docs/MAQS_1/IntelliJ.md @@ -25,7 +25,7 @@ Note: You can download it here: [https://www.jetbrains.com/idea/download/#secti 2. Select the **Repository URL** tab 3. For **Version control** select **Git** 4. In the URL text box enter the maqs-java git url: - https://github.com/CognizantOpenSource/maqs-java.git + https://github.com/MAQS-Framework/maqs-java.git 5. Click the **Clone** button ![alt text](../resources/installationImages/intellij/GitSetup.png) diff --git a/docs/MAQS_1/Introduction.md b/docs/MAQS_1/Introduction.md index 4b51a6699..350f5bd25 100644 --- a/docs/MAQS_1/Introduction.md +++ b/docs/MAQS_1/Introduction.md @@ -1,12 +1,12 @@ # MAQS ## Introduction to MAQS -MAQS stands for Cognizant Softvision's automation quick start. +MAQS stands for modular automation quick start. It … - is a modular test automation framework - can be used as the base for your automation project or individual pieces can be used to enhance existing frameworks -- is maintained/extended by Cognizant volunteers +- is maintained/extended by volunteers The main idea behind MAQS is to avoid **reinventing the wheel**. Most automation engagements have you doing the same basic steps to get a functioning framework implemented. Utilizing project templates, NuGet, and utility libraries we are able to have a functioning framework up and running in minutes, almost entirely removing on the initial time investment on implementing an automation solution. diff --git a/docs/MAQS_1/License.md b/docs/MAQS_1/License.md index e1d81fd3a..060ae485f 100644 --- a/docs/MAQS_1/License.md +++ b/docs/MAQS_1/License.md @@ -2,7 +2,7 @@ ---- -The MIT License (MIT) Copyright (c) 2022 Cognizant +The MIT License (MIT) Copyright (c) 2022 MAQS Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/docs/MAQS_1/VS_Code.md b/docs/MAQS_1/VS_Code.md index 0b5a3953f..87ccba086 100644 --- a/docs/MAQS_1/VS_Code.md +++ b/docs/MAQS_1/VS_Code.md @@ -83,7 +83,7 @@ code --install-extension vscjava.vscode-java-pack 4. Login to your git-hub account (if you don't have an account, use the Git Bash instructions) -5. Type in: **CognizantOpenSource/maqs-java** and select it in the dropdown +5. Type in: **MAQS-Framework/maqs-java** and select it in the dropdown ![alt text](../resources/installationImages/vsCode/GitHubMAQSLink.png) diff --git a/docs/MAQS_1/appium/AppiumConfig.md b/docs/MAQS_1/appium/AppiumConfig.md index b8fe570d2..c933c5723 100644 --- a/docs/MAQS_1/appium/AppiumConfig.md +++ b/docs/MAQS_1/appium/AppiumConfig.md @@ -145,7 +145,7 @@ AppiumConfig.setTimouts(driver); - + diff --git a/docs/MAQS_1/appium/AppiumFAQ.md b/docs/MAQS_1/appium/AppiumFAQ.md index ec28068fc..575e1d1a7 100644 --- a/docs/MAQS_1/appium/AppiumFAQ.md +++ b/docs/MAQS_1/appium/AppiumFAQ.md @@ -22,4 +22,4 @@ ## Errors trying to locate Enterprise when restoring NuGet packages - right-click the Solution and select Properties > Options > NuGet Package Manager > Package Sources here you will find Available package sources and Machine-wide package sources. -A mapping to the internal Cognizant Softvision package storage url (for internal use only) or an external reference such as and internal NuGet repository or file share. \ No newline at end of file +A mapping to the internal MAQS package storage url (for internal use only) or an external reference such as and internal NuGet repository or file share. \ No newline at end of file diff --git a/docs/MAQS_1/appium/AppiumFeatures.md b/docs/MAQS_1/appium/AppiumFeatures.md index b1f6cb175..716d2863d 100644 --- a/docs/MAQS_1/appium/AppiumFeatures.md +++ b/docs/MAQS_1/appium/AppiumFeatures.md @@ -49,7 +49,7 @@ Stores methods for interacting with the config.xml ## Sample code ```java -package com.cognizantsoftvision.maqs.appium; +package io.github.maqs.appium; import helper.io.github.maqs.utilities.TestCategories; import org.testng.Assert; diff --git a/docs/MAQS_1/appium/AppiumTestObject.md b/docs/MAQS_1/appium/AppiumTestObject.md index bf5751b92..2043c466a 100644 --- a/docs/MAQS_1/appium/AppiumTestObject.md +++ b/docs/MAQS_1/appium/AppiumTestObject.md @@ -5,7 +5,7 @@ BaseTestObject io.github.maqs.appium.AppiumTestObject ``` -Package: com.cognizantsoftvision.maqs.appium; +Package: io.github.maqs.appium; Assembly: import io.github.maqs.appium.AppiumTestObject ## Syntax diff --git a/docs/MAQS_1/database/DatabaseBaseTest.md b/docs/MAQS_1/database/DatabaseBaseTest.md index ed088880e..477475b07 100644 --- a/docs/MAQS_1/database/DatabaseBaseTest.md +++ b/docs/MAQS_1/database/DatabaseBaseTest.md @@ -37,7 +37,7 @@ this.getTestObject().getLogger().logMessage("I am testing with MAQS"); ## Sample code ```java import io.github.maqs.database.BaseDatabaseTest; -import com.cognizantsoftvision.maqs.utilites.helper.logger; +import io.github.maqs.utilites.helper.logger; import helper.io.github.maqs.utilities.TestCategories; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/docs/MAQS_1/general/Configurations.md b/docs/MAQS_1/general/Configurations.md index a79a43170..169bc3cf8 100644 --- a/docs/MAQS_1/general/Configurations.md +++ b/docs/MAQS_1/general/Configurations.md @@ -225,8 +225,8 @@ Primarily used with Maven implementation of MAQS. - - + + - - + + - + Chrome http://ondemand.saucelabs.com:80/wd/hub - https://cognizantopensource.github.io/maqs-dotnet-templates/Static/Automation/ + https://MAQS-Framework.github.io/maqs-dotnet-templates/Static/Automation/ 1000 20000 Chrome diff --git a/maqs-accessibility/src/main/java/io/github/maqs/accessibility/AccessibilityUtilities.java b/maqs-accessibility/src/main/java/io/github/maqs/accessibility/AccessibilityUtilities.java index e5f68a59c..779759f5d 100644 --- a/maqs-accessibility/src/main/java/io/github/maqs/accessibility/AccessibilityUtilities.java +++ b/maqs-accessibility/src/main/java/io/github/maqs/accessibility/AccessibilityUtilities.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.accessibility; diff --git a/maqs-accessibility/src/main/java/io/github/maqs/accessibility/HtmlReporter.java b/maqs-accessibility/src/main/java/io/github/maqs/accessibility/HtmlReporter.java index 747cd5f19..c40237fc4 100644 --- a/maqs-accessibility/src/main/java/io/github/maqs/accessibility/HtmlReporter.java +++ b/maqs-accessibility/src/main/java/io/github/maqs/accessibility/HtmlReporter.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.accessibility; diff --git a/maqs-accessibility/src/main/java/io/github/maqs/accessibility/SeleniumReport.java b/maqs-accessibility/src/main/java/io/github/maqs/accessibility/SeleniumReport.java index 39d40088b..7dfd401a7 100644 --- a/maqs-accessibility/src/main/java/io/github/maqs/accessibility/SeleniumReport.java +++ b/maqs-accessibility/src/main/java/io/github/maqs/accessibility/SeleniumReport.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.accessibility; diff --git a/maqs-accessibility/src/test/java/io/github/maqs/accessibility/AccessibilityHTMLUnitTest.java b/maqs-accessibility/src/test/java/io/github/maqs/accessibility/AccessibilityHTMLUnitTest.java index db427c0df..ab0d276c1 100644 --- a/maqs-accessibility/src/test/java/io/github/maqs/accessibility/AccessibilityHTMLUnitTest.java +++ b/maqs-accessibility/src/test/java/io/github/maqs/accessibility/AccessibilityHTMLUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.accessibility; diff --git a/maqs-accessibility/src/test/java/io/github/maqs/accessibility/AccessibilityUnitTest.java b/maqs-accessibility/src/test/java/io/github/maqs/accessibility/AccessibilityUnitTest.java index e1f2fe518..d8f9345f1 100644 --- a/maqs-accessibility/src/test/java/io/github/maqs/accessibility/AccessibilityUnitTest.java +++ b/maqs-accessibility/src/test/java/io/github/maqs/accessibility/AccessibilityUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.accessibility; diff --git a/maqs-accessibility/src/test/java/io/github/maqs/accessibility/HTMLReporterUnitTest.java b/maqs-accessibility/src/test/java/io/github/maqs/accessibility/HTMLReporterUnitTest.java index b85c7807d..f680490d6 100644 --- a/maqs-accessibility/src/test/java/io/github/maqs/accessibility/HTMLReporterUnitTest.java +++ b/maqs-accessibility/src/test/java/io/github/maqs/accessibility/HTMLReporterUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.accessibility; diff --git a/maqs-accessibility/src/test/resources/testFiles/integration-test-target-complex.html b/maqs-accessibility/src/test/resources/testFiles/integration-test-target-complex.html index 64b78b805..525a22ca7 100644 --- a/maqs-accessibility/src/test/resources/testFiles/integration-test-target-complex.html +++ b/maqs-accessibility/src/test/resources/testFiles/integration-test-target-complex.html @@ -1,5 +1,5 @@ diff --git a/maqs-accessibility/src/test/resources/testFiles/integration-test-target.html b/maqs-accessibility/src/test/resources/testFiles/integration-test-target.html index 6005e8fd5..b079563d8 100644 --- a/maqs-accessibility/src/test/resources/testFiles/integration-test-target.html +++ b/maqs-accessibility/src/test/resources/testFiles/integration-test-target.html @@ -1,5 +1,5 @@ diff --git a/maqs-appium/src/main/java/io/github/maqs/appium/AppiumConfig.java b/maqs-appium/src/main/java/io/github/maqs/appium/AppiumConfig.java index b5a578a0c..c6a42b967 100644 --- a/maqs-appium/src/main/java/io/github/maqs/appium/AppiumConfig.java +++ b/maqs-appium/src/main/java/io/github/maqs/appium/AppiumConfig.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.appium; diff --git a/maqs-appium/src/main/java/io/github/maqs/appium/AppiumDriverFactory.java b/maqs-appium/src/main/java/io/github/maqs/appium/AppiumDriverFactory.java index fa607f08a..30e1d6622 100644 --- a/maqs-appium/src/main/java/io/github/maqs/appium/AppiumDriverFactory.java +++ b/maqs-appium/src/main/java/io/github/maqs/appium/AppiumDriverFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.appium; diff --git a/maqs-appium/src/main/java/io/github/maqs/appium/AppiumTestObject.java b/maqs-appium/src/main/java/io/github/maqs/appium/AppiumTestObject.java index 978873f74..6a82d2c8e 100644 --- a/maqs-appium/src/main/java/io/github/maqs/appium/AppiumTestObject.java +++ b/maqs-appium/src/main/java/io/github/maqs/appium/AppiumTestObject.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.appium; diff --git a/maqs-appium/src/main/java/io/github/maqs/appium/AppiumUtilities.java b/maqs-appium/src/main/java/io/github/maqs/appium/AppiumUtilities.java index fac59a60e..32d1aa4b5 100644 --- a/maqs-appium/src/main/java/io/github/maqs/appium/AppiumUtilities.java +++ b/maqs-appium/src/main/java/io/github/maqs/appium/AppiumUtilities.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.appium; diff --git a/maqs-appium/src/main/java/io/github/maqs/appium/BaseAppiumTest.java b/maqs-appium/src/main/java/io/github/maqs/appium/BaseAppiumTest.java index d159fd37e..a17f675a6 100644 --- a/maqs-appium/src/main/java/io/github/maqs/appium/BaseAppiumTest.java +++ b/maqs-appium/src/main/java/io/github/maqs/appium/BaseAppiumTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.appium; diff --git a/maqs-appium/src/main/java/io/github/maqs/appium/IAppiumTestObject.java b/maqs-appium/src/main/java/io/github/maqs/appium/IAppiumTestObject.java index e04ae6b20..7e3d47e72 100644 --- a/maqs-appium/src/main/java/io/github/maqs/appium/IAppiumTestObject.java +++ b/maqs-appium/src/main/java/io/github/maqs/appium/IAppiumTestObject.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.appium; diff --git a/maqs-appium/src/main/java/io/github/maqs/appium/MobileDriverManager.java b/maqs-appium/src/main/java/io/github/maqs/appium/MobileDriverManager.java index b882160c7..cd0295593 100644 --- a/maqs-appium/src/main/java/io/github/maqs/appium/MobileDriverManager.java +++ b/maqs-appium/src/main/java/io/github/maqs/appium/MobileDriverManager.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.appium; diff --git a/maqs-appium/src/main/java/io/github/maqs/appium/constants/PlatformType.java b/maqs-appium/src/main/java/io/github/maqs/appium/constants/PlatformType.java index e9945a12e..035a6f072 100644 --- a/maqs-appium/src/main/java/io/github/maqs/appium/constants/PlatformType.java +++ b/maqs-appium/src/main/java/io/github/maqs/appium/constants/PlatformType.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.appium.constants; diff --git a/maqs-appium/src/main/java/io/github/maqs/appium/exceptions/AppiumConfigException.java b/maqs-appium/src/main/java/io/github/maqs/appium/exceptions/AppiumConfigException.java index a2b6d0fe5..a61eda64e 100644 --- a/maqs-appium/src/main/java/io/github/maqs/appium/exceptions/AppiumConfigException.java +++ b/maqs-appium/src/main/java/io/github/maqs/appium/exceptions/AppiumConfigException.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.appium.exceptions; diff --git a/maqs-appium/src/test/java/io/github/maqs/appium/AppiumConfigUnitTest.java b/maqs-appium/src/test/java/io/github/maqs/appium/AppiumConfigUnitTest.java index 1c66f275c..7b40c9f7d 100644 --- a/maqs-appium/src/test/java/io/github/maqs/appium/AppiumConfigUnitTest.java +++ b/maqs-appium/src/test/java/io/github/maqs/appium/AppiumConfigUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.appium; diff --git a/maqs-appium/src/test/java/io/github/maqs/appium/AppiumDriverFactoryUnitTest.java b/maqs-appium/src/test/java/io/github/maqs/appium/AppiumDriverFactoryUnitTest.java index fc786009a..9e5eea63c 100644 --- a/maqs-appium/src/test/java/io/github/maqs/appium/AppiumDriverFactoryUnitTest.java +++ b/maqs-appium/src/test/java/io/github/maqs/appium/AppiumDriverFactoryUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.appium; diff --git a/maqs-appium/src/test/java/io/github/maqs/appium/AppiumTestObjectUnitTest.java b/maqs-appium/src/test/java/io/github/maqs/appium/AppiumTestObjectUnitTest.java index b8bd7266a..1c0c6bf81 100644 --- a/maqs-appium/src/test/java/io/github/maqs/appium/AppiumTestObjectUnitTest.java +++ b/maqs-appium/src/test/java/io/github/maqs/appium/AppiumTestObjectUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.appium; diff --git a/maqs-appium/src/test/java/io/github/maqs/appium/AppiumUtilitiesUnitTest.java b/maqs-appium/src/test/java/io/github/maqs/appium/AppiumUtilitiesUnitTest.java index aaed0b5f3..52c65924a 100644 --- a/maqs-appium/src/test/java/io/github/maqs/appium/AppiumUtilitiesUnitTest.java +++ b/maqs-appium/src/test/java/io/github/maqs/appium/AppiumUtilitiesUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.appium; diff --git a/maqs-appium/src/test/java/io/github/maqs/appium/BaseAppiumTestUnitTest.java b/maqs-appium/src/test/java/io/github/maqs/appium/BaseAppiumTestUnitTest.java index 95292c4cd..e91bbffd1 100644 --- a/maqs-appium/src/test/java/io/github/maqs/appium/BaseAppiumTestUnitTest.java +++ b/maqs-appium/src/test/java/io/github/maqs/appium/BaseAppiumTestUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.appium; diff --git a/maqs-appium/src/test/java/io/github/maqs/appium/MobileDriverManagerUnitTest.java b/maqs-appium/src/test/java/io/github/maqs/appium/MobileDriverManagerUnitTest.java index 84f95084d..57b24f0bc 100644 --- a/maqs-appium/src/test/java/io/github/maqs/appium/MobileDriverManagerUnitTest.java +++ b/maqs-appium/src/test/java/io/github/maqs/appium/MobileDriverManagerUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.appium; diff --git a/maqs-base/src/main/java/io/github/maqs/base/BaseExtendableTest.java b/maqs-base/src/main/java/io/github/maqs/base/BaseExtendableTest.java index 872ba71a4..ccfd4eb18 100644 --- a/maqs-base/src/main/java/io/github/maqs/base/BaseExtendableTest.java +++ b/maqs-base/src/main/java/io/github/maqs/base/BaseExtendableTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.base; diff --git a/maqs-base/src/main/java/io/github/maqs/base/BaseGenericTest.java b/maqs-base/src/main/java/io/github/maqs/base/BaseGenericTest.java index 440a84df0..458c161c6 100644 --- a/maqs-base/src/main/java/io/github/maqs/base/BaseGenericTest.java +++ b/maqs-base/src/main/java/io/github/maqs/base/BaseGenericTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.base; diff --git a/maqs-base/src/main/java/io/github/maqs/base/BaseTest.java b/maqs-base/src/main/java/io/github/maqs/base/BaseTest.java index 6186db96c..32795ff2d 100644 --- a/maqs-base/src/main/java/io/github/maqs/base/BaseTest.java +++ b/maqs-base/src/main/java/io/github/maqs/base/BaseTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.base; @@ -389,7 +389,7 @@ protected void logVerbose(String message, Object... args) { for (StackTraceElement element : Thread.currentThread().getStackTrace()) { // If the stack trace element is from this package (excluding this method) append the stack trace line - if (element.toString().startsWith("com.cognizantsoftvision") + if (element.toString().startsWith("com.MAQS") && !element.toString().contains("BaseTest.logVerbose")) { messages.append(element).append(System.lineSeparator()); } diff --git a/maqs-base/src/main/java/io/github/maqs/base/BaseTestObject.java b/maqs-base/src/main/java/io/github/maqs/base/BaseTestObject.java index 1942931a2..96b4227d8 100644 --- a/maqs-base/src/main/java/io/github/maqs/base/BaseTestObject.java +++ b/maqs-base/src/main/java/io/github/maqs/base/BaseTestObject.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.base; diff --git a/maqs-base/src/main/java/io/github/maqs/base/ConcurrentManagerHashMap.java b/maqs-base/src/main/java/io/github/maqs/base/ConcurrentManagerHashMap.java index f3c75fdb7..f4be83df3 100644 --- a/maqs-base/src/main/java/io/github/maqs/base/ConcurrentManagerHashMap.java +++ b/maqs-base/src/main/java/io/github/maqs/base/ConcurrentManagerHashMap.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.base; diff --git a/maqs-base/src/main/java/io/github/maqs/base/DriverManager.java b/maqs-base/src/main/java/io/github/maqs/base/DriverManager.java index 886e0aacc..f8ba8feea 100644 --- a/maqs-base/src/main/java/io/github/maqs/base/DriverManager.java +++ b/maqs-base/src/main/java/io/github/maqs/base/DriverManager.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.base; diff --git a/maqs-base/src/main/java/io/github/maqs/base/IDriverManager.java b/maqs-base/src/main/java/io/github/maqs/base/IDriverManager.java index 4af36d236..96c3f8d86 100644 --- a/maqs-base/src/main/java/io/github/maqs/base/IDriverManager.java +++ b/maqs-base/src/main/java/io/github/maqs/base/IDriverManager.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.base; diff --git a/maqs-base/src/main/java/io/github/maqs/base/IManagerStore.java b/maqs-base/src/main/java/io/github/maqs/base/IManagerStore.java index b4cf202eb..16e113545 100644 --- a/maqs-base/src/main/java/io/github/maqs/base/IManagerStore.java +++ b/maqs-base/src/main/java/io/github/maqs/base/IManagerStore.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.base; diff --git a/maqs-base/src/main/java/io/github/maqs/base/ITestObject.java b/maqs-base/src/main/java/io/github/maqs/base/ITestObject.java index a930d547a..0a082b52f 100644 --- a/maqs-base/src/main/java/io/github/maqs/base/ITestObject.java +++ b/maqs-base/src/main/java/io/github/maqs/base/ITestObject.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.base; diff --git a/maqs-base/src/main/java/io/github/maqs/base/ManagerStore.java b/maqs-base/src/main/java/io/github/maqs/base/ManagerStore.java index ea7b8daf3..ad4458922 100644 --- a/maqs-base/src/main/java/io/github/maqs/base/ManagerStore.java +++ b/maqs-base/src/main/java/io/github/maqs/base/ManagerStore.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.base; diff --git a/maqs-base/src/main/java/io/github/maqs/base/TestResultContent.java b/maqs-base/src/main/java/io/github/maqs/base/TestResultContent.java index 9d514441d..7d9e4d465 100644 --- a/maqs-base/src/main/java/io/github/maqs/base/TestResultContent.java +++ b/maqs-base/src/main/java/io/github/maqs/base/TestResultContent.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.base; diff --git a/maqs-base/src/main/java/io/github/maqs/base/exceptions/DriverDisposalException.java b/maqs-base/src/main/java/io/github/maqs/base/exceptions/DriverDisposalException.java index 5debd1029..c2a8d8a95 100644 --- a/maqs-base/src/main/java/io/github/maqs/base/exceptions/DriverDisposalException.java +++ b/maqs-base/src/main/java/io/github/maqs/base/exceptions/DriverDisposalException.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.base.exceptions; diff --git a/maqs-base/src/main/java/io/github/maqs/base/exceptions/MAQSRuntimeException.java b/maqs-base/src/main/java/io/github/maqs/base/exceptions/MAQSRuntimeException.java index 32465ab18..5f88076bf 100644 --- a/maqs-base/src/main/java/io/github/maqs/base/exceptions/MAQSRuntimeException.java +++ b/maqs-base/src/main/java/io/github/maqs/base/exceptions/MAQSRuntimeException.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.base.exceptions; diff --git a/maqs-base/src/main/java/io/github/maqs/base/exceptions/ManagerDisposalException.java b/maqs-base/src/main/java/io/github/maqs/base/exceptions/ManagerDisposalException.java index d854cfa9b..2c83777d8 100644 --- a/maqs-base/src/main/java/io/github/maqs/base/exceptions/ManagerDisposalException.java +++ b/maqs-base/src/main/java/io/github/maqs/base/exceptions/ManagerDisposalException.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.base.exceptions; diff --git a/maqs-base/src/test/java/io/github/maqs/base/BaseGenericTestNGUnitTest.java b/maqs-base/src/test/java/io/github/maqs/base/BaseGenericTestNGUnitTest.java index 67d7a0945..125d280f2 100644 --- a/maqs-base/src/test/java/io/github/maqs/base/BaseGenericTestNGUnitTest.java +++ b/maqs-base/src/test/java/io/github/maqs/base/BaseGenericTestNGUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.base; diff --git a/maqs-base/src/test/java/io/github/maqs/base/BaseTestObjectUnitTest.java b/maqs-base/src/test/java/io/github/maqs/base/BaseTestObjectUnitTest.java index b3dc9d31f..e4938edea 100644 --- a/maqs-base/src/test/java/io/github/maqs/base/BaseTestObjectUnitTest.java +++ b/maqs-base/src/test/java/io/github/maqs/base/BaseTestObjectUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.base; diff --git a/maqs-base/src/test/java/io/github/maqs/base/BaseTestUnitTest.java b/maqs-base/src/test/java/io/github/maqs/base/BaseTestUnitTest.java index 8c7a14213..84cd3ddab 100644 --- a/maqs-base/src/test/java/io/github/maqs/base/BaseTestUnitTest.java +++ b/maqs-base/src/test/java/io/github/maqs/base/BaseTestUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.base; @@ -26,7 +26,7 @@ public class BaseTestUnitTest extends BaseTest { public void fullyQualifiedTestNameTest() { String testName = this.getFullyQualifiedTestClassName(); Assert.assertEquals(testName, - "com.cognizantsoftvision.maqs.base.BaseTestUnitTest.fullyQualifiedTestNameTest"); + "io.github.maqs.base.BaseTestUnitTest.fullyQualifiedTestNameTest"); } /** @@ -149,7 +149,7 @@ public void testCleanUpLogs() { /* * (non-Javadoc) * - * @see com.cognizantsoftvision.maqs.utilities.BaseTest.BaseTest#beforeLoggingTeardown(org.testng. + * @see io.github.maqs.utilities.BaseTest.BaseTest#beforeLoggingTeardown(org.testng. * ITestResult) */ @Override diff --git a/maqs-base/src/test/java/io/github/maqs/base/ConcurrentManagerHashMapUnitTest.java b/maqs-base/src/test/java/io/github/maqs/base/ConcurrentManagerHashMapUnitTest.java index ace51e850..2f08da460 100644 --- a/maqs-base/src/test/java/io/github/maqs/base/ConcurrentManagerHashMapUnitTest.java +++ b/maqs-base/src/test/java/io/github/maqs/base/ConcurrentManagerHashMapUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.base; diff --git a/maqs-base/src/test/java/io/github/maqs/base/DriverManagerUnitTest.java b/maqs-base/src/test/java/io/github/maqs/base/DriverManagerUnitTest.java index ca3775db4..bb03eb52a 100644 --- a/maqs-base/src/test/java/io/github/maqs/base/DriverManagerUnitTest.java +++ b/maqs-base/src/test/java/io/github/maqs/base/DriverManagerUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.base; diff --git a/maqs-base/src/test/java/io/github/maqs/base/ManagerStoreUnitTest.java b/maqs-base/src/test/java/io/github/maqs/base/ManagerStoreUnitTest.java index a1cf39f2b..60f27447e 100644 --- a/maqs-base/src/test/java/io/github/maqs/base/ManagerStoreUnitTest.java +++ b/maqs-base/src/test/java/io/github/maqs/base/ManagerStoreUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.base; diff --git a/maqs-cucumber/src/main/java/io/github/maqs/cucumber/BaseCucumberTestNG.java b/maqs-cucumber/src/main/java/io/github/maqs/cucumber/BaseCucumberTestNG.java index e00d64dc7..2240f6007 100644 --- a/maqs-cucumber/src/main/java/io/github/maqs/cucumber/BaseCucumberTestNG.java +++ b/maqs-cucumber/src/main/java/io/github/maqs/cucumber/BaseCucumberTestNG.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.cucumber; diff --git a/maqs-cucumber/src/main/java/io/github/maqs/cucumber/BaseGenericCucumber.java b/maqs-cucumber/src/main/java/io/github/maqs/cucumber/BaseGenericCucumber.java index 089e44ac1..ce9a79639 100644 --- a/maqs-cucumber/src/main/java/io/github/maqs/cucumber/BaseGenericCucumber.java +++ b/maqs-cucumber/src/main/java/io/github/maqs/cucumber/BaseGenericCucumber.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.cucumber; diff --git a/maqs-cucumber/src/main/java/io/github/maqs/cucumber/BaseSeleniumCucumber.java b/maqs-cucumber/src/main/java/io/github/maqs/cucumber/BaseSeleniumCucumber.java index 94aad957f..7b6989533 100644 --- a/maqs-cucumber/src/main/java/io/github/maqs/cucumber/BaseSeleniumCucumber.java +++ b/maqs-cucumber/src/main/java/io/github/maqs/cucumber/BaseSeleniumCucumber.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.cucumber; diff --git a/maqs-cucumber/src/main/java/io/github/maqs/cucumber/ScenarioContext.java b/maqs-cucumber/src/main/java/io/github/maqs/cucumber/ScenarioContext.java index be82e797a..bb86afcd1 100644 --- a/maqs-cucumber/src/main/java/io/github/maqs/cucumber/ScenarioContext.java +++ b/maqs-cucumber/src/main/java/io/github/maqs/cucumber/ScenarioContext.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.cucumber; diff --git a/maqs-cucumber/src/main/java/io/github/maqs/cucumber/steps/BaseGenericStep.java b/maqs-cucumber/src/main/java/io/github/maqs/cucumber/steps/BaseGenericStep.java index 280d740ea..12ab17d05 100644 --- a/maqs-cucumber/src/main/java/io/github/maqs/cucumber/steps/BaseGenericStep.java +++ b/maqs-cucumber/src/main/java/io/github/maqs/cucumber/steps/BaseGenericStep.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.cucumber.steps; diff --git a/maqs-cucumber/src/main/java/io/github/maqs/cucumber/steps/BaseSeleniumStep.java b/maqs-cucumber/src/main/java/io/github/maqs/cucumber/steps/BaseSeleniumStep.java index 7d322bac1..c649d17bd 100644 --- a/maqs-cucumber/src/main/java/io/github/maqs/cucumber/steps/BaseSeleniumStep.java +++ b/maqs-cucumber/src/main/java/io/github/maqs/cucumber/steps/BaseSeleniumStep.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.cucumber.steps; diff --git a/maqs-cucumber/src/main/java/io/github/maqs/cucumber/steps/IBaseGenericStep.java b/maqs-cucumber/src/main/java/io/github/maqs/cucumber/steps/IBaseGenericStep.java index 645b532f3..47632b188 100644 --- a/maqs-cucumber/src/main/java/io/github/maqs/cucumber/steps/IBaseGenericStep.java +++ b/maqs-cucumber/src/main/java/io/github/maqs/cucumber/steps/IBaseGenericStep.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.cucumber.steps; diff --git a/maqs-cucumber/src/test/java/io/github/maqs/cucumber/BaseCucumberTestNGUnitTest.java b/maqs-cucumber/src/test/java/io/github/maqs/cucumber/BaseCucumberTestNGUnitTest.java index 09c77efd8..749b50587 100644 --- a/maqs-cucumber/src/test/java/io/github/maqs/cucumber/BaseCucumberTestNGUnitTest.java +++ b/maqs-cucumber/src/test/java/io/github/maqs/cucumber/BaseCucumberTestNGUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.cucumber; diff --git a/maqs-cucumber/src/test/java/io/github/maqs/cucumber/BaseGenericCucumberUnitTest.java b/maqs-cucumber/src/test/java/io/github/maqs/cucumber/BaseGenericCucumberUnitTest.java index 8ec132d90..83719eeef 100644 --- a/maqs-cucumber/src/test/java/io/github/maqs/cucumber/BaseGenericCucumberUnitTest.java +++ b/maqs-cucumber/src/test/java/io/github/maqs/cucumber/BaseGenericCucumberUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.cucumber; diff --git a/maqs-cucumber/src/test/java/io/github/maqs/cucumber/BaseSeleniumCucumberUnitTest.java b/maqs-cucumber/src/test/java/io/github/maqs/cucumber/BaseSeleniumCucumberUnitTest.java index cdc032ff8..e0c8edb44 100644 --- a/maqs-cucumber/src/test/java/io/github/maqs/cucumber/BaseSeleniumCucumberUnitTest.java +++ b/maqs-cucumber/src/test/java/io/github/maqs/cucumber/BaseSeleniumCucumberUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.cucumber; diff --git a/maqs-cucumber/src/test/java/io/github/maqs/cucumber/ScenarioContextUnitTest.java b/maqs-cucumber/src/test/java/io/github/maqs/cucumber/ScenarioContextUnitTest.java index 7a35f9f2a..d94f72193 100644 --- a/maqs-cucumber/src/test/java/io/github/maqs/cucumber/ScenarioContextUnitTest.java +++ b/maqs-cucumber/src/test/java/io/github/maqs/cucumber/ScenarioContextUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.cucumber; diff --git a/maqs-cucumber/src/test/java/io/github/maqs/cucumber/steps/BaseGenericStepUnitTest.java b/maqs-cucumber/src/test/java/io/github/maqs/cucumber/steps/BaseGenericStepUnitTest.java index 74f406734..b8794ca30 100644 --- a/maqs-cucumber/src/test/java/io/github/maqs/cucumber/steps/BaseGenericStepUnitTest.java +++ b/maqs-cucumber/src/test/java/io/github/maqs/cucumber/steps/BaseGenericStepUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.cucumber.steps; diff --git a/maqs-cucumber/src/test/java/io/github/maqs/cucumber/steps/BaseSeleniumStepUnitTest.java b/maqs-cucumber/src/test/java/io/github/maqs/cucumber/steps/BaseSeleniumStepUnitTest.java index b15e84ab3..8a40e2e83 100644 --- a/maqs-cucumber/src/test/java/io/github/maqs/cucumber/steps/BaseSeleniumStepUnitTest.java +++ b/maqs-cucumber/src/test/java/io/github/maqs/cucumber/steps/BaseSeleniumStepUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.cucumber.steps; diff --git a/maqs-cucumber/src/test/java/io/github/maqs/cucumber/unittestpagemodel/DummyBaseCucumberTestNG.java b/maqs-cucumber/src/test/java/io/github/maqs/cucumber/unittestpagemodel/DummyBaseCucumberTestNG.java index 88454e4cc..6acd1d182 100644 --- a/maqs-cucumber/src/test/java/io/github/maqs/cucumber/unittestpagemodel/DummyBaseCucumberTestNG.java +++ b/maqs-cucumber/src/test/java/io/github/maqs/cucumber/unittestpagemodel/DummyBaseCucumberTestNG.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.cucumber.unittestpagemodel; diff --git a/maqs-cucumber/src/test/java/io/github/maqs/cucumber/unittestpagemodel/DummyBaseGenericStep.java b/maqs-cucumber/src/test/java/io/github/maqs/cucumber/unittestpagemodel/DummyBaseGenericStep.java index 10760d084..27610e176 100644 --- a/maqs-cucumber/src/test/java/io/github/maqs/cucumber/unittestpagemodel/DummyBaseGenericStep.java +++ b/maqs-cucumber/src/test/java/io/github/maqs/cucumber/unittestpagemodel/DummyBaseGenericStep.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.cucumber.unittestpagemodel; diff --git a/maqs-cucumber/src/test/java/io/github/maqs/cucumber/unittestpagemodel/DummyBaseSeleniumStep.java b/maqs-cucumber/src/test/java/io/github/maqs/cucumber/unittestpagemodel/DummyBaseSeleniumStep.java index 86a851a18..7068621e8 100644 --- a/maqs-cucumber/src/test/java/io/github/maqs/cucumber/unittestpagemodel/DummyBaseSeleniumStep.java +++ b/maqs-cucumber/src/test/java/io/github/maqs/cucumber/unittestpagemodel/DummyBaseSeleniumStep.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.cucumber.unittestpagemodel; diff --git a/maqs-cucumber/src/test/java/io/github/maqs/cucumber/unittestpagemodel/DummyTestResult.java b/maqs-cucumber/src/test/java/io/github/maqs/cucumber/unittestpagemodel/DummyTestResult.java index ccb11b3b8..39895d830 100644 --- a/maqs-cucumber/src/test/java/io/github/maqs/cucumber/unittestpagemodel/DummyTestResult.java +++ b/maqs-cucumber/src/test/java/io/github/maqs/cucumber/unittestpagemodel/DummyTestResult.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.cucumber.unittestpagemodel; diff --git a/maqs-cucumber/src/test/java/stepdefs/generic/BaseSteps.java b/maqs-cucumber/src/test/java/stepdefs/generic/BaseSteps.java index 532f8e53d..c1cd7d92f 100644 --- a/maqs-cucumber/src/test/java/stepdefs/generic/BaseSteps.java +++ b/maqs-cucumber/src/test/java/stepdefs/generic/BaseSteps.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package stepdefs.generic; diff --git a/maqs-cucumber/src/test/java/stepdefs/selenium/SeleniumSteps.java b/maqs-cucumber/src/test/java/stepdefs/selenium/SeleniumSteps.java index 7f5ac4eb9..d79845b0c 100644 --- a/maqs-cucumber/src/test/java/stepdefs/selenium/SeleniumSteps.java +++ b/maqs-cucumber/src/test/java/stepdefs/selenium/SeleniumSteps.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package stepdefs.selenium; diff --git a/maqs-cucumber/src/test/java/stepdefs/selenium/SeleniumSteps2.java b/maqs-cucumber/src/test/java/stepdefs/selenium/SeleniumSteps2.java index 2357fcdd8..1f24e6d16 100644 --- a/maqs-cucumber/src/test/java/stepdefs/selenium/SeleniumSteps2.java +++ b/maqs-cucumber/src/test/java/stepdefs/selenium/SeleniumSteps2.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package stepdefs.selenium; diff --git a/maqs-cucumber/src/test/java/stepdefs/selenium/SeleniumSteps3.java b/maqs-cucumber/src/test/java/stepdefs/selenium/SeleniumSteps3.java index 11fa0c2c8..b3b130139 100644 --- a/maqs-cucumber/src/test/java/stepdefs/selenium/SeleniumSteps3.java +++ b/maqs-cucumber/src/test/java/stepdefs/selenium/SeleniumSteps3.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package stepdefs.selenium; diff --git a/maqs-database/config.xml b/maqs-database/config.xml index 1a7018c5e..c77985e55 100644 --- a/maqs-database/config.xml +++ b/maqs-database/config.xml @@ -56,8 +56,8 @@ sa globalMAQS2 jdbc:sqlserver://localhost - ./src/test/java/com/cognizantsoftvision/maqs/database/entities/ - com.cognizantsoftvision.maqs.database.entities + ./src/test/java/com/maqs/database/entities/ + io.github.maqs.database.entities class diff --git a/maqs-database/src/main/java/io/github/maqs/database/BaseDatabaseTest.java b/maqs-database/src/main/java/io/github/maqs/database/BaseDatabaseTest.java index 40af2c1cf..3b0818068 100644 --- a/maqs-database/src/main/java/io/github/maqs/database/BaseDatabaseTest.java +++ b/maqs-database/src/main/java/io/github/maqs/database/BaseDatabaseTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.database; diff --git a/maqs-database/src/main/java/io/github/maqs/database/ConnectionFactory.java b/maqs-database/src/main/java/io/github/maqs/database/ConnectionFactory.java index dce0d3c1b..e33c4dd0a 100644 --- a/maqs-database/src/main/java/io/github/maqs/database/ConnectionFactory.java +++ b/maqs-database/src/main/java/io/github/maqs/database/ConnectionFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.database; diff --git a/maqs-database/src/main/java/io/github/maqs/database/DatabaseConfig.java b/maqs-database/src/main/java/io/github/maqs/database/DatabaseConfig.java index b205f23f5..0bd92aa33 100644 --- a/maqs-database/src/main/java/io/github/maqs/database/DatabaseConfig.java +++ b/maqs-database/src/main/java/io/github/maqs/database/DatabaseConfig.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.database; diff --git a/maqs-database/src/main/java/io/github/maqs/database/DatabaseDriver.java b/maqs-database/src/main/java/io/github/maqs/database/DatabaseDriver.java index 8cf798189..cc9008f75 100644 --- a/maqs-database/src/main/java/io/github/maqs/database/DatabaseDriver.java +++ b/maqs-database/src/main/java/io/github/maqs/database/DatabaseDriver.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.database; diff --git a/maqs-database/src/main/java/io/github/maqs/database/DatabaseDriverManager.java b/maqs-database/src/main/java/io/github/maqs/database/DatabaseDriverManager.java index f75a6af9f..7480a9e8d 100644 --- a/maqs-database/src/main/java/io/github/maqs/database/DatabaseDriverManager.java +++ b/maqs-database/src/main/java/io/github/maqs/database/DatabaseDriverManager.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.database; diff --git a/maqs-database/src/main/java/io/github/maqs/database/DatabasePersistenceUnitInfo.java b/maqs-database/src/main/java/io/github/maqs/database/DatabasePersistenceUnitInfo.java index ecf0a4e75..c60452a58 100644 --- a/maqs-database/src/main/java/io/github/maqs/database/DatabasePersistenceUnitInfo.java +++ b/maqs-database/src/main/java/io/github/maqs/database/DatabasePersistenceUnitInfo.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.database; diff --git a/maqs-database/src/main/java/io/github/maqs/database/DatabaseTestObject.java b/maqs-database/src/main/java/io/github/maqs/database/DatabaseTestObject.java index 2478d4dde..ce9d07372 100644 --- a/maqs-database/src/main/java/io/github/maqs/database/DatabaseTestObject.java +++ b/maqs-database/src/main/java/io/github/maqs/database/DatabaseTestObject.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.database; diff --git a/maqs-database/src/main/java/io/github/maqs/database/constants/DataProviderType.java b/maqs-database/src/main/java/io/github/maqs/database/constants/DataProviderType.java index 83a148496..42c8eba65 100644 --- a/maqs-database/src/main/java/io/github/maqs/database/constants/DataProviderType.java +++ b/maqs-database/src/main/java/io/github/maqs/database/constants/DataProviderType.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.database.constants; diff --git a/maqs-database/src/main/java/io/github/maqs/database/providers/H2Provider.java b/maqs-database/src/main/java/io/github/maqs/database/providers/H2Provider.java index ee15eab1b..50a8ecbcb 100644 --- a/maqs-database/src/main/java/io/github/maqs/database/providers/H2Provider.java +++ b/maqs-database/src/main/java/io/github/maqs/database/providers/H2Provider.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.database.providers; diff --git a/maqs-database/src/main/java/io/github/maqs/database/providers/IDataSourceProvider.java b/maqs-database/src/main/java/io/github/maqs/database/providers/IDataSourceProvider.java index 62e9d9fda..77130d003 100644 --- a/maqs-database/src/main/java/io/github/maqs/database/providers/IDataSourceProvider.java +++ b/maqs-database/src/main/java/io/github/maqs/database/providers/IDataSourceProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.database.providers; diff --git a/maqs-database/src/main/java/io/github/maqs/database/providers/MySQLProvider.java b/maqs-database/src/main/java/io/github/maqs/database/providers/MySQLProvider.java index aa0d25831..269a4dcb7 100644 --- a/maqs-database/src/main/java/io/github/maqs/database/providers/MySQLProvider.java +++ b/maqs-database/src/main/java/io/github/maqs/database/providers/MySQLProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.database.providers; diff --git a/maqs-database/src/main/java/io/github/maqs/database/providers/SQLProvider.java b/maqs-database/src/main/java/io/github/maqs/database/providers/SQLProvider.java index 04aff02a7..93f942fc6 100644 --- a/maqs-database/src/main/java/io/github/maqs/database/providers/SQLProvider.java +++ b/maqs-database/src/main/java/io/github/maqs/database/providers/SQLProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.database.providers; diff --git a/maqs-database/src/main/java/io/github/maqs/database/providers/SQLiteProvider.java b/maqs-database/src/main/java/io/github/maqs/database/providers/SQLiteProvider.java index f813f7448..4fad7d107 100644 --- a/maqs-database/src/main/java/io/github/maqs/database/providers/SQLiteProvider.java +++ b/maqs-database/src/main/java/io/github/maqs/database/providers/SQLiteProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.database.providers; diff --git a/maqs-database/src/test/java/io/github/maqs/database/BaseDatabaseTestUnitTest.java b/maqs-database/src/test/java/io/github/maqs/database/BaseDatabaseTestUnitTest.java index 7384013ab..75783a58d 100644 --- a/maqs-database/src/test/java/io/github/maqs/database/BaseDatabaseTestUnitTest.java +++ b/maqs-database/src/test/java/io/github/maqs/database/BaseDatabaseTestUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.database; diff --git a/maqs-database/src/test/java/io/github/maqs/database/ConnectionFactoryUnitTest.java b/maqs-database/src/test/java/io/github/maqs/database/ConnectionFactoryUnitTest.java index 5cbd8ad05..dae60af55 100644 --- a/maqs-database/src/test/java/io/github/maqs/database/ConnectionFactoryUnitTest.java +++ b/maqs-database/src/test/java/io/github/maqs/database/ConnectionFactoryUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.database; diff --git a/maqs-database/src/test/java/io/github/maqs/database/DatabaseConfigUnitTest.java b/maqs-database/src/test/java/io/github/maqs/database/DatabaseConfigUnitTest.java index 871762061..a8d2490ef 100644 --- a/maqs-database/src/test/java/io/github/maqs/database/DatabaseConfigUnitTest.java +++ b/maqs-database/src/test/java/io/github/maqs/database/DatabaseConfigUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.database; @@ -31,13 +31,13 @@ public void testGetConnectionString() { @Test(groups = TestCategories.DATABASE) public void testGetEntityDirectoryString() { Assert.assertEquals(DatabaseConfig.getEntityDirectoryString(), - "./src/test/java/com/cognizantsoftvision/maqs/database/entities/"); + "./src/test/java/com/maqs/database/entities/"); } @Test(groups = TestCategories.DATABASE) public void testGetEntityPackageString() { Assert.assertEquals(DatabaseConfig.getEntityPackageString(), - "com.cognizantsoftvision.maqs.database.entities"); + "io.github.maqs.database.entities"); } @Test(groups = TestCategories.DATABASE) diff --git a/maqs-database/src/test/java/io/github/maqs/database/DatabaseDriverUnitTest.java b/maqs-database/src/test/java/io/github/maqs/database/DatabaseDriverUnitTest.java index 1da453c2c..41e315ee8 100644 --- a/maqs-database/src/test/java/io/github/maqs/database/DatabaseDriverUnitTest.java +++ b/maqs-database/src/test/java/io/github/maqs/database/DatabaseDriverUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.database; diff --git a/maqs-database/src/test/java/io/github/maqs/database/DatabaseTestObjectUnitTest.java b/maqs-database/src/test/java/io/github/maqs/database/DatabaseTestObjectUnitTest.java index c80aa102f..a89d7716c 100644 --- a/maqs-database/src/test/java/io/github/maqs/database/DatabaseTestObjectUnitTest.java +++ b/maqs-database/src/test/java/io/github/maqs/database/DatabaseTestObjectUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.database; diff --git a/maqs-database/src/test/java/io/github/maqs/database/constants/DataProviderTypeUnitTest.java b/maqs-database/src/test/java/io/github/maqs/database/constants/DataProviderTypeUnitTest.java index 03cb3ca4b..20548d35a 100644 --- a/maqs-database/src/test/java/io/github/maqs/database/constants/DataProviderTypeUnitTest.java +++ b/maqs-database/src/test/java/io/github/maqs/database/constants/DataProviderTypeUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.database.constants; diff --git a/maqs-database/src/test/java/io/github/maqs/database/entities/OrdersEntity.java b/maqs-database/src/test/java/io/github/maqs/database/entities/OrdersEntity.java index 81bc458b2..771f85da1 100644 --- a/maqs-database/src/test/java/io/github/maqs/database/entities/OrdersEntity.java +++ b/maqs-database/src/test/java/io/github/maqs/database/entities/OrdersEntity.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.database.entities; diff --git a/maqs-database/src/test/java/io/github/maqs/database/entities/ProductsEntity.java b/maqs-database/src/test/java/io/github/maqs/database/entities/ProductsEntity.java index 2f38f05c9..69da462e4 100644 --- a/maqs-database/src/test/java/io/github/maqs/database/entities/ProductsEntity.java +++ b/maqs-database/src/test/java/io/github/maqs/database/entities/ProductsEntity.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.database.entities; diff --git a/maqs-database/src/test/java/io/github/maqs/database/entities/SqliteMasterEntity.java b/maqs-database/src/test/java/io/github/maqs/database/entities/SqliteMasterEntity.java index 90c29fdb4..4414aecd5 100644 --- a/maqs-database/src/test/java/io/github/maqs/database/entities/SqliteMasterEntity.java +++ b/maqs-database/src/test/java/io/github/maqs/database/entities/SqliteMasterEntity.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.database.entities; diff --git a/maqs-database/src/test/java/io/github/maqs/database/entities/StatesEntity.java b/maqs-database/src/test/java/io/github/maqs/database/entities/StatesEntity.java index 4365e85de..4aa20dd77 100644 --- a/maqs-database/src/test/java/io/github/maqs/database/entities/StatesEntity.java +++ b/maqs-database/src/test/java/io/github/maqs/database/entities/StatesEntity.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.database.entities; diff --git a/maqs-database/src/test/java/io/github/maqs/database/entities/UsersEntity.java b/maqs-database/src/test/java/io/github/maqs/database/entities/UsersEntity.java index a4c183690..bf7a7d070 100644 --- a/maqs-database/src/test/java/io/github/maqs/database/entities/UsersEntity.java +++ b/maqs-database/src/test/java/io/github/maqs/database/entities/UsersEntity.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.database.entities; diff --git a/maqs-database/src/test/java/io/github/maqs/database/providers/IDataSourceProviderUnitTest.java b/maqs-database/src/test/java/io/github/maqs/database/providers/IDataSourceProviderUnitTest.java index 662c7d1c1..6bd655e1a 100644 --- a/maqs-database/src/test/java/io/github/maqs/database/providers/IDataSourceProviderUnitTest.java +++ b/maqs-database/src/test/java/io/github/maqs/database/providers/IDataSourceProviderUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.database.providers; diff --git a/maqs-database/src/test/java/io/github/maqs/database/providers/SQLProviderTest.java b/maqs-database/src/test/java/io/github/maqs/database/providers/SQLProviderTest.java index 79e6682d8..964087d08 100644 --- a/maqs-database/src/test/java/io/github/maqs/database/providers/SQLProviderTest.java +++ b/maqs-database/src/test/java/io/github/maqs/database/providers/SQLProviderTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.database.providers; diff --git a/maqs-database/src/test/java/io/github/maqs/database/providers/SQLiteProviderUnitTest.java b/maqs-database/src/test/java/io/github/maqs/database/providers/SQLiteProviderUnitTest.java index a6183aa52..60042e83c 100644 --- a/maqs-database/src/test/java/io/github/maqs/database/providers/SQLiteProviderUnitTest.java +++ b/maqs-database/src/test/java/io/github/maqs/database/providers/SQLiteProviderUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.database.providers; diff --git a/maqs-playwright/config.xml b/maqs-playwright/config.xml index df2fa12d7..a94b8a194 100644 --- a/maqs-playwright/config.xml +++ b/maqs-playwright/config.xml @@ -33,7 +33,7 @@ - https://cognizantopensource.github.io/maqs-dotnet-templates/Static/Automation/ + https://MAQS-Framework.github.io/maqs-dotnet-templates/Static/Automation/ Chrome http://ondemand.saucelabs.com:80/wd/hub - https://cognizantopensource.github.io/maqs-dotnet-templates/Static/Automation/ + https://MAQS-Framework.github.io/maqs-dotnet-templates/Static/Automation/ 1000 20000 Chrome diff --git a/maqs-selenium/src/main/java/io/github/maqs/selenium/AbstractLazyElement.java b/maqs-selenium/src/main/java/io/github/maqs/selenium/AbstractLazyElement.java index bc20b5013..16c21e486 100644 --- a/maqs-selenium/src/main/java/io/github/maqs/selenium/AbstractLazyElement.java +++ b/maqs-selenium/src/main/java/io/github/maqs/selenium/AbstractLazyElement.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.selenium; diff --git a/maqs-selenium/src/main/java/io/github/maqs/selenium/ActionBuilder.java b/maqs-selenium/src/main/java/io/github/maqs/selenium/ActionBuilder.java index 94d654405..338006c2e 100644 --- a/maqs-selenium/src/main/java/io/github/maqs/selenium/ActionBuilder.java +++ b/maqs-selenium/src/main/java/io/github/maqs/selenium/ActionBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.selenium; diff --git a/maqs-selenium/src/main/java/io/github/maqs/selenium/BaseSeleniumPageModel.java b/maqs-selenium/src/main/java/io/github/maqs/selenium/BaseSeleniumPageModel.java index 7ab507cba..27d919121 100644 --- a/maqs-selenium/src/main/java/io/github/maqs/selenium/BaseSeleniumPageModel.java +++ b/maqs-selenium/src/main/java/io/github/maqs/selenium/BaseSeleniumPageModel.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.selenium; diff --git a/maqs-selenium/src/main/java/io/github/maqs/selenium/BaseSeleniumTest.java b/maqs-selenium/src/main/java/io/github/maqs/selenium/BaseSeleniumTest.java index 4c33773ea..803aed79c 100644 --- a/maqs-selenium/src/main/java/io/github/maqs/selenium/BaseSeleniumTest.java +++ b/maqs-selenium/src/main/java/io/github/maqs/selenium/BaseSeleniumTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.selenium; diff --git a/maqs-selenium/src/main/java/io/github/maqs/selenium/ElementHandler.java b/maqs-selenium/src/main/java/io/github/maqs/selenium/ElementHandler.java index 975c883f1..541447871 100644 --- a/maqs-selenium/src/main/java/io/github/maqs/selenium/ElementHandler.java +++ b/maqs-selenium/src/main/java/io/github/maqs/selenium/ElementHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.selenium; diff --git a/maqs-selenium/src/main/java/io/github/maqs/selenium/EventHandler.java b/maqs-selenium/src/main/java/io/github/maqs/selenium/EventHandler.java index e95121032..88317c8a5 100644 --- a/maqs-selenium/src/main/java/io/github/maqs/selenium/EventHandler.java +++ b/maqs-selenium/src/main/java/io/github/maqs/selenium/EventHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.selenium; diff --git a/maqs-selenium/src/main/java/io/github/maqs/selenium/ISeleniumTestObject.java b/maqs-selenium/src/main/java/io/github/maqs/selenium/ISeleniumTestObject.java index 801b9bc29..54b8838a6 100644 --- a/maqs-selenium/src/main/java/io/github/maqs/selenium/ISeleniumTestObject.java +++ b/maqs-selenium/src/main/java/io/github/maqs/selenium/ISeleniumTestObject.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.selenium; diff --git a/maqs-selenium/src/main/java/io/github/maqs/selenium/LazyWebElement.java b/maqs-selenium/src/main/java/io/github/maqs/selenium/LazyWebElement.java index 11db6d158..7fdf25eb4 100644 --- a/maqs-selenium/src/main/java/io/github/maqs/selenium/LazyWebElement.java +++ b/maqs-selenium/src/main/java/io/github/maqs/selenium/LazyWebElement.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.selenium; diff --git a/maqs-selenium/src/main/java/io/github/maqs/selenium/SeleniumConfig.java b/maqs-selenium/src/main/java/io/github/maqs/selenium/SeleniumConfig.java index 612c77562..0fce2377d 100644 --- a/maqs-selenium/src/main/java/io/github/maqs/selenium/SeleniumConfig.java +++ b/maqs-selenium/src/main/java/io/github/maqs/selenium/SeleniumConfig.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.selenium; diff --git a/maqs-selenium/src/main/java/io/github/maqs/selenium/SeleniumDriverManager.java b/maqs-selenium/src/main/java/io/github/maqs/selenium/SeleniumDriverManager.java index afdd1d7ed..54c7031f0 100644 --- a/maqs-selenium/src/main/java/io/github/maqs/selenium/SeleniumDriverManager.java +++ b/maqs-selenium/src/main/java/io/github/maqs/selenium/SeleniumDriverManager.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.selenium; diff --git a/maqs-selenium/src/main/java/io/github/maqs/selenium/SeleniumTestObject.java b/maqs-selenium/src/main/java/io/github/maqs/selenium/SeleniumTestObject.java index 72312bf35..23c70fbd3 100644 --- a/maqs-selenium/src/main/java/io/github/maqs/selenium/SeleniumTestObject.java +++ b/maqs-selenium/src/main/java/io/github/maqs/selenium/SeleniumTestObject.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.selenium; diff --git a/maqs-selenium/src/main/java/io/github/maqs/selenium/SeleniumUtilities.java b/maqs-selenium/src/main/java/io/github/maqs/selenium/SeleniumUtilities.java index c77fb447a..5c6306d09 100644 --- a/maqs-selenium/src/main/java/io/github/maqs/selenium/SeleniumUtilities.java +++ b/maqs-selenium/src/main/java/io/github/maqs/selenium/SeleniumUtilities.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.selenium; diff --git a/maqs-selenium/src/main/java/io/github/maqs/selenium/UIFind.java b/maqs-selenium/src/main/java/io/github/maqs/selenium/UIFind.java index f5f9ab122..7c03ab9b1 100644 --- a/maqs-selenium/src/main/java/io/github/maqs/selenium/UIFind.java +++ b/maqs-selenium/src/main/java/io/github/maqs/selenium/UIFind.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.selenium; diff --git a/maqs-selenium/src/main/java/io/github/maqs/selenium/UIWait.java b/maqs-selenium/src/main/java/io/github/maqs/selenium/UIWait.java index 33ba7c1b8..fd9ebbb97 100644 --- a/maqs-selenium/src/main/java/io/github/maqs/selenium/UIWait.java +++ b/maqs-selenium/src/main/java/io/github/maqs/selenium/UIWait.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.selenium; diff --git a/maqs-selenium/src/main/java/io/github/maqs/selenium/WebDriverFactory.java b/maqs-selenium/src/main/java/io/github/maqs/selenium/WebDriverFactory.java index 3b70a9596..499dcddbd 100644 --- a/maqs-selenium/src/main/java/io/github/maqs/selenium/WebDriverFactory.java +++ b/maqs-selenium/src/main/java/io/github/maqs/selenium/WebDriverFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.selenium; diff --git a/maqs-selenium/src/main/java/io/github/maqs/selenium/constants/BrowserType.java b/maqs-selenium/src/main/java/io/github/maqs/selenium/constants/BrowserType.java index 93d2c9382..8a6f067a2 100644 --- a/maqs-selenium/src/main/java/io/github/maqs/selenium/constants/BrowserType.java +++ b/maqs-selenium/src/main/java/io/github/maqs/selenium/constants/BrowserType.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.selenium.constants; diff --git a/maqs-selenium/src/main/java/io/github/maqs/selenium/constants/OperatingSystem.java b/maqs-selenium/src/main/java/io/github/maqs/selenium/constants/OperatingSystem.java index 0cfcb312e..b6034e7a4 100644 --- a/maqs-selenium/src/main/java/io/github/maqs/selenium/constants/OperatingSystem.java +++ b/maqs-selenium/src/main/java/io/github/maqs/selenium/constants/OperatingSystem.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.selenium.constants; diff --git a/maqs-selenium/src/main/java/io/github/maqs/selenium/constants/RemoteBrowserType.java b/maqs-selenium/src/main/java/io/github/maqs/selenium/constants/RemoteBrowserType.java index 0792d7b2d..83c015ed3 100644 --- a/maqs-selenium/src/main/java/io/github/maqs/selenium/constants/RemoteBrowserType.java +++ b/maqs-selenium/src/main/java/io/github/maqs/selenium/constants/RemoteBrowserType.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.selenium.constants; diff --git a/maqs-selenium/src/main/java/io/github/maqs/selenium/exceptions/ElementHandlerException.java b/maqs-selenium/src/main/java/io/github/maqs/selenium/exceptions/ElementHandlerException.java index 4964075bc..52f815e48 100644 --- a/maqs-selenium/src/main/java/io/github/maqs/selenium/exceptions/ElementHandlerException.java +++ b/maqs-selenium/src/main/java/io/github/maqs/selenium/exceptions/ElementHandlerException.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.selenium.exceptions; diff --git a/maqs-selenium/src/main/java/io/github/maqs/selenium/exceptions/WebDriverFactoryException.java b/maqs-selenium/src/main/java/io/github/maqs/selenium/exceptions/WebDriverFactoryException.java index af6ad9ec1..ebb1c0cc8 100644 --- a/maqs-selenium/src/main/java/io/github/maqs/selenium/exceptions/WebDriverFactoryException.java +++ b/maqs-selenium/src/main/java/io/github/maqs/selenium/exceptions/WebDriverFactoryException.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.selenium.exceptions; diff --git a/maqs-selenium/src/main/java/io/github/maqs/selenium/factories/FluentWaitFactory.java b/maqs-selenium/src/main/java/io/github/maqs/selenium/factories/FluentWaitFactory.java index a29db0611..3881abab8 100644 --- a/maqs-selenium/src/main/java/io/github/maqs/selenium/factories/FluentWaitFactory.java +++ b/maqs-selenium/src/main/java/io/github/maqs/selenium/factories/FluentWaitFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.selenium.factories; diff --git a/maqs-selenium/src/main/java/io/github/maqs/selenium/factories/UIFindFactory.java b/maqs-selenium/src/main/java/io/github/maqs/selenium/factories/UIFindFactory.java index bde4787df..d5049a468 100644 --- a/maqs-selenium/src/main/java/io/github/maqs/selenium/factories/UIFindFactory.java +++ b/maqs-selenium/src/main/java/io/github/maqs/selenium/factories/UIFindFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.selenium.factories; diff --git a/maqs-selenium/src/main/java/io/github/maqs/selenium/factories/UIWaitFactory.java b/maqs-selenium/src/main/java/io/github/maqs/selenium/factories/UIWaitFactory.java index 23e6a8c11..6ba6c4641 100644 --- a/maqs-selenium/src/main/java/io/github/maqs/selenium/factories/UIWaitFactory.java +++ b/maqs-selenium/src/main/java/io/github/maqs/selenium/factories/UIWaitFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.selenium.factories; diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/ActionBuilderUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/ActionBuilderUnitTest.java index 973f39686..a237d70d6 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/ActionBuilderUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/ActionBuilderUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.selenium; diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/BaseSeleniumPageModelUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/BaseSeleniumPageModelUnitTest.java index ce950e30b..72daf8541 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/BaseSeleniumPageModelUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/BaseSeleniumPageModelUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.selenium; diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/BaseSeleniumTestUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/BaseSeleniumTestUnitTest.java index 42291e5c5..193099e1b 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/BaseSeleniumTestUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/BaseSeleniumTestUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.selenium; diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/ElementHandlerUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/ElementHandlerUnitTest.java index eb93be3bc..9ae2befac 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/ElementHandlerUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/ElementHandlerUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.selenium; diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/EventHandlerUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/EventHandlerUnitTest.java index 01c12763c..550a2f330 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/EventHandlerUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/EventHandlerUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.selenium; diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/FluentWaitFactoryUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/FluentWaitFactoryUnitTest.java index b3b8e1ccd..0dd2167e3 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/FluentWaitFactoryUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/FluentWaitFactoryUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.selenium; diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/LazyWebElementUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/LazyWebElementUnitTest.java index 4b08c6dfe..0175978d9 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/LazyWebElementUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/LazyWebElementUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.selenium; diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumConfigUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumConfigUnitTest.java index 7e62fbd97..f8b2cdadc 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumConfigUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumConfigUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.selenium; @@ -56,7 +56,7 @@ public void getBrowserName() { public void getWebsiteBase() { String website = SeleniumConfig.getWebSiteBase(); Assert.assertTrue(website.equalsIgnoreCase( - "https://cognizantopensource.github.io/maqs-dotnet-templates/Static/Automation/")); + "https://MAQS-Framework.github.io/maqs-dotnet-templates/Static/Automation/")); } /** diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumDriverManagerUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumDriverManagerUnitTest.java index 6a8c817d7..bdd031168 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumDriverManagerUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumDriverManagerUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.selenium; diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumTestObjectUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumTestObjectUnitTest.java index 5af75ba96..20d5f3bf7 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumTestObjectUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumTestObjectUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.selenium; diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumUtilitiesUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumUtilitiesUnitTest.java index 5dad45c29..9924d0db1 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumUtilitiesUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumUtilitiesUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.selenium; diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/UIFindFactoryUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/UIFindFactoryUnitTest.java index 08983cf4b..7b4b7974d 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/UIFindFactoryUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/UIFindFactoryUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.selenium; diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/UIFindUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/UIFindUnitTest.java index 47865d99d..33287efa1 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/UIFindUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/UIFindUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.selenium; diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/UIWaitFactoryUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/UIWaitFactoryUnitTest.java index 1da50b47a..acd8326c8 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/UIWaitFactoryUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/UIWaitFactoryUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.selenium; diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/UIWaitUntilUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/UIWaitUntilUnitTest.java index 8aa098a55..c9eddffcf 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/UIWaitUntilUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/UIWaitUntilUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.selenium; diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/WebDriverFactoryUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/WebDriverFactoryUnitTest.java index 0bfb264fe..2c3c2e72a 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/WebDriverFactoryUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/WebDriverFactoryUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.selenium; diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/constants/OperatingSystemUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/constants/OperatingSystemUnitTest.java index 692872e5c..871699d0c 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/constants/OperatingSystemUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/constants/OperatingSystemUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.selenium.constants; @@ -78,7 +78,7 @@ public void testGetOperatingSystemMacOS() { * Test get operating system - Linux. */ @Test(singleThreaded = true, - dependsOnMethods = "com.cognizantsoftvision.maqs.selenium.constants.OperatingSystemUnitTest.testGetOperatingSystemMacOS") + dependsOnMethods = "io.github.maqs.selenium.constants.OperatingSystemUnitTest.testGetOperatingSystemMacOS") public void testGetOperatingSystemLinux() { System.setProperty("os.name", "Linux"); OperatingSystem operatingSystem = OperatingSystem.getOperatingSystem(); @@ -89,7 +89,7 @@ public void testGetOperatingSystemLinux() { * Test get operating system - Windows. */ @Test(singleThreaded = true, - dependsOnMethods = "com.cognizantsoftvision.maqs.selenium.constants.OperatingSystemUnitTest.testGetOperatingSystemLinux") + dependsOnMethods = "io.github.maqs.selenium.constants.OperatingSystemUnitTest.testGetOperatingSystemLinux") public void testGetOperatingSystemWindows() { System.setProperty("os.name", "Windows"); OperatingSystem operatingSystem = OperatingSystem.getOperatingSystem(); diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/pageModel/AsyncPageModel.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/pageModel/AsyncPageModel.java index 578958ef4..3b588c0ba 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/pageModel/AsyncPageModel.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/pageModel/AsyncPageModel.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.selenium.pageModel; diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/pageModel/AutomationPageModel.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/pageModel/AutomationPageModel.java index 786429866..99e187eb2 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/pageModel/AutomationPageModel.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/pageModel/AutomationPageModel.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.selenium.pageModel; diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/pageModel/HeaderPageModel.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/pageModel/HeaderPageModel.java index 1ebd7c2a6..ae4d41f83 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/pageModel/HeaderPageModel.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/pageModel/HeaderPageModel.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.selenium.pageModel; diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/pageModel/IFramePageModel.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/pageModel/IFramePageModel.java index 883a81dbf..1837627ca 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/pageModel/IFramePageModel.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/pageModel/IFramePageModel.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.selenium.pageModel; diff --git a/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/Config.java b/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/Config.java index 6cffff5db..46f69b2f3 100644 --- a/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/Config.java +++ b/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/Config.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.utilities.helper; diff --git a/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/ConfigSection.java b/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/ConfigSection.java index 669b065d4..682893be6 100644 --- a/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/ConfigSection.java +++ b/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/ConfigSection.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.utilities.helper; diff --git a/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/GenericWait.java b/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/GenericWait.java index d0836cadc..f72998f0c 100644 --- a/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/GenericWait.java +++ b/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/GenericWait.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.utilities.helper; diff --git a/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/ListProcessor.java b/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/ListProcessor.java index ae39a610c..029531c38 100644 --- a/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/ListProcessor.java +++ b/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/ListProcessor.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.utilities.helper; diff --git a/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/PropertyManager.java b/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/PropertyManager.java index 92e625524..87394aea3 100644 --- a/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/PropertyManager.java +++ b/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/PropertyManager.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.utilities.helper; diff --git a/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/StringProcessor.java b/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/StringProcessor.java index d353f29e7..40aecc514 100644 --- a/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/StringProcessor.java +++ b/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/StringProcessor.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.utilities.helper; diff --git a/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/TestCategories.java b/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/TestCategories.java index 568a8b4c0..1da7a7fdc 100644 --- a/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/TestCategories.java +++ b/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/TestCategories.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.utilities.helper; diff --git a/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/exceptions/ExecutionFailedException.java b/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/exceptions/ExecutionFailedException.java index 568dfe1e9..fa87345bf 100644 --- a/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/exceptions/ExecutionFailedException.java +++ b/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/exceptions/ExecutionFailedException.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.utilities.helper.exceptions; diff --git a/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/exceptions/FrameworkConfigurationException.java b/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/exceptions/FrameworkConfigurationException.java index 3cba9441a..8a9e55d23 100644 --- a/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/exceptions/FrameworkConfigurationException.java +++ b/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/exceptions/FrameworkConfigurationException.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.utilities.helper.exceptions; diff --git a/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/exceptions/FunctionException.java b/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/exceptions/FunctionException.java index 4a379f1aa..588848dc5 100644 --- a/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/exceptions/FunctionException.java +++ b/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/exceptions/FunctionException.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.utilities.helper.exceptions; diff --git a/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/exceptions/MaqsLoggingConfigException.java b/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/exceptions/MaqsLoggingConfigException.java index 6ad2b6f49..631b71373 100644 --- a/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/exceptions/MaqsLoggingConfigException.java +++ b/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/exceptions/MaqsLoggingConfigException.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.utilities.helper.exceptions; diff --git a/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/exceptions/TimeoutException.java b/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/exceptions/TimeoutException.java index a86388674..f12684444 100644 --- a/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/exceptions/TimeoutException.java +++ b/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/exceptions/TimeoutException.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.utilities.helper.exceptions; diff --git a/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/functionalinterfaces/Action.java b/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/functionalinterfaces/Action.java index dac51c29b..77984652c 100644 --- a/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/functionalinterfaces/Action.java +++ b/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/functionalinterfaces/Action.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.utilities.helper.functionalinterfaces; diff --git a/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/ConsoleLogger.java b/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/ConsoleLogger.java index 026ed30e0..9266ab713 100644 --- a/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/ConsoleLogger.java +++ b/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/ConsoleLogger.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.utilities.logging; diff --git a/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/FileLogger.java b/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/FileLogger.java index 54d60447a..7ec2caafe 100644 --- a/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/FileLogger.java +++ b/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/FileLogger.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.utilities.logging; diff --git a/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/HtmlFileLogger.java b/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/HtmlFileLogger.java index 2dd259724..a2b898989 100644 --- a/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/HtmlFileLogger.java +++ b/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/HtmlFileLogger.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.utilities.logging; @@ -29,7 +29,7 @@ public class HtmlFileLogger extends FileLogger implements IHtmlFileLogger { private static final String DEFAULT_LOG_NAME = "HtmlFileLog.html"; private static final File FILE_DIRECTORY = new File( - "../maqs-utilities/src/main/java/com/cognizantsoftvision/maqs/utilities/logging/resources"); + "../maqs-utilities/src/main/java/com/maqs/utilities/logging/resources"); private static final String FILES = FILE_DIRECTORY.getPath() + File.separator; diff --git a/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/IFileLogger.java b/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/IFileLogger.java index bcbec2109..babfef946 100644 --- a/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/IFileLogger.java +++ b/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/IFileLogger.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.utilities.logging; diff --git a/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/IHtmlFileLogger.java b/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/IHtmlFileLogger.java index b9050b965..66f0cab2e 100644 --- a/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/IHtmlFileLogger.java +++ b/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/IHtmlFileLogger.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.utilities.logging; diff --git a/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/ILogger.java b/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/ILogger.java index 32692dbce..d63e79cfb 100644 --- a/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/ILogger.java +++ b/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/ILogger.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.utilities.logging; diff --git a/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/Logger.java b/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/Logger.java index c296de252..c10357070 100644 --- a/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/Logger.java +++ b/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/Logger.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.utilities.logging; diff --git a/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/LoggerFactory.java b/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/LoggerFactory.java index 9c3768c79..6a98fe1d4 100644 --- a/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/LoggerFactory.java +++ b/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/LoggerFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.utilities.logging; diff --git a/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/LoggingConfig.java b/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/LoggingConfig.java index 177a7bb26..c0789eece 100644 --- a/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/LoggingConfig.java +++ b/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/LoggingConfig.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.utilities.logging; diff --git a/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/LoggingEnabled.java b/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/LoggingEnabled.java index 3c097a348..bbe820753 100644 --- a/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/LoggingEnabled.java +++ b/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/LoggingEnabled.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.utilities.logging; diff --git a/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/MessageType.java b/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/MessageType.java index 8e731eb02..4850778b8 100644 --- a/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/MessageType.java +++ b/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/MessageType.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.utilities.logging; diff --git a/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/TestResultType.java b/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/TestResultType.java index f7e5bfa0d..1b5fe051d 100644 --- a/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/TestResultType.java +++ b/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/TestResultType.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.utilities.logging; diff --git a/maqs-utilities/src/main/java/io/github/maqs/utilities/performance/IPerfTimerCollection.java b/maqs-utilities/src/main/java/io/github/maqs/utilities/performance/IPerfTimerCollection.java index 123ac1b22..2e2b1a8c7 100644 --- a/maqs-utilities/src/main/java/io/github/maqs/utilities/performance/IPerfTimerCollection.java +++ b/maqs-utilities/src/main/java/io/github/maqs/utilities/performance/IPerfTimerCollection.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.utilities.performance; diff --git a/maqs-utilities/src/main/java/io/github/maqs/utilities/performance/PerfTimerCollection.java b/maqs-utilities/src/main/java/io/github/maqs/utilities/performance/PerfTimerCollection.java index 870274231..d677c69ec 100644 --- a/maqs-utilities/src/main/java/io/github/maqs/utilities/performance/PerfTimerCollection.java +++ b/maqs-utilities/src/main/java/io/github/maqs/utilities/performance/PerfTimerCollection.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.utilities.performance; diff --git a/maqs-utilities/src/test/java/io/github/maqs/utilities/helper/ConfigUnitTest.java b/maqs-utilities/src/test/java/io/github/maqs/utilities/helper/ConfigUnitTest.java index 68ef468bf..55577090d 100644 --- a/maqs-utilities/src/test/java/io/github/maqs/utilities/helper/ConfigUnitTest.java +++ b/maqs-utilities/src/test/java/io/github/maqs/utilities/helper/ConfigUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.utilities.helper; diff --git a/maqs-utilities/src/test/java/io/github/maqs/utilities/helper/GenericWaitNotParallelUnitTest.java b/maqs-utilities/src/test/java/io/github/maqs/utilities/helper/GenericWaitNotParallelUnitTest.java index 79aec4bc5..b2e5d8778 100644 --- a/maqs-utilities/src/test/java/io/github/maqs/utilities/helper/GenericWaitNotParallelUnitTest.java +++ b/maqs-utilities/src/test/java/io/github/maqs/utilities/helper/GenericWaitNotParallelUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.utilities.helper; diff --git a/maqs-utilities/src/test/java/io/github/maqs/utilities/helper/GenericWaitUnitTest.java b/maqs-utilities/src/test/java/io/github/maqs/utilities/helper/GenericWaitUnitTest.java index 02f08e16c..e18cbc758 100644 --- a/maqs-utilities/src/test/java/io/github/maqs/utilities/helper/GenericWaitUnitTest.java +++ b/maqs-utilities/src/test/java/io/github/maqs/utilities/helper/GenericWaitUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.utilities.helper; diff --git a/maqs-utilities/src/test/java/io/github/maqs/utilities/helper/ListProcessorUnitTest.java b/maqs-utilities/src/test/java/io/github/maqs/utilities/helper/ListProcessorUnitTest.java index 110a1f020..241ec43d6 100644 --- a/maqs-utilities/src/test/java/io/github/maqs/utilities/helper/ListProcessorUnitTest.java +++ b/maqs-utilities/src/test/java/io/github/maqs/utilities/helper/ListProcessorUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.utilities.helper; diff --git a/maqs-utilities/src/test/java/io/github/maqs/utilities/helper/PropertyManagerUnitTest.java b/maqs-utilities/src/test/java/io/github/maqs/utilities/helper/PropertyManagerUnitTest.java index 852d4e9d0..87fe253c2 100644 --- a/maqs-utilities/src/test/java/io/github/maqs/utilities/helper/PropertyManagerUnitTest.java +++ b/maqs-utilities/src/test/java/io/github/maqs/utilities/helper/PropertyManagerUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.utilities.helper; diff --git a/maqs-utilities/src/test/java/io/github/maqs/utilities/helper/StringProcessorUnitTest.java b/maqs-utilities/src/test/java/io/github/maqs/utilities/helper/StringProcessorUnitTest.java index 2e9b17e54..49a70b480 100644 --- a/maqs-utilities/src/test/java/io/github/maqs/utilities/helper/StringProcessorUnitTest.java +++ b/maqs-utilities/src/test/java/io/github/maqs/utilities/helper/StringProcessorUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.utilities.helper; diff --git a/maqs-utilities/src/test/java/io/github/maqs/utilities/logger/ConsoleCopy.java b/maqs-utilities/src/test/java/io/github/maqs/utilities/logger/ConsoleCopy.java index ee72fe150..6dba51d8c 100644 --- a/maqs-utilities/src/test/java/io/github/maqs/utilities/logger/ConsoleCopy.java +++ b/maqs-utilities/src/test/java/io/github/maqs/utilities/logger/ConsoleCopy.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.utilities.logger; diff --git a/maqs-utilities/src/test/java/io/github/maqs/utilities/logger/ConsoleLoggerUnitTest.java b/maqs-utilities/src/test/java/io/github/maqs/utilities/logger/ConsoleLoggerUnitTest.java index 447f37113..0f235ec36 100644 --- a/maqs-utilities/src/test/java/io/github/maqs/utilities/logger/ConsoleLoggerUnitTest.java +++ b/maqs-utilities/src/test/java/io/github/maqs/utilities/logger/ConsoleLoggerUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.utilities.logger; diff --git a/maqs-utilities/src/test/java/io/github/maqs/utilities/logger/FileLoggerUnitTest.java b/maqs-utilities/src/test/java/io/github/maqs/utilities/logger/FileLoggerUnitTest.java index 434e81971..e2a6a4740 100644 --- a/maqs-utilities/src/test/java/io/github/maqs/utilities/logger/FileLoggerUnitTest.java +++ b/maqs-utilities/src/test/java/io/github/maqs/utilities/logger/FileLoggerUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.utilities.logger; diff --git a/maqs-utilities/src/test/java/io/github/maqs/utilities/logger/HtmlFileLoggerUnitTest.java b/maqs-utilities/src/test/java/io/github/maqs/utilities/logger/HtmlFileLoggerUnitTest.java index 4620464e5..c4009f752 100644 --- a/maqs-utilities/src/test/java/io/github/maqs/utilities/logger/HtmlFileLoggerUnitTest.java +++ b/maqs-utilities/src/test/java/io/github/maqs/utilities/logger/HtmlFileLoggerUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.utilities.logger; diff --git a/maqs-utilities/src/test/java/io/github/maqs/utilities/logger/LoggerFactoryUnitTest.java b/maqs-utilities/src/test/java/io/github/maqs/utilities/logger/LoggerFactoryUnitTest.java index 0b4c7dae5..24f43e30a 100644 --- a/maqs-utilities/src/test/java/io/github/maqs/utilities/logger/LoggerFactoryUnitTest.java +++ b/maqs-utilities/src/test/java/io/github/maqs/utilities/logger/LoggerFactoryUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.utilities.logger; diff --git a/maqs-utilities/src/test/java/io/github/maqs/utilities/logger/LoggingConfigUnitTest.java b/maqs-utilities/src/test/java/io/github/maqs/utilities/logger/LoggingConfigUnitTest.java index 7767535b6..ebf3ecf78 100644 --- a/maqs-utilities/src/test/java/io/github/maqs/utilities/logger/LoggingConfigUnitTest.java +++ b/maqs-utilities/src/test/java/io/github/maqs/utilities/logger/LoggingConfigUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.utilities.logger; @@ -8,7 +8,7 @@ import io.github.maqs.utilities.helper.StringProcessor; import io.github.maqs.utilities.helper.TestCategories; import io.github.maqs.utilities.helper.exceptions.MaqsLoggingConfigException; -import com.cognizantsoftvision.maqs.utilities.logging.*; +import io.github.maqs.utilities.logging.*; import java.io.File; import java.util.HashMap; diff --git a/maqs-utilities/src/test/java/io/github/maqs/utilities/performance/PerfTimerCollectionUnitTest.java b/maqs-utilities/src/test/java/io/github/maqs/utilities/performance/PerfTimerCollectionUnitTest.java index 2fab6d23d..620c4d35a 100644 --- a/maqs-utilities/src/test/java/io/github/maqs/utilities/performance/PerfTimerCollectionUnitTest.java +++ b/maqs-utilities/src/test/java/io/github/maqs/utilities/performance/PerfTimerCollectionUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.utilities.performance; diff --git a/maqs-webservices/src/main/java/io/github/maqs/webservices/BaseWebServiceTest.java b/maqs-webservices/src/main/java/io/github/maqs/webservices/BaseWebServiceTest.java index ed0618896..34d2da653 100644 --- a/maqs-webservices/src/main/java/io/github/maqs/webservices/BaseWebServiceTest.java +++ b/maqs-webservices/src/main/java/io/github/maqs/webservices/BaseWebServiceTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.webservices; diff --git a/maqs-webservices/src/main/java/io/github/maqs/webservices/HttpClientFactory.java b/maqs-webservices/src/main/java/io/github/maqs/webservices/HttpClientFactory.java index 94eaed971..fb7c2cd74 100644 --- a/maqs-webservices/src/main/java/io/github/maqs/webservices/HttpClientFactory.java +++ b/maqs-webservices/src/main/java/io/github/maqs/webservices/HttpClientFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.webservices; diff --git a/maqs-webservices/src/main/java/io/github/maqs/webservices/IWebServiceTestObject.java b/maqs-webservices/src/main/java/io/github/maqs/webservices/IWebServiceTestObject.java index 3712e1cc1..9b939905c 100644 --- a/maqs-webservices/src/main/java/io/github/maqs/webservices/IWebServiceTestObject.java +++ b/maqs-webservices/src/main/java/io/github/maqs/webservices/IWebServiceTestObject.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.webservices; diff --git a/maqs-webservices/src/main/java/io/github/maqs/webservices/MediaType.java b/maqs-webservices/src/main/java/io/github/maqs/webservices/MediaType.java index 25ea2b94a..6da50eeed 100644 --- a/maqs-webservices/src/main/java/io/github/maqs/webservices/MediaType.java +++ b/maqs-webservices/src/main/java/io/github/maqs/webservices/MediaType.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.webservices; diff --git a/maqs-webservices/src/main/java/io/github/maqs/webservices/WebServiceConfig.java b/maqs-webservices/src/main/java/io/github/maqs/webservices/WebServiceConfig.java index 9bcee2033..21a13f3ba 100644 --- a/maqs-webservices/src/main/java/io/github/maqs/webservices/WebServiceConfig.java +++ b/maqs-webservices/src/main/java/io/github/maqs/webservices/WebServiceConfig.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.webservices; diff --git a/maqs-webservices/src/main/java/io/github/maqs/webservices/WebServiceDriver.java b/maqs-webservices/src/main/java/io/github/maqs/webservices/WebServiceDriver.java index e163683b0..79b26fcc2 100644 --- a/maqs-webservices/src/main/java/io/github/maqs/webservices/WebServiceDriver.java +++ b/maqs-webservices/src/main/java/io/github/maqs/webservices/WebServiceDriver.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.webservices; diff --git a/maqs-webservices/src/main/java/io/github/maqs/webservices/WebServiceDriverManager.java b/maqs-webservices/src/main/java/io/github/maqs/webservices/WebServiceDriverManager.java index 51d01bc68..5412dabb2 100644 --- a/maqs-webservices/src/main/java/io/github/maqs/webservices/WebServiceDriverManager.java +++ b/maqs-webservices/src/main/java/io/github/maqs/webservices/WebServiceDriverManager.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.webservices; diff --git a/maqs-webservices/src/main/java/io/github/maqs/webservices/WebServiceTestObject.java b/maqs-webservices/src/main/java/io/github/maqs/webservices/WebServiceTestObject.java index bc9de592e..d19243d4a 100644 --- a/maqs-webservices/src/main/java/io/github/maqs/webservices/WebServiceTestObject.java +++ b/maqs-webservices/src/main/java/io/github/maqs/webservices/WebServiceTestObject.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.webservices; diff --git a/maqs-webservices/src/main/java/io/github/maqs/webservices/WebServiceUtilities.java b/maqs-webservices/src/main/java/io/github/maqs/webservices/WebServiceUtilities.java index b716d6b69..405674784 100644 --- a/maqs-webservices/src/main/java/io/github/maqs/webservices/WebServiceUtilities.java +++ b/maqs-webservices/src/main/java/io/github/maqs/webservices/WebServiceUtilities.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.webservices; diff --git a/maqs-webservices/src/test/java/io/github/maqs/webservices/BaseWebServiceTestUnitTest.java b/maqs-webservices/src/test/java/io/github/maqs/webservices/BaseWebServiceTestUnitTest.java index 86d734158..2358ea4ca 100644 --- a/maqs-webservices/src/test/java/io/github/maqs/webservices/BaseWebServiceTestUnitTest.java +++ b/maqs-webservices/src/test/java/io/github/maqs/webservices/BaseWebServiceTestUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.webservices; diff --git a/maqs-webservices/src/test/java/io/github/maqs/webservices/MediaTypeUnitTest.java b/maqs-webservices/src/test/java/io/github/maqs/webservices/MediaTypeUnitTest.java index 7e168bc17..079332c93 100644 --- a/maqs-webservices/src/test/java/io/github/maqs/webservices/MediaTypeUnitTest.java +++ b/maqs-webservices/src/test/java/io/github/maqs/webservices/MediaTypeUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.webservices; diff --git a/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceConfigUnitTest.java b/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceConfigUnitTest.java index 2ec4d0014..b55a2274f 100644 --- a/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceConfigUnitTest.java +++ b/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceConfigUnitTest.java @@ -1,6 +1,6 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.webservices; diff --git a/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverManagerUnitTest.java b/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverManagerUnitTest.java index 92a7d3de9..2d3db5839 100644 --- a/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverManagerUnitTest.java +++ b/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverManagerUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.webservices; diff --git a/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverDeleteUnitTest.java b/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverDeleteUnitTest.java index 04c39d5b1..bc6480385 100644 --- a/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverDeleteUnitTest.java +++ b/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverDeleteUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.webservices.WebServiceDriverRequestUnitTest; diff --git a/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverGetUnitTest.java b/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverGetUnitTest.java index 09ed9a95a..fd8bb3e3f 100644 --- a/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverGetUnitTest.java +++ b/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverGetUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.webservices.WebServiceDriverRequestUnitTest; diff --git a/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverPatchUnitTest.java b/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverPatchUnitTest.java index fdb23ad21..afd1f0dd5 100644 --- a/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverPatchUnitTest.java +++ b/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverPatchUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.webservices.WebServiceDriverRequestUnitTest; diff --git a/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverPostUnitTest.java b/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverPostUnitTest.java index b127b45d8..4db667fa1 100644 --- a/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverPostUnitTest.java +++ b/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverPostUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.webservices.WebServiceDriverRequestUnitTest; diff --git a/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverPutUnitTest.java b/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverPutUnitTest.java index f4b5937fc..efc9101a3 100644 --- a/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverPutUnitTest.java +++ b/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverPutUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.webservices.WebServiceDriverRequestUnitTest; diff --git a/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverUnitTest.java b/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverUnitTest.java index ae080f64d..53b642705 100644 --- a/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverUnitTest.java +++ b/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.webservices; diff --git a/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceTestObjectUnitTest.java b/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceTestObjectUnitTest.java index b9d15c975..f07af3d83 100644 --- a/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceTestObjectUnitTest.java +++ b/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceTestObjectUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.webservices; diff --git a/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceUtilitiesUnitTest.java b/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceUtilitiesUnitTest.java index 8f5e68847..9904beda6 100644 --- a/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceUtilitiesUnitTest.java +++ b/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceUtilitiesUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.webservices; diff --git a/maqs-webservices/src/test/java/io/github/maqs/webservices/models/Product.java b/maqs-webservices/src/test/java/io/github/maqs/webservices/models/Product.java index 29b442ec0..54751ea6d 100644 --- a/maqs-webservices/src/test/java/io/github/maqs/webservices/models/Product.java +++ b/maqs-webservices/src/test/java/io/github/maqs/webservices/models/Product.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ package io.github.maqs.webservices.models; diff --git a/maqs_checks.xml b/maqs_checks.xml index f95d8ff13..2ea3b2a51 100644 --- a/maqs_checks.xml +++ b/maqs_checks.xml @@ -189,6 +189,6 @@ - + From ad0aa0252537744b556082421e6c62205621cbcf Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Tue, 13 Dec 2022 20:21:58 -0600 Subject: [PATCH 39/91] checkstyle updates --- .../src/main/java/io/github/maqs/utilities/helper/Config.java | 1 - .../main/java/io/github/maqs/utilities/helper/GenericWait.java | 1 - .../java/io/github/maqs/utilities/logging/LoggingConfig.java | 1 - 3 files changed, 3 deletions(-) diff --git a/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/Config.java b/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/Config.java index 46f69b2f3..8f0deb9de 100644 --- a/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/Config.java +++ b/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/Config.java @@ -9,7 +9,6 @@ import java.util.HashMap; import java.util.Iterator; import java.util.Map; - import org.apache.commons.configuration2.XMLConfiguration; import org.apache.commons.configuration2.builder.FileBasedConfigurationBuilder; import org.apache.commons.configuration2.builder.fluent.Configurations; diff --git a/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/GenericWait.java b/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/GenericWait.java index f72998f0c..55b0840f5 100644 --- a/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/GenericWait.java +++ b/maqs-utilities/src/main/java/io/github/maqs/utilities/helper/GenericWait.java @@ -6,7 +6,6 @@ import io.github.maqs.utilities.helper.exceptions.FunctionException; import io.github.maqs.utilities.helper.exceptions.TimeoutException; - import java.time.LocalDateTime; import java.time.temporal.ChronoUnit; import java.util.function.BooleanSupplier; diff --git a/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/LoggingConfig.java b/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/LoggingConfig.java index c0789eece..2c4ca766d 100644 --- a/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/LoggingConfig.java +++ b/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/LoggingConfig.java @@ -7,7 +7,6 @@ import io.github.maqs.utilities.helper.Config; import io.github.maqs.utilities.helper.StringProcessor; import io.github.maqs.utilities.helper.exceptions.MaqsLoggingConfigException; - import java.io.File; /** From d66250e149712695b5391468b6ea500d8aeabbb5 Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Tue, 13 Dec 2022 20:23:42 -0600 Subject: [PATCH 40/91] organize project level properties --- pom.xml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index b7dff30ea..aa525949b 100644 --- a/pom.xml +++ b/pom.xml @@ -259,21 +259,26 @@ 3.0.1-SNAPSHOT + 11 + UTF-8 + 3.0.0-M1 + + 8.29 2.17 + 3.1.2 + 9.2.1 + 3.3.1 3.8.1 3.0.0-M6 - 3.1.2 - UTF-8 - 9.2.1 + 0.8.7 7.5 + 4.1.1 3.141.59 - 3.0.0-M1 - 8.29 - 11 + 94.0.4606.41 0.28.0 5.16299 From 9ba308594b0fd8d96ea2ea00625f3f728331126d Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Tue, 13 Dec 2022 20:26:15 -0600 Subject: [PATCH 41/91] checkstyle fixes --- maqs-base/src/main/java/io/github/maqs/base/BaseTestObject.java | 1 - 1 file changed, 1 deletion(-) diff --git a/maqs-base/src/main/java/io/github/maqs/base/BaseTestObject.java b/maqs-base/src/main/java/io/github/maqs/base/BaseTestObject.java index 96b4227d8..67638423e 100644 --- a/maqs-base/src/main/java/io/github/maqs/base/BaseTestObject.java +++ b/maqs-base/src/main/java/io/github/maqs/base/BaseTestObject.java @@ -10,7 +10,6 @@ import io.github.maqs.utilities.logging.MessageType; import io.github.maqs.utilities.performance.IPerfTimerCollection; import io.github.maqs.utilities.performance.PerfTimerCollection; - import java.io.File; import java.util.ArrayList; import java.util.List; From 7bb4072de836609979d681bc7f82d56bce672d83 Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Tue, 13 Dec 2022 20:30:37 -0600 Subject: [PATCH 42/91] checkstyle fixes --- .../io/github/maqs/playwright/BasePlaywrightTest.java | 8 ++++---- .../java/io/github/maqs/playwright/PageDriverFactory.java | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/maqs-playwright/src/main/java/io/github/maqs/playwright/BasePlaywrightTest.java b/maqs-playwright/src/main/java/io/github/maqs/playwright/BasePlaywrightTest.java index 8af62f541..7377daf9a 100644 --- a/maqs-playwright/src/main/java/io/github/maqs/playwright/BasePlaywrightTest.java +++ b/maqs-playwright/src/main/java/io/github/maqs/playwright/BasePlaywrightTest.java @@ -4,6 +4,10 @@ package io.github.maqs.playwright; +import com.microsoft.playwright.Browser; +import com.microsoft.playwright.BrowserContext; +import com.microsoft.playwright.Page; +import com.microsoft.playwright.Tracing; import io.github.maqs.base.BaseExtendableTest; import io.github.maqs.utilities.helper.StringProcessor; import io.github.maqs.utilities.logging.IFileLogger; @@ -11,10 +15,6 @@ import io.github.maqs.utilities.logging.LoggingConfig; import io.github.maqs.utilities.logging.LoggingEnabled; import io.github.maqs.utilities.logging.MessageType; -import com.microsoft.playwright.Browser; -import com.microsoft.playwright.BrowserContext; -import com.microsoft.playwright.Page; -import com.microsoft.playwright.Tracing; import java.io.File; import java.nio.file.Path; import java.nio.file.Paths; diff --git a/maqs-playwright/src/main/java/io/github/maqs/playwright/PageDriverFactory.java b/maqs-playwright/src/main/java/io/github/maqs/playwright/PageDriverFactory.java index 005419f05..8b56917dd 100644 --- a/maqs-playwright/src/main/java/io/github/maqs/playwright/PageDriverFactory.java +++ b/maqs-playwright/src/main/java/io/github/maqs/playwright/PageDriverFactory.java @@ -4,8 +4,7 @@ package io.github.maqs.playwright; -import io.github.maqs.utilities.logging.LoggingConfig; -import io.github.maqs.utilities.logging.LoggingEnabled; + import com.microsoft.playwright.Browser; import com.microsoft.playwright.BrowserContext; import com.microsoft.playwright.BrowserType; @@ -14,6 +13,8 @@ import com.microsoft.playwright.Tracing; import com.microsoft.playwright.options.Proxy; import com.microsoft.playwright.options.ViewportSize; +import io.github.maqs.utilities.logging.LoggingConfig; +import io.github.maqs.utilities.logging.LoggingEnabled; import java.awt.Dimension; import java.io.File; From 345ade9cae52ac626975c6f701d049d688f54be3 Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Tue, 13 Dec 2022 20:38:57 -0600 Subject: [PATCH 43/91] checkstyle fixes --- .../main/java/io/github/maqs/appium/AppiumDriverFactory.java | 5 ++--- .../main/java/io/github/maqs/appium/AppiumTestObject.java | 2 +- .../src/main/java/io/github/maqs/appium/AppiumUtilities.java | 2 +- .../src/main/java/io/github/maqs/appium/BaseAppiumTest.java | 2 +- .../main/java/io/github/maqs/appium/IAppiumTestObject.java | 2 +- .../main/java/io/github/maqs/appium/MobileDriverManager.java | 2 +- .../java/io/github/maqs/appium/AppiumConfigUnitTest.java | 1 - .../io/github/maqs/appium/AppiumDriverFactoryUnitTest.java | 5 ++--- .../java/io/github/maqs/appium/AppiumTestObjectUnitTest.java | 2 +- .../java/io/github/maqs/appium/AppiumUtilitiesUnitTest.java | 2 +- .../io/github/maqs/appium/MobileDriverManagerUnitTest.java | 2 +- .../main/java/io/github/maqs/database/DatabaseConfig.java | 1 - .../java/io/github/maqs/database/providers/SQLProvider.java | 2 +- .../io/github/maqs/database/providers/SQLiteProvider.java | 3 +-- .../java/io/github/maqs/webservices/WebServiceUtilities.java | 2 +- 15 files changed, 15 insertions(+), 20 deletions(-) diff --git a/maqs-appium/src/main/java/io/github/maqs/appium/AppiumDriverFactory.java b/maqs-appium/src/main/java/io/github/maqs/appium/AppiumDriverFactory.java index 30e1d6622..3c8ecf56e 100644 --- a/maqs-appium/src/main/java/io/github/maqs/appium/AppiumDriverFactory.java +++ b/maqs-appium/src/main/java/io/github/maqs/appium/AppiumDriverFactory.java @@ -4,13 +4,13 @@ package io.github.maqs.appium; -import io.github.maqs.appium.constants.PlatformType; -import io.github.maqs.utilities.helper.StringProcessor; import io.appium.java_client.AppiumDriver; import io.appium.java_client.android.AndroidDriver; import io.appium.java_client.ios.IOSDriver; import io.appium.java_client.remote.MobileCapabilityType; import io.appium.java_client.windows.WindowsDriver; +import io.github.maqs.appium.constants.PlatformType; +import io.github.maqs.utilities.helper.StringProcessor; import java.net.URL; import java.time.Duration; import java.util.Map; @@ -18,7 +18,6 @@ import java.util.concurrent.TimeUnit; import java.util.function.Consumer; import java.util.function.Supplier; - import org.openqa.selenium.WebDriverException; import org.openqa.selenium.WebElement; import org.openqa.selenium.remote.CapabilityType; diff --git a/maqs-appium/src/main/java/io/github/maqs/appium/AppiumTestObject.java b/maqs-appium/src/main/java/io/github/maqs/appium/AppiumTestObject.java index 6a82d2c8e..969a71979 100644 --- a/maqs-appium/src/main/java/io/github/maqs/appium/AppiumTestObject.java +++ b/maqs-appium/src/main/java/io/github/maqs/appium/AppiumTestObject.java @@ -4,9 +4,9 @@ package io.github.maqs.appium; +import io.appium.java_client.AppiumDriver; import io.github.maqs.base.BaseTestObject; import io.github.maqs.utilities.logging.ILogger; -import io.appium.java_client.AppiumDriver; import java.util.function.Supplier; import org.openqa.selenium.WebElement; diff --git a/maqs-appium/src/main/java/io/github/maqs/appium/AppiumUtilities.java b/maqs-appium/src/main/java/io/github/maqs/appium/AppiumUtilities.java index 32d1aa4b5..ea9fa9707 100644 --- a/maqs-appium/src/main/java/io/github/maqs/appium/AppiumUtilities.java +++ b/maqs-appium/src/main/java/io/github/maqs/appium/AppiumUtilities.java @@ -4,12 +4,12 @@ package io.github.maqs.appium; +import io.appium.java_client.AppiumDriver; import io.github.maqs.utilities.helper.StringProcessor; import io.github.maqs.utilities.logging.FileLogger; import io.github.maqs.utilities.logging.Logger; import io.github.maqs.utilities.logging.LoggingConfig; import io.github.maqs.utilities.logging.MessageType; -import io.appium.java_client.AppiumDriver; import java.io.File; import java.io.FileWriter; import java.io.IOException; diff --git a/maqs-appium/src/main/java/io/github/maqs/appium/BaseAppiumTest.java b/maqs-appium/src/main/java/io/github/maqs/appium/BaseAppiumTest.java index a17f675a6..b48d6ee3f 100644 --- a/maqs-appium/src/main/java/io/github/maqs/appium/BaseAppiumTest.java +++ b/maqs-appium/src/main/java/io/github/maqs/appium/BaseAppiumTest.java @@ -4,11 +4,11 @@ package io.github.maqs.appium; +import io.appium.java_client.AppiumDriver; import io.github.maqs.base.BaseExtendableTest; import io.github.maqs.utilities.logging.FileLogger; import io.github.maqs.utilities.logging.LoggingEnabled; import io.github.maqs.utilities.logging.MessageType; -import io.appium.java_client.AppiumDriver; import org.openqa.selenium.WebElement; import org.testng.ITestResult; diff --git a/maqs-appium/src/main/java/io/github/maqs/appium/IAppiumTestObject.java b/maqs-appium/src/main/java/io/github/maqs/appium/IAppiumTestObject.java index 7e3d47e72..408c2f75e 100644 --- a/maqs-appium/src/main/java/io/github/maqs/appium/IAppiumTestObject.java +++ b/maqs-appium/src/main/java/io/github/maqs/appium/IAppiumTestObject.java @@ -4,8 +4,8 @@ package io.github.maqs.appium; -import io.github.maqs.base.ITestObject; import io.appium.java_client.AppiumDriver; +import io.github.maqs.base.ITestObject; import java.util.function.Supplier; import org.openqa.selenium.WebElement; diff --git a/maqs-appium/src/main/java/io/github/maqs/appium/MobileDriverManager.java b/maqs-appium/src/main/java/io/github/maqs/appium/MobileDriverManager.java index cd0295593..a3be217f3 100644 --- a/maqs-appium/src/main/java/io/github/maqs/appium/MobileDriverManager.java +++ b/maqs-appium/src/main/java/io/github/maqs/appium/MobileDriverManager.java @@ -4,11 +4,11 @@ package io.github.maqs.appium; +import io.appium.java_client.AppiumDriver; import io.github.maqs.base.DriverManager; import io.github.maqs.base.ITestObject; import io.github.maqs.utilities.helper.StringProcessor; import io.github.maqs.utilities.logging.MessageType; -import io.appium.java_client.AppiumDriver; import java.util.function.Supplier; import org.openqa.selenium.WebElement; diff --git a/maqs-appium/src/test/java/io/github/maqs/appium/AppiumConfigUnitTest.java b/maqs-appium/src/test/java/io/github/maqs/appium/AppiumConfigUnitTest.java index 7b40c9f7d..60852c9d3 100644 --- a/maqs-appium/src/test/java/io/github/maqs/appium/AppiumConfigUnitTest.java +++ b/maqs-appium/src/test/java/io/github/maqs/appium/AppiumConfigUnitTest.java @@ -10,7 +10,6 @@ import io.github.maqs.utilities.helper.TestCategories; import java.util.HashMap; import java.util.Map; - import org.testng.Assert; import org.testng.annotations.Ignore; import org.testng.annotations.Test; diff --git a/maqs-appium/src/test/java/io/github/maqs/appium/AppiumDriverFactoryUnitTest.java b/maqs-appium/src/test/java/io/github/maqs/appium/AppiumDriverFactoryUnitTest.java index 9e5eea63c..da6a38029 100644 --- a/maqs-appium/src/test/java/io/github/maqs/appium/AppiumDriverFactoryUnitTest.java +++ b/maqs-appium/src/test/java/io/github/maqs/appium/AppiumDriverFactoryUnitTest.java @@ -4,17 +4,16 @@ package io.github.maqs.appium; +import io.appium.java_client.AppiumDriver; +import io.appium.java_client.remote.MobileCapabilityType; import io.github.maqs.appium.constants.PlatformType; import io.github.maqs.base.BaseGenericTest; import io.github.maqs.utilities.helper.TestCategories; -import io.appium.java_client.AppiumDriver; -import io.appium.java_client.remote.MobileCapabilityType; import java.net.MalformedURLException; import java.net.URL; import java.util.Map; import java.util.function.Consumer; import java.util.function.Supplier; - import org.openqa.selenium.WebDriverException; import org.openqa.selenium.WebElement; import org.openqa.selenium.remote.DesiredCapabilities; diff --git a/maqs-appium/src/test/java/io/github/maqs/appium/AppiumTestObjectUnitTest.java b/maqs-appium/src/test/java/io/github/maqs/appium/AppiumTestObjectUnitTest.java index 1c0c6bf81..2a2696216 100644 --- a/maqs-appium/src/test/java/io/github/maqs/appium/AppiumTestObjectUnitTest.java +++ b/maqs-appium/src/test/java/io/github/maqs/appium/AppiumTestObjectUnitTest.java @@ -4,9 +4,9 @@ package io.github.maqs.appium; +import io.appium.java_client.AppiumDriver; import io.github.maqs.base.BaseGenericTest; import io.github.maqs.utilities.helper.TestCategories; -import io.appium.java_client.AppiumDriver; import org.openqa.selenium.WebElement; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/maqs-appium/src/test/java/io/github/maqs/appium/AppiumUtilitiesUnitTest.java b/maqs-appium/src/test/java/io/github/maqs/appium/AppiumUtilitiesUnitTest.java index 52c65924a..e0681f25e 100644 --- a/maqs-appium/src/test/java/io/github/maqs/appium/AppiumUtilitiesUnitTest.java +++ b/maqs-appium/src/test/java/io/github/maqs/appium/AppiumUtilitiesUnitTest.java @@ -4,13 +4,13 @@ package io.github.maqs.appium; +import io.appium.java_client.AppiumDriver; import io.github.maqs.base.BaseGenericTest; import io.github.maqs.utilities.helper.StringProcessor; import io.github.maqs.utilities.helper.TestCategories; import io.github.maqs.utilities.logging.ConsoleLogger; import io.github.maqs.utilities.logging.FileLogger; import io.github.maqs.utilities.logging.Logger; -import io.appium.java_client.AppiumDriver; import java.io.File; import java.nio.file.Paths; import java.time.Clock; diff --git a/maqs-appium/src/test/java/io/github/maqs/appium/MobileDriverManagerUnitTest.java b/maqs-appium/src/test/java/io/github/maqs/appium/MobileDriverManagerUnitTest.java index 57b24f0bc..b984549ac 100644 --- a/maqs-appium/src/test/java/io/github/maqs/appium/MobileDriverManagerUnitTest.java +++ b/maqs-appium/src/test/java/io/github/maqs/appium/MobileDriverManagerUnitTest.java @@ -4,8 +4,8 @@ package io.github.maqs.appium; -import io.github.maqs.base.BaseGenericTest; import io.appium.java_client.AppiumDriver; +import io.github.maqs.base.BaseGenericTest; import java.util.function.Supplier; import org.openqa.selenium.WebElement; import org.testng.Assert; diff --git a/maqs-database/src/main/java/io/github/maqs/database/DatabaseConfig.java b/maqs-database/src/main/java/io/github/maqs/database/DatabaseConfig.java index 0bd92aa33..87873afa7 100644 --- a/maqs-database/src/main/java/io/github/maqs/database/DatabaseConfig.java +++ b/maqs-database/src/main/java/io/github/maqs/database/DatabaseConfig.java @@ -10,7 +10,6 @@ import io.github.maqs.database.providers.SQLiteProvider; import io.github.maqs.utilities.helper.Config; import io.github.maqs.utilities.helper.ConfigSection; - import java.util.HashMap; import java.util.Map; diff --git a/maqs-database/src/main/java/io/github/maqs/database/providers/SQLProvider.java b/maqs-database/src/main/java/io/github/maqs/database/providers/SQLProvider.java index 93f942fc6..ad97ba5a2 100644 --- a/maqs-database/src/main/java/io/github/maqs/database/providers/SQLProvider.java +++ b/maqs-database/src/main/java/io/github/maqs/database/providers/SQLProvider.java @@ -4,9 +4,9 @@ package io.github.maqs.database.providers; +import com.microsoft.sqlserver.jdbc.SQLServerDataSource; import io.github.maqs.database.DatabaseConfig; import io.github.maqs.database.constants.DataProviderType; -import com.microsoft.sqlserver.jdbc.SQLServerDataSource; import javax.sql.DataSource; diff --git a/maqs-database/src/main/java/io/github/maqs/database/providers/SQLiteProvider.java b/maqs-database/src/main/java/io/github/maqs/database/providers/SQLiteProvider.java index 4fad7d107..a649face2 100644 --- a/maqs-database/src/main/java/io/github/maqs/database/providers/SQLiteProvider.java +++ b/maqs-database/src/main/java/io/github/maqs/database/providers/SQLiteProvider.java @@ -6,7 +6,6 @@ import io.github.maqs.database.constants.DataProviderType; import javax.sql.DataSource; - import org.sqlite.SQLiteDataSource; /** @@ -17,7 +16,7 @@ public class SQLiteProvider implements IDataSourceProvider { /** * Field dbUrl. */ - private String dbUrl; + private final String dbUrl; /** * Field dataProviderType. */ diff --git a/maqs-webservices/src/main/java/io/github/maqs/webservices/WebServiceUtilities.java b/maqs-webservices/src/main/java/io/github/maqs/webservices/WebServiceUtilities.java index 405674784..d00381dd0 100644 --- a/maqs-webservices/src/main/java/io/github/maqs/webservices/WebServiceUtilities.java +++ b/maqs-webservices/src/main/java/io/github/maqs/webservices/WebServiceUtilities.java @@ -4,10 +4,10 @@ package io.github.maqs.webservices; -import io.github.maqs.utilities.helper.StringProcessor; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.dataformat.xml.XmlMapper; +import io.github.maqs.utilities.helper.StringProcessor; import java.io.IOException; import java.lang.reflect.Type; import java.net.http.HttpResponse; From b607f445ae58181189a18efcf476cdfa9f0924f9 Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Tue, 13 Dec 2022 20:43:44 -0600 Subject: [PATCH 44/91] checkstyle fixes --- .../java/io/github/maqs/database/providers/SQLProvider.java | 1 - .../main/java/io/github/maqs/selenium/WebDriverFactory.java | 3 +-- .../java/io/github/maqs/selenium/factories/UIWaitFactory.java | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/maqs-database/src/main/java/io/github/maqs/database/providers/SQLProvider.java b/maqs-database/src/main/java/io/github/maqs/database/providers/SQLProvider.java index ad97ba5a2..a6968fb48 100644 --- a/maqs-database/src/main/java/io/github/maqs/database/providers/SQLProvider.java +++ b/maqs-database/src/main/java/io/github/maqs/database/providers/SQLProvider.java @@ -7,7 +7,6 @@ import com.microsoft.sqlserver.jdbc.SQLServerDataSource; import io.github.maqs.database.DatabaseConfig; import io.github.maqs.database.constants.DataProviderType; - import javax.sql.DataSource; public class SQLProvider implements IDataSourceProvider { diff --git a/maqs-selenium/src/main/java/io/github/maqs/selenium/WebDriverFactory.java b/maqs-selenium/src/main/java/io/github/maqs/selenium/WebDriverFactory.java index 499dcddbd..ae9516bfc 100644 --- a/maqs-selenium/src/main/java/io/github/maqs/selenium/WebDriverFactory.java +++ b/maqs-selenium/src/main/java/io/github/maqs/selenium/WebDriverFactory.java @@ -4,16 +4,15 @@ package io.github.maqs.selenium; +import io.github.bonigarcia.wdm.WebDriverManager; import io.github.maqs.selenium.constants.BrowserType; import io.github.maqs.selenium.constants.OperatingSystem; import io.github.maqs.selenium.constants.RemoteBrowserType; import io.github.maqs.selenium.exceptions.WebDriverFactoryException; import io.github.maqs.utilities.helper.StringProcessor; -import io.github.bonigarcia.wdm.WebDriverManager; import java.net.URL; import java.util.HashMap; import java.util.Map; - import org.openqa.selenium.Dimension; import org.openqa.selenium.MutableCapabilities; import org.openqa.selenium.PageLoadStrategy; diff --git a/maqs-selenium/src/main/java/io/github/maqs/selenium/factories/UIWaitFactory.java b/maqs-selenium/src/main/java/io/github/maqs/selenium/factories/UIWaitFactory.java index 6ba6c4641..0f8910fdd 100644 --- a/maqs-selenium/src/main/java/io/github/maqs/selenium/factories/UIWaitFactory.java +++ b/maqs-selenium/src/main/java/io/github/maqs/selenium/factories/UIWaitFactory.java @@ -9,7 +9,6 @@ import io.github.maqs.selenium.UIWait; import java.time.Duration; import java.util.concurrent.ConcurrentHashMap; - import org.openqa.selenium.SearchContext; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; From cd5b5decce88424940ba2fa81ecf96e991e3c449 Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Tue, 13 Dec 2022 20:45:10 -0600 Subject: [PATCH 45/91] checkstyle fixes --- .../io/github/maqs/selenium/factories/FluentWaitFactory.java | 1 - 1 file changed, 1 deletion(-) diff --git a/maqs-selenium/src/main/java/io/github/maqs/selenium/factories/FluentWaitFactory.java b/maqs-selenium/src/main/java/io/github/maqs/selenium/factories/FluentWaitFactory.java index 3881abab8..ef96d3812 100644 --- a/maqs-selenium/src/main/java/io/github/maqs/selenium/factories/FluentWaitFactory.java +++ b/maqs-selenium/src/main/java/io/github/maqs/selenium/factories/FluentWaitFactory.java @@ -6,7 +6,6 @@ import io.github.maqs.selenium.SeleniumConfig; import java.time.Duration; - import org.openqa.selenium.NotFoundException; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.ui.FluentWait; From b5e8c6db53123985f31aa3144aa78ac8c7bbcc49 Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Tue, 13 Dec 2022 20:47:55 -0600 Subject: [PATCH 46/91] checkstyle fixes --- .../maqs/accessibility/AccessibilityUtilities.java | 9 +++++---- .../java/io/github/maqs/cucumber/BaseCucumberTestNG.java | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/maqs-accessibility/src/main/java/io/github/maqs/accessibility/AccessibilityUtilities.java b/maqs-accessibility/src/main/java/io/github/maqs/accessibility/AccessibilityUtilities.java index 779759f5d..e74616c65 100644 --- a/maqs-accessibility/src/main/java/io/github/maqs/accessibility/AccessibilityUtilities.java +++ b/maqs-accessibility/src/main/java/io/github/maqs/accessibility/AccessibilityUtilities.java @@ -4,16 +4,17 @@ package io.github.maqs.accessibility; -import io.github.maqs.selenium.ISeleniumTestObject; -import io.github.maqs.utilities.logging.FileLogger; -import io.github.maqs.utilities.logging.ILogger; -import io.github.maqs.utilities.logging.MessageType; + import com.deque.html.axecore.results.AxeRuntimeException; import com.deque.html.axecore.results.Results; import com.deque.html.axecore.results.Rule; import com.deque.html.axecore.selenium.AxeBuilder; import com.deque.html.axecore.selenium.AxeReporter; import com.deque.html.axecore.selenium.ResultType; +import io.github.maqs.selenium.ISeleniumTestObject; +import io.github.maqs.utilities.logging.FileLogger; +import io.github.maqs.utilities.logging.ILogger; +import io.github.maqs.utilities.logging.MessageType; import java.io.File; import java.io.IOException; import java.nio.file.Paths; diff --git a/maqs-cucumber/src/main/java/io/github/maqs/cucumber/BaseCucumberTestNG.java b/maqs-cucumber/src/main/java/io/github/maqs/cucumber/BaseCucumberTestNG.java index 2240f6007..45ce3491b 100644 --- a/maqs-cucumber/src/main/java/io/github/maqs/cucumber/BaseCucumberTestNG.java +++ b/maqs-cucumber/src/main/java/io/github/maqs/cucumber/BaseCucumberTestNG.java @@ -4,9 +4,9 @@ package io.github.maqs.cucumber; +import io.cucumber.testng.AbstractTestNGCucumberTests; import io.github.maqs.base.BaseTest; import io.github.maqs.utilities.logging.MessageType; -import io.cucumber.testng.AbstractTestNGCucumberTests; import java.lang.reflect.Method; import org.testng.ITest; import org.testng.ITestContext; From 527e6081f4121b8ef59c18ef47752cdafab6b8a4 Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Wed, 14 Dec 2022 00:38:30 -0600 Subject: [PATCH 47/91] fixed failing utilities tests --- .../java/io/github/maqs/utilities/logging/HtmlFileLogger.java | 2 +- .../github/maqs/utilities/logger/HtmlFileLoggerUnitTest.java | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/HtmlFileLogger.java b/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/HtmlFileLogger.java index a2b898989..554733c57 100644 --- a/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/HtmlFileLogger.java +++ b/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/HtmlFileLogger.java @@ -29,7 +29,7 @@ public class HtmlFileLogger extends FileLogger implements IHtmlFileLogger { private static final String DEFAULT_LOG_NAME = "HtmlFileLog.html"; private static final File FILE_DIRECTORY = new File( - "../maqs-utilities/src/main/java/com/maqs/utilities/logging/resources"); + "../maqs-utilities/src/main/java/io/github/maqs/utilities/logging/resources"); private static final String FILES = FILE_DIRECTORY.getPath() + File.separator; diff --git a/maqs-utilities/src/test/java/io/github/maqs/utilities/logger/HtmlFileLoggerUnitTest.java b/maqs-utilities/src/test/java/io/github/maqs/utilities/logger/HtmlFileLoggerUnitTest.java index c4009f752..5e178476e 100644 --- a/maqs-utilities/src/test/java/io/github/maqs/utilities/logger/HtmlFileLoggerUnitTest.java +++ b/maqs-utilities/src/test/java/io/github/maqs/utilities/logger/HtmlFileLoggerUnitTest.java @@ -151,6 +151,8 @@ public void testSetFilePath() { logger.close(); Assert.assertFalse(file.exists()); Assert.assertEquals(filePath, "test file path", "Expected 'test file path' as file path"); + + deleteFile(logger); } /** @@ -164,6 +166,8 @@ public void testCatchThrownException() { logger.logMessage(MessageType.GENERIC, "Test throws error as expected."); new File(logger.getFilePath()); logger.close(); + + deleteFile(logger); } /** From bcee83aedb0b2ab8e5875fadc07a09c1f5a826b1 Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Wed, 14 Dec 2022 01:07:12 -0600 Subject: [PATCH 48/91] trying to fix text --- .../java/io/github/maqs/utilities/logging/LoggingConfig.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/LoggingConfig.java b/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/LoggingConfig.java index 2c4ca766d..110b51339 100644 --- a/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/LoggingConfig.java +++ b/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/LoggingConfig.java @@ -65,8 +65,7 @@ public static MessageType getLoggingLevelSetting() { case "SUSPENDED": return MessageType.SUSPENDED; // All logging is suspended default: - throw new MaqsLoggingConfigException(StringProcessor - .safeFormatter("Logging level value '{0}' is not a valid option", Config.getGeneralValue("LogLevel"))); + throw new MaqsLoggingConfigException("Logging level value " + Config.getGeneralValue("LogLevel") + " is not a valid option"); } } From bce15eaedc2898942536ea82625be762566fc1a3 Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Wed, 14 Dec 2022 01:10:05 -0600 Subject: [PATCH 49/91] checkstyle update --- .../java/io/github/maqs/utilities/logging/LoggingConfig.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/LoggingConfig.java b/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/LoggingConfig.java index 110b51339..0e4d15e66 100644 --- a/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/LoggingConfig.java +++ b/maqs-utilities/src/main/java/io/github/maqs/utilities/logging/LoggingConfig.java @@ -65,7 +65,8 @@ public static MessageType getLoggingLevelSetting() { case "SUSPENDED": return MessageType.SUSPENDED; // All logging is suspended default: - throw new MaqsLoggingConfigException("Logging level value " + Config.getGeneralValue("LogLevel") + " is not a valid option"); + throw new MaqsLoggingConfigException( + "Logging level value " + Config.getGeneralValue("LogLevel") + " is not a valid option"); } } From e9640364bc7df7de6498fc893c9ae2f80be8489a Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Wed, 14 Dec 2022 02:11:48 -0600 Subject: [PATCH 50/91] updated accessibility module to work better --- maqs-accessibility/pom.xml | 21 +--------- .../accessibility/AccessibilityUtilities.java | 2 +- .../maqs/accessibility/HtmlReporter.java | 2 +- .../maqs/accessibility/SeleniumReport.java | 2 +- .../AccessibilityHTMLUnitTest.java | 21 +++------- .../accessibility/AccessibilityUnitTest.java | 29 ++++++------- .../accessibility/HTMLReporterUnitTest.java | 41 ++++++++++--------- 7 files changed, 44 insertions(+), 74 deletions(-) diff --git a/maqs-accessibility/pom.xml b/maqs-accessibility/pom.xml index da939664e..91dab4444 100644 --- a/maqs-accessibility/pom.xml +++ b/maqs-accessibility/pom.xml @@ -11,12 +11,11 @@ io.github.maqs.accessibility maqs-accessibility - ${revision} MAQS Accessibility Testing Module - jar + ${revision} - 4.4.1 + 4.5.1 1.10.0 1.15.3 @@ -31,10 +30,6 @@ selenium ${deque.axe.version} - - io.github.bonigarcia - webdrivermanager - org.apache.commons commons-text @@ -46,17 +41,5 @@ ${jsoup.version} compile - - org.seleniumhq.selenium - selenium-api - - - org.seleniumhq.selenium - selenium-remote-driver - - - org.seleniumhq.selenium - selenium-java - diff --git a/maqs-accessibility/src/main/java/io/github/maqs/accessibility/AccessibilityUtilities.java b/maqs-accessibility/src/main/java/io/github/maqs/accessibility/AccessibilityUtilities.java index e74616c65..0164a28d3 100644 --- a/maqs-accessibility/src/main/java/io/github/maqs/accessibility/AccessibilityUtilities.java +++ b/maqs-accessibility/src/main/java/io/github/maqs/accessibility/AccessibilityUtilities.java @@ -10,7 +10,7 @@ import com.deque.html.axecore.results.Rule; import com.deque.html.axecore.selenium.AxeBuilder; import com.deque.html.axecore.selenium.AxeReporter; -import com.deque.html.axecore.selenium.ResultType; +import com.deque.html.axecore.results.ResultType; import io.github.maqs.selenium.ISeleniumTestObject; import io.github.maqs.utilities.logging.FileLogger; import io.github.maqs.utilities.logging.ILogger; diff --git a/maqs-accessibility/src/main/java/io/github/maqs/accessibility/HtmlReporter.java b/maqs-accessibility/src/main/java/io/github/maqs/accessibility/HtmlReporter.java index c40237fc4..9124936ee 100644 --- a/maqs-accessibility/src/main/java/io/github/maqs/accessibility/HtmlReporter.java +++ b/maqs-accessibility/src/main/java/io/github/maqs/accessibility/HtmlReporter.java @@ -8,7 +8,7 @@ import com.deque.html.axecore.results.CheckedNode; import com.deque.html.axecore.results.Results; import com.deque.html.axecore.results.Rule; -import com.deque.html.axecore.selenium.ResultType; +import com.deque.html.axecore.results.ResultType; import java.io.File; import java.io.IOException; import java.nio.charset.StandardCharsets; diff --git a/maqs-accessibility/src/main/java/io/github/maqs/accessibility/SeleniumReport.java b/maqs-accessibility/src/main/java/io/github/maqs/accessibility/SeleniumReport.java index 7dfd401a7..1d020351b 100644 --- a/maqs-accessibility/src/main/java/io/github/maqs/accessibility/SeleniumReport.java +++ b/maqs-accessibility/src/main/java/io/github/maqs/accessibility/SeleniumReport.java @@ -6,7 +6,7 @@ import com.deque.html.axecore.results.Results; import com.deque.html.axecore.selenium.AxeBuilder; -import com.deque.html.axecore.selenium.ResultType; +import com.deque.html.axecore.results.ResultType; import java.io.IOException; import java.text.ParseException; import java.util.EnumSet; diff --git a/maqs-accessibility/src/test/java/io/github/maqs/accessibility/AccessibilityHTMLUnitTest.java b/maqs-accessibility/src/test/java/io/github/maqs/accessibility/AccessibilityHTMLUnitTest.java index ab0d276c1..40612ba64 100644 --- a/maqs-accessibility/src/test/java/io/github/maqs/accessibility/AccessibilityHTMLUnitTest.java +++ b/maqs-accessibility/src/test/java/io/github/maqs/accessibility/AccessibilityHTMLUnitTest.java @@ -7,7 +7,7 @@ import com.deque.html.axecore.results.AxeRuntimeException; import com.deque.html.axecore.results.Results; import com.deque.html.axecore.selenium.AxeBuilder; -import com.deque.html.axecore.selenium.ResultType; +import com.deque.html.axecore.results.ResultType; import com.fasterxml.jackson.databind.ObjectMapper; import io.github.maqs.selenium.BaseSeleniumTest; import io.github.maqs.selenium.LazyWebElement; @@ -28,6 +28,7 @@ import org.apache.commons.io.IOUtils; import org.openqa.selenium.By; import org.testng.Assert; +import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; /** @@ -52,10 +53,10 @@ public class AccessibilityHTMLUnitTest extends BaseSeleniumTest { /** * Sets up and navigates to the provided url. - * @param url the url to be navigated to */ - public void setup(String url) { - this.getWebDriver().navigate().to(url); + @BeforeMethod + public void setup() { + this.getWebDriver().navigate().to(testSiteAutomationUrl); UIWaitFactory.getWaitDriver(this.getWebDriver()).waitForPageLoad(); } @@ -65,7 +66,6 @@ public void setup(String url) { */ @Test(groups = TestCategories.ACCESSIBILITY) public void testAccessibilityHtmlReport() throws IOException, ParseException { - setup(testSiteAutomationUrl); AccessibilityUtilities.createAccessibilityHtmlReport(this.getTestObject(), new AxeBuilder().analyze(this.getWebDriver()), false); @@ -81,8 +81,6 @@ public void testAccessibilityHtmlReport() throws IOException, ParseException { */ @Test(groups = TestCategories.ACCESSIBILITY) public void accessibilityMultipleHtmlReports() throws IOException, ParseException { - setup(testSiteAutomationUrl); - // Create 3 reports AccessibilityUtilities.createAccessibilityHtmlReport(this.getTestObject(), false); AccessibilityUtilities.createAccessibilityHtmlReport(this.getTestObject(), false); @@ -100,7 +98,6 @@ public void accessibilityMultipleHtmlReports() throws IOException, ParseExceptio */ @Test(groups = TestCategories.ACCESSIBILITY, expectedExceptions = AxeRuntimeException.class) public void accessibilityHtmlReportWithError() throws IOException, ParseException { - setup(testSiteAutomationUrl); String axeResultWithError = FileUtils.readFileToString(axeResultWithErrorFile, StandardCharsets.UTF_8); Results results = new ObjectMapper().readValue(axeResultWithError, Results.class); AccessibilityUtilities.createAccessibilityHtmlReport(this.getTestObject(), results, false); @@ -116,7 +113,6 @@ public void accessibilityHtmlReportWithError() throws IOException, ParseExceptio */ @Test(groups = TestCategories.ACCESSIBILITY, expectedExceptions = AxeRuntimeException.class) public void accessibilityHtmlReportWithErrorFromLazyElement() throws IOException, ParseException { - setup(testSiteAutomationUrl); String axeResultWithError = FileUtils.readFileToString(axeResultWithErrorFile, StandardCharsets.UTF_8); Results error = new ObjectMapper().readValue(axeResultWithError, Results.class); AccessibilityUtilities.createAccessibilityHtmlReport(this.getTestObject(), error,false); @@ -134,7 +130,6 @@ public void accessibilityHtmlReportWithErrorFromLazyElement() throws IOException */ @Test(groups = TestCategories.ACCESSIBILITY, expectedExceptions = RuntimeException.class) public void accessibilityHtmlReportWithViolation() throws IOException, ParseException { - setup(testSiteAutomationUrl); AccessibilityUtilities.createAccessibilityHtmlReport(this.getTestObject(), true); deleteFiles(Arrays.asList(this.getTestObject().getArrayOfAssociatedFiles())); } @@ -145,7 +140,6 @@ public void accessibilityHtmlReportWithViolation() throws IOException, ParseExce */ @Test(groups = TestCategories.ACCESSIBILITY) public void accessibilityHtmlReportWithLazyElement() throws IOException, ParseException { - setup(testSiteAutomationUrl); LazyWebElement foodTable = new LazyWebElement(this.getTestObject(), By.id("FoodTable"), "Food Table"); @@ -164,7 +158,6 @@ public void accessibilityHtmlReportWithLazyElement() throws IOException, ParseEx */ @Test(groups = TestCategories.ACCESSIBILITY) public void accessibilityHtmlReportWithElement() throws IOException, ParseException { - setup(testSiteAutomationUrl); AccessibilityUtilities.createAccessibilityHtmlReport(this.getTestObject(), this.getWebDriver().findElement(By.id("FoodTable")), false); @@ -185,7 +178,6 @@ public void accessibilityHtmlLogSuppression() throws IOException, ParseException // Make sure we are not using verbose logging this.getLogger().setLoggingLevel(MessageType.INFORMATION); - setup(testSiteAutomationUrl); AccessibilityUtilities.createAccessibilityHtmlReport(this.getTestObject(), false); // The script executed message should be suppressed when we run the accessibility check @@ -203,8 +195,6 @@ public void accessibilityHtmlLogSuppression() throws IOException, ParseException */ @Test(groups = TestCategories.ACCESSIBILITY) public void accessibilityHtmlReportViolationsOnly() throws IOException, ParseException { - setup(testSiteAutomationUrl); - // Make sure we are not using verbose logging this.getLogger().setLoggingLevel(MessageType.INFORMATION); @@ -226,7 +216,6 @@ public void accessibilityHtmlReportViolationsOnly() throws IOException, ParseExc */ @Test(groups = TestCategories.ACCESSIBILITY) public void accessibilityHtmlViolationsReportWithElement() throws IOException, ParseException { - setup(testSiteAutomationUrl); AccessibilityUtilities.createAccessibilityHtmlReport(this.getTestObject(), this.getWebDriver().findElement(By.id("FoodTable")), false, EnumSet.of(ResultType.Violations)); diff --git a/maqs-accessibility/src/test/java/io/github/maqs/accessibility/AccessibilityUnitTest.java b/maqs-accessibility/src/test/java/io/github/maqs/accessibility/AccessibilityUnitTest.java index d8f9345f1..091054989 100644 --- a/maqs-accessibility/src/test/java/io/github/maqs/accessibility/AccessibilityUnitTest.java +++ b/maqs-accessibility/src/test/java/io/github/maqs/accessibility/AccessibilityUnitTest.java @@ -17,7 +17,9 @@ import java.nio.file.Files; import java.nio.file.Paths; import org.testng.Assert; +import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; +import org.testng.asserts.SoftAssert; /** * The Accessibility Unit test class. @@ -32,6 +34,7 @@ public class AccessibilityUnitTest extends BaseSeleniumTest { /** * Navigates and sets up the login page for scanning. */ + @BeforeMethod public void setup() { this.getWebDriver().navigate().to(testSiteAccessibilityUrl); UIWaitFactory.getWaitDriver(getWebDriver()).waitForPageLoad(); @@ -42,15 +45,16 @@ public void setup() { */ @Test(groups = TestCategories.ACCESSIBILITY) public void testAccessibilityCheckVerbose() throws IOException { - setup(); String filePath = ((FileLogger)getLogger()).getFilePath(); AccessibilityUtilities.checkAccessibility(getTestObject(), false); String logContent = String.valueOf(Files.readAllLines(Paths.get(filePath))); - Assert.assertTrue(logContent.contains("Found 15 items"), "Expected to find 15 pass matches."); - Assert.assertTrue(logContent.contains("Found 66 items"), "Expected to find 66 inapplicable matches."); - Assert.assertTrue(logContent.contains("Found 6 items"), "Expected to find 6 violations matches."); - Assert.assertTrue(logContent.contains("Found 0 items"), "Expected to find 0 incomplete matches."); + SoftAssert softAssert = new SoftAssert(); + softAssert.assertTrue(logContent.contains("Found 13 items"), "Expected to find 15 pass matches."); + softAssert.assertTrue(logContent.contains("Found 71 items"), "Expected to find 66 inapplicable matches."); + softAssert.assertTrue(logContent.contains("Found 6 items"), "Expected to find 6 violations matches."); + softAssert.assertTrue(logContent.contains("Found 0 items"), "Expected to find 0 incomplete matches."); + softAssert.assertAll(); deleteFile(filePath); } @@ -59,7 +63,6 @@ public void testAccessibilityCheckVerbose() throws IOException { */ @Test(groups = TestCategories.ACCESSIBILITY) public void testAccessibilityCheckRespectsMessageLevel() { - setup(); String filePath = ((FileLogger)getLogger()).getFilePath(); FileLogger fileLogger = new FileLogger(filePath, "LevTest.txt", MessageType.WARNING); @@ -88,7 +91,6 @@ public void testAccessibilityCheckRespectsMessageLevel() { */ @Test(groups = TestCategories.ACCESSIBILITY) public void testAccessibilityInapplicableCheckRespectsMessageLevel() { - setup(); String filePath = ((FileLogger)getLogger()).getFilePath(); FileLogger fileLogger = new FileLogger(filePath, getTestContext().getName() + ".txt", MessageType.INFORMATION); @@ -113,7 +115,6 @@ public void testAccessibilityInapplicableCheckRespectsMessageLevel() { */ @Test(groups = TestCategories.ACCESSIBILITY) public void testAccessibilityIncompleteCheckRespectsMessageLevel() { - setup(); String filePath = ((FileLogger)getLogger()).getFilePath(); FileLogger fileLogger = new FileLogger(filePath, getTestContext().getName() + ".txt", MessageType.INFORMATION); @@ -138,7 +139,6 @@ public void testAccessibilityIncompleteCheckRespectsMessageLevel() { */ @Test(groups = TestCategories.ACCESSIBILITY) public void testAccessibilityPassesCheckRespectsMessageLevel() { - setup(); String filePath = ((FileLogger)getLogger()).getFilePath(); FileLogger fileLogger = new FileLogger(filePath, getTestContext().getName() + ".txt", MessageType.INFORMATION); @@ -163,7 +163,6 @@ public void testAccessibilityPassesCheckRespectsMessageLevel() { */ @Test(groups = TestCategories.ACCESSIBILITY) public void testAccessibilityViolationsCheckRespectsMessageLevel() { - setup(); String filePath = ((FileLogger)getLogger()).getFilePath(); FileLogger fileLogger = new FileLogger(filePath, getTestContext().getName() + ".txt", MessageType.INFORMATION); @@ -188,7 +187,6 @@ public void testAccessibilityViolationsCheckRespectsMessageLevel() { */ @Test(groups = TestCategories.ACCESSIBILITY, expectedExceptions = RuntimeException.class) public void testAccessibilityCheckThrows() { - setup(); AccessibilityUtilities.checkAccessibility(getTestObject(), true); } @@ -197,8 +195,6 @@ public void testAccessibilityCheckThrows() { */ @Test(groups = TestCategories.ACCESSIBILITY) public void testAccessibilityCheckNoThrowOnNoResults() { - setup(); - // There should be 0 incomplete items found AccessibilityUtilities.checkAccessibilityIncomplete(getTestObject().getWebDriver(), getTestObject().getLogger(), MessageType.WARNING, true); @@ -209,13 +205,14 @@ public void testAccessibilityCheckNoThrowOnNoResults() { */ @Test(groups = TestCategories.ACCESSIBILITY) public void testAccessibilityReadableResults() { - setup(); AxeReporter.getReadableAxeResults("TEST", getWebDriver(), new AxeBuilder().analyze(getWebDriver()).getViolations()); String messages = AxeReporter.getAxeResultString(); - Assert.assertTrue(messages.contains("TEST check for"), "Expected header."); - Assert.assertTrue(messages.contains("Found 6 items"), "Expected to find 6 violations matches."); + SoftAssert softAssert = new SoftAssert(); + softAssert.assertTrue(messages.contains("TEST check for"), "Expected header."); + softAssert.assertTrue(messages.contains("Found 6 items"), "Expected to find 6 violations matches."); + softAssert.assertAll(); } private void deleteFile(String filePath) { diff --git a/maqs-accessibility/src/test/java/io/github/maqs/accessibility/HTMLReporterUnitTest.java b/maqs-accessibility/src/test/java/io/github/maqs/accessibility/HTMLReporterUnitTest.java index f680490d6..8b3d37b4c 100644 --- a/maqs-accessibility/src/test/java/io/github/maqs/accessibility/HTMLReporterUnitTest.java +++ b/maqs-accessibility/src/test/java/io/github/maqs/accessibility/HTMLReporterUnitTest.java @@ -4,13 +4,13 @@ package io.github.maqs.accessibility; -import com.deque.html.axecore.axeargs.AxeRunOptions; +import com.deque.html.axecore.args.AxeRunOptions; import com.deque.html.axecore.results.Check; import com.deque.html.axecore.results.CheckedNode; import com.deque.html.axecore.results.Results; import com.deque.html.axecore.results.Rule; import com.deque.html.axecore.selenium.AxeBuilder; -import com.deque.html.axecore.selenium.ResultType; +import com.deque.html.axecore.results.ResultType; import com.fasterxml.jackson.databind.ObjectMapper; import io.github.maqs.selenium.BaseSeleniumTest; import io.github.maqs.selenium.factories.UIWaitFactory; @@ -38,10 +38,15 @@ */ public class HTMLReporterUnitTest extends BaseSeleniumTest { + /** + * The file path to the testFiles folder. + */ + private static final String TEST_FILES = "src/test/resources/testFiles/"; + /** * The file path to the html testing page. */ - private static final String filePath = "src/test/resources/testFiles/integration-test-target.html"; + private static final String filePath = TEST_FILES + "integration-test-target.html"; /** * The file to be opened in the browser. @@ -57,7 +62,7 @@ public class HTMLReporterUnitTest extends BaseSeleniumTest { * The file to be opened in the browser. */ private static final File integrationTestTargetComplexFile = new File( - "src/test/resources/testFiles/integration-test-target-complex.html"); + TEST_FILES + "integration-test-target-complex.html"); /** * The url to be opened in the browser. @@ -67,8 +72,7 @@ public class HTMLReporterUnitTest extends BaseSeleniumTest { /** * The file to be converted into a result type. */ - private static final File integrationTestJsonResultFile = new File( - "src/test/resources/testFiles/sampleResults.json"); + private static final File integrationTestJsonResultFile = new File(TEST_FILES + "sampleResults.json"); /** * The path to the file converted into a result type. @@ -119,13 +123,12 @@ public void runScanOnPage() { } @Test(groups = TestCategories.ACCESSIBILITY) - public void runScanOnGivenElement() - throws IOException, ParseException { + public void runScanOnGivenElement() throws IOException, ParseException { loadTestPage(integrationTestTargetSimpleUrl); String path = createReportPath(); SeleniumReport.createHtmlReport(this.getWebDriver(), this.getWebDriver().findElement(By.cssSelector(mainElementSelector)), path); - validateReport(path, 3, 14, 0, 75); + validateReport(path, 3, 14, 0, 76); deleteFile(new File(path)); } @@ -135,14 +138,13 @@ public void reportFullPage() throws IOException, ParseException { loadTestPage(integrationTestTargetSimpleUrl); String path = createReportPath(); SeleniumReport.createHtmlReport(this.getWebDriver(), path); - validateReport(path, 4, 26, 0, 69); + validateReport(path, 4, 26, 0, 70); deleteFile(new File(path)); } @Test(groups = TestCategories.ACCESSIBILITY) - public void reportFullPageViolationsOnly() - throws IOException, ParseException { + public void reportFullPageViolationsOnly() throws IOException, ParseException { loadTestPage(integrationTestTargetSimpleUrl); String path = createReportPath(); SeleniumReport.createHtmlReport(this.getWebDriver(), path, EnumSet.of(ResultType.Violations)); @@ -156,15 +158,14 @@ public void reportFullPageViolationsOnly() } @Test(groups = TestCategories.ACCESSIBILITY) - public void reportFullPagePassesInapplicableViolationsOnly() - throws IOException, ParseException { + public void reportFullPagePassesInapplicableViolationsOnly() throws IOException, ParseException { loadTestPage(integrationTestTargetSimpleUrl); String path = createReportPath(); SeleniumReport.createHtmlReport(this.getWebDriver(), path, EnumSet.of(ResultType.Passes, ResultType.Inapplicable, ResultType.Violations)); // Check Passes - validateReport(path, 4, 26, 0, 69); + validateReport(path, 4, 26, 0, 70); validateResultNotWritten(path, EnumSet.of(ResultType.Incomplete)); deleteFile(new File(path)); @@ -178,7 +179,7 @@ public void reportOnElement() throws IOException, ParseException { var mainElement = this.getWebDriver().findElement(By.cssSelector(mainElementSelector)); SeleniumReport.createHtmlReport(this.getWebDriver(), mainElement, path); - validateReport(path, 3, 14, 0, 75); + validateReport(path, 3, 14, 0, 76); deleteFile(new File(path)); } @@ -190,7 +191,7 @@ public void reportRespectRules() throws IOException, ParseException { var builder = new AxeBuilder().disableRules(Collections.singletonList("color-contrast")); SeleniumReport.createHtmlReport(this.getWebDriver(), builder.analyze(this.getWebDriver()), path); - validateReport(path, 3, 21, 0, 69); + validateReport(path, 3, 21, 0, 70); deleteFile(new File(path)); } @@ -225,7 +226,7 @@ public void reportRespectsIframeImplicitTrue() throws IOException, ParseExceptio String path = createReportPath(); SeleniumReport.createHtmlReport(this.getWebDriver(), path); - validateReport(path, 4, 43, 0, 64); + validateReport(path, 4, 43, 0, 65); deleteFile(new File(path)); } @@ -241,7 +242,7 @@ public void ReportRespectsIframeTrue() throws IOException, ParseException { var builder = new AxeBuilder().withOptions(runOptions); SeleniumReport.createHtmlReport(this.getWebDriver(), builder.analyze(this.getWebDriver()), path); - validateReport(path, 4, 43, 0, 64); + validateReport(path, 4, 43, 0, 65); deleteFile(new File(path)); } @@ -256,7 +257,7 @@ public void reportRespectsIframeFalse() throws IOException, ParseException { var builder = new AxeBuilder().withOptions(runOptions); SeleniumReport.createHtmlReport(this.getWebDriver(), builder.analyze(this.getWebDriver()), path); - validateReport(path, 4, 43, 0, 64); + validateReport(path, 4, 43, 0, 65); deleteFile(new File(path)); } From 64c78f28c1d1fe1cfb85acb455b41c8176383e71 Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Wed, 14 Dec 2022 02:18:22 -0600 Subject: [PATCH 51/91] checkstyle update --- .../io/github/maqs/accessibility/AccessibilityUtilities.java | 2 +- .../main/java/io/github/maqs/accessibility/HtmlReporter.java | 2 +- .../main/java/io/github/maqs/accessibility/SeleniumReport.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/maqs-accessibility/src/main/java/io/github/maqs/accessibility/AccessibilityUtilities.java b/maqs-accessibility/src/main/java/io/github/maqs/accessibility/AccessibilityUtilities.java index 0164a28d3..57eab9a54 100644 --- a/maqs-accessibility/src/main/java/io/github/maqs/accessibility/AccessibilityUtilities.java +++ b/maqs-accessibility/src/main/java/io/github/maqs/accessibility/AccessibilityUtilities.java @@ -7,10 +7,10 @@ import com.deque.html.axecore.results.AxeRuntimeException; import com.deque.html.axecore.results.Results; +import com.deque.html.axecore.results.ResultType; import com.deque.html.axecore.results.Rule; import com.deque.html.axecore.selenium.AxeBuilder; import com.deque.html.axecore.selenium.AxeReporter; -import com.deque.html.axecore.results.ResultType; import io.github.maqs.selenium.ISeleniumTestObject; import io.github.maqs.utilities.logging.FileLogger; import io.github.maqs.utilities.logging.ILogger; diff --git a/maqs-accessibility/src/main/java/io/github/maqs/accessibility/HtmlReporter.java b/maqs-accessibility/src/main/java/io/github/maqs/accessibility/HtmlReporter.java index 9124936ee..ad1f04450 100644 --- a/maqs-accessibility/src/main/java/io/github/maqs/accessibility/HtmlReporter.java +++ b/maqs-accessibility/src/main/java/io/github/maqs/accessibility/HtmlReporter.java @@ -7,8 +7,8 @@ import com.deque.html.axecore.results.Check; import com.deque.html.axecore.results.CheckedNode; import com.deque.html.axecore.results.Results; -import com.deque.html.axecore.results.Rule; import com.deque.html.axecore.results.ResultType; +import com.deque.html.axecore.results.Rule; import java.io.File; import java.io.IOException; import java.nio.charset.StandardCharsets; diff --git a/maqs-accessibility/src/main/java/io/github/maqs/accessibility/SeleniumReport.java b/maqs-accessibility/src/main/java/io/github/maqs/accessibility/SeleniumReport.java index 1d020351b..06ec247b8 100644 --- a/maqs-accessibility/src/main/java/io/github/maqs/accessibility/SeleniumReport.java +++ b/maqs-accessibility/src/main/java/io/github/maqs/accessibility/SeleniumReport.java @@ -5,8 +5,8 @@ package io.github.maqs.accessibility; import com.deque.html.axecore.results.Results; -import com.deque.html.axecore.selenium.AxeBuilder; import com.deque.html.axecore.results.ResultType; +import com.deque.html.axecore.selenium.AxeBuilder; import java.io.IOException; import java.text.ParseException; import java.util.EnumSet; From a4617c56841f9b64b4bda6907007fcb3b064d047 Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Wed, 14 Dec 2022 02:23:03 -0600 Subject: [PATCH 52/91] checkstyle update --- .../io/github/maqs/accessibility/AccessibilityUtilities.java | 2 +- .../main/java/io/github/maqs/accessibility/HtmlReporter.java | 2 +- .../main/java/io/github/maqs/accessibility/SeleniumReport.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/maqs-accessibility/src/main/java/io/github/maqs/accessibility/AccessibilityUtilities.java b/maqs-accessibility/src/main/java/io/github/maqs/accessibility/AccessibilityUtilities.java index 57eab9a54..eeafd31d3 100644 --- a/maqs-accessibility/src/main/java/io/github/maqs/accessibility/AccessibilityUtilities.java +++ b/maqs-accessibility/src/main/java/io/github/maqs/accessibility/AccessibilityUtilities.java @@ -6,8 +6,8 @@ import com.deque.html.axecore.results.AxeRuntimeException; -import com.deque.html.axecore.results.Results; import com.deque.html.axecore.results.ResultType; +import com.deque.html.axecore.results.Results; import com.deque.html.axecore.results.Rule; import com.deque.html.axecore.selenium.AxeBuilder; import com.deque.html.axecore.selenium.AxeReporter; diff --git a/maqs-accessibility/src/main/java/io/github/maqs/accessibility/HtmlReporter.java b/maqs-accessibility/src/main/java/io/github/maqs/accessibility/HtmlReporter.java index ad1f04450..c8d828eb6 100644 --- a/maqs-accessibility/src/main/java/io/github/maqs/accessibility/HtmlReporter.java +++ b/maqs-accessibility/src/main/java/io/github/maqs/accessibility/HtmlReporter.java @@ -6,8 +6,8 @@ import com.deque.html.axecore.results.Check; import com.deque.html.axecore.results.CheckedNode; -import com.deque.html.axecore.results.Results; import com.deque.html.axecore.results.ResultType; +import com.deque.html.axecore.results.Results; import com.deque.html.axecore.results.Rule; import java.io.File; import java.io.IOException; diff --git a/maqs-accessibility/src/main/java/io/github/maqs/accessibility/SeleniumReport.java b/maqs-accessibility/src/main/java/io/github/maqs/accessibility/SeleniumReport.java index 06ec247b8..2937390af 100644 --- a/maqs-accessibility/src/main/java/io/github/maqs/accessibility/SeleniumReport.java +++ b/maqs-accessibility/src/main/java/io/github/maqs/accessibility/SeleniumReport.java @@ -4,8 +4,8 @@ package io.github.maqs.accessibility; -import com.deque.html.axecore.results.Results; import com.deque.html.axecore.results.ResultType; +import com.deque.html.axecore.results.Results; import com.deque.html.axecore.selenium.AxeBuilder; import java.io.IOException; import java.text.ParseException; From 96ffcd6531d32f09bcea7c1c8580ba868a7d5636 Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Wed, 14 Dec 2022 22:57:51 -0600 Subject: [PATCH 53/91] get more database tests working --- maqs-database/config.xml | 2 +- .../java/io/github/maqs/database/DatabaseConfigUnitTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/maqs-database/config.xml b/maqs-database/config.xml index c77985e55..c06d73e39 100644 --- a/maqs-database/config.xml +++ b/maqs-database/config.xml @@ -56,7 +56,7 @@ sa globalMAQS2 jdbc:sqlserver://localhost - ./src/test/java/com/maqs/database/entities/ + ./src/test/java/io/github/maqs/database/entities/ io.github.maqs.database.entities diff --git a/maqs-database/src/test/java/io/github/maqs/database/DatabaseConfigUnitTest.java b/maqs-database/src/test/java/io/github/maqs/database/DatabaseConfigUnitTest.java index a8d2490ef..b6c51331d 100644 --- a/maqs-database/src/test/java/io/github/maqs/database/DatabaseConfigUnitTest.java +++ b/maqs-database/src/test/java/io/github/maqs/database/DatabaseConfigUnitTest.java @@ -31,7 +31,7 @@ public void testGetConnectionString() { @Test(groups = TestCategories.DATABASE) public void testGetEntityDirectoryString() { Assert.assertEquals(DatabaseConfig.getEntityDirectoryString(), - "./src/test/java/com/maqs/database/entities/"); + "./src/test/java/io/github/maqs/database/entities/"); } @Test(groups = TestCategories.DATABASE) From b17b3ed90852a4217a2eb80ee59ae06bc6a461d0 Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Wed, 14 Dec 2022 23:13:51 -0600 Subject: [PATCH 54/91] trying to solve utilities unit test failure --- .../utilities/logger/LoggingConfigUnitTest.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/maqs-utilities/src/test/java/io/github/maqs/utilities/logger/LoggingConfigUnitTest.java b/maqs-utilities/src/test/java/io/github/maqs/utilities/logger/LoggingConfigUnitTest.java index ebf3ecf78..134276fdf 100644 --- a/maqs-utilities/src/test/java/io/github/maqs/utilities/logger/LoggingConfigUnitTest.java +++ b/maqs-utilities/src/test/java/io/github/maqs/utilities/logger/LoggingConfigUnitTest.java @@ -8,11 +8,15 @@ import io.github.maqs.utilities.helper.StringProcessor; import io.github.maqs.utilities.helper.TestCategories; import io.github.maqs.utilities.helper.exceptions.MaqsLoggingConfigException; -import io.github.maqs.utilities.logging.*; +import io.github.maqs.utilities.logging.ConsoleLogger; +import io.github.maqs.utilities.logging.FileLogger; +import io.github.maqs.utilities.logging.HtmlFileLogger; +import io.github.maqs.utilities.logging.Logger; +import io.github.maqs.utilities.logging.LoggingConfig; +import io.github.maqs.utilities.logging.LoggingEnabled; +import io.github.maqs.utilities.logging.MessageType; import java.io.File; import java.util.HashMap; - -import io.github.maqs.utilities.logging.*; import org.testng.Assert; import org.testng.annotations.Test; @@ -69,6 +73,9 @@ public void getCreateLogInvalidArgumentTest() { newValueMap.put("Log", "INVALIDVALUE"); Config.addGeneralTestSettingValues(newValueMap, true); LoggingConfig.getLoggingEnabledSetting(); + newValueMap.clear(); + newValueMap.put("Log", "OnFail"); + Config.addGeneralTestSettingValues(newValueMap, true); } /** From 7f41081649a53994afbabe34e70c9bf3a473f954 Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Wed, 14 Dec 2022 23:22:33 -0600 Subject: [PATCH 55/91] rename unit tests --- .../utilities/helper/ListProcessorUnitTest.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/maqs-utilities/src/test/java/io/github/maqs/utilities/helper/ListProcessorUnitTest.java b/maqs-utilities/src/test/java/io/github/maqs/utilities/helper/ListProcessorUnitTest.java index 241ec43d6..6cecb4b87 100644 --- a/maqs-utilities/src/test/java/io/github/maqs/utilities/helper/ListProcessorUnitTest.java +++ b/maqs-utilities/src/test/java/io/github/maqs/utilities/helper/ListProcessorUnitTest.java @@ -61,7 +61,7 @@ public void createSortedCommaDelimitedStringTest() { * Unit Test for comparing two lists of strings. */ @Test(groups = TestCategories.UTILITIES) - public void listOfStringsComparerTest() { + public void listOfStringsToCompareTest() { StringBuilder results = new StringBuilder(); ArrayList expectedList = new ArrayList<>(); expectedList.add("Maine"); @@ -90,7 +90,7 @@ public void listOfStringsComparerTest() { * Unit Test for comparing two lists of strings by order. */ @Test(groups = TestCategories.UTILITIES) - public void listOfStringsComparerByOrderTest() { + public void listOfStringsToCompareByOrderTest() { ArrayList expectedList = new ArrayList<>(); expectedList.add("Maine"); expectedList.add("Massachusetts"); @@ -116,10 +116,10 @@ public void listOfStringsComparerByOrderTest() { } /** - * Verify that listOfStringsComparer handles lists of unequal length as expected. + * Verify that listOfStringsToCompare handles lists of unequal length as expected. */ @Test(groups = TestCategories.UTILITIES) - public void listOfStringsComparerUnequalLengths() { + public void listOfStringsToCompareUnequalLengths() { ArrayList expectedList = new ArrayList<>(); expectedList.add("A"); expectedList.add("B"); @@ -134,10 +134,10 @@ public void listOfStringsComparerUnequalLengths() { } /** - * Verify that ListOfStringsComparer handles not finding an item in the expected list correctly. + * Verify that ListOfStringsToCompare handles not finding an item in the expected list correctly. */ @Test(groups = TestCategories.UTILITIES) - public void listOfStringComparerItemNotFound() { + public void listOfStringToCompareItemNotFound() { ArrayList expectedList = new ArrayList<>(); expectedList.add("A"); expectedList.add("B"); @@ -154,10 +154,10 @@ public void listOfStringComparerItemNotFound() { } /** - * Verify that listOfStringsComparer handles inequality between lists as expected. + * Verify that listOfStringsToCompare handles inequality between lists as expected. */ @Test(groups = TestCategories.UTILITIES) - public void listOfStringsComparerItemNotMatching() { + public void listOfStringsToCompareItemNotMatching() { ArrayList expectedList = new ArrayList<>(); expectedList.add("A"); expectedList.add("B"); From 1b0d25582b0896f1d03ccb6220735612053da6e0 Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Wed, 21 Dec 2022 21:13:15 -0600 Subject: [PATCH 56/91] update testing web page url --- maqs-accessibility/config.xml | 2 +- .../io/github/maqs/accessibility/AccessibilityUnitTest.java | 4 ++-- maqs-playwright/config.xml | 2 +- maqs-playwright/pom.xml | 2 +- .../java/io/github/maqs/playwright/PageDriverUnitTest.java | 4 ++-- maqs-selenium/config.xml | 2 +- .../java/io/github/maqs/selenium/SeleniumConfigUnitTest.java | 2 +- pom.xml | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/maqs-accessibility/config.xml b/maqs-accessibility/config.xml index f9fdfae92..21ba4a5c0 100644 --- a/maqs-accessibility/config.xml +++ b/maqs-accessibility/config.xml @@ -44,7 +44,7 @@ Chrome http://ondemand.saucelabs.com:80/wd/hub - https://MAQS-Framework.github.io/maqs-dotnet-templates/Static/Automation/ + https://maqs-framework.github.io/TestingSite/Automation/ 1000 20000 Chrome diff --git a/maqs-accessibility/src/test/java/io/github/maqs/accessibility/AccessibilityUnitTest.java b/maqs-accessibility/src/test/java/io/github/maqs/accessibility/AccessibilityUnitTest.java index 091054989..5ef2f56db 100644 --- a/maqs-accessibility/src/test/java/io/github/maqs/accessibility/AccessibilityUnitTest.java +++ b/maqs-accessibility/src/test/java/io/github/maqs/accessibility/AccessibilityUnitTest.java @@ -50,8 +50,8 @@ public void testAccessibilityCheckVerbose() throws IOException { String logContent = String.valueOf(Files.readAllLines(Paths.get(filePath))); SoftAssert softAssert = new SoftAssert(); - softAssert.assertTrue(logContent.contains("Found 13 items"), "Expected to find 15 pass matches."); - softAssert.assertTrue(logContent.contains("Found 71 items"), "Expected to find 66 inapplicable matches."); + softAssert.assertTrue(logContent.contains("Found 15 items"), "Expected to find 15 pass matches."); + softAssert.assertTrue(logContent.contains("Found 67 items"), "Expected to find 67 inapplicable matches."); softAssert.assertTrue(logContent.contains("Found 6 items"), "Expected to find 6 violations matches."); softAssert.assertTrue(logContent.contains("Found 0 items"), "Expected to find 0 incomplete matches."); softAssert.assertAll(); diff --git a/maqs-playwright/config.xml b/maqs-playwright/config.xml index a94b8a194..68aa456dc 100644 --- a/maqs-playwright/config.xml +++ b/maqs-playwright/config.xml @@ -33,7 +33,7 @@ - https://MAQS-Framework.github.io/maqs-dotnet-templates/Static/Automation/ + https://maqs-framework.github.io/TestingSite/Automation/ Chrome http://ondemand.saucelabs.com:80/wd/hub - https://MAQS-Framework.github.io/maqs-dotnet-templates/Static/Automation/ + https://maqs-framework.github.io/TestingSite/Automation/ 1000 20000 Chrome diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumConfigUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumConfigUnitTest.java index f8b2cdadc..d9205283b 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumConfigUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumConfigUnitTest.java @@ -56,7 +56,7 @@ public void getBrowserName() { public void getWebsiteBase() { String website = SeleniumConfig.getWebSiteBase(); Assert.assertTrue(website.equalsIgnoreCase( - "https://MAQS-Framework.github.io/maqs-dotnet-templates/Static/Automation/")); + "https://maqs-framework.github.io/TestingSite/Automation/")); } /** diff --git a/pom.xml b/pom.xml index aa525949b..75f16451f 100644 --- a/pom.xml +++ b/pom.xml @@ -275,7 +275,7 @@ 0.8.7 7.5 - 4.1.1 + 4.7.1 3.141.59 From 5904e2b053b79d7c321cd6f5c542290a62aa7ee2 Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Sat, 31 Dec 2022 00:29:03 -0600 Subject: [PATCH 57/91] update js stuff --- .../src/main/resources/htmlReporterElements.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/maqs-accessibility/src/main/resources/htmlReporterElements.js b/maqs-accessibility/src/main/resources/htmlReporterElements.js index 8a5066b03..89dbe49f5 100644 --- a/maqs-accessibility/src/main/resources/htmlReporterElements.js +++ b/maqs-accessibility/src/main/resources/htmlReporterElements.js @@ -1,13 +1,13 @@ -var buttons = document.getElementsByClassName("sectionbutton"); -var i; +let buttons = document.getElementsByClassName("sectionbutton"); +let i; for (i = 0; i < buttons.length; i++) { buttons[i].addEventListener("click", function () { - var expandoText = this.getElementsByClassName("buttonExpandoText")[0]; + let expandoText = this.getElementsByClassName("buttonExpandoText")[0]; this.classList.toggle("active"); - var content = this.nextElementSibling; + let content = this.nextElementSibling; if (expandoText.innerHTML === "-") { content.style.maxHeight = 0; expandoText.innerHTML = "+"; @@ -18,10 +18,10 @@ for (i = 0; i < buttons.length; i++) { }); } -var thumbnail = document.getElementById("screenshotThumbnail"); -var thumbnailStyle = getComputedStyle(thumbnail); -var modal = document.getElementById("modal"); -var modalimg = modal.getElementsByTagName("img")[0]; +let thumbnail = document.getElementById("screenshotThumbnail"); +let thumbnailStyle = getComputedStyle(thumbnail); +let modal = document.getElementById("modal"); +let modalimg = modal.getElementsByTagName("img")[0]; modal.addEventListener("click", function () { modal.style.display = "none"; From 989541711d62ddd93c7ebe305e0a08a19a616151 Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Sat, 31 Dec 2022 02:03:01 -0600 Subject: [PATCH 58/91] updated selenium unit tests to used @BeforeMethod set up --- .../github/maqs/selenium/ElementHandler.java | 3 - .../maqs/selenium/ActionBuilderUnitTest.java | 21 +- .../BaseSeleniumPageModelUnitTest.java | 25 +- .../selenium/BaseSeleniumTestUnitTest.java | 1 - .../maqs/selenium/ElementHandlerUnitTest.java | 31 +- .../maqs/selenium/EventHandlerUnitTest.java | 81 +- .../maqs/selenium/LazyWebElementUnitTest.java | 4 +- .../SeleniumDriverManagerUnitTest.java | 28 +- .../selenium/SeleniumTestObjectUnitTest.java | 2 - .../selenium/SeleniumUtilitiesUnitTest.java | 709 +++++++++--------- .../github/maqs/selenium/UIFindUnitTest.java | 28 +- .../maqs/selenium/UIWaitFactoryUnitTest.java | 1 - .../maqs/selenium/UIWaitForUnitTest.java | 79 +- .../maqs/selenium/UIWaitUntilUnitTest.java | 43 +- 14 files changed, 500 insertions(+), 556 deletions(-) diff --git a/maqs-selenium/src/main/java/io/github/maqs/selenium/ElementHandler.java b/maqs-selenium/src/main/java/io/github/maqs/selenium/ElementHandler.java index 541447871..ce19977a0 100644 --- a/maqs-selenium/src/main/java/io/github/maqs/selenium/ElementHandler.java +++ b/maqs-selenium/src/main/java/io/github/maqs/selenium/ElementHandler.java @@ -39,7 +39,6 @@ private ElementHandler() { * @return Text of the selected option in dropdown */ public static String getSelectedOptionFromDropdown(WebDriver webDriver, By by) { - Select select = new Select(UIWaitFactory.getWaitDriver(webDriver).waitForClickableElement(by)); return select.getFirstSelectedOption().getText(); } @@ -52,7 +51,6 @@ public static String getSelectedOptionFromDropdown(WebDriver webDriver, By by) { * @return String array list of selected items in dropdown */ public static List getSelectedOptionsFromDropdown(WebDriver webDriver, By by) { - ArrayList elements; ArrayList selectedItems = new ArrayList<>(); Select select = new Select(UIWaitFactory.getWaitDriver(webDriver).waitForClickableElement(by)); @@ -92,7 +90,6 @@ public static String getElementAttribute(WebDriver webDriver, By by) { * @return The text in the text box */ public static String getElementAttribute(WebDriver webDriver, By by, String attribute) { - return UIWaitFactory.getWaitDriver(webDriver).waitForVisibleElement(by).getAttribute(attribute); } diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/ActionBuilderUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/ActionBuilderUnitTest.java index a237d70d6..5c1b17ee0 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/ActionBuilderUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/ActionBuilderUnitTest.java @@ -9,6 +9,7 @@ import io.github.maqs.utilities.helper.TestCategories; import org.openqa.selenium.Keys; import org.testng.Assert; +import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; /** @@ -16,12 +17,18 @@ */ public class ActionBuilderUnitTest extends BaseSeleniumTest { + /** + * The automation page model to use for the unit tests. + */ + private AutomationPageModel automationPageModel; + /** * Navigates to the specified url test page. - * @param url the url to be navigated to */ - private void navigateToUrl(String url) { - this.getWebDriver().navigate().to(url); + @BeforeMethod + private void setUp() { + automationPageModel = new AutomationPageModel(this.getTestObject()); + this.getWebDriver().navigate().to(automationPageModel.testSiteAutomationUrl); UIWaitFactory.getWaitDriver(this.getWebDriver()).waitForPageLoad(); } @@ -30,8 +37,6 @@ private void navigateToUrl(String url) { */ @Test(groups = TestCategories.SELENIUM) public void hoverOverTest() { - AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); - this.navigateToUrl(automationPageModel.testSiteAutomationUrl); ActionBuilder.hoverOver(this.getWebDriver(), automationPageModel.automationDropDown); UIWaitFactory.getWaitDriver( this.getWebDriver()).waitForClickableElement(automationPageModel.iFrameDropDownButton).click(); @@ -44,8 +49,6 @@ public void hoverOverTest() { */ @Test(groups = TestCategories.SELENIUM) public void pressModifierKeyTest() { - AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); - this.navigateToUrl(automationPageModel.testSiteAutomationUrl); UIWaitFactory.getWaitDriver( this.getWebDriver()).waitForClickableElement(automationPageModel.listBoxOption1).click(); ActionBuilder.pressModifierKey(this.getWebDriver(), Keys.CONTROL); @@ -63,8 +66,6 @@ public void pressModifierKeyTest() { */ @Test(groups = TestCategories.SELENIUM) public void moveSliderTest() { - AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); - this.navigateToUrl(automationPageModel.testSiteAutomationUrl); ActionBuilder.slideElement(this.getWebDriver(), automationPageModel.slider, 50); Assert.assertEquals(this.getWebDriver().findElement( automationPageModel.sliderLabelNumber).getAttribute("value"), "4"); @@ -75,8 +76,6 @@ public void moveSliderTest() { */ @Test(groups = TestCategories.SELENIUM) public void rightClickToTriggerContextMenu() { - AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); - this.navigateToUrl(automationPageModel.testSiteAutomationUrl); ActionBuilder.rightClick(this.getWebDriver(), automationPageModel.rightClickableElementWithContextMenu); Assert.assertTrue(this.getWebDriver().findElement(automationPageModel.rightClickContextSaveText).isDisplayed()); } diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/BaseSeleniumPageModelUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/BaseSeleniumPageModelUnitTest.java index 72daf8541..4b663282d 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/BaseSeleniumPageModelUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/BaseSeleniumPageModelUnitTest.java @@ -9,6 +9,7 @@ import io.github.maqs.utilities.helper.exceptions.TimeoutException; import org.openqa.selenium.WebDriver; import org.testng.Assert; +import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; /** @@ -16,12 +17,24 @@ */ public class BaseSeleniumPageModelUnitTest extends BaseSeleniumTest { + /** + * The automation page model to be used for the unit tests. + */ + private AutomationPageModel automationPageModel; + + /** + * Setting up the automation page model for the unit tests. + */ + @BeforeMethod + private void setUp() { + automationPageModel = new AutomationPageModel(this.getTestObject()); + } + /** * Test getting the logger. */ @Test(groups = TestCategories.SELENIUM) public void testGetLogger() { - AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); Assert.assertNotNull(automationPageModel.getLogger()); } @@ -30,7 +43,6 @@ public void testGetLogger() { */ @Test(groups = TestCategories.SELENIUM) public void testGetTestObject() { - AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); Assert.assertNotNull(automationPageModel.getTestObject()); } @@ -39,7 +51,6 @@ public void testGetTestObject() { */ @Test(groups = TestCategories.SELENIUM) public void testGetWebDriver() { - AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); Assert.assertNotNull(automationPageModel.getWebDriver()); } @@ -48,7 +59,6 @@ public void testGetWebDriver() { */ @Test(groups = TestCategories.SELENIUM) public void testGetPerfTimerCollection() { - AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); Assert.assertNotNull(automationPageModel.getPerfTimerCollection()); } @@ -57,7 +67,6 @@ public void testGetPerfTimerCollection() { */ @Test(groups = TestCategories.SELENIUM) public void testSetWebDriver() { - AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); int hashCode = automationPageModel.getWebDriver().hashCode(); WebDriver drive = this.getBrowser(); @@ -72,7 +81,6 @@ public void testSetWebDriver() { */ @Test(groups = TestCategories.SELENIUM) public void testIsPageLoaded() { - AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); automationPageModel.open(); Assert.assertTrue(automationPageModel.isPageLoaded()); } @@ -82,7 +90,6 @@ public void testIsPageLoaded() { */ @Test(groups = TestCategories.SELENIUM) public void testGetSameElementTwiceReturnsTheSameElement() { - AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); automationPageModel.open(); automationPageModel.waitForPageLoad(); @@ -98,7 +105,6 @@ public void testGetSameElementTwiceReturnsTheSameElement() { */ @Test(groups = TestCategories.SELENIUM) public void testGetLazyElementWithBy() throws TimeoutException, InterruptedException { - AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); automationPageModel.open(); automationPageModel.waitForPageLoad(); LazyWebElement lazyElement = automationPageModel.getLazyElement(automationPageModel.automationPageHeader); @@ -118,7 +124,6 @@ public void testGetLazyElementWithBy() throws TimeoutException, InterruptedExcep */ @Test(groups = TestCategories.SELENIUM) public void testGetLazyElementWithByAndName() throws TimeoutException, InterruptedException { - AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); automationPageModel.open(); automationPageModel.waitForPageLoad(); LazyWebElement lazyElement = automationPageModel.getLazyElement( @@ -140,7 +145,6 @@ public void testGetLazyElementWithByAndName() throws TimeoutException, Interrupt */ @Test(groups = TestCategories.SELENIUM) public void testGetLazyElementWithParentElementAndBy() throws TimeoutException, InterruptedException { - AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); automationPageModel.open(); automationPageModel.waitForPageLoad(); LazyWebElement lazyElement = automationPageModel.getLazyElement( @@ -161,7 +165,6 @@ public void testGetLazyElementWithParentElementAndBy() throws TimeoutException, */ @Test(groups = TestCategories.SELENIUM) public void testGetLazyElementWithParentElementByAndName() throws TimeoutException, InterruptedException { - AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); automationPageModel.open(); automationPageModel.waitForPageLoad(); LazyWebElement lazyElement = automationPageModel.getLazyElement( diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/BaseSeleniumTestUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/BaseSeleniumTestUnitTest.java index 193099e1b..c50744c4c 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/BaseSeleniumTestUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/BaseSeleniumTestUnitTest.java @@ -40,7 +40,6 @@ public void testGetSeleniumTestObject() { @Test(groups = TestCategories.SELENIUM) public void testGetBrowser() { - WebDriver driver = null; try { diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/ElementHandlerUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/ElementHandlerUnitTest.java index 9ae2befac..9ebf01cde 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/ElementHandlerUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/ElementHandlerUnitTest.java @@ -20,6 +20,7 @@ import org.openqa.selenium.NoSuchElementException; import org.openqa.selenium.WebElement; import org.testng.Assert; +import org.testng.annotations.BeforeMethod; import org.testng.annotations.Ignore; import org.testng.annotations.Test; @@ -28,14 +29,16 @@ */ public class ElementHandlerUnitTest extends BaseSeleniumTest { + private AutomationPageModel automationPageModel; + /** * Navigate to test page url and wait for page to load. */ - private AutomationPageModel navigateToUrl() { - AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); + @BeforeMethod + private void setUp() { + automationPageModel = new AutomationPageModel(this.getTestObject()); getWebDriver().navigate().to(automationPageModel.testSiteAutomationUrl); UIWaitFactory.getWaitDriver(getWebDriver()).waitForPageLoad(); - return automationPageModel; } /** @@ -44,7 +47,6 @@ private AutomationPageModel navigateToUrl() { @Test(groups = TestCategories.SELENIUM) public void createSortedCommaDelimitedStringFromWebElementsTest() { String expectedText = "Hard Drive, Keyboard, Monitor, Motherboard, Mouse, Power Supply"; - AutomationPageModel automationPageModel = navigateToUrl(); verifyText(ElementHandler.createCommaDelimitedString( getWebDriver(), automationPageModel.computerPartsListOptions, true), expectedText); } @@ -55,7 +57,6 @@ public void createSortedCommaDelimitedStringFromWebElementsTest() { @Test(groups = TestCategories.SELENIUM) public void createCommaDelimitedStringFromWebElementsTest() { String expectedText = "Motherboard, Power Supply, Hard Drive, Monitor, Mouse, Keyboard"; - AutomationPageModel automationPageModel = navigateToUrl(); verifyText(ElementHandler.createCommaDelimitedString( getWebDriver(), automationPageModel.computerPartsListOptions), expectedText); } @@ -66,7 +67,6 @@ public void createCommaDelimitedStringFromWebElementsTest() { @Test(groups = TestCategories.SELENIUM) public void setTextBoxAndVerifyValueTest() { String expectedValue = "Tester"; - AutomationPageModel automationPageModel = navigateToUrl(); ElementHandler.setTextBox(getWebDriver(), automationPageModel.firstNameTextBox, expectedValue); String actualValue = ElementHandler.getElementAttribute(getWebDriver(), automationPageModel.firstNameTextBox); verifyText(actualValue, expectedValue); @@ -78,7 +78,6 @@ public void setTextBoxAndVerifyValueTest() { @Test(groups = TestCategories.SELENIUM, expectedExceptions = ElementHandlerException.class) public void setTextBoxException() { String expectedValue = ""; - AutomationPageModel automationPageModel = navigateToUrl(); ElementHandler.setTextBox(getWebDriver(), automationPageModel.firstNameTextBox, expectedValue); } @@ -87,7 +86,6 @@ public void setTextBoxException() { */ @Test(groups = TestCategories.SELENIUM) public void checkRadioButtonTest() { - AutomationPageModel automationPageModel = navigateToUrl(); ElementHandler.clickButton(getWebDriver(), automationPageModel.femaleRadioButton, false); Assert.assertTrue(UIWaitFactory.getWaitDriver(getWebDriver()).waitForClickableElement( automationPageModel.femaleRadioButton).isSelected(), "Radio button was not selected"); @@ -98,7 +96,6 @@ public void checkRadioButtonTest() { */ @Test(groups = TestCategories.SELENIUM) public void checkCheckBoxTest() { - AutomationPageModel automationPageModel = navigateToUrl(); ElementHandler.checkCheckBox(getWebDriver(), automationPageModel.checkbox, true); Assert.assertTrue(UIWaitFactory.getWaitDriver(getWebDriver()).waitForClickableElement( automationPageModel.checkbox).isSelected(), "Checkbox was not enabled"); @@ -109,7 +106,6 @@ public void checkCheckBoxTest() { */ @Test(groups = TestCategories.SELENIUM) public void getElementAttributeTest() { - AutomationPageModel automationPageModel = navigateToUrl(); String actualText = ElementHandler.getElementAttribute( this.getWebDriver(), automationPageModel.firstNameTextBox, "type"); verifyText(actualText, "text"); @@ -122,7 +118,6 @@ public void getElementAttributeTest() { @Test(groups = TestCategories.SELENIUM) public void selectItemFromDropDownTest() { String expectedSelection = "Emily"; - AutomationPageModel automationPageModel = navigateToUrl(); ElementHandler.selectDropDownOption(getWebDriver(), automationPageModel.nameDropdown, expectedSelection); String actualSelection = ElementHandler.getSelectedOptionFromDropdown(getWebDriver(), automationPageModel.nameDropdown); @@ -136,7 +131,6 @@ public void selectItemFromDropDownTest() { @Test(groups = TestCategories.SELENIUM) public void selectItemFromDropDownByValueTest() { String expectedSelection = "Jack"; - AutomationPageModel automationPageModel = navigateToUrl(); ElementHandler.selectDropDownOptionByValue(getWebDriver(), automationPageModel.nameDropdown, "two"); String actualSelection = ElementHandler.getSelectedOptionFromDropdown(getWebDriver(), automationPageModel.nameDropdown); @@ -155,7 +149,6 @@ public void selectMultipleItemsFromListBoxTest() { itemsToSelect.add("Hard Drive"); itemsToSelect.add("Keyboard"); - AutomationPageModel automationPageModel = navigateToUrl(); ElementHandler.selectMultipleElementsFromListBox( getWebDriver(), automationPageModel.computerPartsList, itemsToSelect); ArrayList selectedItems = (ArrayList) ElementHandler.getSelectedOptionsFromDropdown( @@ -178,7 +171,6 @@ public void selectMultipleItemsFromListBoxTestByValue() { itemsToSelect.add("four"); itemsToSelect.add("five"); - AutomationPageModel automationPageModel = navigateToUrl(); ElementHandler.selectMultipleElementsFromListBoxByValue( getWebDriver(), automationPageModel.computerPartsList, itemsToSelect); ArrayList selectedItems = (ArrayList) ElementHandler.getSelectedOptionsFromDropdown( @@ -195,7 +187,6 @@ public void selectMultipleItemsFromListBoxTestByValue() { */ @Test(groups = TestCategories.SELENIUM) public void clickElementByJavascriptFromHoverDropdown() { - AutomationPageModel automationPageModel = navigateToUrl(); ElementHandler.clickElementByJavaScript(getWebDriver(), automationPageModel.iFrameDropDownButton); UIWaitFactory.getWaitDriver(getWebDriver()).waitForPageLoad(); UIWaitFactory.getWaitDriver(getWebDriver()).waitForExactText(automationPageModel.iFramePageTitle, "Index"); @@ -206,7 +197,6 @@ public void clickElementByJavascriptFromHoverDropdown() { */ @Test(groups = TestCategories.SELENIUM) public void scrollIntoView() { - AutomationPageModel automationPageModel = navigateToUrl(); ElementHandler.scrollIntoView(getWebDriver(), automationPageModel.checkbox); } @@ -215,7 +205,6 @@ public void scrollIntoView() { */ @Test(groups = TestCategories.SELENIUM) public void scrollIntoViewWithCoordinates() { - AutomationPageModel automationPageModel = navigateToUrl(); ElementHandler.scrollIntoView(getWebDriver(), automationPageModel.checkbox, 50, 0); } @@ -224,7 +213,6 @@ public void scrollIntoViewWithCoordinates() { */ @Test(groups = TestCategories.SELENIUM) public void scrollIntoViewElement() { - AutomationPageModel automationPageModel = navigateToUrl(); WebElement element = this.getWebDriver().findElement(By.cssSelector("body")); ElementHandler.scrollIntoView(element, automationPageModel.checkbox); } @@ -234,7 +222,6 @@ public void scrollIntoViewElement() { */ @Test(groups = TestCategories.SELENIUM) public void scrollIntoViewElementWithCoordinates() { - AutomationPageModel automationPageModel = navigateToUrl(); WebElement element = this.getWebDriver().findElement(By.cssSelector("body")); ElementHandler.scrollIntoView(element, automationPageModel.checkbox, 50, 0); } @@ -244,7 +231,6 @@ public void scrollIntoViewElementWithCoordinates() { */ @Test(groups = TestCategories.SELENIUM) public void executingScrolling() { - navigateToUrl(); ElementHandler.executeScrolling(getWebDriver(), 50, 0); } @@ -253,7 +239,6 @@ public void executingScrolling() { */ @Test(expectedExceptions = NoSuchElementException.class, groups = TestCategories.SELENIUM) public void clickElementByJavascriptFromHoverDropdownNotFound() { - navigateToUrl(); ElementHandler.clickElementByJavaScript(getWebDriver(), By.cssSelector(".NotPresent")); } @@ -262,7 +247,6 @@ public void clickElementByJavascriptFromHoverDropdownNotFound() { */ @Test(groups = TestCategories.SELENIUM) public void slowTypeTest() { - AutomationPageModel automationPageModel = navigateToUrl(); ElementHandler.slowType(getWebDriver(), automationPageModel.firstNameTextBox, "Test input slow type"); Assert.assertEquals( UIWaitFactory.getWaitDriver(getWebDriver()).waitForClickableElement(automationPageModel.firstNameTextBox) @@ -274,7 +258,6 @@ public void slowTypeTest() { */ @Test(groups = TestCategories.SELENIUM) public void sendSecretTextSuspendLoggingTest() throws IOException { - AutomationPageModel automationPageModel = this.navigateToUrl(); this.getWebDriver().findElement(automationPageModel.firstNameTextBox).sendKeys("somethingTest"); this.getWebDriver().findElement(automationPageModel.firstNameTextBox).clear(); ElementHandler.sendSecretKeys(getWebDriver(), automationPageModel.firstNameTextBox, "secretKeys", this.getLogger()); @@ -294,7 +277,6 @@ public void sendSecretTextSuspendLoggingTest() throws IOException { @Ignore @Test(groups = TestCategories.SELENIUM) public void sendSecretTextContinueLoggingTest() throws IOException { - AutomationPageModel automationPageModel = this.navigateToUrl(); ElementHandler.sendSecretKeys(getWebDriver(), automationPageModel.firstNameTextBox, "secretKeys", this.getLogger()); this.getWebDriver().findElement(automationPageModel.firstNameTextBox).clear(); this.getWebDriver().findElement(automationPageModel.firstNameTextBox).sendKeys("somethingTest"); @@ -313,7 +295,6 @@ public void sendSecretTextContinueLoggingTest() throws IOException { */ @Test(groups = TestCategories.SELENIUM, expectedExceptions = ElementHandlerException.class) public void sendSecretTextCatchException() { - AutomationPageModel automationPageModel = this.navigateToUrl(); this.getWebDriver().findElement(automationPageModel.firstNameTextBox).sendKeys("somethingTest"); this.getWebDriver().findElement(automationPageModel.firstNameTextBox).clear(); ElementHandler.sendSecretKeys(getWebDriver(), automationPageModel.flowerTableTitle, "secretKeys", this.getLogger()); diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/EventHandlerUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/EventHandlerUnitTest.java index 550a2f330..0ddddcf03 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/EventHandlerUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/EventHandlerUnitTest.java @@ -16,6 +16,7 @@ import org.openqa.selenium.JavascriptExecutor; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WrapsDriver; +import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; import org.testng.asserts.SoftAssert; @@ -29,15 +30,28 @@ public class EventHandlerUnitTest extends BaseSeleniumTest { */ private AutomationPageModel automationPageModel; + /** + * The web driver to be used in the unit tests. + */ + private WebDriver webDriverWithHandler; + + /** + * Navigate to test page url and wait for page to load. + */ + @BeforeMethod + private void setUp() { + // Navigate to the Automation site and set up the event handler + automationPageModel = new AutomationPageModel(this.getTestObject()); + getWebDriver().navigate().to(automationPageModel.testSiteAutomationUrl); + UIWaitFactory.getWaitDriver(getWebDriver()).waitForPageLoad(); + webDriverWithHandler = getWebDriver(); + } + /** * Test that checks if the correct messages are logged when clicking an element. */ @Test(groups = TestCategories.SELENIUM) public void eventHandlerClickElement() { - // Navigate to the Automation site and set up the event handler - this.navigateToAutomationSiteUrl(); - WebDriver webDriverWithHandler = getWebDriver(); - // Use the Event Firing Web Driver to click an element, then get the log text webDriverWithHandler.findElement(automationPageModel.checkbox).click(); String logText = this.readTextFile(((FileLogger) this.getLogger()).getFilePath()); @@ -56,10 +70,6 @@ public void eventHandlerClickElement() { */ @Test(groups = TestCategories.SELENIUM) public void eventHandlerChangeValueOf() { - // Navigate to the Automation site and set up the event handler - this.navigateToAutomationSiteUrl(); - WebDriver webDriverWithHandler = getWebDriver(); - // Use the Event Firing Web Driver to change the value of an element, then get the log text webDriverWithHandler.findElement(automationPageModel.firstNameTextBox).clear(); webDriverWithHandler.findElement(automationPageModel.firstNameTextBox).sendKeys("Change Value"); @@ -83,10 +93,6 @@ public void eventHandlerChangeValueOf() { */ @Test(groups = TestCategories.SELENIUM) public void eventHandlerFindBy() { - // Navigate to the Automation site and set up the event handler - this.navigateToAutomationSiteUrl(); - WebDriver webDriverWithHandler = getWebDriver(); - // Use the Event Firing Web Driver to find an element, then get the log text webDriverWithHandler.findElement(automationPageModel.computerPartsList); String logText = this.readTextFile(((FileLogger) this.getLogger()).getFilePath()); @@ -106,10 +112,6 @@ public void eventHandlerFindBy() { */ @Test(groups = TestCategories.SELENIUM) public void eventHandlerNavigateBack() { - // Navigate to the Automation site and set up the event handler - this.navigateToAutomationSiteUrl(); - WebDriver webDriverWithHandler = getWebDriver(); - // Use the Event Firing Web Driver to navigate back to a page, then get the log text webDriverWithHandler.findElement(automationPageModel.homeButton).click(); webDriverWithHandler.navigate().back(); @@ -130,10 +132,6 @@ public void eventHandlerNavigateBack() { */ @Test(groups = TestCategories.SELENIUM) public void eventHandlerNavigateForward() { - // Navigate to the Automation site and set up the event handler - this.navigateToAutomationSiteUrl(); - WebDriver webDriverWithHandler = getWebDriver(); - // Use the Event Firing Web Driver to navigate forward to a page, then get the log text webDriverWithHandler.findElement(automationPageModel.homeButton).click(); webDriverWithHandler.navigate().back(); @@ -154,10 +152,6 @@ public void eventHandlerNavigateForward() { */ @Test(groups = TestCategories.SELENIUM) public void eventHandlerRefresh() { - // Navigate to the Automation site and set up the event handler - this.navigateToAutomationSiteUrl(); - WebDriver webDriverWithHandler = getWebDriver(); - // Use the Event Firing Web Driver to refresh the page, then get the log text webDriverWithHandler.navigate().refresh(); String logText = this.readTextFile(((FileLogger) this.getLogger()).getFilePath()); @@ -176,10 +170,6 @@ public void eventHandlerRefresh() { */ @Test(groups = TestCategories.SELENIUM) public void eventHandlerNavigateTo() { - // Navigate to the Automation site and set up the event handler - this.navigateToAutomationSiteUrl(); - WebDriver webDriverWithHandler = getWebDriver(); - // Use the Event Firing Web Driver to navigate to a page, then get the log text webDriverWithHandler.navigate().to(automationPageModel.testSiteAutomationUrl); String logText = this.readTextFile(((FileLogger) this.getLogger()).getFilePath()); @@ -198,10 +188,6 @@ public void eventHandlerNavigateTo() { */ @Test(groups = TestCategories.SELENIUM) public void eventHandlerScript() { - // Navigate to the Automation site and set up the event handler - this.navigateToAutomationSiteUrl(); - WebDriver webDriverWithHandler = getWebDriver(); - // Use the Event Firing Web Driver to execute a script, then get the log text JavascriptExecutor javascriptExecutor = (JavascriptExecutor) webDriverWithHandler; javascriptExecutor.executeScript("document.querySelector(\"#homeButton > a\");"); @@ -220,10 +206,6 @@ public void eventHandlerScript() { */ @Test(groups = TestCategories.SELENIUM) public void eventHandlerSwitchWindow() { - // Navigate to the Automation site and set up the event handler - this.navigateToAutomationSiteUrl(); - WebDriver webDriverWithHandler = this.getWebDriver(); - // Use the Event Firing Web Driver to open a new tab, then get the log text ((JavascriptExecutor) webDriverWithHandler).executeScript("window.open()"); @@ -249,10 +231,6 @@ public void eventHandlerSwitchWindow() { */ @Test(groups = TestCategories.SELENIUM, expectedExceptions = MAQSRuntimeException.class) public void eventHandlerSwitchInvalidWindow() { - // Navigate to the Automation site and set up the event handler - this.navigateToAutomationSiteUrl(); - WebDriver webDriverWithHandler = this.getWebDriver(); - // Use the Event Firing Web Driver to open a new tab, then get the log text ((JavascriptExecutor) webDriverWithHandler).executeScript("window.open()"); @@ -265,8 +243,8 @@ public void eventHandlerSwitchInvalidWindow() { @Test(groups = TestCategories.SELENIUM) public void eventHandlerAcceptAlert() { // Navigate to the Automation site and set up the event handler - this.navigateToAutomationSiteUrl(); - WebDriver webDriverWithHandler = getWebDriver(); + // this.navigateToAutomationSiteUrl(); + // WebDriver webDriverWithHandler = getWebDriver(); // Use the Event Firing Web Driver to accept an alert, then get the log text UIWait waitDriver = UIWaitFactory.getWaitDriver(((WrapsDriver) this.getWebDriver()).getWrappedDriver()); @@ -290,8 +268,8 @@ public void eventHandlerAcceptAlert() { @Test(groups = TestCategories.SELENIUM) public void eventHandlerAcceptDismiss() { // Navigate to the Automation site and set up the event handler - this.navigateToAutomationSiteUrl(); - WebDriver webDriverWithHandler = getWebDriver(); + // this.navigateToAutomationSiteUrl(); + // WebDriver webDriverWithHandler = getWebDriver(); // Use the Event Firing Web Driver to dismiss an alert, then get the log text UIWait waitDriver = UIWaitFactory.getWaitDriver(((WrapsDriver)this.getWebDriver()).getWrappedDriver()); @@ -316,8 +294,8 @@ public void eventHandlerAcceptDismiss() { @Test(groups = TestCategories.SELENIUM) public void eventHandlerGetText() { // Navigate to the Automation site and set up the event handler - this.navigateToAutomationSiteUrl(); - WebDriver webDriverWithHandler = getWebDriver(); + // this.navigateToAutomationSiteUrl(); + // WebDriver webDriverWithHandler = getWebDriver(); // Use the Event Firing Web Driver to get the text from an element, then get the log text webDriverWithHandler.findElement(automationPageModel.errorLinkBy).getText(); @@ -338,7 +316,7 @@ public void eventHandlerGetText() { @Test(groups = TestCategories.SELENIUM) public void eventHandlerScreenshot() { // Navigate to the Automation site and set up the event handler - this.navigateToAutomationSiteUrl(); + // this.navigateToAutomationSiteUrl(); SeleniumUtilities.captureScreenshot(this.getWebDriver(), this.getTestObject()); // Use the Event Firing Web Driver to take a screenshot, then get the log text @@ -352,15 +330,6 @@ public void eventHandlerScreenshot() { softAssert.assertAll(); } - /** - * Navigate to test page url and wait for page to load. - */ - private void navigateToAutomationSiteUrl() { - automationPageModel = new AutomationPageModel(this.getTestObject()); - getWebDriver().navigate().to(automationPageModel.testSiteAutomationUrl); - UIWaitFactory.getWaitDriver(getWebDriver()).waitForPageLoad(); - } - /** * Read a file and return it as a string. * diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/LazyWebElementUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/LazyWebElementUnitTest.java index 0175978d9..d852720d5 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/LazyWebElementUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/LazyWebElementUnitTest.java @@ -189,10 +189,10 @@ private LazyWebElement getDisabledInput() { } /** - * Setup before a test + * Navigate to test page and set up for test. */ @BeforeMethod - public void navigateToTestPage() { + public void setUp() { this.getWebDriver().navigate().to(SeleniumConfig.getWebSiteBase()); UIWaitFactory.getWaitDriver(this.getWebDriver()).waitForPageLoad(); } diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumDriverManagerUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumDriverManagerUnitTest.java index bdd031168..8ddb3bb74 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumDriverManagerUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumDriverManagerUnitTest.java @@ -16,19 +16,6 @@ */ public class SeleniumDriverManagerUnitTest extends BaseGenericTest { - /** - * The Get driver. - */ - private final Supplier getDriver = () -> { - WebDriver driver = null; - try { - driver = WebDriverFactory.getDefaultBrowser(); - } catch (Exception e) { - e.printStackTrace(); - } - return driver; - }; - /** * Test close not initialized. */ @@ -72,7 +59,7 @@ public void testGetWebDriver() { @Test(groups = TestCategories.SELENIUM) public void testLogVerbose() { try (SeleniumDriverManager seleniumDriverManager = new SeleniumDriverManager(getDriver, this.getTestObject())) { - // List list; + // List the list; seleniumDriverManager.logVerbose("Logging verbose messaging"); } } @@ -86,4 +73,17 @@ public void testDriverManWithInstantiatedDriver() { seleniumDriverManager.logVerbose("Run with new driver"); } } + + /** + * The Get driver. + */ + private final Supplier getDriver = () -> { + WebDriver driver = null; + try { + driver = WebDriverFactory.getDefaultBrowser(); + } catch (Exception e) { + e.printStackTrace(); + } + return driver; + }; } \ No newline at end of file diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumTestObjectUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumTestObjectUnitTest.java index 20d5f3bf7..23720c012 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumTestObjectUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumTestObjectUnitTest.java @@ -20,7 +20,6 @@ public class SeleniumTestObjectUnitTest extends BaseGenericTest { */ @Test(groups = TestCategories.SELENIUM) public void testSeleniumTestObjectCreationWithDriver() { - WebDriver defaultBrowser = null; try { defaultBrowser = WebDriverFactory.getDefaultBrowser(); @@ -40,7 +39,6 @@ public void testSeleniumTestObjectCreationWithDriver() { */ @Test(groups = TestCategories.SELENIUM) public void testSeleniumTestObjectCreationWithSupplier() { - try (SeleniumTestObject testObject = new SeleniumTestObject(() -> { try { return WebDriverFactory.getDefaultBrowser(); diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumUtilitiesUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumUtilitiesUnitTest.java index 9924d0db1..9198de985 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumUtilitiesUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumUtilitiesUnitTest.java @@ -10,12 +10,14 @@ import io.github.maqs.utilities.helper.TestCategories; import io.github.maqs.utilities.logging.ConsoleLogger; import io.github.maqs.utilities.logging.FileLogger; + import java.io.File; import java.nio.file.Paths; import java.time.Clock; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; import java.util.Locale; + import io.github.maqs.utilities.logging.HtmlFileLogger; import io.github.maqs.utilities.logging.Logger; import org.openqa.selenium.By; @@ -25,6 +27,7 @@ import org.openqa.selenium.support.events.EventFiringDecorator; import org.openqa.selenium.support.events.WebDriverListener; import org.testng.Assert; +import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; /** @@ -32,370 +35,370 @@ */ public class SeleniumUtilitiesUnitTest extends BaseGenericTest { - /** - * Test capture screenshot no append. - */ - @Test(groups = TestCategories.SELENIUM) - public void testCaptureScreenshotNoAppend() { - WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); - try { - FileLogger fileLogger = (FileLogger) this.getTestObject().getLogger(); - SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, - this.getTestObject().getFullyQualifiedTestName()); - this.setTestObject(testObject); - - // Open Google and take a screenshot - webDriver.navigate().to("http://www.google.com"); - boolean isSuccess = SeleniumUtilities.captureScreenshot(webDriver, testObject); - - // Assert screenshot was successful - Assert.assertTrue(isSuccess, "Expected Screenshot to be successful."); - String[] arrayOfAssociatedFiles = testObject.getArrayOfAssociatedFiles(); - Assert.assertTrue( - new File((arrayOfAssociatedFiles[arrayOfAssociatedFiles.length - 1])).exists(), - "Checking that expected file path exists"); - } finally { - webDriver.quit(); - } + /** + * The web driver to be used in testing. + */ + protected WebDriver webDriver; + + /** + * Sets up the web driver for the unit test. + */ + @BeforeMethod + private void setUp() { + webDriver = WebDriverFactory.getDefaultBrowser(); + } + + /** + * Test capture screenshot no append. + */ + @Test(groups = TestCategories.SELENIUM) + public void testCaptureScreenshotNoAppend() { + try { + FileLogger fileLogger = (FileLogger) this.getTestObject().getLogger(); + SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, + this.getTestObject().getFullyQualifiedTestName()); + this.setTestObject(testObject); + + // Open Google and take a screenshot + webDriver.navigate().to("http://www.google.com"); + boolean isSuccess = SeleniumUtilities.captureScreenshot(webDriver, testObject); + + // Assert screenshot was successful + Assert.assertTrue(isSuccess, "Expected Screenshot to be successful."); + String[] arrayOfAssociatedFiles = testObject.getArrayOfAssociatedFiles(); + Assert.assertTrue( + new File((arrayOfAssociatedFiles[arrayOfAssociatedFiles.length - 1])).exists(), + "Checking that expected file path exists"); + } finally { + webDriver.quit(); } - - /** - * Test capture screenshot append. - */ - @Test(groups = TestCategories.SELENIUM) - public void testCaptureScreenshotAppend() { - WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); - try { - FileLogger fileLogger = (FileLogger) this.getTestObject().getLogger(); - SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, - this.getTestObject().getFullyQualifiedTestName()); - this.setTestObject(testObject); - - // Open Google and take a screenshot - webDriver.navigate().to("http://www.google.com"); - final String testAppend = "testAppend"; - boolean isSuccess = SeleniumUtilities.captureScreenshot(webDriver, testObject, testAppend); - - // Assert screenshot was successful - Assert.assertTrue(isSuccess, "Expected Screenshot to be successful."); - String[] arrayOfAssociatedFiles = testObject.getArrayOfAssociatedFiles(); - Assert.assertTrue( - new File((arrayOfAssociatedFiles[arrayOfAssociatedFiles.length - 1])).exists(), - "Checking that expected file path exists"); - Assert.assertTrue( - new File((arrayOfAssociatedFiles[arrayOfAssociatedFiles.length - 1])).getName() - .contains(testAppend), - "Checking that appended value was added to file"); - } finally { - webDriver.quit(); - } + } + + /** + * Test capture screenshot append. + */ + @Test(groups = TestCategories.SELENIUM) + public void testCaptureScreenshotAppend() { + try { + FileLogger fileLogger = (FileLogger) this.getTestObject().getLogger(); + SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, + this.getTestObject().getFullyQualifiedTestName()); + this.setTestObject(testObject); + + // Open Google and take a screenshot + webDriver.navigate().to("http://www.google.com"); + final String testAppend = "testAppend"; + boolean isSuccess = SeleniumUtilities.captureScreenshot(webDriver, testObject, testAppend); + + // Assert screenshot was successful + Assert.assertTrue(isSuccess, "Expected Screenshot to be successful."); + String[] arrayOfAssociatedFiles = testObject.getArrayOfAssociatedFiles(); + Assert.assertTrue( + new File((arrayOfAssociatedFiles[arrayOfAssociatedFiles.length - 1])).exists(), + "Checking that expected file path exists"); + Assert.assertTrue( + new File((arrayOfAssociatedFiles[arrayOfAssociatedFiles.length - 1])).getName() + .contains(testAppend), + "Checking that appended value was added to file"); + } finally { + webDriver.quit(); } - - /** - * Test capture screenshot append. - */ - @Test(groups = TestCategories.SELENIUM) - public void testCaptureScreenshotNullWebDriver() { - WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); - try { - FileLogger fileLogger = (FileLogger) this.getTestObject().getLogger(); - SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, - this.getTestObject().getFullyQualifiedTestName()); - this.setTestObject(testObject); - - // Open Google and take a screenshot - webDriver.navigate().to("http://www.google.com"); - final String testAppend = "testAppend"; - boolean isSuccess = SeleniumUtilities.captureScreenshot(null, testObject, testAppend); - - // Assert screenshot was successful - Assert.assertFalse(isSuccess, "Expected Screenshot to be successful."); - } finally { - webDriver.quit(); - } + } + + /** + * Test capture screenshot append. + */ + @Test(groups = TestCategories.SELENIUM) + public void testCaptureScreenshotNullWebDriver() { + try { + FileLogger fileLogger = (FileLogger) this.getTestObject().getLogger(); + SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, + this.getTestObject().getFullyQualifiedTestName()); + this.setTestObject(testObject); + + // Open Google and take a screenshot + webDriver.navigate().to("http://www.google.com"); + final String testAppend = "testAppend"; + boolean isSuccess = SeleniumUtilities.captureScreenshot(null, testObject, testAppend); + + // Assert screenshot was successful + Assert.assertFalse(isSuccess, "Expected Screenshot to be successful."); + } finally { + webDriver.quit(); } - - /** - * Test capture screenshot append. - */ - @Test(groups = TestCategories.SELENIUM) - public void testCaptureScreenshotAppendScreenshot() { - WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); - try { - HtmlFileLogger fileLogger = new HtmlFileLogger("Capture Screenshot Append"); - this.getTestObject().setLogger(fileLogger); - SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, - this.getTestObject().getFullyQualifiedTestName()); - this.setTestObject(testObject); - - // Open Google and take a screenshot - webDriver.navigate().to("http://www.google.com"); - final String testAppend = "testAppend"; - boolean isSuccess = SeleniumUtilities.captureScreenshot(webDriver, testObject, testAppend); - - // Assert screenshot was successful - Assert.assertTrue(isSuccess, "Expected Screenshot to be successful."); - String[] arrayOfAssociatedFiles = testObject.getArrayOfAssociatedFiles(); - Assert.assertTrue( - new File((arrayOfAssociatedFiles[arrayOfAssociatedFiles.length - 1])).exists(), - "Checking that expected file path exists"); - Assert.assertTrue( - new File((arrayOfAssociatedFiles[arrayOfAssociatedFiles.length - 1])).getName() - .contains(testAppend), - "Checking that appended value was added to file"); - } finally { - webDriver.quit(); - } + } + + /** + * Test capture screenshot append. + */ + @Test(groups = TestCategories.SELENIUM) + public void testCaptureScreenshotAppendScreenshot() { + try { + HtmlFileLogger fileLogger = new HtmlFileLogger("Capture Screenshot Append"); + this.getTestObject().setLogger(fileLogger); + SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, + this.getTestObject().getFullyQualifiedTestName()); + this.setTestObject(testObject); + + // Open Google and take a screenshot + webDriver.navigate().to("http://www.google.com"); + final String testAppend = "testAppend"; + boolean isSuccess = SeleniumUtilities.captureScreenshot(webDriver, testObject, testAppend); + + // Assert screenshot was successful + Assert.assertTrue(isSuccess, "Expected Screenshot to be successful."); + String[] arrayOfAssociatedFiles = testObject.getArrayOfAssociatedFiles(); + Assert.assertTrue( + new File((arrayOfAssociatedFiles[arrayOfAssociatedFiles.length - 1])).exists(), + "Checking that expected file path exists"); + Assert.assertTrue( + new File((arrayOfAssociatedFiles[arrayOfAssociatedFiles.length - 1])).getName() + .contains(testAppend), + "Checking that appended value was added to file"); + } finally { + webDriver.quit(); } - - /** - * Test capture screenshot console logger. - */ - @Test(groups = TestCategories.SELENIUM) - public void testCaptureScreenshotConsoleLogger() { - WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); - try { - ConsoleLogger consoleLogger = new ConsoleLogger(); - SeleniumTestObject testObject = new SeleniumTestObject(webDriver, consoleLogger, - this.getTestObject().getFullyQualifiedTestName()); - this.setTestObject(testObject); - - // Open Google and take a screenshot - webDriver.navigate().to("http://www.google.com"); - boolean isSuccess = SeleniumUtilities.captureScreenshot(webDriver, testObject, "testAppend"); - - // Assert screenshot was NOT successful - Assert.assertFalse(isSuccess, "Expected Screenshot to NOT be successful."); - } finally { - webDriver.quit(); - } + } + + /** + * Test capture screenshot console logger. + */ + @Test(groups = TestCategories.SELENIUM) + public void testCaptureScreenshotConsoleLogger() { + try { + ConsoleLogger consoleLogger = new ConsoleLogger(); + SeleniumTestObject testObject = new SeleniumTestObject(webDriver, consoleLogger, + this.getTestObject().getFullyQualifiedTestName()); + this.setTestObject(testObject); + + // Open Google and take a screenshot + webDriver.navigate().to("http://www.google.com"); + boolean isSuccess = SeleniumUtilities.captureScreenshot(webDriver, testObject, "testAppend"); + + // Assert screenshot was NOT successful + Assert.assertFalse(isSuccess, "Expected Screenshot to NOT be successful."); + } finally { + webDriver.quit(); } - - /** - * Test capture screenshot custom directory file name. - */ - @Test(groups = TestCategories.SELENIUM) - public void testCaptureScreenshotCustomDirectoryFileName() { - WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); - try { - FileLogger fileLogger = (FileLogger) this.getTestObject().getLogger(); - SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, - this.getTestObject().getFullyQualifiedTestName()); - this.setTestObject(testObject); - - // Open Google and take a screenshot - webDriver.navigate().to("http://www.google.com"); - String dateTime = DateTimeFormatter.ofPattern(Logger.DEFAULT_DATE_TIME_FORMAT, - Locale.getDefault()).format(LocalDateTime.now(Clock.systemUTC())); - String filePath = SeleniumUtilities.captureScreenshot(webDriver, testObject, - fileLogger.getDirectory(), - StringProcessor.safeFormatter("%s - %s", "TestCustomName", dateTime)); - - Assert.assertEquals(filePath, - Paths.get(StringProcessor.safeFormatter("%s%s - %s%s", - fileLogger.getDirectory(), File.separator + "TestCustomName", dateTime, - ".png")).normalize().toString()); - Assert.assertTrue(new File(filePath).exists(), - "Checking that screenshot file exists at expected path."); - } finally { - webDriver.quit(); - } + } + + /** + * Test capture screenshot custom directory file name. + */ + @Test(groups = TestCategories.SELENIUM) + public void testCaptureScreenshotCustomDirectoryFileName() { + try { + FileLogger fileLogger = (FileLogger) this.getTestObject().getLogger(); + SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, + this.getTestObject().getFullyQualifiedTestName()); + this.setTestObject(testObject); + + // Open Google and take a screenshot + webDriver.navigate().to("http://www.google.com"); + String dateTime = DateTimeFormatter.ofPattern(Logger.DEFAULT_DATE_TIME_FORMAT, + Locale.getDefault()).format(LocalDateTime.now(Clock.systemUTC())); + String filePath = SeleniumUtilities.captureScreenshot(webDriver, testObject, + fileLogger.getDirectory(), + StringProcessor.safeFormatter("%s - %s", "TestCustomName", dateTime)); + + Assert.assertEquals(filePath, + Paths.get(StringProcessor.safeFormatter("%s%s - %s%s", + fileLogger.getDirectory(), File.separator + "TestCustomName", dateTime, + ".png")).normalize().toString()); + Assert.assertTrue(new File(filePath).exists(), + "Checking that screenshot file exists at expected path."); + } finally { + webDriver.quit(); } - - /** - * Test save page source no append. - */ - @Test(groups = TestCategories.SELENIUM) - public void testSavePageSourceNoAppend() { - WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); - try { - FileLogger fileLogger = (FileLogger) this.getTestObject().getLogger(); - SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, - this.getTestObject().getFullyQualifiedTestName()); - this.setTestObject(testObject); - - // Open Google and take a screenshot - webDriver.navigate().to("http://www.google.com"); - boolean isSuccess = SeleniumUtilities.savePageSource(webDriver, testObject); - - // Assert screenshot was successful - Assert.assertTrue(isSuccess, "Expected Screenshot to be successful."); - String[] arrayOfAssociatedFiles = testObject.getArrayOfAssociatedFiles(); - Assert.assertTrue( - new File((arrayOfAssociatedFiles[arrayOfAssociatedFiles.length - 1])).exists(), - "Checking that expected file path exists"); - } finally { - webDriver.quit(); - } + } + + /** + * Test save page source no append. + */ + @Test(groups = TestCategories.SELENIUM) + public void testSavePageSourceNoAppend() { + try { + FileLogger fileLogger = (FileLogger) this.getTestObject().getLogger(); + SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, + this.getTestObject().getFullyQualifiedTestName()); + this.setTestObject(testObject); + + // Open Google and take a screenshot + webDriver.navigate().to("http://www.google.com"); + boolean isSuccess = SeleniumUtilities.savePageSource(webDriver, testObject); + + // Assert screenshot was successful + Assert.assertTrue(isSuccess, "Expected Screenshot to be successful."); + String[] arrayOfAssociatedFiles = testObject.getArrayOfAssociatedFiles(); + Assert.assertTrue( + new File((arrayOfAssociatedFiles[arrayOfAssociatedFiles.length - 1])).exists(), + "Checking that expected file path exists"); + } finally { + webDriver.quit(); } - - /** - * Test save page source append. - */ - @Test(groups = TestCategories.SELENIUM) - public void testSavePageSourceAppend() { - WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); - try { - FileLogger fileLogger = (FileLogger) this.getTestObject().getLogger(); - SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, - this.getTestObject().getFullyQualifiedTestName()); - this.setTestObject(testObject); - - // Open Google and take a screenshot - webDriver.navigate().to("http://www.google.com"); - final String testAppend = "testAppend"; - boolean isSuccess = SeleniumUtilities.savePageSource(webDriver, testObject, testAppend); - - // Assert screenshot was successful - Assert.assertTrue(isSuccess, "Expected Screenshot to be successful."); - String[] arrayOfAssociatedFiles = testObject.getArrayOfAssociatedFiles(); - Assert.assertTrue( - new File((arrayOfAssociatedFiles[arrayOfAssociatedFiles.length - 1])).exists(), - "Checking that expected file path exists"); - Assert.assertTrue( - new File((arrayOfAssociatedFiles[arrayOfAssociatedFiles.length - 1])).getName() - .contains(testAppend), - "Checking that appended value was added to file"); - } finally { - webDriver.quit(); - } + } + + /** + * Test save page source append. + */ + @Test(groups = TestCategories.SELENIUM) + public void testSavePageSourceAppend() { + try { + FileLogger fileLogger = (FileLogger) this.getTestObject().getLogger(); + SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, + this.getTestObject().getFullyQualifiedTestName()); + this.setTestObject(testObject); + + // Open Google and take a screenshot + webDriver.navigate().to("http://www.google.com"); + final String testAppend = "testAppend"; + boolean isSuccess = SeleniumUtilities.savePageSource(webDriver, testObject, testAppend); + + // Assert screenshot was successful + Assert.assertTrue(isSuccess, "Expected Screenshot to be successful."); + String[] arrayOfAssociatedFiles = testObject.getArrayOfAssociatedFiles(); + Assert.assertTrue( + new File((arrayOfAssociatedFiles[arrayOfAssociatedFiles.length - 1])).exists(), + "Checking that expected file path exists"); + Assert.assertTrue( + new File((arrayOfAssociatedFiles[arrayOfAssociatedFiles.length - 1])).getName() + .contains(testAppend), + "Checking that appended value was added to file"); + } finally { + webDriver.quit(); } - - /** - * Test save page source append. - */ - @Test(groups = TestCategories.SELENIUM) - public void testSavePageSourceNullWebDriver() { - WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); - try { - FileLogger fileLogger = (FileLogger) this.getTestObject().getLogger(); - SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, - this.getTestObject().getFullyQualifiedTestName()); - this.setTestObject(testObject); - - // Open Google and take a screenshot - webDriver.navigate().to("http://www.google.com"); - final String testAppend = "testAppend"; - boolean isSuccess = SeleniumUtilities.savePageSource(null, testObject, testAppend); - - // Assert screenshot was not successful - Assert.assertFalse(isSuccess, "Expected Screenshot to be successful."); - } finally { - webDriver.quit(); - } + } + + /** + * Test save page source append. + */ + @Test(groups = TestCategories.SELENIUM) + public void testSavePageSourceNullWebDriver() { + try { + FileLogger fileLogger = (FileLogger) this.getTestObject().getLogger(); + SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, + this.getTestObject().getFullyQualifiedTestName()); + this.setTestObject(testObject); + + // Open Google and take a screenshot + webDriver.navigate().to("http://www.google.com"); + final String testAppend = "testAppend"; + boolean isSuccess = SeleniumUtilities.savePageSource(null, testObject, testAppend); + + // Assert screenshot was not successful + Assert.assertFalse(isSuccess, "Expected Screenshot to be successful."); + } finally { + webDriver.quit(); } - - - /** - * Test save page source custom directory file name. - */ - @Test(groups = TestCategories.SELENIUM) - public void testSavePageSourceCustomDirectoryFileName() { - WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); - try { - FileLogger fileLogger = (FileLogger) this.getTestObject().getLogger(); - SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, - this.getTestObject().getFullyQualifiedTestName()); - this.setTestObject(testObject); - - // Open Google and take a screenshot - webDriver.navigate().to("http://www.google.com"); - String dateTime = DateTimeFormatter.ofPattern(Logger.DEFAULT_DATE_TIME_FORMAT, - Locale.getDefault()).format(LocalDateTime.now(Clock.systemUTC())); - String filePath = SeleniumUtilities.savePageSource(webDriver, testObject, - fileLogger.getDirectory(), - StringProcessor.safeFormatter("%s - %s", "TestCustomName", dateTime)); - - // Assert File Path returned from Screenshot is the same as expected file path. - Assert.assertEquals(filePath, - Paths.get(StringProcessor.safeFormatter("%s%s - %s%s", - fileLogger.getDirectory(), File.separator + "TestCustomName", dateTime, - ".txt")).normalize().toString()); - Assert.assertTrue(new File(filePath).exists(), - "Checking that page source file exists at expected path."); - String[] arrayOfAssociatedFiles = testObject.getArrayOfAssociatedFiles(); - Assert.assertTrue( - new File((arrayOfAssociatedFiles[arrayOfAssociatedFiles.length - 1])).exists(), - "Checking that expected file path exists"); - } finally { - webDriver.quit(); - } + } + + + /** + * Test save page source custom directory file name. + */ + @Test(groups = TestCategories.SELENIUM) + public void testSavePageSourceCustomDirectoryFileName() { + try { + FileLogger fileLogger = (FileLogger) this.getTestObject().getLogger(); + SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, + this.getTestObject().getFullyQualifiedTestName()); + this.setTestObject(testObject); + + // Open Google and take a screenshot + webDriver.navigate().to("http://www.google.com"); + String dateTime = DateTimeFormatter.ofPattern(Logger.DEFAULT_DATE_TIME_FORMAT, + Locale.getDefault()).format(LocalDateTime.now(Clock.systemUTC())); + String filePath = SeleniumUtilities.savePageSource(webDriver, testObject, + fileLogger.getDirectory(), + StringProcessor.safeFormatter("%s - %s", "TestCustomName", dateTime)); + + // Assert File Path returned from Screenshot is the same as expected file path. + Assert.assertEquals(filePath, + Paths.get(StringProcessor.safeFormatter("%s%s - %s%s", + fileLogger.getDirectory(), File.separator + "TestCustomName", dateTime, + ".txt")).normalize().toString()); + Assert.assertTrue(new File(filePath).exists(), + "Checking that page source file exists at expected path."); + String[] arrayOfAssociatedFiles = testObject.getArrayOfAssociatedFiles(); + Assert.assertTrue( + new File((arrayOfAssociatedFiles[arrayOfAssociatedFiles.length - 1])).exists(), + "Checking that expected file path exists"); + } finally { + webDriver.quit(); } - - /** - * Test save page source console logger. - */ - @Test(groups = TestCategories.SELENIUM) - public void testSavePageSourceConsoleLogger() { - WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); - try { - ConsoleLogger consoleLogger = new ConsoleLogger(); - SeleniumTestObject testObject = new SeleniumTestObject(webDriver, consoleLogger, - this.getTestObject().getFullyQualifiedTestName()); - this.setTestObject(testObject); - - // Open Google and take a screenshot - webDriver.navigate().to("http://www.google.com"); - boolean isSuccess = SeleniumUtilities.savePageSource(webDriver, testObject); - - // Assert screenshot was successful - Assert.assertTrue(isSuccess, "Expected Screenshot to be successful."); - String[] arrayOfAssociatedFiles = testObject.getArrayOfAssociatedFiles(); - Assert.assertTrue( - new File((arrayOfAssociatedFiles[arrayOfAssociatedFiles.length - 1])).exists(), - "Checking that expected file path exists"); - } finally { - webDriver.quit(); - } + } + + /** + * Test save page source console logger. + */ + @Test(groups = TestCategories.SELENIUM) + public void testSavePageSourceConsoleLogger() { + try { + ConsoleLogger consoleLogger = new ConsoleLogger(); + SeleniumTestObject testObject = new SeleniumTestObject(webDriver, consoleLogger, + this.getTestObject().getFullyQualifiedTestName()); + this.setTestObject(testObject); + + // Open Google and take a screenshot + webDriver.navigate().to("http://www.google.com"); + boolean isSuccess = SeleniumUtilities.savePageSource(webDriver, testObject); + + // Assert screenshot was successful + Assert.assertTrue(isSuccess, "Expected Screenshot to be successful."); + String[] arrayOfAssociatedFiles = testObject.getArrayOfAssociatedFiles(); + Assert.assertTrue( + new File((arrayOfAssociatedFiles[arrayOfAssociatedFiles.length - 1])).exists(), + "Checking that expected file path exists"); + } finally { + webDriver.quit(); } - - /** - * Test web element to web driver. - */ - @Test(groups = TestCategories.SELENIUM) - public void testWebElementToWebDriver() { - WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); - try { - WebDriverListener listener = new EventHandler(this.getLogger()); - webDriver = new EventFiringDecorator(listener).decorate(webDriver); - - ConsoleLogger consoleLogger = new ConsoleLogger(); - SeleniumTestObject testObject = new SeleniumTestObject(webDriver, consoleLogger, - this.getTestObject().getFullyQualifiedTestName()); - this.setTestObject(testObject); - - // Open Google and take a screenshot - webDriver.navigate().to("http://www.google.com"); - UIWaitFactory.getWaitDriver(webDriver).waitForPageLoad(); - WebElement input = webDriver.findElement(By.tagName("div")); - WebDriver webElementToWebDriver = SeleniumUtilities.webElementToWebDriver(input); - Assert.assertNotNull(webElementToWebDriver, "Expected extracted web driver to not be null"); - } finally { - webDriver.quit(); - } + } + + /** + * Test web element to web driver. + */ + @Test(groups = TestCategories.SELENIUM) + public void testWebElementToWebDriver() { + try { + WebDriverListener listener = new EventHandler(this.getLogger()); + webDriver = new EventFiringDecorator(listener).decorate(webDriver); + + ConsoleLogger consoleLogger = new ConsoleLogger(); + SeleniumTestObject testObject = new SeleniumTestObject(webDriver, consoleLogger, + this.getTestObject().getFullyQualifiedTestName()); + this.setTestObject(testObject); + + // Open Google and take a screenshot + webDriver.navigate().to("http://www.google.com"); + UIWaitFactory.getWaitDriver(webDriver).waitForPageLoad(); + WebElement input = webDriver.findElement(By.tagName("div")); + WebDriver webElementToWebDriver = SeleniumUtilities.webElementToWebDriver(input); + Assert.assertNotNull(webElementToWebDriver, "Expected extracted web driver to not be null"); + } finally { + webDriver.quit(); } - - /** - * Test kill driver. - */ - @Test(groups = TestCategories.SELENIUM) - public void testKillDriver() { - WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); - try { - ConsoleLogger consoleLogger = new ConsoleLogger(); - SeleniumTestObject testObject = new SeleniumTestObject(webDriver, consoleLogger, - this.getTestObject().getFullyQualifiedTestName()); - this.setTestObject(testObject); - - // Open Google then Kill the Driver - webDriver.navigate().to("http://www.google.com"); - SeleniumUtilities.killDriver(webDriver); - - // Assert that the Session ID is null in the Selenium Driver - Assert.assertNull(((RemoteWebDriver) webDriver).getSessionId(), - "Expected Selenium Driver Session ID to be null."); - } finally { - webDriver.quit(); - } + } + + /** + * Test kill driver. + */ + @Test(groups = TestCategories.SELENIUM) + public void testKillDriver() { + try { + ConsoleLogger consoleLogger = new ConsoleLogger(); + SeleniumTestObject testObject = new SeleniumTestObject(webDriver, consoleLogger, + this.getTestObject().getFullyQualifiedTestName()); + this.setTestObject(testObject); + + // Open Google then Kill the Driver + webDriver.navigate().to("http://www.google.com"); + SeleniumUtilities.killDriver(webDriver); + + // Assert that the Session ID is null in the Selenium Driver + Assert.assertNull(((RemoteWebDriver) webDriver).getSessionId(), + "Expected Selenium Driver Session ID to be null."); + } finally { + webDriver.quit(); } + } } \ No newline at end of file diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/UIFindUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/UIFindUnitTest.java index 33287efa1..f9582174d 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/UIFindUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/UIFindUnitTest.java @@ -12,6 +12,7 @@ import org.openqa.selenium.NotFoundException; import org.openqa.selenium.WebElement; import org.testng.Assert; +import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; /** @@ -24,13 +25,19 @@ public class UIFindUnitTest extends BaseSeleniumTest { */ private AutomationPageModel automationPageModel; + /** + * The UI Find object for the test. + */ + protected UIFind find; + /** * Sets up the page models for the test. */ - public UIFind setUp() { + @BeforeMethod + private void setUp() { automationPageModel = new AutomationPageModel(this.getTestObject()); this.getWebDriver().navigate().to(automationPageModel.testSiteAutomationUrl); - return UIFindFactory.getFind(this.getWebDriver()); + find = UIFindFactory.getFind(this.getWebDriver()); } /** @@ -38,7 +45,6 @@ public UIFind setUp() { */ @Test(groups = TestCategories.SELENIUM) public void findElementFound() { - UIFind find = setUp(); WebElement element = find.findElement(automationPageModel.automationNamesLabel); Assert.assertEquals(element.getText(),"Names"); } @@ -49,7 +55,6 @@ public void findElementFound() { */ @Test(groups = TestCategories.SELENIUM) public void findElementNotFound() { - UIFind find = setUp(); Assert.assertNull(find.findElement(automationPageModel.notInPage, false)); } @@ -58,7 +63,6 @@ public void findElementNotFound() { */ @Test(groups = TestCategories.SELENIUM, expectedExceptions = NotFoundException.class) public void findElementCatchException() { - UIFind find = setUp(); find.findElement(automationPageModel.notInPage, true); } @@ -67,7 +71,6 @@ public void findElementCatchException() { */ @Test(groups = TestCategories.SELENIUM) public void findElementsFound() { - UIFind find = setUp(); List list = find.findElements(automationPageModel.dropdownToggleClassSelector); Assert.assertEquals(list.size(),2, "There are 2 elements with dropdown classes"); @@ -85,7 +88,6 @@ public void findElementsFound() { */ @Test(groups = TestCategories.SELENIUM) public void findElementsNotFound() { - UIFind find = setUp(); List list = find.findElements(automationPageModel.notInPage, false); Assert.assertEquals(list.size(), 0); } @@ -95,7 +97,6 @@ public void findElementsNotFound() { */ @Test(groups = TestCategories.SELENIUM) public void findElementsNotFoundThrowException() { - UIFind find = setUp(); List elements = find.findElements(automationPageModel.notInPage, false); Assert.assertEquals(elements.size(), 0); } @@ -105,7 +106,6 @@ public void findElementsNotFoundThrowException() { */ @Test(groups = TestCategories.SELENIUM) public void findElementWithTextElementNotFound() { - UIFind find = setUp(); Assert.assertNull(find.findElementWithText(automationPageModel.notInPage, "notInPage", false), "Element was not found"); } @@ -116,7 +116,6 @@ public void findElementWithTextElementNotFound() { */ @Test(groups = TestCategories.SELENIUM) public void findElementWithText() { - UIFind find = setUp(); String text = find.findElement(automationPageModel.automationShowDialog1).getText(); Assert.assertNotNull(find.findElementWithText(automationPageModel.automationShowDialog1, text), "Element was not found"); @@ -128,7 +127,6 @@ public void findElementWithText() { */ @Test(groups = TestCategories.SELENIUM) public void findElementWithTextNotFound() { - UIFind find = setUp(); Assert.assertNull(find.findElementWithText(automationPageModel.homeButton, "#notfound", false), "Element was not found"); } @@ -139,7 +137,6 @@ public void findElementWithTextNotFound() { */ @Test(groups = TestCategories.SELENIUM) public void findIndexOfElementWithText() { - UIFind find = setUp(); Assert.assertEquals(find.findIndexOfElementWithText(automationPageModel.flowerTable, "Red"), 3); } @@ -149,7 +146,6 @@ public void findIndexOfElementWithText() { */ @Test(groups = TestCategories.SELENIUM) public void findIndexOfElementWithTextNotFound() { - UIFind find = setUp(); Assert.assertEquals(find.findIndexOfElementWithText(automationPageModel.flowerTable, "#notfound", false), -1); } @@ -160,7 +156,6 @@ public void findIndexOfElementWithTextNotFound() { */ @Test(groups = TestCategories.SELENIUM) public void findIndexOfElementWithTextWithNotFoundElement() { - UIFind find = setUp(); Assert.assertEquals(find.findIndexOfElementWithText(automationPageModel.notInPage, "#notfound", false), -1); } @@ -171,7 +166,6 @@ public void findIndexOfElementWithTextWithNotFoundElement() { */ @Test(groups = TestCategories.SELENIUM) public void findIndexOfElementInCollection() { - UIFind find = setUp(); Assert.assertEquals(find.findIndexOfElementWithText( find.findElements(automationPageModel.flowerTable), "10 in"), 0); } @@ -181,7 +175,6 @@ public void findIndexOfElementInCollection() { */ @Test(groups = TestCategories.SELENIUM, expectedExceptions = NotFoundException.class) public void findIndexOfElementInCollectionThrowException() { - UIFind find = setUp(); Assert.assertEquals(find.findIndexOfElementWithText( find.findElements(automationPageModel.notInPage), "not In page"), 0); } @@ -192,7 +185,6 @@ public void findIndexOfElementInCollectionThrowException() { */ @Test(groups = TestCategories.SELENIUM) public void findIndexOfElementInCollectionNotFound() { - UIFind find = setUp(); Assert.assertEquals(find.findIndexOfElementWithText(find.findElements(automationPageModel.flowerTable), "#notfound", false), -1); } @@ -203,7 +195,6 @@ public void findIndexOfElementInCollectionNotFound() { */ @Test(groups = TestCategories.SELENIUM) public void findIndexOfElementInCollectionEmptyInputList() { - UIFind find = UIFindFactory.getFind(this.getWebDriver()); int index = find.findIndexOfElementWithText( (List) null, "#notfound", false); Assert.assertEquals(index, -1); @@ -215,7 +206,6 @@ public void findIndexOfElementInCollectionEmptyInputList() { */ @Test(groups = TestCategories.SELENIUM) public void findIndexOfElementInCollectionTextNotFoundAssertIsTrue() { - UIFind find = setUp(); int index = find.findIndexOfElementWithText(find.findElements(automationPageModel.flowerTable), "#notfound", false); Assert.assertEquals(index, -1); diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/UIWaitFactoryUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/UIWaitFactoryUnitTest.java index acd8326c8..92ab699c4 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/UIWaitFactoryUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/UIWaitFactoryUnitTest.java @@ -30,7 +30,6 @@ public class UIWaitFactoryUnitTest extends BaseSeleniumTest { */ @Test(groups = TestCategories.SELENIUM) public void getWaitDriverTest() { - new AutomationPageModel(this.getTestObject()); UIWait waitDriver = UIWaitFactory.getWaitDriver(this.getWebDriver()); // Error string templates for assertion failures. diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/UIWaitForUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/UIWaitForUnitTest.java index fbf4b0a32..8ba8771e1 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/UIWaitForUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/UIWaitForUnitTest.java @@ -9,6 +9,7 @@ import org.openqa.selenium.TimeoutException; import org.openqa.selenium.WebElement; import org.testng.Assert; +import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; /** @@ -16,15 +17,42 @@ */ public class UIWaitForUnitTest extends BaseSeleniumTest { + /** + * The IFrame page model. + */ + private IFramePageModel iFramePageModel; + + /** + * The Async page model. + */ + private AsyncPageModel asyncPageModel; + + /** + * The Automation page model. + */ + private AutomationPageModel automationPageModel; + + private UIWait wait; + + /** + * Sets up the page models for the unit tests. + */ + @BeforeMethod + private void setUp() { + iFramePageModel = new IFramePageModel(this.getTestObject()); + asyncPageModel = new AsyncPageModel(this.getTestObject()); + automationPageModel = new AutomationPageModel(this.getTestObject()); + wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); + } + /** * Tests the functionality that waits for the IFrame to load. */ @Test(groups = TestCategories.SELENIUM) public void waitForIFrameToLoad() { - IFramePageModel iFramePageModel = new IFramePageModel(this.getTestObject()); this.getWebDriver().navigate().to(iFramePageModel.testSiteIFrameUrl); - UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); wait.waitForPageLoad(); + WebDriverFactory.setBrowserSize(this.getWebDriver(), "Maximize"); wait.waitForIframeToLoad(iFramePageModel.iframeLocator); @@ -38,10 +66,9 @@ public void waitForIFrameToLoad() { */ @Test(groups = TestCategories.SELENIUM) public void waitForAttributeTextEqualsFound() { - AsyncPageModel asyncPageModel = new AsyncPageModel(this.getTestObject()); this.getWebDriver().navigate().to(asyncPageModel.testSiteAsyncUrl); - UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); wait.waitForVisibleElement(asyncPageModel.asyncLoadingTextDiv); + WebElement element = wait.waitForAttributeTextEquals( asyncPageModel.asyncLoadingTextDiv, "style", ""); Assert.assertNotNull(element); @@ -53,9 +80,7 @@ public void waitForAttributeTextEqualsFound() { */ @Test(groups = TestCategories.SELENIUM) public void waitForClickableElementAndScrollIntoView() { - AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); this.getWebDriver().navigate().to(automationPageModel.testSiteAutomationUrl); - UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); Assert.assertNotNull(wait.waitForClickableElementAndScrollIntoView( automationPageModel.automationShowDialog1)); Assert.assertNotNull(wait.waitForClickableElementAndScrollIntoView( @@ -67,9 +92,7 @@ public void waitForClickableElementAndScrollIntoView() { */ @Test(groups = TestCategories.SELENIUM) public void waitForPresentElement() { - AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); this.getWebDriver().navigate().to(automationPageModel.testSiteAutomationUrl); - UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); Assert.assertNotNull(wait.waitForPresentElement(automationPageModel.flowerTableTitle)); Assert.assertNotNull(wait.waitForPresentElement(automationPageModel.flowerTableTitle, 10000, 1000)); } @@ -79,9 +102,7 @@ public void waitForPresentElement() { */ @Test(groups = TestCategories.SELENIUM) public void waitForElements() { - AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); this.getWebDriver().navigate().to(automationPageModel.testSiteAutomationUrl); - UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); Assert.assertEquals(wait.waitForElements(automationPageModel.flowerTable).size(), 20); Assert.assertEquals(wait.waitForElements(automationPageModel.flowerTable, 10000, 1000).size(), 20); } @@ -91,9 +112,7 @@ public void waitForElements() { */ @Test(groups = TestCategories.SELENIUM) public void waitForEnabledElement() { - AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); this.getWebDriver().navigate().to(automationPageModel.testSiteAutomationUrl); - UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); Assert.assertNotNull(wait.waitForEnabledElement(automationPageModel.flowerTableTitle)); Assert.assertNotNull(wait.waitForEnabledElement(automationPageModel.flowerTableTitle, 10000, 1000)); } @@ -103,10 +122,9 @@ public void waitForEnabledElement() { */ @Test(groups = TestCategories.SELENIUM) public void waitForClickableElement() { - AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); this.getWebDriver().navigate().to(automationPageModel.testSiteUrl); - UIWaitFactory.getWaitDriver(this.getWebDriver()).waitForPageLoad(); - UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); + wait.waitForPageLoad(); + WebElement element = wait.waitForClickableElement(automationPageModel.homeButton); Assert.assertNotNull(element, "Null element was returned"); element = wait.waitForClickableElement(automationPageModel.homeButton, 10000, 1000); @@ -118,11 +136,9 @@ public void waitForClickableElement() { */ @Test(groups = TestCategories.SELENIUM) public void waitForVisibleElement() { - AsyncPageModel asyncPageModel = new AsyncPageModel(this.getTestObject()); this.getWebDriver().navigate().to(asyncPageModel.testSiteAsyncUrl); - UIWaitFactory.getWaitDriver(this.getWebDriver()).waitForPageLoad(); + wait.waitForPageLoad(); - UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); WebElement element = wait.waitForVisibleElement(asyncPageModel.asyncDropdownCssSelector); Assert.assertNotNull(element, "Null element was returned"); element = wait.waitForVisibleElement(asyncPageModel.asyncDropdownCssSelector, 10000, 1000); @@ -134,11 +150,9 @@ public void waitForVisibleElement() { */ @Test(groups = TestCategories.SELENIUM) public void waitForExactText() { - AsyncPageModel asyncPageModel = new AsyncPageModel(this.getTestObject()); this.getWebDriver().navigate().to(asyncPageModel.testSiteAsyncUrl); - UIWaitFactory.getWaitDriver(this.getWebDriver()).waitForPageLoad(); + wait.waitForPageLoad(); - UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); WebElement element = wait.waitForExactText(asyncPageModel.asyncOptionsLabel, "Options"); Assert.assertNotNull(element, "Null element was returned"); } @@ -148,11 +162,9 @@ public void waitForExactText() { */ @Test(groups = TestCategories.SELENIUM) public void waitForContainsText() { - AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); this.getWebDriver().navigate().to(automationPageModel.testSiteAutomationUrl); - UIWaitFactory.getWaitDriver(this.getWebDriver()).waitForPageLoad(); + wait.waitForPageLoad(); - UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); WebElement element = wait.waitForContainsText(automationPageModel.automationNamesLabel, "Name"); Assert.assertNotNull(element, "Null element was returned"); } @@ -162,11 +174,8 @@ public void waitForContainsText() { */ @Test(groups = TestCategories.SELENIUM) public void waitForAbsentElement() { - AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); this.getWebDriver().navigate().to(automationPageModel.testSiteUrl); - UIWaitFactory.getWaitDriver(this.getWebDriver()).waitForPageLoad(); - - UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); + wait.waitForPageLoad(); wait.waitForAbsentElement(automationPageModel.notInPage); } @@ -175,11 +184,7 @@ public void waitForAbsentElement() { */ @Test(groups = TestCategories.SELENIUM, expectedExceptions = TimeoutException.class) public void waitForAbsentElementFail() { - AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); this.getWebDriver().navigate().to(automationPageModel.testSiteUrl); - UIWaitFactory.getWaitDriver(this.getWebDriver()).waitForPageLoad(); - - UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); wait.waitForPageLoad(); wait.waitForAbsentElement(automationPageModel.homeButton); } @@ -189,11 +194,7 @@ public void waitForAbsentElementFail() { */ @Test(groups = TestCategories.SELENIUM) public void waitForPageLoad() { - AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); getWebDriver().navigate().to(automationPageModel.testSiteUrl); - UIWaitFactory.getWaitDriver(this.getWebDriver()).waitForPageLoad(); - - UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); wait.waitForPageLoad(); } @@ -204,11 +205,9 @@ public void waitForPageLoad() { */ @Test(groups = TestCategories.SELENIUM, expectedExceptions = NotFoundException.class) public void waitForAttributeEqualsDoesNotFind() { - AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); this.getWebDriver().navigate().to(automationPageModel.testSiteAutomationUrl); - UIWaitFactory.getWaitDriver(this.getWebDriver()).waitForPageLoad(); + wait.waitForPageLoad(); - UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); WebElement element = wait.waitForAttributeTextEquals( automationPageModel.foodTable, "Flower Table", "Summary"); Assert.assertEquals(element.getAttribute("Text"), "Flower Table"); @@ -220,9 +219,7 @@ public void waitForAttributeEqualsDoesNotFind() { */ @Test(groups = TestCategories.SELENIUM) public void waitForAttributeEqualsFound() { - AsyncPageModel asyncPageModel = new AsyncPageModel(this.getTestObject()); this.getWebDriver().navigate().to(asyncPageModel.testSiteAsyncUrl); - UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); wait.waitForPageLoad(); wait.waitForVisibleElement(asyncPageModel.asyncLoadingTextDiv); diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/UIWaitUntilUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/UIWaitUntilUnitTest.java index c9eddffcf..46c944936 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/UIWaitUntilUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/UIWaitUntilUnitTest.java @@ -10,6 +10,7 @@ import io.github.maqs.selenium.pageModel.IFramePageModel; import io.github.maqs.utilities.helper.TestCategories; import org.testng.Assert; +import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; /** @@ -17,12 +18,36 @@ */ public class UIWaitUntilUnitTest extends BaseSeleniumTest { + /** + * The IFrame page model. + */ + private IFramePageModel iFramePageModel; + + /** + * The Async page model. + */ + private AsyncPageModel asyncPageModel; + + /** + * The Automation page model. + */ + private AutomationPageModel automationPageModel; + + /** + * Sets up the page models for the unit tests. + */ + @BeforeMethod + private void setUp() { + iFramePageModel = new IFramePageModel(this.getTestObject()); + asyncPageModel = new AsyncPageModel(this.getTestObject()); + automationPageModel = new AutomationPageModel(this.getTestObject()); + } + /** * Tests the functionality that waits until the IFrame to load. */ @Test(groups = TestCategories.SELENIUM) public void waitUntilIFrameToLoad() { - IFramePageModel iFramePageModel = new IFramePageModel(this.getTestObject()); this.getWebDriver().navigate().to(iFramePageModel.testSiteIFrameUrl); UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); wait.waitUntilPageLoad(); @@ -40,7 +65,6 @@ public void waitUntilIFrameToLoad() { */ @Test(groups = TestCategories.SELENIUM) public void waitUntilAttributeTextEquals() { - AsyncPageModel asyncPageModel = new AsyncPageModel(this.getTestObject()); this.getWebDriver().navigate().to(asyncPageModel.testSiteAsyncUrl); UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); Assert.assertTrue(wait.waitUntilAttributeTextEquals(asyncPageModel.asyncLoadingLabel, "style", "display: none;")); @@ -52,7 +76,6 @@ public void waitUntilAttributeTextEquals() { */ @Test(groups = TestCategories.SELENIUM) public void waitUntilAttributeTextContainsFound() { - AsyncPageModel asyncPageModel = new AsyncPageModel(this.getTestObject()); this.getWebDriver().navigate().to(asyncPageModel.testSiteAsyncUrl); UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); Assert.assertTrue(wait.waitUntilAttributeTextContains( @@ -67,7 +90,6 @@ public void waitUntilAttributeTextContainsFound() { */ @Test(groups = TestCategories.SELENIUM) public void waitUntilAttributeTextContainsFalse() { - AsyncPageModel asyncPageModel = new AsyncPageModel(this.getTestObject()); this.getWebDriver().navigate().to(asyncPageModel.testSiteAsyncUrl); UIWaitFactory.getWaitDriver(this.getWebDriver()).waitForPageLoad(); @@ -84,7 +106,6 @@ public void waitUntilAttributeTextContainsFalse() { */ @Test(groups = TestCategories.SELENIUM) public void waitUntilAttributeTextEqualsFalse() { - AsyncPageModel asyncPageModel = new AsyncPageModel(this.getTestObject()); getWebDriver().navigate().to(asyncPageModel.testSiteAsyncUrl); UIWaitFactory.getWaitDriver(this.getWebDriver()).waitForPageLoad(); @@ -99,7 +120,6 @@ public void waitUntilAttributeTextEqualsFalse() { */ @Test(groups = TestCategories.SELENIUM) public void waitUntilClickableElementAndScrollIntoView() { - AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); this.getWebDriver().navigate().to(automationPageModel.testSiteAutomationUrl); UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); Assert.assertTrue(wait.waitUntilClickableElementAndScrollIntoView( @@ -113,7 +133,6 @@ public void waitUntilClickableElementAndScrollIntoView() { */ @Test(groups = TestCategories.SELENIUM) public void waitUntilEnabledElement() { - AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); this.getWebDriver().navigate().to(automationPageModel.testSiteAutomationUrl); UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); Assert.assertTrue(wait.waitUntilEnabledElement(automationPageModel.flowerTableTitle)); @@ -125,7 +144,6 @@ public void waitUntilEnabledElement() { */ @Test(groups = TestCategories.SELENIUM) public void waitUntilDisabledElement() { - AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); this.getWebDriver().navigate().to(automationPageModel.testSiteAutomationUrl); UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); Assert.assertTrue(wait.waitUntilDisabledElement(automationPageModel.disabledField)); @@ -148,7 +166,6 @@ public void resetWaitDriver() { */ @Test(groups = TestCategories.SELENIUM) public void getNewWaitDriver() { - AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); this.getWebDriver().navigate().to(automationPageModel.testSiteUrl); UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); Assert.assertNotNull(wait.getNewWaitDriver()); @@ -162,7 +179,6 @@ public void getNewWaitDriver() { */ @Test(groups = TestCategories.SELENIUM) public void waitUntilPageLoad() { - AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); getWebDriver().navigate().to(automationPageModel.testSiteUrl); UIWaitFactory.getWaitDriver(this.getWebDriver()).waitForPageLoad(); @@ -175,7 +191,6 @@ public void waitUntilPageLoad() { */ @Test(groups = TestCategories.SELENIUM) public void waitUntilClickableElement() { - AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); this.getWebDriver().navigate().to(automationPageModel.testSiteAutomationUrl); UIWaitFactory.getWaitDriver(this.getWebDriver()).waitForPageLoad(); @@ -191,7 +206,6 @@ public void waitUntilClickableElement() { */ @Test(groups = TestCategories.SELENIUM) public void waitUntilVisibleElement() { - AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); this.getWebDriver().navigate().to(automationPageModel.testSiteAutomationUrl); UIWaitFactory.getWaitDriver(this.getWebDriver()).waitForPageLoad(); @@ -208,7 +222,6 @@ public void waitUntilVisibleElement() { */ @Test(groups = TestCategories.SELENIUM) public void waitUntilExactText() { - AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); this.getWebDriver().navigate().to(automationPageModel.testSiteAutomationUrl); UIWaitFactory.getWaitDriver(this.getWebDriver()).waitForPageLoad(); @@ -224,7 +237,6 @@ public void waitUntilExactText() { */ @Test(groups = TestCategories.SELENIUM) public void waitUntilContainsText() { - AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); this.getWebDriver().navigate().to(automationPageModel.testSiteAutomationUrl); UIWaitFactory.getWaitDriver(this.getWebDriver()).waitForPageLoad(); @@ -242,7 +254,6 @@ public void waitUntilContainsText() { */ @Test(groups = TestCategories.SELENIUM) public void waitUntilAbsentElement() { - AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); this.getWebDriver().navigate().to(automationPageModel.testSiteUrl); UIWaitFactory.getWaitDriver(this.getWebDriver()).waitForPageLoad(); @@ -257,7 +268,6 @@ public void waitUntilAbsentElement() { */ @Test(groups = TestCategories.SELENIUM) public void waitUntilAttributeEquals() { - AsyncPageModel asyncPageModel = new AsyncPageModel(this.getTestObject()); this.getWebDriver().navigate().to(asyncPageModel.testSiteAsyncUrl); UIWaitFactory.getWaitDriver(this.getWebDriver()).waitForPageLoad(); @@ -271,7 +281,6 @@ public void waitUntilAttributeEquals() { */ @Test(groups = TestCategories.SELENIUM) public void waitUntilAttributeContains() { - AsyncPageModel asyncPageModel = new AsyncPageModel(this.getTestObject()); this.getWebDriver().navigate().to(asyncPageModel.testSiteAsyncUrl); UIWaitFactory.getWaitDriver(this.getWebDriver()).waitForPageLoad(); From abfd7af72ef64787d734bc7326e99ef50cb4fa4f Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Sat, 31 Dec 2022 02:26:09 -0600 Subject: [PATCH 59/91] updated playwright unit tests to used @BeforeMethod set up --- .../PlaywrightSyncElementUnitTest.java | 42 +++---------------- 1 file changed, 6 insertions(+), 36 deletions(-) diff --git a/maqs-playwright/src/test/java/io/github/maqs/playwright/PlaywrightSyncElementUnitTest.java b/maqs-playwright/src/test/java/io/github/maqs/playwright/PlaywrightSyncElementUnitTest.java index 863fee09f..4d2eb090d 100644 --- a/maqs-playwright/src/test/java/io/github/maqs/playwright/PlaywrightSyncElementUnitTest.java +++ b/maqs-playwright/src/test/java/io/github/maqs/playwright/PlaywrightSyncElementUnitTest.java @@ -29,15 +29,15 @@ public class PlaywrightSyncElementUnitTest extends BasePlaywrightTest { /** - * the models map. + * The models map. */ private static final Map models = new HashMap<>(); /** - * Setup test and make sure we are on the correct test page. + * Create the page model and make sure we are on the correct test page. */ @BeforeMethod - public void createPlaywrightPageModel() { + public void setUp() { PageModel pageModel = new PageModel(this.getTestObject()); pageModel.openPage(); models.put(this.getTestObject(), pageModel); @@ -56,7 +56,6 @@ public void cleanupPlaywrightPageModel() { */ @Test(groups = TestCategories.PLAYWRIGHT) public void checkTest() { - createPlaywrightPageModel(); Assert.assertFalse(models.get(this.getTestObject()).getCheckbox1().isChecked()); models.get(this.getTestObject()).getCheckbox1().check(); Assert.assertTrue(models.get(this.getTestObject()).getCheckbox1().isChecked()); @@ -67,7 +66,6 @@ public void checkTest() { */ @Test(groups = TestCategories.PLAYWRIGHT) public void setCheckTest() { - createPlaywrightPageModel(); Assert.assertFalse(models.get(this.getTestObject()).getCheckbox2().isChecked()); models.get(this.getTestObject()).getCheckbox2().setChecked(false); Assert.assertFalse(models.get(this.getTestObject()).getCheckbox2().isChecked()); @@ -80,7 +78,6 @@ public void setCheckTest() { */ @Test(groups = TestCategories.PLAYWRIGHT) public void clickTest() { - createPlaywrightPageModel(); Assert.assertFalse(models.get(this.getTestObject()).getCloseButtonShowDialog().isVisible()); models.get(this.getTestObject()).getShowDialog1().click(); Assert.assertTrue(models.get(this.getTestObject()).getCloseButtonShowDialog().isEnabled()); @@ -91,7 +88,6 @@ public void clickTest() { */ @Test(groups = TestCategories.PLAYWRIGHT) public void selectOptionTest() { - createPlaywrightPageModel(); List singleOption = models.get(this.getTestObject()).getNamesDropDown().selectOption("5"); Assert.assertEquals(singleOption.size(), 1); Assert.assertEquals(singleOption.get(0), "5"); @@ -114,7 +110,6 @@ public void selectOptionTest() { */ @Test(groups = TestCategories.PLAYWRIGHT) public void selectMultipleOptionTest() { - createPlaywrightPageModel(); List multipleOptions = models.get(this.getTestObject()).getComputerPartsSelection() .selectOption(new String[]{"one", "five"}); Assert.assertEquals(multipleOptions.size(), 2); @@ -138,7 +133,6 @@ public void selectMultipleOptionTest() { */ @Test(groups = TestCategories.PLAYWRIGHT) public void doubleClickTest() { - createPlaywrightPageModel(); models.get(this.getTestObject()).getNamesDropDown().doubleClick(); Assert.assertFalse(models.get(this.getTestObject()).getNamesDropDownFirstOption().isVisible()); } @@ -148,14 +142,13 @@ public void doubleClickTest() { */ @Test(groups = TestCategories.PLAYWRIGHT) public void dragAndDropTest() { - createPlaywrightPageModel(); models.get(this.getTestObject()).getHtml5Draggable() .dragTo(models.get(this.getTestObject()).getHtml5Drop().elementLocator()); } - /// - /// Test page locator options work as expected - /// + /** + * Test page locator options work as expected. + */ @Test(groups = TestCategories.PLAYWRIGHT) public void PageLocatorOptionsTest() { Page.LocatorOptions locator = new Page.LocatorOptions(); @@ -171,7 +164,6 @@ public void PageLocatorOptionsTest() { */ @Test(groups = TestCategories.PLAYWRIGHT) public void fillTest() { - createPlaywrightPageModel(); models.get(this.getTestObject()).getFirstNameText().fill("Ted"); Assert.assertEquals(models.get(this.getTestObject()).getFirstNameText().inputValue(), "Ted"); } @@ -181,7 +173,6 @@ public void fillTest() { */ @Test(groups = TestCategories.PLAYWRIGHT) public void getAttributeTest() { - createPlaywrightPageModel(); Assert.assertEquals(models.get(this.getTestObject()).getShowDialog1().getAttribute("onclick"), "ShowProgressAnimation();"); } @@ -191,7 +182,6 @@ public void getAttributeTest() { */ @Test(groups = TestCategories.PLAYWRIGHT) public void pressTest() { - createPlaywrightPageModel(); Assert.assertFalse(models.get(this.getTestObject()).getCloseButtonShowDialog().isVisible()); models.get(this.getTestObject()).getShowDialog1().press("Enter"); Assert.assertTrue(models.get(this.getTestObject()).getCloseButtonShowDialog().isEnabled()); @@ -202,7 +192,6 @@ public void pressTest() { */ @Test(groups = TestCategories.PLAYWRIGHT) public void hoverTest() { - createPlaywrightPageModel(); models.get(this.getTestObject()).getTrainingDropdown().hover(); Assert.assertTrue(models.get(this.getTestObject()).getTrainingOneLink().isVisible()); } @@ -212,7 +201,6 @@ public void hoverTest() { */ @Test(groups = TestCategories.PLAYWRIGHT) public void innerHTMLTest() { - createPlaywrightPageModel(); Assert.assertTrue(models.get(this.getTestObject()).getFooter().innerHTML().contains("MAQS")); } @@ -221,7 +209,6 @@ public void innerHTMLTest() { */ @Test(groups = TestCategories.PLAYWRIGHT) public void innerTextTest() { - createPlaywrightPageModel(); Assert.assertTrue(models.get(this.getTestObject()).getFooter().innerText().contains("MAQS")); } @@ -230,7 +217,6 @@ public void innerTextTest() { */ @Test(groups = TestCategories.PLAYWRIGHT) public void isDisabledTest() { - createPlaywrightPageModel(); Assert.assertTrue(models.get(this.getTestObject()).getDisabledField().isDisabled()); Assert.assertFalse(models.get(this.getTestObject()).getFirstNameText().isDisabled()); } @@ -240,7 +226,6 @@ public void isDisabledTest() { */ @Test(groups = TestCategories.PLAYWRIGHT) public void isEditableTest() { - createPlaywrightPageModel(); Assert.assertFalse(models.get(this.getTestObject()).getDisabledField().isEditable()); Assert.assertTrue(models.get(this.getTestObject()).getFirstNameText().isEditable()); } @@ -250,7 +235,6 @@ public void isEditableTest() { */ @Test(groups = TestCategories.PLAYWRIGHT) public void isEnabledTest() { - createPlaywrightPageModel(); Assert.assertFalse(models.get(this.getTestObject()).getDisabledField().isEnabled()); Assert.assertTrue(models.get(this.getTestObject()).getFirstNameText().isEnabled()); } @@ -260,7 +244,6 @@ public void isEnabledTest() { */ @Test(groups = TestCategories.PLAYWRIGHT) public void isEventuallyGoneTest() { - createPlaywrightPageModel(); Assert.assertTrue(models.get(this.getTestObject()).getNotReal().isEventuallyGone()); Assert.assertFalse(models.get(this.getTestObject()).getFirstNameText().isEventuallyGone()); } @@ -270,7 +253,6 @@ public void isEventuallyGoneTest() { */ @Test(groups = TestCategories.PLAYWRIGHT) public void isEventuallyVisibleTest() { - createPlaywrightPageModel(); Assert.assertTrue(models.get(this.getTestObject()).getFirstNameText().isEventuallyVisible()); Assert.assertFalse(models.get(this.getTestObject()).getNotReal().isEventuallyVisible()); } @@ -280,7 +262,6 @@ public void isEventuallyVisibleTest() { */ @Test(groups = TestCategories.PLAYWRIGHT) public void isHiddenTest() { - createPlaywrightPageModel(); Assert.assertFalse(models.get(this.getTestObject()).getDisabledField().isHidden()); Assert.assertTrue(models.get(this.getTestObject()).getTrainingOneLink().isHidden()); Assert.assertTrue(models.get(this.getTestObject()).getNotReal().isHidden()); @@ -291,7 +272,6 @@ public void isHiddenTest() { */ @Test(groups = TestCategories.PLAYWRIGHT) public void isVisibleTest() { - createPlaywrightPageModel(); Assert.assertTrue(models.get(this.getTestObject()).getFirstNameText().isVisible()); Assert.assertFalse(models.get(this.getTestObject()).getNotReal().isVisible()); } @@ -301,8 +281,6 @@ public void isVisibleTest() { */ @Test(groups = TestCategories.PLAYWRIGHT) public void tapTest() { - createPlaywrightPageModel(); - // Switch to a context that supports touch BrowserContext newBrowserContext = this.getPageDriver().getParentBrowser() .newContext(new Browser.NewContextOptions().setHasTouch(true)); @@ -321,7 +299,6 @@ public void tapTest() { */ @Test(groups = TestCategories.PLAYWRIGHT) public void textContentTest() { - createPlaywrightPageModel(); Assert.assertEquals(models.get(this.getTestObject()).getShowDialog1().textContent(), "Show dialog"); } @@ -330,7 +307,6 @@ public void textContentTest() { */ @Test(groups = TestCategories.PLAYWRIGHT) public void typeAndInputValueTest() { - createPlaywrightPageModel(); models.get(this.getTestObject()).getFirstNameText().type("Ted"); Assert.assertEquals(models.get(this.getTestObject()).getFirstNameText().inputValue(), "Ted"); } @@ -340,7 +316,6 @@ public void typeAndInputValueTest() { */ @Test(groups = TestCategories.PLAYWRIGHT) public void uncheckTest() { - createPlaywrightPageModel(); models.get(this.getTestObject()).getCheckbox2().uncheck(); } @@ -349,7 +324,6 @@ public void uncheckTest() { */ @Test(groups = TestCategories.PLAYWRIGHT) public void evalOnSelectorAllTest() { - createPlaywrightPageModel(); Object results = models.get( this.getTestObject()).getComputerPartsAllOptions().evalOnSelectorAll( "nodes => nodes.map(n => n.innerText)"); @@ -361,7 +335,6 @@ public void evalOnSelectorAllTest() { */ @Test(groups = TestCategories.PLAYWRIGHT) public void evaluateTest() { - createPlaywrightPageModel(); Assert.assertEquals(Integer.parseInt(models.get( this.getTestObject()).getShowDialog1().evaluate("1 + 2").toString()), 3); } @@ -371,7 +344,6 @@ public void evaluateTest() { */ @Test(groups = TestCategories.PLAYWRIGHT) public void dispatchEventTest() { - createPlaywrightPageModel(); models.get(this.getTestObject()).getAsyncPageLink().dispatchEvent("click"); Assert.assertTrue(models.get(this.getTestObject()).getAlwaysUpOnAsyncPage().isEventuallyVisible()); } @@ -381,7 +353,6 @@ public void dispatchEventTest() { */ @Test(groups = TestCategories.PLAYWRIGHT) public void setInputFilesTest() { - createPlaywrightPageModel(); FilePayload filePayload = new FilePayload( "test.png", "image/png", this.getPageDriver().getAsyncPage().screenshot()); models.get(this.getTestObject()).getUpload().setInputFiles(filePayload); @@ -393,7 +364,6 @@ public void setInputFilesTest() { */ @Test(groups = TestCategories.PLAYWRIGHT) public void focusTest() { - createPlaywrightPageModel(); Assert.assertFalse(models.get(this.getTestObject()).getDatePickerDays().isVisible()); models.get(this.getTestObject()).getDatePickerInput().focus(); Assert.assertTrue(models.get(this.getTestObject()).getDatePickerDays().isVisible()); From db7bd64b8f42a20680e4c79227ce1feee587ede1 Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Sat, 31 Dec 2022 02:48:36 -0600 Subject: [PATCH 60/91] updated selenium unit tests to work again --- .../selenium/SeleniumUtilitiesUnitTest.java | 34 ++++++++----------- .../maqs/selenium/UIWaitForUnitTest.java | 18 ++++++++-- 2 files changed, 30 insertions(+), 22 deletions(-) diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumUtilitiesUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumUtilitiesUnitTest.java index 9198de985..3ac02082d 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumUtilitiesUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumUtilitiesUnitTest.java @@ -10,16 +10,14 @@ import io.github.maqs.utilities.helper.TestCategories; import io.github.maqs.utilities.logging.ConsoleLogger; import io.github.maqs.utilities.logging.FileLogger; - +import io.github.maqs.utilities.logging.HtmlFileLogger; +import io.github.maqs.utilities.logging.Logger; import java.io.File; import java.nio.file.Paths; import java.time.Clock; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; import java.util.Locale; - -import io.github.maqs.utilities.logging.HtmlFileLogger; -import io.github.maqs.utilities.logging.Logger; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; @@ -27,7 +25,6 @@ import org.openqa.selenium.support.events.EventFiringDecorator; import org.openqa.selenium.support.events.WebDriverListener; import org.testng.Assert; -import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; /** @@ -35,24 +32,12 @@ */ public class SeleniumUtilitiesUnitTest extends BaseGenericTest { - /** - * The web driver to be used in testing. - */ - protected WebDriver webDriver; - - /** - * Sets up the web driver for the unit test. - */ - @BeforeMethod - private void setUp() { - webDriver = WebDriverFactory.getDefaultBrowser(); - } - /** * Test capture screenshot no append. */ @Test(groups = TestCategories.SELENIUM) public void testCaptureScreenshotNoAppend() { + WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); try { FileLogger fileLogger = (FileLogger) this.getTestObject().getLogger(); SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, @@ -79,6 +64,7 @@ public void testCaptureScreenshotNoAppend() { */ @Test(groups = TestCategories.SELENIUM) public void testCaptureScreenshotAppend() { + WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); try { FileLogger fileLogger = (FileLogger) this.getTestObject().getLogger(); SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, @@ -110,6 +96,7 @@ public void testCaptureScreenshotAppend() { */ @Test(groups = TestCategories.SELENIUM) public void testCaptureScreenshotNullWebDriver() { + WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); try { FileLogger fileLogger = (FileLogger) this.getTestObject().getLogger(); SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, @@ -133,6 +120,7 @@ public void testCaptureScreenshotNullWebDriver() { */ @Test(groups = TestCategories.SELENIUM) public void testCaptureScreenshotAppendScreenshot() { + WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); try { HtmlFileLogger fileLogger = new HtmlFileLogger("Capture Screenshot Append"); this.getTestObject().setLogger(fileLogger); @@ -165,6 +153,7 @@ public void testCaptureScreenshotAppendScreenshot() { */ @Test(groups = TestCategories.SELENIUM) public void testCaptureScreenshotConsoleLogger() { + WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); try { ConsoleLogger consoleLogger = new ConsoleLogger(); SeleniumTestObject testObject = new SeleniumTestObject(webDriver, consoleLogger, @@ -187,6 +176,7 @@ public void testCaptureScreenshotConsoleLogger() { */ @Test(groups = TestCategories.SELENIUM) public void testCaptureScreenshotCustomDirectoryFileName() { + WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); try { FileLogger fileLogger = (FileLogger) this.getTestObject().getLogger(); SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, @@ -217,6 +207,7 @@ public void testCaptureScreenshotCustomDirectoryFileName() { */ @Test(groups = TestCategories.SELENIUM) public void testSavePageSourceNoAppend() { + WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); try { FileLogger fileLogger = (FileLogger) this.getTestObject().getLogger(); SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, @@ -243,6 +234,7 @@ public void testSavePageSourceNoAppend() { */ @Test(groups = TestCategories.SELENIUM) public void testSavePageSourceAppend() { + WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); try { FileLogger fileLogger = (FileLogger) this.getTestObject().getLogger(); SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, @@ -274,6 +266,7 @@ public void testSavePageSourceAppend() { */ @Test(groups = TestCategories.SELENIUM) public void testSavePageSourceNullWebDriver() { + WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); try { FileLogger fileLogger = (FileLogger) this.getTestObject().getLogger(); SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, @@ -292,12 +285,12 @@ public void testSavePageSourceNullWebDriver() { } } - /** * Test save page source custom directory file name. */ @Test(groups = TestCategories.SELENIUM) public void testSavePageSourceCustomDirectoryFileName() { + WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); try { FileLogger fileLogger = (FileLogger) this.getTestObject().getLogger(); SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, @@ -333,6 +326,7 @@ public void testSavePageSourceCustomDirectoryFileName() { */ @Test(groups = TestCategories.SELENIUM) public void testSavePageSourceConsoleLogger() { + WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); try { ConsoleLogger consoleLogger = new ConsoleLogger(); SeleniumTestObject testObject = new SeleniumTestObject(webDriver, consoleLogger, @@ -359,6 +353,7 @@ public void testSavePageSourceConsoleLogger() { */ @Test(groups = TestCategories.SELENIUM) public void testWebElementToWebDriver() { + WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); try { WebDriverListener listener = new EventHandler(this.getLogger()); webDriver = new EventFiringDecorator(listener).decorate(webDriver); @@ -384,6 +379,7 @@ public void testWebElementToWebDriver() { */ @Test(groups = TestCategories.SELENIUM) public void testKillDriver() { + WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); try { ConsoleLogger consoleLogger = new ConsoleLogger(); SeleniumTestObject testObject = new SeleniumTestObject(webDriver, consoleLogger, diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/UIWaitForUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/UIWaitForUnitTest.java index 8ba8771e1..88b1133f1 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/UIWaitForUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/UIWaitForUnitTest.java @@ -32,8 +32,6 @@ public class UIWaitForUnitTest extends BaseSeleniumTest { */ private AutomationPageModel automationPageModel; - private UIWait wait; - /** * Sets up the page models for the unit tests. */ @@ -42,7 +40,6 @@ private void setUp() { iFramePageModel = new IFramePageModel(this.getTestObject()); asyncPageModel = new AsyncPageModel(this.getTestObject()); automationPageModel = new AutomationPageModel(this.getTestObject()); - wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); } /** @@ -51,6 +48,7 @@ private void setUp() { @Test(groups = TestCategories.SELENIUM) public void waitForIFrameToLoad() { this.getWebDriver().navigate().to(iFramePageModel.testSiteIFrameUrl); + UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); wait.waitForPageLoad(); WebDriverFactory.setBrowserSize(this.getWebDriver(), "Maximize"); @@ -67,6 +65,7 @@ public void waitForIFrameToLoad() { @Test(groups = TestCategories.SELENIUM) public void waitForAttributeTextEqualsFound() { this.getWebDriver().navigate().to(asyncPageModel.testSiteAsyncUrl); + UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); wait.waitForVisibleElement(asyncPageModel.asyncLoadingTextDiv); WebElement element = wait.waitForAttributeTextEquals( @@ -81,6 +80,7 @@ public void waitForAttributeTextEqualsFound() { @Test(groups = TestCategories.SELENIUM) public void waitForClickableElementAndScrollIntoView() { this.getWebDriver().navigate().to(automationPageModel.testSiteAutomationUrl); + UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); Assert.assertNotNull(wait.waitForClickableElementAndScrollIntoView( automationPageModel.automationShowDialog1)); Assert.assertNotNull(wait.waitForClickableElementAndScrollIntoView( @@ -93,6 +93,7 @@ public void waitForClickableElementAndScrollIntoView() { @Test(groups = TestCategories.SELENIUM) public void waitForPresentElement() { this.getWebDriver().navigate().to(automationPageModel.testSiteAutomationUrl); + UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); Assert.assertNotNull(wait.waitForPresentElement(automationPageModel.flowerTableTitle)); Assert.assertNotNull(wait.waitForPresentElement(automationPageModel.flowerTableTitle, 10000, 1000)); } @@ -103,6 +104,7 @@ public void waitForPresentElement() { @Test(groups = TestCategories.SELENIUM) public void waitForElements() { this.getWebDriver().navigate().to(automationPageModel.testSiteAutomationUrl); + UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); Assert.assertEquals(wait.waitForElements(automationPageModel.flowerTable).size(), 20); Assert.assertEquals(wait.waitForElements(automationPageModel.flowerTable, 10000, 1000).size(), 20); } @@ -113,6 +115,7 @@ public void waitForElements() { @Test(groups = TestCategories.SELENIUM) public void waitForEnabledElement() { this.getWebDriver().navigate().to(automationPageModel.testSiteAutomationUrl); + UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); Assert.assertNotNull(wait.waitForEnabledElement(automationPageModel.flowerTableTitle)); Assert.assertNotNull(wait.waitForEnabledElement(automationPageModel.flowerTableTitle, 10000, 1000)); } @@ -123,6 +126,7 @@ public void waitForEnabledElement() { @Test(groups = TestCategories.SELENIUM) public void waitForClickableElement() { this.getWebDriver().navigate().to(automationPageModel.testSiteUrl); + UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); wait.waitForPageLoad(); WebElement element = wait.waitForClickableElement(automationPageModel.homeButton); @@ -137,6 +141,7 @@ public void waitForClickableElement() { @Test(groups = TestCategories.SELENIUM) public void waitForVisibleElement() { this.getWebDriver().navigate().to(asyncPageModel.testSiteAsyncUrl); + UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); wait.waitForPageLoad(); WebElement element = wait.waitForVisibleElement(asyncPageModel.asyncDropdownCssSelector); @@ -151,6 +156,7 @@ public void waitForVisibleElement() { @Test(groups = TestCategories.SELENIUM) public void waitForExactText() { this.getWebDriver().navigate().to(asyncPageModel.testSiteAsyncUrl); + UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); wait.waitForPageLoad(); WebElement element = wait.waitForExactText(asyncPageModel.asyncOptionsLabel, "Options"); @@ -163,6 +169,7 @@ public void waitForExactText() { @Test(groups = TestCategories.SELENIUM) public void waitForContainsText() { this.getWebDriver().navigate().to(automationPageModel.testSiteAutomationUrl); + UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); wait.waitForPageLoad(); WebElement element = wait.waitForContainsText(automationPageModel.automationNamesLabel, "Name"); @@ -175,6 +182,7 @@ public void waitForContainsText() { @Test(groups = TestCategories.SELENIUM) public void waitForAbsentElement() { this.getWebDriver().navigate().to(automationPageModel.testSiteUrl); + UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); wait.waitForPageLoad(); wait.waitForAbsentElement(automationPageModel.notInPage); } @@ -185,6 +193,7 @@ public void waitForAbsentElement() { @Test(groups = TestCategories.SELENIUM, expectedExceptions = TimeoutException.class) public void waitForAbsentElementFail() { this.getWebDriver().navigate().to(automationPageModel.testSiteUrl); + UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); wait.waitForPageLoad(); wait.waitForAbsentElement(automationPageModel.homeButton); } @@ -195,6 +204,7 @@ public void waitForAbsentElementFail() { @Test(groups = TestCategories.SELENIUM) public void waitForPageLoad() { getWebDriver().navigate().to(automationPageModel.testSiteUrl); + UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); wait.waitForPageLoad(); } @@ -206,6 +216,7 @@ public void waitForPageLoad() { @Test(groups = TestCategories.SELENIUM, expectedExceptions = NotFoundException.class) public void waitForAttributeEqualsDoesNotFind() { this.getWebDriver().navigate().to(automationPageModel.testSiteAutomationUrl); + UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); wait.waitForPageLoad(); WebElement element = wait.waitForAttributeTextEquals( @@ -220,6 +231,7 @@ public void waitForAttributeEqualsDoesNotFind() { @Test(groups = TestCategories.SELENIUM) public void waitForAttributeEqualsFound() { this.getWebDriver().navigate().to(asyncPageModel.testSiteAsyncUrl); + UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); wait.waitForPageLoad(); wait.waitForVisibleElement(asyncPageModel.asyncLoadingTextDiv); From b3ba4f3335b011c47690f888e5e0136068ce0aed Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Sat, 31 Dec 2022 02:59:01 -0600 Subject: [PATCH 61/91] Revert "updated selenium unit tests to work again" This reverts commit db7bd64b8f42a20680e4c79227ce1feee587ede1. --- .../selenium/SeleniumUtilitiesUnitTest.java | 34 +++++++++++-------- .../maqs/selenium/UIWaitForUnitTest.java | 18 ++-------- 2 files changed, 22 insertions(+), 30 deletions(-) diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumUtilitiesUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumUtilitiesUnitTest.java index 3ac02082d..9198de985 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumUtilitiesUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumUtilitiesUnitTest.java @@ -10,14 +10,16 @@ import io.github.maqs.utilities.helper.TestCategories; import io.github.maqs.utilities.logging.ConsoleLogger; import io.github.maqs.utilities.logging.FileLogger; -import io.github.maqs.utilities.logging.HtmlFileLogger; -import io.github.maqs.utilities.logging.Logger; + import java.io.File; import java.nio.file.Paths; import java.time.Clock; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; import java.util.Locale; + +import io.github.maqs.utilities.logging.HtmlFileLogger; +import io.github.maqs.utilities.logging.Logger; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; @@ -25,6 +27,7 @@ import org.openqa.selenium.support.events.EventFiringDecorator; import org.openqa.selenium.support.events.WebDriverListener; import org.testng.Assert; +import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; /** @@ -32,12 +35,24 @@ */ public class SeleniumUtilitiesUnitTest extends BaseGenericTest { + /** + * The web driver to be used in testing. + */ + protected WebDriver webDriver; + + /** + * Sets up the web driver for the unit test. + */ + @BeforeMethod + private void setUp() { + webDriver = WebDriverFactory.getDefaultBrowser(); + } + /** * Test capture screenshot no append. */ @Test(groups = TestCategories.SELENIUM) public void testCaptureScreenshotNoAppend() { - WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); try { FileLogger fileLogger = (FileLogger) this.getTestObject().getLogger(); SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, @@ -64,7 +79,6 @@ public void testCaptureScreenshotNoAppend() { */ @Test(groups = TestCategories.SELENIUM) public void testCaptureScreenshotAppend() { - WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); try { FileLogger fileLogger = (FileLogger) this.getTestObject().getLogger(); SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, @@ -96,7 +110,6 @@ public void testCaptureScreenshotAppend() { */ @Test(groups = TestCategories.SELENIUM) public void testCaptureScreenshotNullWebDriver() { - WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); try { FileLogger fileLogger = (FileLogger) this.getTestObject().getLogger(); SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, @@ -120,7 +133,6 @@ public void testCaptureScreenshotNullWebDriver() { */ @Test(groups = TestCategories.SELENIUM) public void testCaptureScreenshotAppendScreenshot() { - WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); try { HtmlFileLogger fileLogger = new HtmlFileLogger("Capture Screenshot Append"); this.getTestObject().setLogger(fileLogger); @@ -153,7 +165,6 @@ public void testCaptureScreenshotAppendScreenshot() { */ @Test(groups = TestCategories.SELENIUM) public void testCaptureScreenshotConsoleLogger() { - WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); try { ConsoleLogger consoleLogger = new ConsoleLogger(); SeleniumTestObject testObject = new SeleniumTestObject(webDriver, consoleLogger, @@ -176,7 +187,6 @@ public void testCaptureScreenshotConsoleLogger() { */ @Test(groups = TestCategories.SELENIUM) public void testCaptureScreenshotCustomDirectoryFileName() { - WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); try { FileLogger fileLogger = (FileLogger) this.getTestObject().getLogger(); SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, @@ -207,7 +217,6 @@ public void testCaptureScreenshotCustomDirectoryFileName() { */ @Test(groups = TestCategories.SELENIUM) public void testSavePageSourceNoAppend() { - WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); try { FileLogger fileLogger = (FileLogger) this.getTestObject().getLogger(); SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, @@ -234,7 +243,6 @@ public void testSavePageSourceNoAppend() { */ @Test(groups = TestCategories.SELENIUM) public void testSavePageSourceAppend() { - WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); try { FileLogger fileLogger = (FileLogger) this.getTestObject().getLogger(); SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, @@ -266,7 +274,6 @@ public void testSavePageSourceAppend() { */ @Test(groups = TestCategories.SELENIUM) public void testSavePageSourceNullWebDriver() { - WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); try { FileLogger fileLogger = (FileLogger) this.getTestObject().getLogger(); SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, @@ -285,12 +292,12 @@ public void testSavePageSourceNullWebDriver() { } } + /** * Test save page source custom directory file name. */ @Test(groups = TestCategories.SELENIUM) public void testSavePageSourceCustomDirectoryFileName() { - WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); try { FileLogger fileLogger = (FileLogger) this.getTestObject().getLogger(); SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, @@ -326,7 +333,6 @@ public void testSavePageSourceCustomDirectoryFileName() { */ @Test(groups = TestCategories.SELENIUM) public void testSavePageSourceConsoleLogger() { - WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); try { ConsoleLogger consoleLogger = new ConsoleLogger(); SeleniumTestObject testObject = new SeleniumTestObject(webDriver, consoleLogger, @@ -353,7 +359,6 @@ public void testSavePageSourceConsoleLogger() { */ @Test(groups = TestCategories.SELENIUM) public void testWebElementToWebDriver() { - WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); try { WebDriverListener listener = new EventHandler(this.getLogger()); webDriver = new EventFiringDecorator(listener).decorate(webDriver); @@ -379,7 +384,6 @@ public void testWebElementToWebDriver() { */ @Test(groups = TestCategories.SELENIUM) public void testKillDriver() { - WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); try { ConsoleLogger consoleLogger = new ConsoleLogger(); SeleniumTestObject testObject = new SeleniumTestObject(webDriver, consoleLogger, diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/UIWaitForUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/UIWaitForUnitTest.java index 88b1133f1..8ba8771e1 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/UIWaitForUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/UIWaitForUnitTest.java @@ -32,6 +32,8 @@ public class UIWaitForUnitTest extends BaseSeleniumTest { */ private AutomationPageModel automationPageModel; + private UIWait wait; + /** * Sets up the page models for the unit tests. */ @@ -40,6 +42,7 @@ private void setUp() { iFramePageModel = new IFramePageModel(this.getTestObject()); asyncPageModel = new AsyncPageModel(this.getTestObject()); automationPageModel = new AutomationPageModel(this.getTestObject()); + wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); } /** @@ -48,7 +51,6 @@ private void setUp() { @Test(groups = TestCategories.SELENIUM) public void waitForIFrameToLoad() { this.getWebDriver().navigate().to(iFramePageModel.testSiteIFrameUrl); - UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); wait.waitForPageLoad(); WebDriverFactory.setBrowserSize(this.getWebDriver(), "Maximize"); @@ -65,7 +67,6 @@ public void waitForIFrameToLoad() { @Test(groups = TestCategories.SELENIUM) public void waitForAttributeTextEqualsFound() { this.getWebDriver().navigate().to(asyncPageModel.testSiteAsyncUrl); - UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); wait.waitForVisibleElement(asyncPageModel.asyncLoadingTextDiv); WebElement element = wait.waitForAttributeTextEquals( @@ -80,7 +81,6 @@ public void waitForAttributeTextEqualsFound() { @Test(groups = TestCategories.SELENIUM) public void waitForClickableElementAndScrollIntoView() { this.getWebDriver().navigate().to(automationPageModel.testSiteAutomationUrl); - UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); Assert.assertNotNull(wait.waitForClickableElementAndScrollIntoView( automationPageModel.automationShowDialog1)); Assert.assertNotNull(wait.waitForClickableElementAndScrollIntoView( @@ -93,7 +93,6 @@ public void waitForClickableElementAndScrollIntoView() { @Test(groups = TestCategories.SELENIUM) public void waitForPresentElement() { this.getWebDriver().navigate().to(automationPageModel.testSiteAutomationUrl); - UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); Assert.assertNotNull(wait.waitForPresentElement(automationPageModel.flowerTableTitle)); Assert.assertNotNull(wait.waitForPresentElement(automationPageModel.flowerTableTitle, 10000, 1000)); } @@ -104,7 +103,6 @@ public void waitForPresentElement() { @Test(groups = TestCategories.SELENIUM) public void waitForElements() { this.getWebDriver().navigate().to(automationPageModel.testSiteAutomationUrl); - UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); Assert.assertEquals(wait.waitForElements(automationPageModel.flowerTable).size(), 20); Assert.assertEquals(wait.waitForElements(automationPageModel.flowerTable, 10000, 1000).size(), 20); } @@ -115,7 +113,6 @@ public void waitForElements() { @Test(groups = TestCategories.SELENIUM) public void waitForEnabledElement() { this.getWebDriver().navigate().to(automationPageModel.testSiteAutomationUrl); - UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); Assert.assertNotNull(wait.waitForEnabledElement(automationPageModel.flowerTableTitle)); Assert.assertNotNull(wait.waitForEnabledElement(automationPageModel.flowerTableTitle, 10000, 1000)); } @@ -126,7 +123,6 @@ public void waitForEnabledElement() { @Test(groups = TestCategories.SELENIUM) public void waitForClickableElement() { this.getWebDriver().navigate().to(automationPageModel.testSiteUrl); - UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); wait.waitForPageLoad(); WebElement element = wait.waitForClickableElement(automationPageModel.homeButton); @@ -141,7 +137,6 @@ public void waitForClickableElement() { @Test(groups = TestCategories.SELENIUM) public void waitForVisibleElement() { this.getWebDriver().navigate().to(asyncPageModel.testSiteAsyncUrl); - UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); wait.waitForPageLoad(); WebElement element = wait.waitForVisibleElement(asyncPageModel.asyncDropdownCssSelector); @@ -156,7 +151,6 @@ public void waitForVisibleElement() { @Test(groups = TestCategories.SELENIUM) public void waitForExactText() { this.getWebDriver().navigate().to(asyncPageModel.testSiteAsyncUrl); - UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); wait.waitForPageLoad(); WebElement element = wait.waitForExactText(asyncPageModel.asyncOptionsLabel, "Options"); @@ -169,7 +163,6 @@ public void waitForExactText() { @Test(groups = TestCategories.SELENIUM) public void waitForContainsText() { this.getWebDriver().navigate().to(automationPageModel.testSiteAutomationUrl); - UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); wait.waitForPageLoad(); WebElement element = wait.waitForContainsText(automationPageModel.automationNamesLabel, "Name"); @@ -182,7 +175,6 @@ public void waitForContainsText() { @Test(groups = TestCategories.SELENIUM) public void waitForAbsentElement() { this.getWebDriver().navigate().to(automationPageModel.testSiteUrl); - UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); wait.waitForPageLoad(); wait.waitForAbsentElement(automationPageModel.notInPage); } @@ -193,7 +185,6 @@ public void waitForAbsentElement() { @Test(groups = TestCategories.SELENIUM, expectedExceptions = TimeoutException.class) public void waitForAbsentElementFail() { this.getWebDriver().navigate().to(automationPageModel.testSiteUrl); - UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); wait.waitForPageLoad(); wait.waitForAbsentElement(automationPageModel.homeButton); } @@ -204,7 +195,6 @@ public void waitForAbsentElementFail() { @Test(groups = TestCategories.SELENIUM) public void waitForPageLoad() { getWebDriver().navigate().to(automationPageModel.testSiteUrl); - UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); wait.waitForPageLoad(); } @@ -216,7 +206,6 @@ public void waitForPageLoad() { @Test(groups = TestCategories.SELENIUM, expectedExceptions = NotFoundException.class) public void waitForAttributeEqualsDoesNotFind() { this.getWebDriver().navigate().to(automationPageModel.testSiteAutomationUrl); - UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); wait.waitForPageLoad(); WebElement element = wait.waitForAttributeTextEquals( @@ -231,7 +220,6 @@ public void waitForAttributeEqualsDoesNotFind() { @Test(groups = TestCategories.SELENIUM) public void waitForAttributeEqualsFound() { this.getWebDriver().navigate().to(asyncPageModel.testSiteAsyncUrl); - UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); wait.waitForPageLoad(); wait.waitForVisibleElement(asyncPageModel.asyncLoadingTextDiv); From 1a041abb73eb8e6613d534882e68480060087aee Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Sat, 31 Dec 2022 02:59:19 -0600 Subject: [PATCH 62/91] Revert "updated selenium unit tests to used @BeforeMethod set up" This reverts commit 989541711d62ddd93c7ebe305e0a08a19a616151. --- .../github/maqs/selenium/ElementHandler.java | 3 + .../maqs/selenium/ActionBuilderUnitTest.java | 21 +- .../BaseSeleniumPageModelUnitTest.java | 25 +- .../selenium/BaseSeleniumTestUnitTest.java | 1 + .../maqs/selenium/ElementHandlerUnitTest.java | 31 +- .../maqs/selenium/EventHandlerUnitTest.java | 81 +- .../maqs/selenium/LazyWebElementUnitTest.java | 4 +- .../SeleniumDriverManagerUnitTest.java | 28 +- .../selenium/SeleniumTestObjectUnitTest.java | 2 + .../selenium/SeleniumUtilitiesUnitTest.java | 709 +++++++++--------- .../github/maqs/selenium/UIFindUnitTest.java | 28 +- .../maqs/selenium/UIWaitFactoryUnitTest.java | 1 + .../maqs/selenium/UIWaitForUnitTest.java | 79 +- .../maqs/selenium/UIWaitUntilUnitTest.java | 43 +- 14 files changed, 556 insertions(+), 500 deletions(-) diff --git a/maqs-selenium/src/main/java/io/github/maqs/selenium/ElementHandler.java b/maqs-selenium/src/main/java/io/github/maqs/selenium/ElementHandler.java index ce19977a0..541447871 100644 --- a/maqs-selenium/src/main/java/io/github/maqs/selenium/ElementHandler.java +++ b/maqs-selenium/src/main/java/io/github/maqs/selenium/ElementHandler.java @@ -39,6 +39,7 @@ private ElementHandler() { * @return Text of the selected option in dropdown */ public static String getSelectedOptionFromDropdown(WebDriver webDriver, By by) { + Select select = new Select(UIWaitFactory.getWaitDriver(webDriver).waitForClickableElement(by)); return select.getFirstSelectedOption().getText(); } @@ -51,6 +52,7 @@ public static String getSelectedOptionFromDropdown(WebDriver webDriver, By by) { * @return String array list of selected items in dropdown */ public static List getSelectedOptionsFromDropdown(WebDriver webDriver, By by) { + ArrayList elements; ArrayList selectedItems = new ArrayList<>(); Select select = new Select(UIWaitFactory.getWaitDriver(webDriver).waitForClickableElement(by)); @@ -90,6 +92,7 @@ public static String getElementAttribute(WebDriver webDriver, By by) { * @return The text in the text box */ public static String getElementAttribute(WebDriver webDriver, By by, String attribute) { + return UIWaitFactory.getWaitDriver(webDriver).waitForVisibleElement(by).getAttribute(attribute); } diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/ActionBuilderUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/ActionBuilderUnitTest.java index 5c1b17ee0..a237d70d6 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/ActionBuilderUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/ActionBuilderUnitTest.java @@ -9,7 +9,6 @@ import io.github.maqs.utilities.helper.TestCategories; import org.openqa.selenium.Keys; import org.testng.Assert; -import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; /** @@ -17,18 +16,12 @@ */ public class ActionBuilderUnitTest extends BaseSeleniumTest { - /** - * The automation page model to use for the unit tests. - */ - private AutomationPageModel automationPageModel; - /** * Navigates to the specified url test page. + * @param url the url to be navigated to */ - @BeforeMethod - private void setUp() { - automationPageModel = new AutomationPageModel(this.getTestObject()); - this.getWebDriver().navigate().to(automationPageModel.testSiteAutomationUrl); + private void navigateToUrl(String url) { + this.getWebDriver().navigate().to(url); UIWaitFactory.getWaitDriver(this.getWebDriver()).waitForPageLoad(); } @@ -37,6 +30,8 @@ private void setUp() { */ @Test(groups = TestCategories.SELENIUM) public void hoverOverTest() { + AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); + this.navigateToUrl(automationPageModel.testSiteAutomationUrl); ActionBuilder.hoverOver(this.getWebDriver(), automationPageModel.automationDropDown); UIWaitFactory.getWaitDriver( this.getWebDriver()).waitForClickableElement(automationPageModel.iFrameDropDownButton).click(); @@ -49,6 +44,8 @@ public void hoverOverTest() { */ @Test(groups = TestCategories.SELENIUM) public void pressModifierKeyTest() { + AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); + this.navigateToUrl(automationPageModel.testSiteAutomationUrl); UIWaitFactory.getWaitDriver( this.getWebDriver()).waitForClickableElement(automationPageModel.listBoxOption1).click(); ActionBuilder.pressModifierKey(this.getWebDriver(), Keys.CONTROL); @@ -66,6 +63,8 @@ public void pressModifierKeyTest() { */ @Test(groups = TestCategories.SELENIUM) public void moveSliderTest() { + AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); + this.navigateToUrl(automationPageModel.testSiteAutomationUrl); ActionBuilder.slideElement(this.getWebDriver(), automationPageModel.slider, 50); Assert.assertEquals(this.getWebDriver().findElement( automationPageModel.sliderLabelNumber).getAttribute("value"), "4"); @@ -76,6 +75,8 @@ public void moveSliderTest() { */ @Test(groups = TestCategories.SELENIUM) public void rightClickToTriggerContextMenu() { + AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); + this.navigateToUrl(automationPageModel.testSiteAutomationUrl); ActionBuilder.rightClick(this.getWebDriver(), automationPageModel.rightClickableElementWithContextMenu); Assert.assertTrue(this.getWebDriver().findElement(automationPageModel.rightClickContextSaveText).isDisplayed()); } diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/BaseSeleniumPageModelUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/BaseSeleniumPageModelUnitTest.java index 4b663282d..72daf8541 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/BaseSeleniumPageModelUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/BaseSeleniumPageModelUnitTest.java @@ -9,7 +9,6 @@ import io.github.maqs.utilities.helper.exceptions.TimeoutException; import org.openqa.selenium.WebDriver; import org.testng.Assert; -import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; /** @@ -17,24 +16,12 @@ */ public class BaseSeleniumPageModelUnitTest extends BaseSeleniumTest { - /** - * The automation page model to be used for the unit tests. - */ - private AutomationPageModel automationPageModel; - - /** - * Setting up the automation page model for the unit tests. - */ - @BeforeMethod - private void setUp() { - automationPageModel = new AutomationPageModel(this.getTestObject()); - } - /** * Test getting the logger. */ @Test(groups = TestCategories.SELENIUM) public void testGetLogger() { + AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); Assert.assertNotNull(automationPageModel.getLogger()); } @@ -43,6 +30,7 @@ public void testGetLogger() { */ @Test(groups = TestCategories.SELENIUM) public void testGetTestObject() { + AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); Assert.assertNotNull(automationPageModel.getTestObject()); } @@ -51,6 +39,7 @@ public void testGetTestObject() { */ @Test(groups = TestCategories.SELENIUM) public void testGetWebDriver() { + AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); Assert.assertNotNull(automationPageModel.getWebDriver()); } @@ -59,6 +48,7 @@ public void testGetWebDriver() { */ @Test(groups = TestCategories.SELENIUM) public void testGetPerfTimerCollection() { + AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); Assert.assertNotNull(automationPageModel.getPerfTimerCollection()); } @@ -67,6 +57,7 @@ public void testGetPerfTimerCollection() { */ @Test(groups = TestCategories.SELENIUM) public void testSetWebDriver() { + AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); int hashCode = automationPageModel.getWebDriver().hashCode(); WebDriver drive = this.getBrowser(); @@ -81,6 +72,7 @@ public void testSetWebDriver() { */ @Test(groups = TestCategories.SELENIUM) public void testIsPageLoaded() { + AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); automationPageModel.open(); Assert.assertTrue(automationPageModel.isPageLoaded()); } @@ -90,6 +82,7 @@ public void testIsPageLoaded() { */ @Test(groups = TestCategories.SELENIUM) public void testGetSameElementTwiceReturnsTheSameElement() { + AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); automationPageModel.open(); automationPageModel.waitForPageLoad(); @@ -105,6 +98,7 @@ public void testGetSameElementTwiceReturnsTheSameElement() { */ @Test(groups = TestCategories.SELENIUM) public void testGetLazyElementWithBy() throws TimeoutException, InterruptedException { + AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); automationPageModel.open(); automationPageModel.waitForPageLoad(); LazyWebElement lazyElement = automationPageModel.getLazyElement(automationPageModel.automationPageHeader); @@ -124,6 +118,7 @@ public void testGetLazyElementWithBy() throws TimeoutException, InterruptedExcep */ @Test(groups = TestCategories.SELENIUM) public void testGetLazyElementWithByAndName() throws TimeoutException, InterruptedException { + AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); automationPageModel.open(); automationPageModel.waitForPageLoad(); LazyWebElement lazyElement = automationPageModel.getLazyElement( @@ -145,6 +140,7 @@ public void testGetLazyElementWithByAndName() throws TimeoutException, Interrupt */ @Test(groups = TestCategories.SELENIUM) public void testGetLazyElementWithParentElementAndBy() throws TimeoutException, InterruptedException { + AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); automationPageModel.open(); automationPageModel.waitForPageLoad(); LazyWebElement lazyElement = automationPageModel.getLazyElement( @@ -165,6 +161,7 @@ public void testGetLazyElementWithParentElementAndBy() throws TimeoutException, */ @Test(groups = TestCategories.SELENIUM) public void testGetLazyElementWithParentElementByAndName() throws TimeoutException, InterruptedException { + AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); automationPageModel.open(); automationPageModel.waitForPageLoad(); LazyWebElement lazyElement = automationPageModel.getLazyElement( diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/BaseSeleniumTestUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/BaseSeleniumTestUnitTest.java index c50744c4c..193099e1b 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/BaseSeleniumTestUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/BaseSeleniumTestUnitTest.java @@ -40,6 +40,7 @@ public void testGetSeleniumTestObject() { @Test(groups = TestCategories.SELENIUM) public void testGetBrowser() { + WebDriver driver = null; try { diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/ElementHandlerUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/ElementHandlerUnitTest.java index 9ebf01cde..9ae2befac 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/ElementHandlerUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/ElementHandlerUnitTest.java @@ -20,7 +20,6 @@ import org.openqa.selenium.NoSuchElementException; import org.openqa.selenium.WebElement; import org.testng.Assert; -import org.testng.annotations.BeforeMethod; import org.testng.annotations.Ignore; import org.testng.annotations.Test; @@ -29,16 +28,14 @@ */ public class ElementHandlerUnitTest extends BaseSeleniumTest { - private AutomationPageModel automationPageModel; - /** * Navigate to test page url and wait for page to load. */ - @BeforeMethod - private void setUp() { - automationPageModel = new AutomationPageModel(this.getTestObject()); + private AutomationPageModel navigateToUrl() { + AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); getWebDriver().navigate().to(automationPageModel.testSiteAutomationUrl); UIWaitFactory.getWaitDriver(getWebDriver()).waitForPageLoad(); + return automationPageModel; } /** @@ -47,6 +44,7 @@ private void setUp() { @Test(groups = TestCategories.SELENIUM) public void createSortedCommaDelimitedStringFromWebElementsTest() { String expectedText = "Hard Drive, Keyboard, Monitor, Motherboard, Mouse, Power Supply"; + AutomationPageModel automationPageModel = navigateToUrl(); verifyText(ElementHandler.createCommaDelimitedString( getWebDriver(), automationPageModel.computerPartsListOptions, true), expectedText); } @@ -57,6 +55,7 @@ public void createSortedCommaDelimitedStringFromWebElementsTest() { @Test(groups = TestCategories.SELENIUM) public void createCommaDelimitedStringFromWebElementsTest() { String expectedText = "Motherboard, Power Supply, Hard Drive, Monitor, Mouse, Keyboard"; + AutomationPageModel automationPageModel = navigateToUrl(); verifyText(ElementHandler.createCommaDelimitedString( getWebDriver(), automationPageModel.computerPartsListOptions), expectedText); } @@ -67,6 +66,7 @@ public void createCommaDelimitedStringFromWebElementsTest() { @Test(groups = TestCategories.SELENIUM) public void setTextBoxAndVerifyValueTest() { String expectedValue = "Tester"; + AutomationPageModel automationPageModel = navigateToUrl(); ElementHandler.setTextBox(getWebDriver(), automationPageModel.firstNameTextBox, expectedValue); String actualValue = ElementHandler.getElementAttribute(getWebDriver(), automationPageModel.firstNameTextBox); verifyText(actualValue, expectedValue); @@ -78,6 +78,7 @@ public void setTextBoxAndVerifyValueTest() { @Test(groups = TestCategories.SELENIUM, expectedExceptions = ElementHandlerException.class) public void setTextBoxException() { String expectedValue = ""; + AutomationPageModel automationPageModel = navigateToUrl(); ElementHandler.setTextBox(getWebDriver(), automationPageModel.firstNameTextBox, expectedValue); } @@ -86,6 +87,7 @@ public void setTextBoxException() { */ @Test(groups = TestCategories.SELENIUM) public void checkRadioButtonTest() { + AutomationPageModel automationPageModel = navigateToUrl(); ElementHandler.clickButton(getWebDriver(), automationPageModel.femaleRadioButton, false); Assert.assertTrue(UIWaitFactory.getWaitDriver(getWebDriver()).waitForClickableElement( automationPageModel.femaleRadioButton).isSelected(), "Radio button was not selected"); @@ -96,6 +98,7 @@ public void checkRadioButtonTest() { */ @Test(groups = TestCategories.SELENIUM) public void checkCheckBoxTest() { + AutomationPageModel automationPageModel = navigateToUrl(); ElementHandler.checkCheckBox(getWebDriver(), automationPageModel.checkbox, true); Assert.assertTrue(UIWaitFactory.getWaitDriver(getWebDriver()).waitForClickableElement( automationPageModel.checkbox).isSelected(), "Checkbox was not enabled"); @@ -106,6 +109,7 @@ public void checkCheckBoxTest() { */ @Test(groups = TestCategories.SELENIUM) public void getElementAttributeTest() { + AutomationPageModel automationPageModel = navigateToUrl(); String actualText = ElementHandler.getElementAttribute( this.getWebDriver(), automationPageModel.firstNameTextBox, "type"); verifyText(actualText, "text"); @@ -118,6 +122,7 @@ public void getElementAttributeTest() { @Test(groups = TestCategories.SELENIUM) public void selectItemFromDropDownTest() { String expectedSelection = "Emily"; + AutomationPageModel automationPageModel = navigateToUrl(); ElementHandler.selectDropDownOption(getWebDriver(), automationPageModel.nameDropdown, expectedSelection); String actualSelection = ElementHandler.getSelectedOptionFromDropdown(getWebDriver(), automationPageModel.nameDropdown); @@ -131,6 +136,7 @@ public void selectItemFromDropDownTest() { @Test(groups = TestCategories.SELENIUM) public void selectItemFromDropDownByValueTest() { String expectedSelection = "Jack"; + AutomationPageModel automationPageModel = navigateToUrl(); ElementHandler.selectDropDownOptionByValue(getWebDriver(), automationPageModel.nameDropdown, "two"); String actualSelection = ElementHandler.getSelectedOptionFromDropdown(getWebDriver(), automationPageModel.nameDropdown); @@ -149,6 +155,7 @@ public void selectMultipleItemsFromListBoxTest() { itemsToSelect.add("Hard Drive"); itemsToSelect.add("Keyboard"); + AutomationPageModel automationPageModel = navigateToUrl(); ElementHandler.selectMultipleElementsFromListBox( getWebDriver(), automationPageModel.computerPartsList, itemsToSelect); ArrayList selectedItems = (ArrayList) ElementHandler.getSelectedOptionsFromDropdown( @@ -171,6 +178,7 @@ public void selectMultipleItemsFromListBoxTestByValue() { itemsToSelect.add("four"); itemsToSelect.add("five"); + AutomationPageModel automationPageModel = navigateToUrl(); ElementHandler.selectMultipleElementsFromListBoxByValue( getWebDriver(), automationPageModel.computerPartsList, itemsToSelect); ArrayList selectedItems = (ArrayList) ElementHandler.getSelectedOptionsFromDropdown( @@ -187,6 +195,7 @@ public void selectMultipleItemsFromListBoxTestByValue() { */ @Test(groups = TestCategories.SELENIUM) public void clickElementByJavascriptFromHoverDropdown() { + AutomationPageModel automationPageModel = navigateToUrl(); ElementHandler.clickElementByJavaScript(getWebDriver(), automationPageModel.iFrameDropDownButton); UIWaitFactory.getWaitDriver(getWebDriver()).waitForPageLoad(); UIWaitFactory.getWaitDriver(getWebDriver()).waitForExactText(automationPageModel.iFramePageTitle, "Index"); @@ -197,6 +206,7 @@ public void clickElementByJavascriptFromHoverDropdown() { */ @Test(groups = TestCategories.SELENIUM) public void scrollIntoView() { + AutomationPageModel automationPageModel = navigateToUrl(); ElementHandler.scrollIntoView(getWebDriver(), automationPageModel.checkbox); } @@ -205,6 +215,7 @@ public void scrollIntoView() { */ @Test(groups = TestCategories.SELENIUM) public void scrollIntoViewWithCoordinates() { + AutomationPageModel automationPageModel = navigateToUrl(); ElementHandler.scrollIntoView(getWebDriver(), automationPageModel.checkbox, 50, 0); } @@ -213,6 +224,7 @@ public void scrollIntoViewWithCoordinates() { */ @Test(groups = TestCategories.SELENIUM) public void scrollIntoViewElement() { + AutomationPageModel automationPageModel = navigateToUrl(); WebElement element = this.getWebDriver().findElement(By.cssSelector("body")); ElementHandler.scrollIntoView(element, automationPageModel.checkbox); } @@ -222,6 +234,7 @@ public void scrollIntoViewElement() { */ @Test(groups = TestCategories.SELENIUM) public void scrollIntoViewElementWithCoordinates() { + AutomationPageModel automationPageModel = navigateToUrl(); WebElement element = this.getWebDriver().findElement(By.cssSelector("body")); ElementHandler.scrollIntoView(element, automationPageModel.checkbox, 50, 0); } @@ -231,6 +244,7 @@ public void scrollIntoViewElementWithCoordinates() { */ @Test(groups = TestCategories.SELENIUM) public void executingScrolling() { + navigateToUrl(); ElementHandler.executeScrolling(getWebDriver(), 50, 0); } @@ -239,6 +253,7 @@ public void executingScrolling() { */ @Test(expectedExceptions = NoSuchElementException.class, groups = TestCategories.SELENIUM) public void clickElementByJavascriptFromHoverDropdownNotFound() { + navigateToUrl(); ElementHandler.clickElementByJavaScript(getWebDriver(), By.cssSelector(".NotPresent")); } @@ -247,6 +262,7 @@ public void clickElementByJavascriptFromHoverDropdownNotFound() { */ @Test(groups = TestCategories.SELENIUM) public void slowTypeTest() { + AutomationPageModel automationPageModel = navigateToUrl(); ElementHandler.slowType(getWebDriver(), automationPageModel.firstNameTextBox, "Test input slow type"); Assert.assertEquals( UIWaitFactory.getWaitDriver(getWebDriver()).waitForClickableElement(automationPageModel.firstNameTextBox) @@ -258,6 +274,7 @@ public void slowTypeTest() { */ @Test(groups = TestCategories.SELENIUM) public void sendSecretTextSuspendLoggingTest() throws IOException { + AutomationPageModel automationPageModel = this.navigateToUrl(); this.getWebDriver().findElement(automationPageModel.firstNameTextBox).sendKeys("somethingTest"); this.getWebDriver().findElement(automationPageModel.firstNameTextBox).clear(); ElementHandler.sendSecretKeys(getWebDriver(), automationPageModel.firstNameTextBox, "secretKeys", this.getLogger()); @@ -277,6 +294,7 @@ public void sendSecretTextSuspendLoggingTest() throws IOException { @Ignore @Test(groups = TestCategories.SELENIUM) public void sendSecretTextContinueLoggingTest() throws IOException { + AutomationPageModel automationPageModel = this.navigateToUrl(); ElementHandler.sendSecretKeys(getWebDriver(), automationPageModel.firstNameTextBox, "secretKeys", this.getLogger()); this.getWebDriver().findElement(automationPageModel.firstNameTextBox).clear(); this.getWebDriver().findElement(automationPageModel.firstNameTextBox).sendKeys("somethingTest"); @@ -295,6 +313,7 @@ public void sendSecretTextContinueLoggingTest() throws IOException { */ @Test(groups = TestCategories.SELENIUM, expectedExceptions = ElementHandlerException.class) public void sendSecretTextCatchException() { + AutomationPageModel automationPageModel = this.navigateToUrl(); this.getWebDriver().findElement(automationPageModel.firstNameTextBox).sendKeys("somethingTest"); this.getWebDriver().findElement(automationPageModel.firstNameTextBox).clear(); ElementHandler.sendSecretKeys(getWebDriver(), automationPageModel.flowerTableTitle, "secretKeys", this.getLogger()); diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/EventHandlerUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/EventHandlerUnitTest.java index 0ddddcf03..550a2f330 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/EventHandlerUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/EventHandlerUnitTest.java @@ -16,7 +16,6 @@ import org.openqa.selenium.JavascriptExecutor; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WrapsDriver; -import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; import org.testng.asserts.SoftAssert; @@ -30,28 +29,15 @@ public class EventHandlerUnitTest extends BaseSeleniumTest { */ private AutomationPageModel automationPageModel; - /** - * The web driver to be used in the unit tests. - */ - private WebDriver webDriverWithHandler; - - /** - * Navigate to test page url and wait for page to load. - */ - @BeforeMethod - private void setUp() { - // Navigate to the Automation site and set up the event handler - automationPageModel = new AutomationPageModel(this.getTestObject()); - getWebDriver().navigate().to(automationPageModel.testSiteAutomationUrl); - UIWaitFactory.getWaitDriver(getWebDriver()).waitForPageLoad(); - webDriverWithHandler = getWebDriver(); - } - /** * Test that checks if the correct messages are logged when clicking an element. */ @Test(groups = TestCategories.SELENIUM) public void eventHandlerClickElement() { + // Navigate to the Automation site and set up the event handler + this.navigateToAutomationSiteUrl(); + WebDriver webDriverWithHandler = getWebDriver(); + // Use the Event Firing Web Driver to click an element, then get the log text webDriverWithHandler.findElement(automationPageModel.checkbox).click(); String logText = this.readTextFile(((FileLogger) this.getLogger()).getFilePath()); @@ -70,6 +56,10 @@ public void eventHandlerClickElement() { */ @Test(groups = TestCategories.SELENIUM) public void eventHandlerChangeValueOf() { + // Navigate to the Automation site and set up the event handler + this.navigateToAutomationSiteUrl(); + WebDriver webDriverWithHandler = getWebDriver(); + // Use the Event Firing Web Driver to change the value of an element, then get the log text webDriverWithHandler.findElement(automationPageModel.firstNameTextBox).clear(); webDriverWithHandler.findElement(automationPageModel.firstNameTextBox).sendKeys("Change Value"); @@ -93,6 +83,10 @@ public void eventHandlerChangeValueOf() { */ @Test(groups = TestCategories.SELENIUM) public void eventHandlerFindBy() { + // Navigate to the Automation site and set up the event handler + this.navigateToAutomationSiteUrl(); + WebDriver webDriverWithHandler = getWebDriver(); + // Use the Event Firing Web Driver to find an element, then get the log text webDriverWithHandler.findElement(automationPageModel.computerPartsList); String logText = this.readTextFile(((FileLogger) this.getLogger()).getFilePath()); @@ -112,6 +106,10 @@ public void eventHandlerFindBy() { */ @Test(groups = TestCategories.SELENIUM) public void eventHandlerNavigateBack() { + // Navigate to the Automation site and set up the event handler + this.navigateToAutomationSiteUrl(); + WebDriver webDriverWithHandler = getWebDriver(); + // Use the Event Firing Web Driver to navigate back to a page, then get the log text webDriverWithHandler.findElement(automationPageModel.homeButton).click(); webDriverWithHandler.navigate().back(); @@ -132,6 +130,10 @@ public void eventHandlerNavigateBack() { */ @Test(groups = TestCategories.SELENIUM) public void eventHandlerNavigateForward() { + // Navigate to the Automation site and set up the event handler + this.navigateToAutomationSiteUrl(); + WebDriver webDriverWithHandler = getWebDriver(); + // Use the Event Firing Web Driver to navigate forward to a page, then get the log text webDriverWithHandler.findElement(automationPageModel.homeButton).click(); webDriverWithHandler.navigate().back(); @@ -152,6 +154,10 @@ public void eventHandlerNavigateForward() { */ @Test(groups = TestCategories.SELENIUM) public void eventHandlerRefresh() { + // Navigate to the Automation site and set up the event handler + this.navigateToAutomationSiteUrl(); + WebDriver webDriverWithHandler = getWebDriver(); + // Use the Event Firing Web Driver to refresh the page, then get the log text webDriverWithHandler.navigate().refresh(); String logText = this.readTextFile(((FileLogger) this.getLogger()).getFilePath()); @@ -170,6 +176,10 @@ public void eventHandlerRefresh() { */ @Test(groups = TestCategories.SELENIUM) public void eventHandlerNavigateTo() { + // Navigate to the Automation site and set up the event handler + this.navigateToAutomationSiteUrl(); + WebDriver webDriverWithHandler = getWebDriver(); + // Use the Event Firing Web Driver to navigate to a page, then get the log text webDriverWithHandler.navigate().to(automationPageModel.testSiteAutomationUrl); String logText = this.readTextFile(((FileLogger) this.getLogger()).getFilePath()); @@ -188,6 +198,10 @@ public void eventHandlerNavigateTo() { */ @Test(groups = TestCategories.SELENIUM) public void eventHandlerScript() { + // Navigate to the Automation site and set up the event handler + this.navigateToAutomationSiteUrl(); + WebDriver webDriverWithHandler = getWebDriver(); + // Use the Event Firing Web Driver to execute a script, then get the log text JavascriptExecutor javascriptExecutor = (JavascriptExecutor) webDriverWithHandler; javascriptExecutor.executeScript("document.querySelector(\"#homeButton > a\");"); @@ -206,6 +220,10 @@ public void eventHandlerScript() { */ @Test(groups = TestCategories.SELENIUM) public void eventHandlerSwitchWindow() { + // Navigate to the Automation site and set up the event handler + this.navigateToAutomationSiteUrl(); + WebDriver webDriverWithHandler = this.getWebDriver(); + // Use the Event Firing Web Driver to open a new tab, then get the log text ((JavascriptExecutor) webDriverWithHandler).executeScript("window.open()"); @@ -231,6 +249,10 @@ public void eventHandlerSwitchWindow() { */ @Test(groups = TestCategories.SELENIUM, expectedExceptions = MAQSRuntimeException.class) public void eventHandlerSwitchInvalidWindow() { + // Navigate to the Automation site and set up the event handler + this.navigateToAutomationSiteUrl(); + WebDriver webDriverWithHandler = this.getWebDriver(); + // Use the Event Firing Web Driver to open a new tab, then get the log text ((JavascriptExecutor) webDriverWithHandler).executeScript("window.open()"); @@ -243,8 +265,8 @@ public void eventHandlerSwitchInvalidWindow() { @Test(groups = TestCategories.SELENIUM) public void eventHandlerAcceptAlert() { // Navigate to the Automation site and set up the event handler - // this.navigateToAutomationSiteUrl(); - // WebDriver webDriverWithHandler = getWebDriver(); + this.navigateToAutomationSiteUrl(); + WebDriver webDriverWithHandler = getWebDriver(); // Use the Event Firing Web Driver to accept an alert, then get the log text UIWait waitDriver = UIWaitFactory.getWaitDriver(((WrapsDriver) this.getWebDriver()).getWrappedDriver()); @@ -268,8 +290,8 @@ public void eventHandlerAcceptAlert() { @Test(groups = TestCategories.SELENIUM) public void eventHandlerAcceptDismiss() { // Navigate to the Automation site and set up the event handler - // this.navigateToAutomationSiteUrl(); - // WebDriver webDriverWithHandler = getWebDriver(); + this.navigateToAutomationSiteUrl(); + WebDriver webDriverWithHandler = getWebDriver(); // Use the Event Firing Web Driver to dismiss an alert, then get the log text UIWait waitDriver = UIWaitFactory.getWaitDriver(((WrapsDriver)this.getWebDriver()).getWrappedDriver()); @@ -294,8 +316,8 @@ public void eventHandlerAcceptDismiss() { @Test(groups = TestCategories.SELENIUM) public void eventHandlerGetText() { // Navigate to the Automation site and set up the event handler - // this.navigateToAutomationSiteUrl(); - // WebDriver webDriverWithHandler = getWebDriver(); + this.navigateToAutomationSiteUrl(); + WebDriver webDriverWithHandler = getWebDriver(); // Use the Event Firing Web Driver to get the text from an element, then get the log text webDriverWithHandler.findElement(automationPageModel.errorLinkBy).getText(); @@ -316,7 +338,7 @@ public void eventHandlerGetText() { @Test(groups = TestCategories.SELENIUM) public void eventHandlerScreenshot() { // Navigate to the Automation site and set up the event handler - // this.navigateToAutomationSiteUrl(); + this.navigateToAutomationSiteUrl(); SeleniumUtilities.captureScreenshot(this.getWebDriver(), this.getTestObject()); // Use the Event Firing Web Driver to take a screenshot, then get the log text @@ -330,6 +352,15 @@ public void eventHandlerScreenshot() { softAssert.assertAll(); } + /** + * Navigate to test page url and wait for page to load. + */ + private void navigateToAutomationSiteUrl() { + automationPageModel = new AutomationPageModel(this.getTestObject()); + getWebDriver().navigate().to(automationPageModel.testSiteAutomationUrl); + UIWaitFactory.getWaitDriver(getWebDriver()).waitForPageLoad(); + } + /** * Read a file and return it as a string. * diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/LazyWebElementUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/LazyWebElementUnitTest.java index d852720d5..0175978d9 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/LazyWebElementUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/LazyWebElementUnitTest.java @@ -189,10 +189,10 @@ private LazyWebElement getDisabledInput() { } /** - * Navigate to test page and set up for test. + * Setup before a test */ @BeforeMethod - public void setUp() { + public void navigateToTestPage() { this.getWebDriver().navigate().to(SeleniumConfig.getWebSiteBase()); UIWaitFactory.getWaitDriver(this.getWebDriver()).waitForPageLoad(); } diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumDriverManagerUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumDriverManagerUnitTest.java index 8ddb3bb74..bdd031168 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumDriverManagerUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumDriverManagerUnitTest.java @@ -16,6 +16,19 @@ */ public class SeleniumDriverManagerUnitTest extends BaseGenericTest { + /** + * The Get driver. + */ + private final Supplier getDriver = () -> { + WebDriver driver = null; + try { + driver = WebDriverFactory.getDefaultBrowser(); + } catch (Exception e) { + e.printStackTrace(); + } + return driver; + }; + /** * Test close not initialized. */ @@ -59,7 +72,7 @@ public void testGetWebDriver() { @Test(groups = TestCategories.SELENIUM) public void testLogVerbose() { try (SeleniumDriverManager seleniumDriverManager = new SeleniumDriverManager(getDriver, this.getTestObject())) { - // List the list; + // List list; seleniumDriverManager.logVerbose("Logging verbose messaging"); } } @@ -73,17 +86,4 @@ public void testDriverManWithInstantiatedDriver() { seleniumDriverManager.logVerbose("Run with new driver"); } } - - /** - * The Get driver. - */ - private final Supplier getDriver = () -> { - WebDriver driver = null; - try { - driver = WebDriverFactory.getDefaultBrowser(); - } catch (Exception e) { - e.printStackTrace(); - } - return driver; - }; } \ No newline at end of file diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumTestObjectUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumTestObjectUnitTest.java index 23720c012..20d5f3bf7 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumTestObjectUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumTestObjectUnitTest.java @@ -20,6 +20,7 @@ public class SeleniumTestObjectUnitTest extends BaseGenericTest { */ @Test(groups = TestCategories.SELENIUM) public void testSeleniumTestObjectCreationWithDriver() { + WebDriver defaultBrowser = null; try { defaultBrowser = WebDriverFactory.getDefaultBrowser(); @@ -39,6 +40,7 @@ public void testSeleniumTestObjectCreationWithDriver() { */ @Test(groups = TestCategories.SELENIUM) public void testSeleniumTestObjectCreationWithSupplier() { + try (SeleniumTestObject testObject = new SeleniumTestObject(() -> { try { return WebDriverFactory.getDefaultBrowser(); diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumUtilitiesUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumUtilitiesUnitTest.java index 9198de985..9924d0db1 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumUtilitiesUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumUtilitiesUnitTest.java @@ -10,14 +10,12 @@ import io.github.maqs.utilities.helper.TestCategories; import io.github.maqs.utilities.logging.ConsoleLogger; import io.github.maqs.utilities.logging.FileLogger; - import java.io.File; import java.nio.file.Paths; import java.time.Clock; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; import java.util.Locale; - import io.github.maqs.utilities.logging.HtmlFileLogger; import io.github.maqs.utilities.logging.Logger; import org.openqa.selenium.By; @@ -27,7 +25,6 @@ import org.openqa.selenium.support.events.EventFiringDecorator; import org.openqa.selenium.support.events.WebDriverListener; import org.testng.Assert; -import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; /** @@ -35,370 +32,370 @@ */ public class SeleniumUtilitiesUnitTest extends BaseGenericTest { - /** - * The web driver to be used in testing. - */ - protected WebDriver webDriver; - - /** - * Sets up the web driver for the unit test. - */ - @BeforeMethod - private void setUp() { - webDriver = WebDriverFactory.getDefaultBrowser(); - } - - /** - * Test capture screenshot no append. - */ - @Test(groups = TestCategories.SELENIUM) - public void testCaptureScreenshotNoAppend() { - try { - FileLogger fileLogger = (FileLogger) this.getTestObject().getLogger(); - SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, - this.getTestObject().getFullyQualifiedTestName()); - this.setTestObject(testObject); - - // Open Google and take a screenshot - webDriver.navigate().to("http://www.google.com"); - boolean isSuccess = SeleniumUtilities.captureScreenshot(webDriver, testObject); - - // Assert screenshot was successful - Assert.assertTrue(isSuccess, "Expected Screenshot to be successful."); - String[] arrayOfAssociatedFiles = testObject.getArrayOfAssociatedFiles(); - Assert.assertTrue( - new File((arrayOfAssociatedFiles[arrayOfAssociatedFiles.length - 1])).exists(), - "Checking that expected file path exists"); - } finally { - webDriver.quit(); + /** + * Test capture screenshot no append. + */ + @Test(groups = TestCategories.SELENIUM) + public void testCaptureScreenshotNoAppend() { + WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); + try { + FileLogger fileLogger = (FileLogger) this.getTestObject().getLogger(); + SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, + this.getTestObject().getFullyQualifiedTestName()); + this.setTestObject(testObject); + + // Open Google and take a screenshot + webDriver.navigate().to("http://www.google.com"); + boolean isSuccess = SeleniumUtilities.captureScreenshot(webDriver, testObject); + + // Assert screenshot was successful + Assert.assertTrue(isSuccess, "Expected Screenshot to be successful."); + String[] arrayOfAssociatedFiles = testObject.getArrayOfAssociatedFiles(); + Assert.assertTrue( + new File((arrayOfAssociatedFiles[arrayOfAssociatedFiles.length - 1])).exists(), + "Checking that expected file path exists"); + } finally { + webDriver.quit(); + } } - } - - /** - * Test capture screenshot append. - */ - @Test(groups = TestCategories.SELENIUM) - public void testCaptureScreenshotAppend() { - try { - FileLogger fileLogger = (FileLogger) this.getTestObject().getLogger(); - SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, - this.getTestObject().getFullyQualifiedTestName()); - this.setTestObject(testObject); - - // Open Google and take a screenshot - webDriver.navigate().to("http://www.google.com"); - final String testAppend = "testAppend"; - boolean isSuccess = SeleniumUtilities.captureScreenshot(webDriver, testObject, testAppend); - - // Assert screenshot was successful - Assert.assertTrue(isSuccess, "Expected Screenshot to be successful."); - String[] arrayOfAssociatedFiles = testObject.getArrayOfAssociatedFiles(); - Assert.assertTrue( - new File((arrayOfAssociatedFiles[arrayOfAssociatedFiles.length - 1])).exists(), - "Checking that expected file path exists"); - Assert.assertTrue( - new File((arrayOfAssociatedFiles[arrayOfAssociatedFiles.length - 1])).getName() - .contains(testAppend), - "Checking that appended value was added to file"); - } finally { - webDriver.quit(); + + /** + * Test capture screenshot append. + */ + @Test(groups = TestCategories.SELENIUM) + public void testCaptureScreenshotAppend() { + WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); + try { + FileLogger fileLogger = (FileLogger) this.getTestObject().getLogger(); + SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, + this.getTestObject().getFullyQualifiedTestName()); + this.setTestObject(testObject); + + // Open Google and take a screenshot + webDriver.navigate().to("http://www.google.com"); + final String testAppend = "testAppend"; + boolean isSuccess = SeleniumUtilities.captureScreenshot(webDriver, testObject, testAppend); + + // Assert screenshot was successful + Assert.assertTrue(isSuccess, "Expected Screenshot to be successful."); + String[] arrayOfAssociatedFiles = testObject.getArrayOfAssociatedFiles(); + Assert.assertTrue( + new File((arrayOfAssociatedFiles[arrayOfAssociatedFiles.length - 1])).exists(), + "Checking that expected file path exists"); + Assert.assertTrue( + new File((arrayOfAssociatedFiles[arrayOfAssociatedFiles.length - 1])).getName() + .contains(testAppend), + "Checking that appended value was added to file"); + } finally { + webDriver.quit(); + } } - } - - /** - * Test capture screenshot append. - */ - @Test(groups = TestCategories.SELENIUM) - public void testCaptureScreenshotNullWebDriver() { - try { - FileLogger fileLogger = (FileLogger) this.getTestObject().getLogger(); - SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, - this.getTestObject().getFullyQualifiedTestName()); - this.setTestObject(testObject); - - // Open Google and take a screenshot - webDriver.navigate().to("http://www.google.com"); - final String testAppend = "testAppend"; - boolean isSuccess = SeleniumUtilities.captureScreenshot(null, testObject, testAppend); - - // Assert screenshot was successful - Assert.assertFalse(isSuccess, "Expected Screenshot to be successful."); - } finally { - webDriver.quit(); + + /** + * Test capture screenshot append. + */ + @Test(groups = TestCategories.SELENIUM) + public void testCaptureScreenshotNullWebDriver() { + WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); + try { + FileLogger fileLogger = (FileLogger) this.getTestObject().getLogger(); + SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, + this.getTestObject().getFullyQualifiedTestName()); + this.setTestObject(testObject); + + // Open Google and take a screenshot + webDriver.navigate().to("http://www.google.com"); + final String testAppend = "testAppend"; + boolean isSuccess = SeleniumUtilities.captureScreenshot(null, testObject, testAppend); + + // Assert screenshot was successful + Assert.assertFalse(isSuccess, "Expected Screenshot to be successful."); + } finally { + webDriver.quit(); + } } - } - - /** - * Test capture screenshot append. - */ - @Test(groups = TestCategories.SELENIUM) - public void testCaptureScreenshotAppendScreenshot() { - try { - HtmlFileLogger fileLogger = new HtmlFileLogger("Capture Screenshot Append"); - this.getTestObject().setLogger(fileLogger); - SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, - this.getTestObject().getFullyQualifiedTestName()); - this.setTestObject(testObject); - - // Open Google and take a screenshot - webDriver.navigate().to("http://www.google.com"); - final String testAppend = "testAppend"; - boolean isSuccess = SeleniumUtilities.captureScreenshot(webDriver, testObject, testAppend); - - // Assert screenshot was successful - Assert.assertTrue(isSuccess, "Expected Screenshot to be successful."); - String[] arrayOfAssociatedFiles = testObject.getArrayOfAssociatedFiles(); - Assert.assertTrue( - new File((arrayOfAssociatedFiles[arrayOfAssociatedFiles.length - 1])).exists(), - "Checking that expected file path exists"); - Assert.assertTrue( - new File((arrayOfAssociatedFiles[arrayOfAssociatedFiles.length - 1])).getName() - .contains(testAppend), - "Checking that appended value was added to file"); - } finally { - webDriver.quit(); + + /** + * Test capture screenshot append. + */ + @Test(groups = TestCategories.SELENIUM) + public void testCaptureScreenshotAppendScreenshot() { + WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); + try { + HtmlFileLogger fileLogger = new HtmlFileLogger("Capture Screenshot Append"); + this.getTestObject().setLogger(fileLogger); + SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, + this.getTestObject().getFullyQualifiedTestName()); + this.setTestObject(testObject); + + // Open Google and take a screenshot + webDriver.navigate().to("http://www.google.com"); + final String testAppend = "testAppend"; + boolean isSuccess = SeleniumUtilities.captureScreenshot(webDriver, testObject, testAppend); + + // Assert screenshot was successful + Assert.assertTrue(isSuccess, "Expected Screenshot to be successful."); + String[] arrayOfAssociatedFiles = testObject.getArrayOfAssociatedFiles(); + Assert.assertTrue( + new File((arrayOfAssociatedFiles[arrayOfAssociatedFiles.length - 1])).exists(), + "Checking that expected file path exists"); + Assert.assertTrue( + new File((arrayOfAssociatedFiles[arrayOfAssociatedFiles.length - 1])).getName() + .contains(testAppend), + "Checking that appended value was added to file"); + } finally { + webDriver.quit(); + } } - } - - /** - * Test capture screenshot console logger. - */ - @Test(groups = TestCategories.SELENIUM) - public void testCaptureScreenshotConsoleLogger() { - try { - ConsoleLogger consoleLogger = new ConsoleLogger(); - SeleniumTestObject testObject = new SeleniumTestObject(webDriver, consoleLogger, - this.getTestObject().getFullyQualifiedTestName()); - this.setTestObject(testObject); - - // Open Google and take a screenshot - webDriver.navigate().to("http://www.google.com"); - boolean isSuccess = SeleniumUtilities.captureScreenshot(webDriver, testObject, "testAppend"); - - // Assert screenshot was NOT successful - Assert.assertFalse(isSuccess, "Expected Screenshot to NOT be successful."); - } finally { - webDriver.quit(); + + /** + * Test capture screenshot console logger. + */ + @Test(groups = TestCategories.SELENIUM) + public void testCaptureScreenshotConsoleLogger() { + WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); + try { + ConsoleLogger consoleLogger = new ConsoleLogger(); + SeleniumTestObject testObject = new SeleniumTestObject(webDriver, consoleLogger, + this.getTestObject().getFullyQualifiedTestName()); + this.setTestObject(testObject); + + // Open Google and take a screenshot + webDriver.navigate().to("http://www.google.com"); + boolean isSuccess = SeleniumUtilities.captureScreenshot(webDriver, testObject, "testAppend"); + + // Assert screenshot was NOT successful + Assert.assertFalse(isSuccess, "Expected Screenshot to NOT be successful."); + } finally { + webDriver.quit(); + } } - } - - /** - * Test capture screenshot custom directory file name. - */ - @Test(groups = TestCategories.SELENIUM) - public void testCaptureScreenshotCustomDirectoryFileName() { - try { - FileLogger fileLogger = (FileLogger) this.getTestObject().getLogger(); - SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, - this.getTestObject().getFullyQualifiedTestName()); - this.setTestObject(testObject); - - // Open Google and take a screenshot - webDriver.navigate().to("http://www.google.com"); - String dateTime = DateTimeFormatter.ofPattern(Logger.DEFAULT_DATE_TIME_FORMAT, - Locale.getDefault()).format(LocalDateTime.now(Clock.systemUTC())); - String filePath = SeleniumUtilities.captureScreenshot(webDriver, testObject, - fileLogger.getDirectory(), - StringProcessor.safeFormatter("%s - %s", "TestCustomName", dateTime)); - - Assert.assertEquals(filePath, - Paths.get(StringProcessor.safeFormatter("%s%s - %s%s", - fileLogger.getDirectory(), File.separator + "TestCustomName", dateTime, - ".png")).normalize().toString()); - Assert.assertTrue(new File(filePath).exists(), - "Checking that screenshot file exists at expected path."); - } finally { - webDriver.quit(); + + /** + * Test capture screenshot custom directory file name. + */ + @Test(groups = TestCategories.SELENIUM) + public void testCaptureScreenshotCustomDirectoryFileName() { + WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); + try { + FileLogger fileLogger = (FileLogger) this.getTestObject().getLogger(); + SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, + this.getTestObject().getFullyQualifiedTestName()); + this.setTestObject(testObject); + + // Open Google and take a screenshot + webDriver.navigate().to("http://www.google.com"); + String dateTime = DateTimeFormatter.ofPattern(Logger.DEFAULT_DATE_TIME_FORMAT, + Locale.getDefault()).format(LocalDateTime.now(Clock.systemUTC())); + String filePath = SeleniumUtilities.captureScreenshot(webDriver, testObject, + fileLogger.getDirectory(), + StringProcessor.safeFormatter("%s - %s", "TestCustomName", dateTime)); + + Assert.assertEquals(filePath, + Paths.get(StringProcessor.safeFormatter("%s%s - %s%s", + fileLogger.getDirectory(), File.separator + "TestCustomName", dateTime, + ".png")).normalize().toString()); + Assert.assertTrue(new File(filePath).exists(), + "Checking that screenshot file exists at expected path."); + } finally { + webDriver.quit(); + } } - } - - /** - * Test save page source no append. - */ - @Test(groups = TestCategories.SELENIUM) - public void testSavePageSourceNoAppend() { - try { - FileLogger fileLogger = (FileLogger) this.getTestObject().getLogger(); - SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, - this.getTestObject().getFullyQualifiedTestName()); - this.setTestObject(testObject); - - // Open Google and take a screenshot - webDriver.navigate().to("http://www.google.com"); - boolean isSuccess = SeleniumUtilities.savePageSource(webDriver, testObject); - - // Assert screenshot was successful - Assert.assertTrue(isSuccess, "Expected Screenshot to be successful."); - String[] arrayOfAssociatedFiles = testObject.getArrayOfAssociatedFiles(); - Assert.assertTrue( - new File((arrayOfAssociatedFiles[arrayOfAssociatedFiles.length - 1])).exists(), - "Checking that expected file path exists"); - } finally { - webDriver.quit(); + + /** + * Test save page source no append. + */ + @Test(groups = TestCategories.SELENIUM) + public void testSavePageSourceNoAppend() { + WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); + try { + FileLogger fileLogger = (FileLogger) this.getTestObject().getLogger(); + SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, + this.getTestObject().getFullyQualifiedTestName()); + this.setTestObject(testObject); + + // Open Google and take a screenshot + webDriver.navigate().to("http://www.google.com"); + boolean isSuccess = SeleniumUtilities.savePageSource(webDriver, testObject); + + // Assert screenshot was successful + Assert.assertTrue(isSuccess, "Expected Screenshot to be successful."); + String[] arrayOfAssociatedFiles = testObject.getArrayOfAssociatedFiles(); + Assert.assertTrue( + new File((arrayOfAssociatedFiles[arrayOfAssociatedFiles.length - 1])).exists(), + "Checking that expected file path exists"); + } finally { + webDriver.quit(); + } } - } - - /** - * Test save page source append. - */ - @Test(groups = TestCategories.SELENIUM) - public void testSavePageSourceAppend() { - try { - FileLogger fileLogger = (FileLogger) this.getTestObject().getLogger(); - SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, - this.getTestObject().getFullyQualifiedTestName()); - this.setTestObject(testObject); - - // Open Google and take a screenshot - webDriver.navigate().to("http://www.google.com"); - final String testAppend = "testAppend"; - boolean isSuccess = SeleniumUtilities.savePageSource(webDriver, testObject, testAppend); - - // Assert screenshot was successful - Assert.assertTrue(isSuccess, "Expected Screenshot to be successful."); - String[] arrayOfAssociatedFiles = testObject.getArrayOfAssociatedFiles(); - Assert.assertTrue( - new File((arrayOfAssociatedFiles[arrayOfAssociatedFiles.length - 1])).exists(), - "Checking that expected file path exists"); - Assert.assertTrue( - new File((arrayOfAssociatedFiles[arrayOfAssociatedFiles.length - 1])).getName() - .contains(testAppend), - "Checking that appended value was added to file"); - } finally { - webDriver.quit(); + + /** + * Test save page source append. + */ + @Test(groups = TestCategories.SELENIUM) + public void testSavePageSourceAppend() { + WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); + try { + FileLogger fileLogger = (FileLogger) this.getTestObject().getLogger(); + SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, + this.getTestObject().getFullyQualifiedTestName()); + this.setTestObject(testObject); + + // Open Google and take a screenshot + webDriver.navigate().to("http://www.google.com"); + final String testAppend = "testAppend"; + boolean isSuccess = SeleniumUtilities.savePageSource(webDriver, testObject, testAppend); + + // Assert screenshot was successful + Assert.assertTrue(isSuccess, "Expected Screenshot to be successful."); + String[] arrayOfAssociatedFiles = testObject.getArrayOfAssociatedFiles(); + Assert.assertTrue( + new File((arrayOfAssociatedFiles[arrayOfAssociatedFiles.length - 1])).exists(), + "Checking that expected file path exists"); + Assert.assertTrue( + new File((arrayOfAssociatedFiles[arrayOfAssociatedFiles.length - 1])).getName() + .contains(testAppend), + "Checking that appended value was added to file"); + } finally { + webDriver.quit(); + } } - } - - /** - * Test save page source append. - */ - @Test(groups = TestCategories.SELENIUM) - public void testSavePageSourceNullWebDriver() { - try { - FileLogger fileLogger = (FileLogger) this.getTestObject().getLogger(); - SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, - this.getTestObject().getFullyQualifiedTestName()); - this.setTestObject(testObject); - - // Open Google and take a screenshot - webDriver.navigate().to("http://www.google.com"); - final String testAppend = "testAppend"; - boolean isSuccess = SeleniumUtilities.savePageSource(null, testObject, testAppend); - - // Assert screenshot was not successful - Assert.assertFalse(isSuccess, "Expected Screenshot to be successful."); - } finally { - webDriver.quit(); + + /** + * Test save page source append. + */ + @Test(groups = TestCategories.SELENIUM) + public void testSavePageSourceNullWebDriver() { + WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); + try { + FileLogger fileLogger = (FileLogger) this.getTestObject().getLogger(); + SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, + this.getTestObject().getFullyQualifiedTestName()); + this.setTestObject(testObject); + + // Open Google and take a screenshot + webDriver.navigate().to("http://www.google.com"); + final String testAppend = "testAppend"; + boolean isSuccess = SeleniumUtilities.savePageSource(null, testObject, testAppend); + + // Assert screenshot was not successful + Assert.assertFalse(isSuccess, "Expected Screenshot to be successful."); + } finally { + webDriver.quit(); + } } - } - - - /** - * Test save page source custom directory file name. - */ - @Test(groups = TestCategories.SELENIUM) - public void testSavePageSourceCustomDirectoryFileName() { - try { - FileLogger fileLogger = (FileLogger) this.getTestObject().getLogger(); - SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, - this.getTestObject().getFullyQualifiedTestName()); - this.setTestObject(testObject); - - // Open Google and take a screenshot - webDriver.navigate().to("http://www.google.com"); - String dateTime = DateTimeFormatter.ofPattern(Logger.DEFAULT_DATE_TIME_FORMAT, - Locale.getDefault()).format(LocalDateTime.now(Clock.systemUTC())); - String filePath = SeleniumUtilities.savePageSource(webDriver, testObject, - fileLogger.getDirectory(), - StringProcessor.safeFormatter("%s - %s", "TestCustomName", dateTime)); - - // Assert File Path returned from Screenshot is the same as expected file path. - Assert.assertEquals(filePath, - Paths.get(StringProcessor.safeFormatter("%s%s - %s%s", - fileLogger.getDirectory(), File.separator + "TestCustomName", dateTime, - ".txt")).normalize().toString()); - Assert.assertTrue(new File(filePath).exists(), - "Checking that page source file exists at expected path."); - String[] arrayOfAssociatedFiles = testObject.getArrayOfAssociatedFiles(); - Assert.assertTrue( - new File((arrayOfAssociatedFiles[arrayOfAssociatedFiles.length - 1])).exists(), - "Checking that expected file path exists"); - } finally { - webDriver.quit(); + + + /** + * Test save page source custom directory file name. + */ + @Test(groups = TestCategories.SELENIUM) + public void testSavePageSourceCustomDirectoryFileName() { + WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); + try { + FileLogger fileLogger = (FileLogger) this.getTestObject().getLogger(); + SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, + this.getTestObject().getFullyQualifiedTestName()); + this.setTestObject(testObject); + + // Open Google and take a screenshot + webDriver.navigate().to("http://www.google.com"); + String dateTime = DateTimeFormatter.ofPattern(Logger.DEFAULT_DATE_TIME_FORMAT, + Locale.getDefault()).format(LocalDateTime.now(Clock.systemUTC())); + String filePath = SeleniumUtilities.savePageSource(webDriver, testObject, + fileLogger.getDirectory(), + StringProcessor.safeFormatter("%s - %s", "TestCustomName", dateTime)); + + // Assert File Path returned from Screenshot is the same as expected file path. + Assert.assertEquals(filePath, + Paths.get(StringProcessor.safeFormatter("%s%s - %s%s", + fileLogger.getDirectory(), File.separator + "TestCustomName", dateTime, + ".txt")).normalize().toString()); + Assert.assertTrue(new File(filePath).exists(), + "Checking that page source file exists at expected path."); + String[] arrayOfAssociatedFiles = testObject.getArrayOfAssociatedFiles(); + Assert.assertTrue( + new File((arrayOfAssociatedFiles[arrayOfAssociatedFiles.length - 1])).exists(), + "Checking that expected file path exists"); + } finally { + webDriver.quit(); + } } - } - - /** - * Test save page source console logger. - */ - @Test(groups = TestCategories.SELENIUM) - public void testSavePageSourceConsoleLogger() { - try { - ConsoleLogger consoleLogger = new ConsoleLogger(); - SeleniumTestObject testObject = new SeleniumTestObject(webDriver, consoleLogger, - this.getTestObject().getFullyQualifiedTestName()); - this.setTestObject(testObject); - - // Open Google and take a screenshot - webDriver.navigate().to("http://www.google.com"); - boolean isSuccess = SeleniumUtilities.savePageSource(webDriver, testObject); - - // Assert screenshot was successful - Assert.assertTrue(isSuccess, "Expected Screenshot to be successful."); - String[] arrayOfAssociatedFiles = testObject.getArrayOfAssociatedFiles(); - Assert.assertTrue( - new File((arrayOfAssociatedFiles[arrayOfAssociatedFiles.length - 1])).exists(), - "Checking that expected file path exists"); - } finally { - webDriver.quit(); + + /** + * Test save page source console logger. + */ + @Test(groups = TestCategories.SELENIUM) + public void testSavePageSourceConsoleLogger() { + WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); + try { + ConsoleLogger consoleLogger = new ConsoleLogger(); + SeleniumTestObject testObject = new SeleniumTestObject(webDriver, consoleLogger, + this.getTestObject().getFullyQualifiedTestName()); + this.setTestObject(testObject); + + // Open Google and take a screenshot + webDriver.navigate().to("http://www.google.com"); + boolean isSuccess = SeleniumUtilities.savePageSource(webDriver, testObject); + + // Assert screenshot was successful + Assert.assertTrue(isSuccess, "Expected Screenshot to be successful."); + String[] arrayOfAssociatedFiles = testObject.getArrayOfAssociatedFiles(); + Assert.assertTrue( + new File((arrayOfAssociatedFiles[arrayOfAssociatedFiles.length - 1])).exists(), + "Checking that expected file path exists"); + } finally { + webDriver.quit(); + } } - } - - /** - * Test web element to web driver. - */ - @Test(groups = TestCategories.SELENIUM) - public void testWebElementToWebDriver() { - try { - WebDriverListener listener = new EventHandler(this.getLogger()); - webDriver = new EventFiringDecorator(listener).decorate(webDriver); - - ConsoleLogger consoleLogger = new ConsoleLogger(); - SeleniumTestObject testObject = new SeleniumTestObject(webDriver, consoleLogger, - this.getTestObject().getFullyQualifiedTestName()); - this.setTestObject(testObject); - - // Open Google and take a screenshot - webDriver.navigate().to("http://www.google.com"); - UIWaitFactory.getWaitDriver(webDriver).waitForPageLoad(); - WebElement input = webDriver.findElement(By.tagName("div")); - WebDriver webElementToWebDriver = SeleniumUtilities.webElementToWebDriver(input); - Assert.assertNotNull(webElementToWebDriver, "Expected extracted web driver to not be null"); - } finally { - webDriver.quit(); + + /** + * Test web element to web driver. + */ + @Test(groups = TestCategories.SELENIUM) + public void testWebElementToWebDriver() { + WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); + try { + WebDriverListener listener = new EventHandler(this.getLogger()); + webDriver = new EventFiringDecorator(listener).decorate(webDriver); + + ConsoleLogger consoleLogger = new ConsoleLogger(); + SeleniumTestObject testObject = new SeleniumTestObject(webDriver, consoleLogger, + this.getTestObject().getFullyQualifiedTestName()); + this.setTestObject(testObject); + + // Open Google and take a screenshot + webDriver.navigate().to("http://www.google.com"); + UIWaitFactory.getWaitDriver(webDriver).waitForPageLoad(); + WebElement input = webDriver.findElement(By.tagName("div")); + WebDriver webElementToWebDriver = SeleniumUtilities.webElementToWebDriver(input); + Assert.assertNotNull(webElementToWebDriver, "Expected extracted web driver to not be null"); + } finally { + webDriver.quit(); + } } - } - - /** - * Test kill driver. - */ - @Test(groups = TestCategories.SELENIUM) - public void testKillDriver() { - try { - ConsoleLogger consoleLogger = new ConsoleLogger(); - SeleniumTestObject testObject = new SeleniumTestObject(webDriver, consoleLogger, - this.getTestObject().getFullyQualifiedTestName()); - this.setTestObject(testObject); - - // Open Google then Kill the Driver - webDriver.navigate().to("http://www.google.com"); - SeleniumUtilities.killDriver(webDriver); - - // Assert that the Session ID is null in the Selenium Driver - Assert.assertNull(((RemoteWebDriver) webDriver).getSessionId(), - "Expected Selenium Driver Session ID to be null."); - } finally { - webDriver.quit(); + + /** + * Test kill driver. + */ + @Test(groups = TestCategories.SELENIUM) + public void testKillDriver() { + WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); + try { + ConsoleLogger consoleLogger = new ConsoleLogger(); + SeleniumTestObject testObject = new SeleniumTestObject(webDriver, consoleLogger, + this.getTestObject().getFullyQualifiedTestName()); + this.setTestObject(testObject); + + // Open Google then Kill the Driver + webDriver.navigate().to("http://www.google.com"); + SeleniumUtilities.killDriver(webDriver); + + // Assert that the Session ID is null in the Selenium Driver + Assert.assertNull(((RemoteWebDriver) webDriver).getSessionId(), + "Expected Selenium Driver Session ID to be null."); + } finally { + webDriver.quit(); + } } - } } \ No newline at end of file diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/UIFindUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/UIFindUnitTest.java index f9582174d..33287efa1 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/UIFindUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/UIFindUnitTest.java @@ -12,7 +12,6 @@ import org.openqa.selenium.NotFoundException; import org.openqa.selenium.WebElement; import org.testng.Assert; -import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; /** @@ -25,19 +24,13 @@ public class UIFindUnitTest extends BaseSeleniumTest { */ private AutomationPageModel automationPageModel; - /** - * The UI Find object for the test. - */ - protected UIFind find; - /** * Sets up the page models for the test. */ - @BeforeMethod - private void setUp() { + public UIFind setUp() { automationPageModel = new AutomationPageModel(this.getTestObject()); this.getWebDriver().navigate().to(automationPageModel.testSiteAutomationUrl); - find = UIFindFactory.getFind(this.getWebDriver()); + return UIFindFactory.getFind(this.getWebDriver()); } /** @@ -45,6 +38,7 @@ private void setUp() { */ @Test(groups = TestCategories.SELENIUM) public void findElementFound() { + UIFind find = setUp(); WebElement element = find.findElement(automationPageModel.automationNamesLabel); Assert.assertEquals(element.getText(),"Names"); } @@ -55,6 +49,7 @@ public void findElementFound() { */ @Test(groups = TestCategories.SELENIUM) public void findElementNotFound() { + UIFind find = setUp(); Assert.assertNull(find.findElement(automationPageModel.notInPage, false)); } @@ -63,6 +58,7 @@ public void findElementNotFound() { */ @Test(groups = TestCategories.SELENIUM, expectedExceptions = NotFoundException.class) public void findElementCatchException() { + UIFind find = setUp(); find.findElement(automationPageModel.notInPage, true); } @@ -71,6 +67,7 @@ public void findElementCatchException() { */ @Test(groups = TestCategories.SELENIUM) public void findElementsFound() { + UIFind find = setUp(); List list = find.findElements(automationPageModel.dropdownToggleClassSelector); Assert.assertEquals(list.size(),2, "There are 2 elements with dropdown classes"); @@ -88,6 +85,7 @@ public void findElementsFound() { */ @Test(groups = TestCategories.SELENIUM) public void findElementsNotFound() { + UIFind find = setUp(); List list = find.findElements(automationPageModel.notInPage, false); Assert.assertEquals(list.size(), 0); } @@ -97,6 +95,7 @@ public void findElementsNotFound() { */ @Test(groups = TestCategories.SELENIUM) public void findElementsNotFoundThrowException() { + UIFind find = setUp(); List elements = find.findElements(automationPageModel.notInPage, false); Assert.assertEquals(elements.size(), 0); } @@ -106,6 +105,7 @@ public void findElementsNotFoundThrowException() { */ @Test(groups = TestCategories.SELENIUM) public void findElementWithTextElementNotFound() { + UIFind find = setUp(); Assert.assertNull(find.findElementWithText(automationPageModel.notInPage, "notInPage", false), "Element was not found"); } @@ -116,6 +116,7 @@ public void findElementWithTextElementNotFound() { */ @Test(groups = TestCategories.SELENIUM) public void findElementWithText() { + UIFind find = setUp(); String text = find.findElement(automationPageModel.automationShowDialog1).getText(); Assert.assertNotNull(find.findElementWithText(automationPageModel.automationShowDialog1, text), "Element was not found"); @@ -127,6 +128,7 @@ public void findElementWithText() { */ @Test(groups = TestCategories.SELENIUM) public void findElementWithTextNotFound() { + UIFind find = setUp(); Assert.assertNull(find.findElementWithText(automationPageModel.homeButton, "#notfound", false), "Element was not found"); } @@ -137,6 +139,7 @@ public void findElementWithTextNotFound() { */ @Test(groups = TestCategories.SELENIUM) public void findIndexOfElementWithText() { + UIFind find = setUp(); Assert.assertEquals(find.findIndexOfElementWithText(automationPageModel.flowerTable, "Red"), 3); } @@ -146,6 +149,7 @@ public void findIndexOfElementWithText() { */ @Test(groups = TestCategories.SELENIUM) public void findIndexOfElementWithTextNotFound() { + UIFind find = setUp(); Assert.assertEquals(find.findIndexOfElementWithText(automationPageModel.flowerTable, "#notfound", false), -1); } @@ -156,6 +160,7 @@ public void findIndexOfElementWithTextNotFound() { */ @Test(groups = TestCategories.SELENIUM) public void findIndexOfElementWithTextWithNotFoundElement() { + UIFind find = setUp(); Assert.assertEquals(find.findIndexOfElementWithText(automationPageModel.notInPage, "#notfound", false), -1); } @@ -166,6 +171,7 @@ public void findIndexOfElementWithTextWithNotFoundElement() { */ @Test(groups = TestCategories.SELENIUM) public void findIndexOfElementInCollection() { + UIFind find = setUp(); Assert.assertEquals(find.findIndexOfElementWithText( find.findElements(automationPageModel.flowerTable), "10 in"), 0); } @@ -175,6 +181,7 @@ public void findIndexOfElementInCollection() { */ @Test(groups = TestCategories.SELENIUM, expectedExceptions = NotFoundException.class) public void findIndexOfElementInCollectionThrowException() { + UIFind find = setUp(); Assert.assertEquals(find.findIndexOfElementWithText( find.findElements(automationPageModel.notInPage), "not In page"), 0); } @@ -185,6 +192,7 @@ public void findIndexOfElementInCollectionThrowException() { */ @Test(groups = TestCategories.SELENIUM) public void findIndexOfElementInCollectionNotFound() { + UIFind find = setUp(); Assert.assertEquals(find.findIndexOfElementWithText(find.findElements(automationPageModel.flowerTable), "#notfound", false), -1); } @@ -195,6 +203,7 @@ public void findIndexOfElementInCollectionNotFound() { */ @Test(groups = TestCategories.SELENIUM) public void findIndexOfElementInCollectionEmptyInputList() { + UIFind find = UIFindFactory.getFind(this.getWebDriver()); int index = find.findIndexOfElementWithText( (List) null, "#notfound", false); Assert.assertEquals(index, -1); @@ -206,6 +215,7 @@ public void findIndexOfElementInCollectionEmptyInputList() { */ @Test(groups = TestCategories.SELENIUM) public void findIndexOfElementInCollectionTextNotFoundAssertIsTrue() { + UIFind find = setUp(); int index = find.findIndexOfElementWithText(find.findElements(automationPageModel.flowerTable), "#notfound", false); Assert.assertEquals(index, -1); diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/UIWaitFactoryUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/UIWaitFactoryUnitTest.java index 92ab699c4..acd8326c8 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/UIWaitFactoryUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/UIWaitFactoryUnitTest.java @@ -30,6 +30,7 @@ public class UIWaitFactoryUnitTest extends BaseSeleniumTest { */ @Test(groups = TestCategories.SELENIUM) public void getWaitDriverTest() { + new AutomationPageModel(this.getTestObject()); UIWait waitDriver = UIWaitFactory.getWaitDriver(this.getWebDriver()); // Error string templates for assertion failures. diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/UIWaitForUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/UIWaitForUnitTest.java index 8ba8771e1..fbf4b0a32 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/UIWaitForUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/UIWaitForUnitTest.java @@ -9,7 +9,6 @@ import org.openqa.selenium.TimeoutException; import org.openqa.selenium.WebElement; import org.testng.Assert; -import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; /** @@ -17,42 +16,15 @@ */ public class UIWaitForUnitTest extends BaseSeleniumTest { - /** - * The IFrame page model. - */ - private IFramePageModel iFramePageModel; - - /** - * The Async page model. - */ - private AsyncPageModel asyncPageModel; - - /** - * The Automation page model. - */ - private AutomationPageModel automationPageModel; - - private UIWait wait; - - /** - * Sets up the page models for the unit tests. - */ - @BeforeMethod - private void setUp() { - iFramePageModel = new IFramePageModel(this.getTestObject()); - asyncPageModel = new AsyncPageModel(this.getTestObject()); - automationPageModel = new AutomationPageModel(this.getTestObject()); - wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); - } - /** * Tests the functionality that waits for the IFrame to load. */ @Test(groups = TestCategories.SELENIUM) public void waitForIFrameToLoad() { + IFramePageModel iFramePageModel = new IFramePageModel(this.getTestObject()); this.getWebDriver().navigate().to(iFramePageModel.testSiteIFrameUrl); + UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); wait.waitForPageLoad(); - WebDriverFactory.setBrowserSize(this.getWebDriver(), "Maximize"); wait.waitForIframeToLoad(iFramePageModel.iframeLocator); @@ -66,9 +38,10 @@ public void waitForIFrameToLoad() { */ @Test(groups = TestCategories.SELENIUM) public void waitForAttributeTextEqualsFound() { + AsyncPageModel asyncPageModel = new AsyncPageModel(this.getTestObject()); this.getWebDriver().navigate().to(asyncPageModel.testSiteAsyncUrl); + UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); wait.waitForVisibleElement(asyncPageModel.asyncLoadingTextDiv); - WebElement element = wait.waitForAttributeTextEquals( asyncPageModel.asyncLoadingTextDiv, "style", ""); Assert.assertNotNull(element); @@ -80,7 +53,9 @@ public void waitForAttributeTextEqualsFound() { */ @Test(groups = TestCategories.SELENIUM) public void waitForClickableElementAndScrollIntoView() { + AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); this.getWebDriver().navigate().to(automationPageModel.testSiteAutomationUrl); + UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); Assert.assertNotNull(wait.waitForClickableElementAndScrollIntoView( automationPageModel.automationShowDialog1)); Assert.assertNotNull(wait.waitForClickableElementAndScrollIntoView( @@ -92,7 +67,9 @@ public void waitForClickableElementAndScrollIntoView() { */ @Test(groups = TestCategories.SELENIUM) public void waitForPresentElement() { + AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); this.getWebDriver().navigate().to(automationPageModel.testSiteAutomationUrl); + UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); Assert.assertNotNull(wait.waitForPresentElement(automationPageModel.flowerTableTitle)); Assert.assertNotNull(wait.waitForPresentElement(automationPageModel.flowerTableTitle, 10000, 1000)); } @@ -102,7 +79,9 @@ public void waitForPresentElement() { */ @Test(groups = TestCategories.SELENIUM) public void waitForElements() { + AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); this.getWebDriver().navigate().to(automationPageModel.testSiteAutomationUrl); + UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); Assert.assertEquals(wait.waitForElements(automationPageModel.flowerTable).size(), 20); Assert.assertEquals(wait.waitForElements(automationPageModel.flowerTable, 10000, 1000).size(), 20); } @@ -112,7 +91,9 @@ public void waitForElements() { */ @Test(groups = TestCategories.SELENIUM) public void waitForEnabledElement() { + AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); this.getWebDriver().navigate().to(automationPageModel.testSiteAutomationUrl); + UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); Assert.assertNotNull(wait.waitForEnabledElement(automationPageModel.flowerTableTitle)); Assert.assertNotNull(wait.waitForEnabledElement(automationPageModel.flowerTableTitle, 10000, 1000)); } @@ -122,9 +103,10 @@ public void waitForEnabledElement() { */ @Test(groups = TestCategories.SELENIUM) public void waitForClickableElement() { + AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); this.getWebDriver().navigate().to(automationPageModel.testSiteUrl); - wait.waitForPageLoad(); - + UIWaitFactory.getWaitDriver(this.getWebDriver()).waitForPageLoad(); + UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); WebElement element = wait.waitForClickableElement(automationPageModel.homeButton); Assert.assertNotNull(element, "Null element was returned"); element = wait.waitForClickableElement(automationPageModel.homeButton, 10000, 1000); @@ -136,9 +118,11 @@ public void waitForClickableElement() { */ @Test(groups = TestCategories.SELENIUM) public void waitForVisibleElement() { + AsyncPageModel asyncPageModel = new AsyncPageModel(this.getTestObject()); this.getWebDriver().navigate().to(asyncPageModel.testSiteAsyncUrl); - wait.waitForPageLoad(); + UIWaitFactory.getWaitDriver(this.getWebDriver()).waitForPageLoad(); + UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); WebElement element = wait.waitForVisibleElement(asyncPageModel.asyncDropdownCssSelector); Assert.assertNotNull(element, "Null element was returned"); element = wait.waitForVisibleElement(asyncPageModel.asyncDropdownCssSelector, 10000, 1000); @@ -150,9 +134,11 @@ public void waitForVisibleElement() { */ @Test(groups = TestCategories.SELENIUM) public void waitForExactText() { + AsyncPageModel asyncPageModel = new AsyncPageModel(this.getTestObject()); this.getWebDriver().navigate().to(asyncPageModel.testSiteAsyncUrl); - wait.waitForPageLoad(); + UIWaitFactory.getWaitDriver(this.getWebDriver()).waitForPageLoad(); + UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); WebElement element = wait.waitForExactText(asyncPageModel.asyncOptionsLabel, "Options"); Assert.assertNotNull(element, "Null element was returned"); } @@ -162,9 +148,11 @@ public void waitForExactText() { */ @Test(groups = TestCategories.SELENIUM) public void waitForContainsText() { + AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); this.getWebDriver().navigate().to(automationPageModel.testSiteAutomationUrl); - wait.waitForPageLoad(); + UIWaitFactory.getWaitDriver(this.getWebDriver()).waitForPageLoad(); + UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); WebElement element = wait.waitForContainsText(automationPageModel.automationNamesLabel, "Name"); Assert.assertNotNull(element, "Null element was returned"); } @@ -174,8 +162,11 @@ public void waitForContainsText() { */ @Test(groups = TestCategories.SELENIUM) public void waitForAbsentElement() { + AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); this.getWebDriver().navigate().to(automationPageModel.testSiteUrl); - wait.waitForPageLoad(); + UIWaitFactory.getWaitDriver(this.getWebDriver()).waitForPageLoad(); + + UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); wait.waitForAbsentElement(automationPageModel.notInPage); } @@ -184,7 +175,11 @@ public void waitForAbsentElement() { */ @Test(groups = TestCategories.SELENIUM, expectedExceptions = TimeoutException.class) public void waitForAbsentElementFail() { + AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); this.getWebDriver().navigate().to(automationPageModel.testSiteUrl); + UIWaitFactory.getWaitDriver(this.getWebDriver()).waitForPageLoad(); + + UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); wait.waitForPageLoad(); wait.waitForAbsentElement(automationPageModel.homeButton); } @@ -194,7 +189,11 @@ public void waitForAbsentElementFail() { */ @Test(groups = TestCategories.SELENIUM) public void waitForPageLoad() { + AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); getWebDriver().navigate().to(automationPageModel.testSiteUrl); + UIWaitFactory.getWaitDriver(this.getWebDriver()).waitForPageLoad(); + + UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); wait.waitForPageLoad(); } @@ -205,9 +204,11 @@ public void waitForPageLoad() { */ @Test(groups = TestCategories.SELENIUM, expectedExceptions = NotFoundException.class) public void waitForAttributeEqualsDoesNotFind() { + AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); this.getWebDriver().navigate().to(automationPageModel.testSiteAutomationUrl); - wait.waitForPageLoad(); + UIWaitFactory.getWaitDriver(this.getWebDriver()).waitForPageLoad(); + UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); WebElement element = wait.waitForAttributeTextEquals( automationPageModel.foodTable, "Flower Table", "Summary"); Assert.assertEquals(element.getAttribute("Text"), "Flower Table"); @@ -219,7 +220,9 @@ public void waitForAttributeEqualsDoesNotFind() { */ @Test(groups = TestCategories.SELENIUM) public void waitForAttributeEqualsFound() { + AsyncPageModel asyncPageModel = new AsyncPageModel(this.getTestObject()); this.getWebDriver().navigate().to(asyncPageModel.testSiteAsyncUrl); + UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); wait.waitForPageLoad(); wait.waitForVisibleElement(asyncPageModel.asyncLoadingTextDiv); diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/UIWaitUntilUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/UIWaitUntilUnitTest.java index 46c944936..c9eddffcf 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/UIWaitUntilUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/UIWaitUntilUnitTest.java @@ -10,7 +10,6 @@ import io.github.maqs.selenium.pageModel.IFramePageModel; import io.github.maqs.utilities.helper.TestCategories; import org.testng.Assert; -import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; /** @@ -18,36 +17,12 @@ */ public class UIWaitUntilUnitTest extends BaseSeleniumTest { - /** - * The IFrame page model. - */ - private IFramePageModel iFramePageModel; - - /** - * The Async page model. - */ - private AsyncPageModel asyncPageModel; - - /** - * The Automation page model. - */ - private AutomationPageModel automationPageModel; - - /** - * Sets up the page models for the unit tests. - */ - @BeforeMethod - private void setUp() { - iFramePageModel = new IFramePageModel(this.getTestObject()); - asyncPageModel = new AsyncPageModel(this.getTestObject()); - automationPageModel = new AutomationPageModel(this.getTestObject()); - } - /** * Tests the functionality that waits until the IFrame to load. */ @Test(groups = TestCategories.SELENIUM) public void waitUntilIFrameToLoad() { + IFramePageModel iFramePageModel = new IFramePageModel(this.getTestObject()); this.getWebDriver().navigate().to(iFramePageModel.testSiteIFrameUrl); UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); wait.waitUntilPageLoad(); @@ -65,6 +40,7 @@ public void waitUntilIFrameToLoad() { */ @Test(groups = TestCategories.SELENIUM) public void waitUntilAttributeTextEquals() { + AsyncPageModel asyncPageModel = new AsyncPageModel(this.getTestObject()); this.getWebDriver().navigate().to(asyncPageModel.testSiteAsyncUrl); UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); Assert.assertTrue(wait.waitUntilAttributeTextEquals(asyncPageModel.asyncLoadingLabel, "style", "display: none;")); @@ -76,6 +52,7 @@ public void waitUntilAttributeTextEquals() { */ @Test(groups = TestCategories.SELENIUM) public void waitUntilAttributeTextContainsFound() { + AsyncPageModel asyncPageModel = new AsyncPageModel(this.getTestObject()); this.getWebDriver().navigate().to(asyncPageModel.testSiteAsyncUrl); UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); Assert.assertTrue(wait.waitUntilAttributeTextContains( @@ -90,6 +67,7 @@ public void waitUntilAttributeTextContainsFound() { */ @Test(groups = TestCategories.SELENIUM) public void waitUntilAttributeTextContainsFalse() { + AsyncPageModel asyncPageModel = new AsyncPageModel(this.getTestObject()); this.getWebDriver().navigate().to(asyncPageModel.testSiteAsyncUrl); UIWaitFactory.getWaitDriver(this.getWebDriver()).waitForPageLoad(); @@ -106,6 +84,7 @@ public void waitUntilAttributeTextContainsFalse() { */ @Test(groups = TestCategories.SELENIUM) public void waitUntilAttributeTextEqualsFalse() { + AsyncPageModel asyncPageModel = new AsyncPageModel(this.getTestObject()); getWebDriver().navigate().to(asyncPageModel.testSiteAsyncUrl); UIWaitFactory.getWaitDriver(this.getWebDriver()).waitForPageLoad(); @@ -120,6 +99,7 @@ public void waitUntilAttributeTextEqualsFalse() { */ @Test(groups = TestCategories.SELENIUM) public void waitUntilClickableElementAndScrollIntoView() { + AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); this.getWebDriver().navigate().to(automationPageModel.testSiteAutomationUrl); UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); Assert.assertTrue(wait.waitUntilClickableElementAndScrollIntoView( @@ -133,6 +113,7 @@ public void waitUntilClickableElementAndScrollIntoView() { */ @Test(groups = TestCategories.SELENIUM) public void waitUntilEnabledElement() { + AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); this.getWebDriver().navigate().to(automationPageModel.testSiteAutomationUrl); UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); Assert.assertTrue(wait.waitUntilEnabledElement(automationPageModel.flowerTableTitle)); @@ -144,6 +125,7 @@ public void waitUntilEnabledElement() { */ @Test(groups = TestCategories.SELENIUM) public void waitUntilDisabledElement() { + AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); this.getWebDriver().navigate().to(automationPageModel.testSiteAutomationUrl); UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); Assert.assertTrue(wait.waitUntilDisabledElement(automationPageModel.disabledField)); @@ -166,6 +148,7 @@ public void resetWaitDriver() { */ @Test(groups = TestCategories.SELENIUM) public void getNewWaitDriver() { + AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); this.getWebDriver().navigate().to(automationPageModel.testSiteUrl); UIWait wait = UIWaitFactory.getWaitDriver(this.getWebDriver()); Assert.assertNotNull(wait.getNewWaitDriver()); @@ -179,6 +162,7 @@ public void getNewWaitDriver() { */ @Test(groups = TestCategories.SELENIUM) public void waitUntilPageLoad() { + AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); getWebDriver().navigate().to(automationPageModel.testSiteUrl); UIWaitFactory.getWaitDriver(this.getWebDriver()).waitForPageLoad(); @@ -191,6 +175,7 @@ public void waitUntilPageLoad() { */ @Test(groups = TestCategories.SELENIUM) public void waitUntilClickableElement() { + AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); this.getWebDriver().navigate().to(automationPageModel.testSiteAutomationUrl); UIWaitFactory.getWaitDriver(this.getWebDriver()).waitForPageLoad(); @@ -206,6 +191,7 @@ public void waitUntilClickableElement() { */ @Test(groups = TestCategories.SELENIUM) public void waitUntilVisibleElement() { + AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); this.getWebDriver().navigate().to(automationPageModel.testSiteAutomationUrl); UIWaitFactory.getWaitDriver(this.getWebDriver()).waitForPageLoad(); @@ -222,6 +208,7 @@ public void waitUntilVisibleElement() { */ @Test(groups = TestCategories.SELENIUM) public void waitUntilExactText() { + AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); this.getWebDriver().navigate().to(automationPageModel.testSiteAutomationUrl); UIWaitFactory.getWaitDriver(this.getWebDriver()).waitForPageLoad(); @@ -237,6 +224,7 @@ public void waitUntilExactText() { */ @Test(groups = TestCategories.SELENIUM) public void waitUntilContainsText() { + AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); this.getWebDriver().navigate().to(automationPageModel.testSiteAutomationUrl); UIWaitFactory.getWaitDriver(this.getWebDriver()).waitForPageLoad(); @@ -254,6 +242,7 @@ public void waitUntilContainsText() { */ @Test(groups = TestCategories.SELENIUM) public void waitUntilAbsentElement() { + AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); this.getWebDriver().navigate().to(automationPageModel.testSiteUrl); UIWaitFactory.getWaitDriver(this.getWebDriver()).waitForPageLoad(); @@ -268,6 +257,7 @@ public void waitUntilAbsentElement() { */ @Test(groups = TestCategories.SELENIUM) public void waitUntilAttributeEquals() { + AsyncPageModel asyncPageModel = new AsyncPageModel(this.getTestObject()); this.getWebDriver().navigate().to(asyncPageModel.testSiteAsyncUrl); UIWaitFactory.getWaitDriver(this.getWebDriver()).waitForPageLoad(); @@ -281,6 +271,7 @@ public void waitUntilAttributeEquals() { */ @Test(groups = TestCategories.SELENIUM) public void waitUntilAttributeContains() { + AsyncPageModel asyncPageModel = new AsyncPageModel(this.getTestObject()); this.getWebDriver().navigate().to(asyncPageModel.testSiteAsyncUrl); UIWaitFactory.getWaitDriver(this.getWebDriver()).waitForPageLoad(); From ebb3a889f0018090e0b0d2702cf875beabe5854c Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Sat, 31 Dec 2022 03:10:33 -0600 Subject: [PATCH 63/91] update logging unit test to clean up after test run --- .../github/maqs/utilities/logger/LoggingConfigUnitTest.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/maqs-utilities/src/test/java/io/github/maqs/utilities/logger/LoggingConfigUnitTest.java b/maqs-utilities/src/test/java/io/github/maqs/utilities/logger/LoggingConfigUnitTest.java index 134276fdf..c2c5e1756 100644 --- a/maqs-utilities/src/test/java/io/github/maqs/utilities/logger/LoggingConfigUnitTest.java +++ b/maqs-utilities/src/test/java/io/github/maqs/utilities/logger/LoggingConfigUnitTest.java @@ -73,6 +73,7 @@ public void getCreateLogInvalidArgumentTest() { newValueMap.put("Log", "INVALIDVALUE"); Config.addGeneralTestSettingValues(newValueMap, true); LoggingConfig.getLoggingEnabledSetting(); + newValueMap.clear(); newValueMap.put("Log", "OnFail"); Config.addGeneralTestSettingValues(newValueMap, true); @@ -184,6 +185,10 @@ public void getLoggingLevelInvalidArgumentTest() { newValueMap.put("LogLevel", "INVALIDVALUE"); Config.addGeneralTestSettingValues(newValueMap, true); LoggingConfig.getLoggingLevelSetting(); + + newValueMap.clear(); + newValueMap.put("Log", "OnFail"); + Config.addGeneralTestSettingValues(newValueMap, true); } /** From 694683a06a5e7aa2ab224e96afdd8d0c4126a9a8 Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Sat, 31 Dec 2022 14:42:35 -0600 Subject: [PATCH 64/91] try @BeforeMethod for ActionBuilder Unit tests --- .../maqs/selenium/ActionBuilderUnitTest.java | 26 +++++++++++++------ 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/ActionBuilderUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/ActionBuilderUnitTest.java index a237d70d6..9109321d9 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/ActionBuilderUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/ActionBuilderUnitTest.java @@ -9,6 +9,7 @@ import io.github.maqs.utilities.helper.TestCategories; import org.openqa.selenium.Keys; import org.testng.Assert; +import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; /** @@ -16,6 +17,8 @@ */ public class ActionBuilderUnitTest extends BaseSeleniumTest { + private AutomationPageModel automationPageModel; + /** * Navigates to the specified url test page. * @param url the url to be navigated to @@ -25,13 +28,20 @@ private void navigateToUrl(String url) { UIWaitFactory.getWaitDriver(this.getWebDriver()).waitForPageLoad(); } + @BeforeMethod + private void setUp() { + automationPageModel = new AutomationPageModel(this.getTestObject()); + this.getWebDriver().navigate().to(automationPageModel.testSiteAutomationUrl); + UIWaitFactory.getWaitDriver(this.getWebDriver()).waitForPageLoad(); + } + /** * Test hover over functionality. */ @Test(groups = TestCategories.SELENIUM) public void hoverOverTest() { - AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); - this.navigateToUrl(automationPageModel.testSiteAutomationUrl); +// AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); +// this.navigateToUrl(automationPageModel.testSiteAutomationUrl); ActionBuilder.hoverOver(this.getWebDriver(), automationPageModel.automationDropDown); UIWaitFactory.getWaitDriver( this.getWebDriver()).waitForClickableElement(automationPageModel.iFrameDropDownButton).click(); @@ -44,8 +54,8 @@ public void hoverOverTest() { */ @Test(groups = TestCategories.SELENIUM) public void pressModifierKeyTest() { - AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); - this.navigateToUrl(automationPageModel.testSiteAutomationUrl); +// AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); +// this.navigateToUrl(automationPageModel.testSiteAutomationUrl); UIWaitFactory.getWaitDriver( this.getWebDriver()).waitForClickableElement(automationPageModel.listBoxOption1).click(); ActionBuilder.pressModifierKey(this.getWebDriver(), Keys.CONTROL); @@ -63,8 +73,8 @@ public void pressModifierKeyTest() { */ @Test(groups = TestCategories.SELENIUM) public void moveSliderTest() { - AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); - this.navigateToUrl(automationPageModel.testSiteAutomationUrl); +// AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); +// this.navigateToUrl(automationPageModel.testSiteAutomationUrl); ActionBuilder.slideElement(this.getWebDriver(), automationPageModel.slider, 50); Assert.assertEquals(this.getWebDriver().findElement( automationPageModel.sliderLabelNumber).getAttribute("value"), "4"); @@ -75,8 +85,8 @@ public void moveSliderTest() { */ @Test(groups = TestCategories.SELENIUM) public void rightClickToTriggerContextMenu() { - AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); - this.navigateToUrl(automationPageModel.testSiteAutomationUrl); +// AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); +// this.navigateToUrl(automationPageModel.testSiteAutomationUrl); ActionBuilder.rightClick(this.getWebDriver(), automationPageModel.rightClickableElementWithContextMenu); Assert.assertTrue(this.getWebDriver().findElement(automationPageModel.rightClickContextSaveText).isDisplayed()); } From 3c3a4dff0af1a9deab8eb7a71ddaa36d1fb409f6 Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Sat, 31 Dec 2022 14:51:04 -0600 Subject: [PATCH 65/91] try @BeforeMethod for BaseSeleniumPageModel Unit tests --- .../maqs/selenium/ActionBuilderUnitTest.java | 17 ++--------- .../BaseSeleniumPageModelUnitTest.java | 30 ++++++++++++------- 2 files changed, 22 insertions(+), 25 deletions(-) diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/ActionBuilderUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/ActionBuilderUnitTest.java index 9109321d9..1781dad3d 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/ActionBuilderUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/ActionBuilderUnitTest.java @@ -17,17 +17,14 @@ */ public class ActionBuilderUnitTest extends BaseSeleniumTest { + /** + * The automation page model for the unit tests. + */ private AutomationPageModel automationPageModel; /** * Navigates to the specified url test page. - * @param url the url to be navigated to */ - private void navigateToUrl(String url) { - this.getWebDriver().navigate().to(url); - UIWaitFactory.getWaitDriver(this.getWebDriver()).waitForPageLoad(); - } - @BeforeMethod private void setUp() { automationPageModel = new AutomationPageModel(this.getTestObject()); @@ -40,8 +37,6 @@ private void setUp() { */ @Test(groups = TestCategories.SELENIUM) public void hoverOverTest() { -// AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); -// this.navigateToUrl(automationPageModel.testSiteAutomationUrl); ActionBuilder.hoverOver(this.getWebDriver(), automationPageModel.automationDropDown); UIWaitFactory.getWaitDriver( this.getWebDriver()).waitForClickableElement(automationPageModel.iFrameDropDownButton).click(); @@ -54,8 +49,6 @@ public void hoverOverTest() { */ @Test(groups = TestCategories.SELENIUM) public void pressModifierKeyTest() { -// AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); -// this.navigateToUrl(automationPageModel.testSiteAutomationUrl); UIWaitFactory.getWaitDriver( this.getWebDriver()).waitForClickableElement(automationPageModel.listBoxOption1).click(); ActionBuilder.pressModifierKey(this.getWebDriver(), Keys.CONTROL); @@ -73,8 +66,6 @@ public void pressModifierKeyTest() { */ @Test(groups = TestCategories.SELENIUM) public void moveSliderTest() { -// AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); -// this.navigateToUrl(automationPageModel.testSiteAutomationUrl); ActionBuilder.slideElement(this.getWebDriver(), automationPageModel.slider, 50); Assert.assertEquals(this.getWebDriver().findElement( automationPageModel.sliderLabelNumber).getAttribute("value"), "4"); @@ -85,8 +76,6 @@ public void moveSliderTest() { */ @Test(groups = TestCategories.SELENIUM) public void rightClickToTriggerContextMenu() { -// AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); -// this.navigateToUrl(automationPageModel.testSiteAutomationUrl); ActionBuilder.rightClick(this.getWebDriver(), automationPageModel.rightClickableElementWithContextMenu); Assert.assertTrue(this.getWebDriver().findElement(automationPageModel.rightClickContextSaveText).isDisplayed()); } diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/BaseSeleniumPageModelUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/BaseSeleniumPageModelUnitTest.java index 72daf8541..35fdc5f02 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/BaseSeleniumPageModelUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/BaseSeleniumPageModelUnitTest.java @@ -9,6 +9,7 @@ import io.github.maqs.utilities.helper.exceptions.TimeoutException; import org.openqa.selenium.WebDriver; import org.testng.Assert; +import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; /** @@ -16,12 +17,19 @@ */ public class BaseSeleniumPageModelUnitTest extends BaseSeleniumTest { + private AutomationPageModel automationPageModel; + + @BeforeMethod + private void setUp() { + automationPageModel = new AutomationPageModel(this.getTestObject()); + } + /** * Test getting the logger. */ @Test(groups = TestCategories.SELENIUM) public void testGetLogger() { - AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); +// AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); Assert.assertNotNull(automationPageModel.getLogger()); } @@ -30,7 +38,7 @@ public void testGetLogger() { */ @Test(groups = TestCategories.SELENIUM) public void testGetTestObject() { - AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); +// AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); Assert.assertNotNull(automationPageModel.getTestObject()); } @@ -39,7 +47,7 @@ public void testGetTestObject() { */ @Test(groups = TestCategories.SELENIUM) public void testGetWebDriver() { - AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); +// AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); Assert.assertNotNull(automationPageModel.getWebDriver()); } @@ -48,7 +56,7 @@ public void testGetWebDriver() { */ @Test(groups = TestCategories.SELENIUM) public void testGetPerfTimerCollection() { - AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); +// AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); Assert.assertNotNull(automationPageModel.getPerfTimerCollection()); } @@ -57,7 +65,7 @@ public void testGetPerfTimerCollection() { */ @Test(groups = TestCategories.SELENIUM) public void testSetWebDriver() { - AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); +// AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); int hashCode = automationPageModel.getWebDriver().hashCode(); WebDriver drive = this.getBrowser(); @@ -72,7 +80,7 @@ public void testSetWebDriver() { */ @Test(groups = TestCategories.SELENIUM) public void testIsPageLoaded() { - AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); +// AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); automationPageModel.open(); Assert.assertTrue(automationPageModel.isPageLoaded()); } @@ -82,7 +90,7 @@ public void testIsPageLoaded() { */ @Test(groups = TestCategories.SELENIUM) public void testGetSameElementTwiceReturnsTheSameElement() { - AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); +// AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); automationPageModel.open(); automationPageModel.waitForPageLoad(); @@ -98,7 +106,7 @@ public void testGetSameElementTwiceReturnsTheSameElement() { */ @Test(groups = TestCategories.SELENIUM) public void testGetLazyElementWithBy() throws TimeoutException, InterruptedException { - AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); + // AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); automationPageModel.open(); automationPageModel.waitForPageLoad(); LazyWebElement lazyElement = automationPageModel.getLazyElement(automationPageModel.automationPageHeader); @@ -118,7 +126,7 @@ public void testGetLazyElementWithBy() throws TimeoutException, InterruptedExcep */ @Test(groups = TestCategories.SELENIUM) public void testGetLazyElementWithByAndName() throws TimeoutException, InterruptedException { - AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); + // AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); automationPageModel.open(); automationPageModel.waitForPageLoad(); LazyWebElement lazyElement = automationPageModel.getLazyElement( @@ -140,7 +148,7 @@ public void testGetLazyElementWithByAndName() throws TimeoutException, Interrupt */ @Test(groups = TestCategories.SELENIUM) public void testGetLazyElementWithParentElementAndBy() throws TimeoutException, InterruptedException { - AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); + // AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); automationPageModel.open(); automationPageModel.waitForPageLoad(); LazyWebElement lazyElement = automationPageModel.getLazyElement( @@ -161,7 +169,7 @@ public void testGetLazyElementWithParentElementAndBy() throws TimeoutException, */ @Test(groups = TestCategories.SELENIUM) public void testGetLazyElementWithParentElementByAndName() throws TimeoutException, InterruptedException { - AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); + // AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); automationPageModel.open(); automationPageModel.waitForPageLoad(); LazyWebElement lazyElement = automationPageModel.getLazyElement( From b6b20a15640565918b57f400b7284fa5feb2b7ac Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Sat, 31 Dec 2022 14:57:09 -0600 Subject: [PATCH 66/91] delete @BeforeMethod for BaseSeleniumPageModel Unit tests --- .../BaseSeleniumPageModelUnitTest.java | 30 +++++++------------ .../selenium/WebDriverFactoryUnitTest.java | 1 + 2 files changed, 12 insertions(+), 19 deletions(-) diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/BaseSeleniumPageModelUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/BaseSeleniumPageModelUnitTest.java index 35fdc5f02..72daf8541 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/BaseSeleniumPageModelUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/BaseSeleniumPageModelUnitTest.java @@ -9,7 +9,6 @@ import io.github.maqs.utilities.helper.exceptions.TimeoutException; import org.openqa.selenium.WebDriver; import org.testng.Assert; -import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; /** @@ -17,19 +16,12 @@ */ public class BaseSeleniumPageModelUnitTest extends BaseSeleniumTest { - private AutomationPageModel automationPageModel; - - @BeforeMethod - private void setUp() { - automationPageModel = new AutomationPageModel(this.getTestObject()); - } - /** * Test getting the logger. */ @Test(groups = TestCategories.SELENIUM) public void testGetLogger() { -// AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); + AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); Assert.assertNotNull(automationPageModel.getLogger()); } @@ -38,7 +30,7 @@ public void testGetLogger() { */ @Test(groups = TestCategories.SELENIUM) public void testGetTestObject() { -// AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); + AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); Assert.assertNotNull(automationPageModel.getTestObject()); } @@ -47,7 +39,7 @@ public void testGetTestObject() { */ @Test(groups = TestCategories.SELENIUM) public void testGetWebDriver() { -// AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); + AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); Assert.assertNotNull(automationPageModel.getWebDriver()); } @@ -56,7 +48,7 @@ public void testGetWebDriver() { */ @Test(groups = TestCategories.SELENIUM) public void testGetPerfTimerCollection() { -// AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); + AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); Assert.assertNotNull(automationPageModel.getPerfTimerCollection()); } @@ -65,7 +57,7 @@ public void testGetPerfTimerCollection() { */ @Test(groups = TestCategories.SELENIUM) public void testSetWebDriver() { -// AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); + AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); int hashCode = automationPageModel.getWebDriver().hashCode(); WebDriver drive = this.getBrowser(); @@ -80,7 +72,7 @@ public void testSetWebDriver() { */ @Test(groups = TestCategories.SELENIUM) public void testIsPageLoaded() { -// AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); + AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); automationPageModel.open(); Assert.assertTrue(automationPageModel.isPageLoaded()); } @@ -90,7 +82,7 @@ public void testIsPageLoaded() { */ @Test(groups = TestCategories.SELENIUM) public void testGetSameElementTwiceReturnsTheSameElement() { -// AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); + AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); automationPageModel.open(); automationPageModel.waitForPageLoad(); @@ -106,7 +98,7 @@ public void testGetSameElementTwiceReturnsTheSameElement() { */ @Test(groups = TestCategories.SELENIUM) public void testGetLazyElementWithBy() throws TimeoutException, InterruptedException { - // AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); + AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); automationPageModel.open(); automationPageModel.waitForPageLoad(); LazyWebElement lazyElement = automationPageModel.getLazyElement(automationPageModel.automationPageHeader); @@ -126,7 +118,7 @@ public void testGetLazyElementWithBy() throws TimeoutException, InterruptedExcep */ @Test(groups = TestCategories.SELENIUM) public void testGetLazyElementWithByAndName() throws TimeoutException, InterruptedException { - // AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); + AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); automationPageModel.open(); automationPageModel.waitForPageLoad(); LazyWebElement lazyElement = automationPageModel.getLazyElement( @@ -148,7 +140,7 @@ public void testGetLazyElementWithByAndName() throws TimeoutException, Interrupt */ @Test(groups = TestCategories.SELENIUM) public void testGetLazyElementWithParentElementAndBy() throws TimeoutException, InterruptedException { - // AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); + AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); automationPageModel.open(); automationPageModel.waitForPageLoad(); LazyWebElement lazyElement = automationPageModel.getLazyElement( @@ -169,7 +161,7 @@ public void testGetLazyElementWithParentElementAndBy() throws TimeoutException, */ @Test(groups = TestCategories.SELENIUM) public void testGetLazyElementWithParentElementByAndName() throws TimeoutException, InterruptedException { - // AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); + AutomationPageModel automationPageModel = new AutomationPageModel(this.getTestObject()); automationPageModel.open(); automationPageModel.waitForPageLoad(); LazyWebElement lazyElement = automationPageModel.getLazyElement( diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/WebDriverFactoryUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/WebDriverFactoryUnitTest.java index 2c3c2e72a..6507e0738 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/WebDriverFactoryUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/WebDriverFactoryUnitTest.java @@ -31,6 +31,7 @@ * The WebDriverFactory test class. */ public class WebDriverFactoryUnitTest extends BaseGenericTest { + /** * Tests getting the default browser. */ From 61aaca070396a5e15c6193cfb315588ec37b3ccc Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Sat, 31 Dec 2022 15:11:21 -0600 Subject: [PATCH 67/91] try @BeforeMethod for BaseSeleniumPageModel Unit tests --- .../maqs/selenium/EventHandlerUnitTest.java | 50 ++++++++++--------- 1 file changed, 27 insertions(+), 23 deletions(-) diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/EventHandlerUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/EventHandlerUnitTest.java index 550a2f330..401545a9b 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/EventHandlerUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/EventHandlerUnitTest.java @@ -11,11 +11,11 @@ import io.github.maqs.utilities.logging.FileLogger; import java.nio.file.Files; import java.nio.file.Paths; - import org.openqa.selenium.Alert; import org.openqa.selenium.JavascriptExecutor; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WrapsDriver; +import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; import org.testng.asserts.SoftAssert; @@ -29,13 +29,24 @@ public class EventHandlerUnitTest extends BaseSeleniumTest { */ private AutomationPageModel automationPageModel; + /** + * Navigate to test page url and wait for page to load. + */ + @BeforeMethod + private void setUp() { + // Navigate to the Automation site and set up the event handler + automationPageModel = new AutomationPageModel(this.getTestObject()); + getWebDriver().navigate().to(automationPageModel.testSiteAutomationUrl); + UIWaitFactory.getWaitDriver(getWebDriver()).waitForPageLoad(); + } + /** * Test that checks if the correct messages are logged when clicking an element. */ @Test(groups = TestCategories.SELENIUM) public void eventHandlerClickElement() { // Navigate to the Automation site and set up the event handler - this.navigateToAutomationSiteUrl(); +// this.navigateToAutomationSiteUrl(); WebDriver webDriverWithHandler = getWebDriver(); // Use the Event Firing Web Driver to click an element, then get the log text @@ -57,7 +68,7 @@ public void eventHandlerClickElement() { @Test(groups = TestCategories.SELENIUM) public void eventHandlerChangeValueOf() { // Navigate to the Automation site and set up the event handler - this.navigateToAutomationSiteUrl(); + // this.navigateToAutomationSiteUrl(); WebDriver webDriverWithHandler = getWebDriver(); // Use the Event Firing Web Driver to change the value of an element, then get the log text @@ -84,7 +95,7 @@ public void eventHandlerChangeValueOf() { @Test(groups = TestCategories.SELENIUM) public void eventHandlerFindBy() { // Navigate to the Automation site and set up the event handler - this.navigateToAutomationSiteUrl(); + // this.navigateToAutomationSiteUrl(); WebDriver webDriverWithHandler = getWebDriver(); // Use the Event Firing Web Driver to find an element, then get the log text @@ -107,7 +118,7 @@ public void eventHandlerFindBy() { @Test(groups = TestCategories.SELENIUM) public void eventHandlerNavigateBack() { // Navigate to the Automation site and set up the event handler - this.navigateToAutomationSiteUrl(); + // this.navigateToAutomationSiteUrl(); WebDriver webDriverWithHandler = getWebDriver(); // Use the Event Firing Web Driver to navigate back to a page, then get the log text @@ -131,7 +142,7 @@ public void eventHandlerNavigateBack() { @Test(groups = TestCategories.SELENIUM) public void eventHandlerNavigateForward() { // Navigate to the Automation site and set up the event handler - this.navigateToAutomationSiteUrl(); + // this.navigateToAutomationSiteUrl(); WebDriver webDriverWithHandler = getWebDriver(); // Use the Event Firing Web Driver to navigate forward to a page, then get the log text @@ -155,7 +166,7 @@ public void eventHandlerNavigateForward() { @Test(groups = TestCategories.SELENIUM) public void eventHandlerRefresh() { // Navigate to the Automation site and set up the event handler - this.navigateToAutomationSiteUrl(); + // this.navigateToAutomationSiteUrl(); WebDriver webDriverWithHandler = getWebDriver(); // Use the Event Firing Web Driver to refresh the page, then get the log text @@ -177,7 +188,7 @@ public void eventHandlerRefresh() { @Test(groups = TestCategories.SELENIUM) public void eventHandlerNavigateTo() { // Navigate to the Automation site and set up the event handler - this.navigateToAutomationSiteUrl(); + // this.navigateToAutomationSiteUrl(); WebDriver webDriverWithHandler = getWebDriver(); // Use the Event Firing Web Driver to navigate to a page, then get the log text @@ -199,7 +210,7 @@ public void eventHandlerNavigateTo() { @Test(groups = TestCategories.SELENIUM) public void eventHandlerScript() { // Navigate to the Automation site and set up the event handler - this.navigateToAutomationSiteUrl(); + // this.navigateToAutomationSiteUrl(); WebDriver webDriverWithHandler = getWebDriver(); // Use the Event Firing Web Driver to execute a script, then get the log text @@ -221,7 +232,7 @@ public void eventHandlerScript() { @Test(groups = TestCategories.SELENIUM) public void eventHandlerSwitchWindow() { // Navigate to the Automation site and set up the event handler - this.navigateToAutomationSiteUrl(); + // this.navigateToAutomationSiteUrl(); WebDriver webDriverWithHandler = this.getWebDriver(); // Use the Event Firing Web Driver to open a new tab, then get the log text @@ -250,7 +261,7 @@ public void eventHandlerSwitchWindow() { @Test(groups = TestCategories.SELENIUM, expectedExceptions = MAQSRuntimeException.class) public void eventHandlerSwitchInvalidWindow() { // Navigate to the Automation site and set up the event handler - this.navigateToAutomationSiteUrl(); + // this.navigateToAutomationSiteUrl(); WebDriver webDriverWithHandler = this.getWebDriver(); // Use the Event Firing Web Driver to open a new tab, then get the log text @@ -265,7 +276,7 @@ public void eventHandlerSwitchInvalidWindow() { @Test(groups = TestCategories.SELENIUM) public void eventHandlerAcceptAlert() { // Navigate to the Automation site and set up the event handler - this.navigateToAutomationSiteUrl(); + // this.navigateToAutomationSiteUrl(); WebDriver webDriverWithHandler = getWebDriver(); // Use the Event Firing Web Driver to accept an alert, then get the log text @@ -290,7 +301,7 @@ public void eventHandlerAcceptAlert() { @Test(groups = TestCategories.SELENIUM) public void eventHandlerAcceptDismiss() { // Navigate to the Automation site and set up the event handler - this.navigateToAutomationSiteUrl(); + // this.navigateToAutomationSiteUrl(); WebDriver webDriverWithHandler = getWebDriver(); // Use the Event Firing Web Driver to dismiss an alert, then get the log text @@ -316,7 +327,7 @@ public void eventHandlerAcceptDismiss() { @Test(groups = TestCategories.SELENIUM) public void eventHandlerGetText() { // Navigate to the Automation site and set up the event handler - this.navigateToAutomationSiteUrl(); + // this.navigateToAutomationSiteUrl(); WebDriver webDriverWithHandler = getWebDriver(); // Use the Event Firing Web Driver to get the text from an element, then get the log text @@ -338,7 +349,7 @@ public void eventHandlerGetText() { @Test(groups = TestCategories.SELENIUM) public void eventHandlerScreenshot() { // Navigate to the Automation site and set up the event handler - this.navigateToAutomationSiteUrl(); + // this.navigateToAutomationSiteUrl(); SeleniumUtilities.captureScreenshot(this.getWebDriver(), this.getTestObject()); // Use the Event Firing Web Driver to take a screenshot, then get the log text @@ -352,14 +363,7 @@ public void eventHandlerScreenshot() { softAssert.assertAll(); } - /** - * Navigate to test page url and wait for page to load. - */ - private void navigateToAutomationSiteUrl() { - automationPageModel = new AutomationPageModel(this.getTestObject()); - getWebDriver().navigate().to(automationPageModel.testSiteAutomationUrl); - UIWaitFactory.getWaitDriver(getWebDriver()).waitForPageLoad(); - } + /** * Read a file and return it as a string. From 7913453bc30acb0336641e29a1e6d991b16f96fc Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Sat, 31 Dec 2022 15:24:04 -0600 Subject: [PATCH 68/91] try @BeforeMethod for EventHandler Unit tests --- .../maqs/selenium/EventHandlerUnitTest.java | 81 ++++--------------- 1 file changed, 15 insertions(+), 66 deletions(-) diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/EventHandlerUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/EventHandlerUnitTest.java index 401545a9b..ab0bf5908 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/EventHandlerUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/EventHandlerUnitTest.java @@ -36,7 +36,7 @@ public class EventHandlerUnitTest extends BaseSeleniumTest { private void setUp() { // Navigate to the Automation site and set up the event handler automationPageModel = new AutomationPageModel(this.getTestObject()); - getWebDriver().navigate().to(automationPageModel.testSiteAutomationUrl); + this.getWebDriver().navigate().to(automationPageModel.testSiteAutomationUrl); UIWaitFactory.getWaitDriver(getWebDriver()).waitForPageLoad(); } @@ -45,12 +45,8 @@ private void setUp() { */ @Test(groups = TestCategories.SELENIUM) public void eventHandlerClickElement() { - // Navigate to the Automation site and set up the event handler -// this.navigateToAutomationSiteUrl(); - WebDriver webDriverWithHandler = getWebDriver(); - // Use the Event Firing Web Driver to click an element, then get the log text - webDriverWithHandler.findElement(automationPageModel.checkbox).click(); + this.getWebDriver().findElement(automationPageModel.checkbox).click(); String logText = this.readTextFile(((FileLogger) this.getLogger()).getFilePath()); // Assert the expected Event Handler logs exist. @@ -67,9 +63,7 @@ public void eventHandlerClickElement() { */ @Test(groups = TestCategories.SELENIUM) public void eventHandlerChangeValueOf() { - // Navigate to the Automation site and set up the event handler - // this.navigateToAutomationSiteUrl(); - WebDriver webDriverWithHandler = getWebDriver(); + WebDriver webDriverWithHandler =this.getWebDriver(); // Use the Event Firing Web Driver to change the value of an element, then get the log text webDriverWithHandler.findElement(automationPageModel.firstNameTextBox).clear(); @@ -94,12 +88,8 @@ public void eventHandlerChangeValueOf() { */ @Test(groups = TestCategories.SELENIUM) public void eventHandlerFindBy() { - // Navigate to the Automation site and set up the event handler - // this.navigateToAutomationSiteUrl(); - WebDriver webDriverWithHandler = getWebDriver(); - // Use the Event Firing Web Driver to find an element, then get the log text - webDriverWithHandler.findElement(automationPageModel.computerPartsList); + this.getWebDriver().findElement(automationPageModel.computerPartsList); String logText = this.readTextFile(((FileLogger) this.getLogger()).getFilePath()); // Assert the expected Event Handler logs exist. @@ -117,9 +107,7 @@ public void eventHandlerFindBy() { */ @Test(groups = TestCategories.SELENIUM) public void eventHandlerNavigateBack() { - // Navigate to the Automation site and set up the event handler - // this.navigateToAutomationSiteUrl(); - WebDriver webDriverWithHandler = getWebDriver(); + WebDriver webDriverWithHandler =this.getWebDriver(); // Use the Event Firing Web Driver to navigate back to a page, then get the log text webDriverWithHandler.findElement(automationPageModel.homeButton).click(); @@ -141,9 +129,7 @@ public void eventHandlerNavigateBack() { */ @Test(groups = TestCategories.SELENIUM) public void eventHandlerNavigateForward() { - // Navigate to the Automation site and set up the event handler - // this.navigateToAutomationSiteUrl(); - WebDriver webDriverWithHandler = getWebDriver(); + WebDriver webDriverWithHandler =this.getWebDriver(); // Use the Event Firing Web Driver to navigate forward to a page, then get the log text webDriverWithHandler.findElement(automationPageModel.homeButton).click(); @@ -165,12 +151,8 @@ public void eventHandlerNavigateForward() { */ @Test(groups = TestCategories.SELENIUM) public void eventHandlerRefresh() { - // Navigate to the Automation site and set up the event handler - // this.navigateToAutomationSiteUrl(); - WebDriver webDriverWithHandler = getWebDriver(); - // Use the Event Firing Web Driver to refresh the page, then get the log text - webDriverWithHandler.navigate().refresh(); + this.getWebDriver().navigate().refresh(); String logText = this.readTextFile(((FileLogger) this.getLogger()).getFilePath()); // Assert the expected Event Handler logs exist. @@ -187,12 +169,8 @@ public void eventHandlerRefresh() { */ @Test(groups = TestCategories.SELENIUM) public void eventHandlerNavigateTo() { - // Navigate to the Automation site and set up the event handler - // this.navigateToAutomationSiteUrl(); - WebDriver webDriverWithHandler = getWebDriver(); - // Use the Event Firing Web Driver to navigate to a page, then get the log text - webDriverWithHandler.navigate().to(automationPageModel.testSiteAutomationUrl); + this.getWebDriver().navigate().to(automationPageModel.testSiteAutomationUrl); String logText = this.readTextFile(((FileLogger) this.getLogger()).getFilePath()); // Assert the expected Event Handler logs exist. @@ -209,12 +187,8 @@ public void eventHandlerNavigateTo() { */ @Test(groups = TestCategories.SELENIUM) public void eventHandlerScript() { - // Navigate to the Automation site and set up the event handler - // this.navigateToAutomationSiteUrl(); - WebDriver webDriverWithHandler = getWebDriver(); - // Use the Event Firing Web Driver to execute a script, then get the log text - JavascriptExecutor javascriptExecutor = (JavascriptExecutor) webDriverWithHandler; + JavascriptExecutor javascriptExecutor = (JavascriptExecutor) this.getWebDriver(); javascriptExecutor.executeScript("document.querySelector(\"#homeButton > a\");"); String logText = this.readTextFile(((FileLogger) this.getLogger()).getFilePath()); @@ -231,12 +205,8 @@ public void eventHandlerScript() { */ @Test(groups = TestCategories.SELENIUM) public void eventHandlerSwitchWindow() { - // Navigate to the Automation site and set up the event handler - // this.navigateToAutomationSiteUrl(); - WebDriver webDriverWithHandler = this.getWebDriver(); - // Use the Event Firing Web Driver to open a new tab, then get the log text - ((JavascriptExecutor) webDriverWithHandler).executeScript("window.open()"); + ((JavascriptExecutor) this.getWebDriver()).executeScript("window.open()"); SeleniumUtilities.switchToWindow(this.getTestObject(), ""); @@ -260,13 +230,8 @@ public void eventHandlerSwitchWindow() { */ @Test(groups = TestCategories.SELENIUM, expectedExceptions = MAQSRuntimeException.class) public void eventHandlerSwitchInvalidWindow() { - // Navigate to the Automation site and set up the event handler - // this.navigateToAutomationSiteUrl(); - WebDriver webDriverWithHandler = this.getWebDriver(); - // Use the Event Firing Web Driver to open a new tab, then get the log text - ((JavascriptExecutor) webDriverWithHandler).executeScript("window.open()"); - + ((JavascriptExecutor) this.getWebDriver()).executeScript("window.open()"); SeleniumUtilities.switchToWindow(this.getTestObject(), "TestWindow"); } @@ -275,14 +240,10 @@ public void eventHandlerSwitchInvalidWindow() { */ @Test(groups = TestCategories.SELENIUM) public void eventHandlerAcceptAlert() { - // Navigate to the Automation site and set up the event handler - // this.navigateToAutomationSiteUrl(); - WebDriver webDriverWithHandler = getWebDriver(); - // Use the Event Firing Web Driver to accept an alert, then get the log text UIWait waitDriver = UIWaitFactory.getWaitDriver(((WrapsDriver) this.getWebDriver()).getWrappedDriver()); waitDriver.waitForClickableElement(automationPageModel.alert).click(); - Alert alert = webDriverWithHandler.switchTo().alert(); + Alert alert = this.getWebDriver().switchTo().alert(); alert.accept(); String logText = this.readTextFile(((FileLogger) this.getLogger()).getFilePath()); @@ -300,14 +261,10 @@ public void eventHandlerAcceptAlert() { */ @Test(groups = TestCategories.SELENIUM) public void eventHandlerAcceptDismiss() { - // Navigate to the Automation site and set up the event handler - // this.navigateToAutomationSiteUrl(); - WebDriver webDriverWithHandler = getWebDriver(); - // Use the Event Firing Web Driver to dismiss an alert, then get the log text UIWait waitDriver = UIWaitFactory.getWaitDriver(((WrapsDriver)this.getWebDriver()).getWrappedDriver()); waitDriver.waitForClickableElement(automationPageModel.alertWithConfirm).click(); - Alert alert = webDriverWithHandler.switchTo().alert(); + Alert alert = this.getWebDriver().switchTo().alert(); alert.dismiss(); String logText = this.readTextFile(((FileLogger) this.getLogger()).getFilePath()); @@ -326,12 +283,8 @@ public void eventHandlerAcceptDismiss() { */ @Test(groups = TestCategories.SELENIUM) public void eventHandlerGetText() { - // Navigate to the Automation site and set up the event handler - // this.navigateToAutomationSiteUrl(); - WebDriver webDriverWithHandler = getWebDriver(); - // Use the Event Firing Web Driver to get the text from an element, then get the log text - webDriverWithHandler.findElement(automationPageModel.errorLinkBy).getText(); + this.getWebDriver().findElement(automationPageModel.errorLinkBy).getText(); String logText = this.readTextFile(((FileLogger) this.getLogger()).getFilePath()); // Assert the expected Event Handler logs exist. @@ -348,8 +301,6 @@ public void eventHandlerGetText() { */ @Test(groups = TestCategories.SELENIUM) public void eventHandlerScreenshot() { - // Navigate to the Automation site and set up the event handler - // this.navigateToAutomationSiteUrl(); SeleniumUtilities.captureScreenshot(this.getWebDriver(), this.getTestObject()); // Use the Event Firing Web Driver to take a screenshot, then get the log text @@ -363,8 +314,6 @@ public void eventHandlerScreenshot() { softAssert.assertAll(); } - - /** * Read a file and return it as a string. * @@ -381,4 +330,4 @@ private String readTextFile(String filePath) { } return text; } -} +} \ No newline at end of file From 36175207bb7da44a95b755685f87f4006460c224 Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Sat, 31 Dec 2022 15:33:53 -0600 Subject: [PATCH 69/91] try @BeforeMethod for EventHandler Unit tests --- .../maqs/selenium/EventHandlerUnitTest.java | 27 +++++++------------ 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/EventHandlerUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/EventHandlerUnitTest.java index ab0bf5908..a83ca9648 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/EventHandlerUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/EventHandlerUnitTest.java @@ -13,7 +13,6 @@ import java.nio.file.Paths; import org.openqa.selenium.Alert; import org.openqa.selenium.JavascriptExecutor; -import org.openqa.selenium.WebDriver; import org.openqa.selenium.WrapsDriver; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; @@ -36,7 +35,7 @@ public class EventHandlerUnitTest extends BaseSeleniumTest { private void setUp() { // Navigate to the Automation site and set up the event handler automationPageModel = new AutomationPageModel(this.getTestObject()); - this.getWebDriver().navigate().to(automationPageModel.testSiteAutomationUrl); + this.getWebDriver().navigate().to(automationPageModel.testSiteAutomationUrl); UIWaitFactory.getWaitDriver(getWebDriver()).waitForPageLoad(); } @@ -63,11 +62,9 @@ public void eventHandlerClickElement() { */ @Test(groups = TestCategories.SELENIUM) public void eventHandlerChangeValueOf() { - WebDriver webDriverWithHandler =this.getWebDriver(); - // Use the Event Firing Web Driver to change the value of an element, then get the log text - webDriverWithHandler.findElement(automationPageModel.firstNameTextBox).clear(); - webDriverWithHandler.findElement(automationPageModel.firstNameTextBox).sendKeys("Change Value"); + this.getWebDriver().findElement(automationPageModel.firstNameTextBox).clear(); + this.getWebDriver().findElement(automationPageModel.firstNameTextBox).sendKeys("Change Value"); String logText = this.readTextFile(((FileLogger) this.getLogger()).getFilePath()); // Assert the expected Event Handler logs exist. @@ -107,11 +104,9 @@ public void eventHandlerFindBy() { */ @Test(groups = TestCategories.SELENIUM) public void eventHandlerNavigateBack() { - WebDriver webDriverWithHandler =this.getWebDriver(); - // Use the Event Firing Web Driver to navigate back to a page, then get the log text - webDriverWithHandler.findElement(automationPageModel.homeButton).click(); - webDriverWithHandler.navigate().back(); + this.getWebDriver().findElement(automationPageModel.homeButton).click(); + this.getWebDriver().navigate().back(); String logText = this.readTextFile(((FileLogger) this.getLogger()).getFilePath()); // Assert the expected Event Handler logs exist. @@ -129,12 +124,10 @@ public void eventHandlerNavigateBack() { */ @Test(groups = TestCategories.SELENIUM) public void eventHandlerNavigateForward() { - WebDriver webDriverWithHandler =this.getWebDriver(); - // Use the Event Firing Web Driver to navigate forward to a page, then get the log text - webDriverWithHandler.findElement(automationPageModel.homeButton).click(); - webDriverWithHandler.navigate().back(); - webDriverWithHandler.navigate().forward(); + this.getWebDriver().findElement(automationPageModel.homeButton).click(); + this.getWebDriver().navigate().back(); + this.getWebDriver().navigate().forward(); String logText = this.readTextFile(((FileLogger) this.getLogger()).getFilePath()); // Assert the expected Event Handler logs exist. @@ -170,7 +163,7 @@ public void eventHandlerRefresh() { @Test(groups = TestCategories.SELENIUM) public void eventHandlerNavigateTo() { // Use the Event Firing Web Driver to navigate to a page, then get the log text - this.getWebDriver().navigate().to(automationPageModel.testSiteAutomationUrl); +// this.getWebDriver().navigate().to(automationPageModel.testSiteAutomationUrl); String logText = this.readTextFile(((FileLogger) this.getLogger()).getFilePath()); // Assert the expected Event Handler logs exist. @@ -262,7 +255,7 @@ public void eventHandlerAcceptAlert() { @Test(groups = TestCategories.SELENIUM) public void eventHandlerAcceptDismiss() { // Use the Event Firing Web Driver to dismiss an alert, then get the log text - UIWait waitDriver = UIWaitFactory.getWaitDriver(((WrapsDriver)this.getWebDriver()).getWrappedDriver()); + UIWait waitDriver = UIWaitFactory.getWaitDriver(((WrapsDriver) this.getWebDriver()).getWrappedDriver()); waitDriver.waitForClickableElement(automationPageModel.alertWithConfirm).click(); Alert alert = this.getWebDriver().switchTo().alert(); alert.dismiss(); From 6e319aaca1e5677011fcf4aa550d72cda74f61f4 Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Sat, 31 Dec 2022 15:47:33 -0600 Subject: [PATCH 70/91] try @BeforeMethod for UIFind Unit tests --- .../SeleniumDriverManagerUnitTest.java | 26 +- .../selenium/SeleniumUtilitiesUnitTest.java | 710 +++++++++--------- .../github/maqs/selenium/UIFindUnitTest.java | 42 +- 3 files changed, 391 insertions(+), 387 deletions(-) diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumDriverManagerUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumDriverManagerUnitTest.java index bdd031168..0d4ab8a1d 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumDriverManagerUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumDriverManagerUnitTest.java @@ -16,19 +16,6 @@ */ public class SeleniumDriverManagerUnitTest extends BaseGenericTest { - /** - * The Get driver. - */ - private final Supplier getDriver = () -> { - WebDriver driver = null; - try { - driver = WebDriverFactory.getDefaultBrowser(); - } catch (Exception e) { - e.printStackTrace(); - } - return driver; - }; - /** * Test close not initialized. */ @@ -86,4 +73,17 @@ public void testDriverManWithInstantiatedDriver() { seleniumDriverManager.logVerbose("Run with new driver"); } } + + /** + * The Get driver. + */ + private final Supplier getDriver = () -> { + WebDriver driver = null; + try { + driver = WebDriverFactory.getDefaultBrowser(); + } catch (Exception e) { + e.printStackTrace(); + } + return driver; + }; } \ No newline at end of file diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumUtilitiesUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumUtilitiesUnitTest.java index 9924d0db1..1491eb466 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumUtilitiesUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumUtilitiesUnitTest.java @@ -10,14 +10,14 @@ import io.github.maqs.utilities.helper.TestCategories; import io.github.maqs.utilities.logging.ConsoleLogger; import io.github.maqs.utilities.logging.FileLogger; +import io.github.maqs.utilities.logging.HtmlFileLogger; +import io.github.maqs.utilities.logging.Logger; import java.io.File; import java.nio.file.Paths; import java.time.Clock; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; import java.util.Locale; -import io.github.maqs.utilities.logging.HtmlFileLogger; -import io.github.maqs.utilities.logging.Logger; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; @@ -32,370 +32,370 @@ */ public class SeleniumUtilitiesUnitTest extends BaseGenericTest { - /** - * Test capture screenshot no append. - */ - @Test(groups = TestCategories.SELENIUM) - public void testCaptureScreenshotNoAppend() { - WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); - try { - FileLogger fileLogger = (FileLogger) this.getTestObject().getLogger(); - SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, - this.getTestObject().getFullyQualifiedTestName()); - this.setTestObject(testObject); - - // Open Google and take a screenshot - webDriver.navigate().to("http://www.google.com"); - boolean isSuccess = SeleniumUtilities.captureScreenshot(webDriver, testObject); - - // Assert screenshot was successful - Assert.assertTrue(isSuccess, "Expected Screenshot to be successful."); - String[] arrayOfAssociatedFiles = testObject.getArrayOfAssociatedFiles(); - Assert.assertTrue( - new File((arrayOfAssociatedFiles[arrayOfAssociatedFiles.length - 1])).exists(), - "Checking that expected file path exists"); - } finally { - webDriver.quit(); - } + /** + * Test capture screenshot no append. + */ + @Test(groups = TestCategories.SELENIUM) + public void testCaptureScreenshotNoAppend() { + WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); + try { + FileLogger fileLogger = (FileLogger) this.getTestObject().getLogger(); + SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, + this.getTestObject().getFullyQualifiedTestName()); + this.setTestObject(testObject); + + // Open Google and take a screenshot + webDriver.navigate().to("http://www.google.com"); + boolean isSuccess = SeleniumUtilities.captureScreenshot(webDriver, testObject); + + // Assert screenshot was successful + Assert.assertTrue(isSuccess, "Expected Screenshot to be successful."); + String[] arrayOfAssociatedFiles = testObject.getArrayOfAssociatedFiles(); + Assert.assertTrue( + new File((arrayOfAssociatedFiles[arrayOfAssociatedFiles.length - 1])).exists(), + "Checking that expected file path exists"); + } finally { + webDriver.quit(); } - - /** - * Test capture screenshot append. - */ - @Test(groups = TestCategories.SELENIUM) - public void testCaptureScreenshotAppend() { - WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); - try { - FileLogger fileLogger = (FileLogger) this.getTestObject().getLogger(); - SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, - this.getTestObject().getFullyQualifiedTestName()); - this.setTestObject(testObject); - - // Open Google and take a screenshot - webDriver.navigate().to("http://www.google.com"); - final String testAppend = "testAppend"; - boolean isSuccess = SeleniumUtilities.captureScreenshot(webDriver, testObject, testAppend); - - // Assert screenshot was successful - Assert.assertTrue(isSuccess, "Expected Screenshot to be successful."); - String[] arrayOfAssociatedFiles = testObject.getArrayOfAssociatedFiles(); - Assert.assertTrue( - new File((arrayOfAssociatedFiles[arrayOfAssociatedFiles.length - 1])).exists(), - "Checking that expected file path exists"); - Assert.assertTrue( - new File((arrayOfAssociatedFiles[arrayOfAssociatedFiles.length - 1])).getName() - .contains(testAppend), - "Checking that appended value was added to file"); - } finally { - webDriver.quit(); - } + } + + /** + * Test capture screenshot append. + */ + @Test(groups = TestCategories.SELENIUM) + public void testCaptureScreenshotAppend() { + WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); + try { + FileLogger fileLogger = (FileLogger) this.getTestObject().getLogger(); + SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, + this.getTestObject().getFullyQualifiedTestName()); + this.setTestObject(testObject); + + // Open Google and take a screenshot + webDriver.navigate().to("http://www.google.com"); + final String testAppend = "testAppend"; + boolean isSuccess = SeleniumUtilities.captureScreenshot(webDriver, testObject, testAppend); + + // Assert screenshot was successful + Assert.assertTrue(isSuccess, "Expected Screenshot to be successful."); + String[] arrayOfAssociatedFiles = testObject.getArrayOfAssociatedFiles(); + Assert.assertTrue( + new File((arrayOfAssociatedFiles[arrayOfAssociatedFiles.length - 1])).exists(), + "Checking that expected file path exists"); + Assert.assertTrue( + new File((arrayOfAssociatedFiles[arrayOfAssociatedFiles.length - 1])).getName() + .contains(testAppend), + "Checking that appended value was added to file"); + } finally { + webDriver.quit(); } - - /** - * Test capture screenshot append. - */ - @Test(groups = TestCategories.SELENIUM) - public void testCaptureScreenshotNullWebDriver() { - WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); - try { - FileLogger fileLogger = (FileLogger) this.getTestObject().getLogger(); - SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, - this.getTestObject().getFullyQualifiedTestName()); - this.setTestObject(testObject); - - // Open Google and take a screenshot - webDriver.navigate().to("http://www.google.com"); - final String testAppend = "testAppend"; - boolean isSuccess = SeleniumUtilities.captureScreenshot(null, testObject, testAppend); - - // Assert screenshot was successful - Assert.assertFalse(isSuccess, "Expected Screenshot to be successful."); - } finally { - webDriver.quit(); - } + } + + /** + * Test capture screenshot append. + */ + @Test(groups = TestCategories.SELENIUM) + public void testCaptureScreenshotNullWebDriver() { + WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); + try { + FileLogger fileLogger = (FileLogger) this.getTestObject().getLogger(); + SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, + this.getTestObject().getFullyQualifiedTestName()); + this.setTestObject(testObject); + + // Open Google and take a screenshot + webDriver.navigate().to("http://www.google.com"); + final String testAppend = "testAppend"; + boolean isSuccess = SeleniumUtilities.captureScreenshot(null, testObject, testAppend); + + // Assert screenshot was successful + Assert.assertFalse(isSuccess, "Expected Screenshot to be successful."); + } finally { + webDriver.quit(); } - - /** - * Test capture screenshot append. - */ - @Test(groups = TestCategories.SELENIUM) - public void testCaptureScreenshotAppendScreenshot() { - WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); - try { - HtmlFileLogger fileLogger = new HtmlFileLogger("Capture Screenshot Append"); - this.getTestObject().setLogger(fileLogger); - SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, - this.getTestObject().getFullyQualifiedTestName()); - this.setTestObject(testObject); - - // Open Google and take a screenshot - webDriver.navigate().to("http://www.google.com"); - final String testAppend = "testAppend"; - boolean isSuccess = SeleniumUtilities.captureScreenshot(webDriver, testObject, testAppend); - - // Assert screenshot was successful - Assert.assertTrue(isSuccess, "Expected Screenshot to be successful."); - String[] arrayOfAssociatedFiles = testObject.getArrayOfAssociatedFiles(); - Assert.assertTrue( - new File((arrayOfAssociatedFiles[arrayOfAssociatedFiles.length - 1])).exists(), - "Checking that expected file path exists"); - Assert.assertTrue( - new File((arrayOfAssociatedFiles[arrayOfAssociatedFiles.length - 1])).getName() - .contains(testAppend), - "Checking that appended value was added to file"); - } finally { - webDriver.quit(); - } + } + + /** + * Test capture screenshot append. + */ + @Test(groups = TestCategories.SELENIUM) + public void testCaptureScreenshotAppendScreenshot() { + WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); + try { + HtmlFileLogger fileLogger = new HtmlFileLogger("Capture Screenshot Append"); + this.getTestObject().setLogger(fileLogger); + SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, + this.getTestObject().getFullyQualifiedTestName()); + this.setTestObject(testObject); + + // Open Google and take a screenshot + webDriver.navigate().to("http://www.google.com"); + final String testAppend = "testAppend"; + boolean isSuccess = SeleniumUtilities.captureScreenshot(webDriver, testObject, testAppend); + + // Assert screenshot was successful + Assert.assertTrue(isSuccess, "Expected Screenshot to be successful."); + String[] arrayOfAssociatedFiles = testObject.getArrayOfAssociatedFiles(); + Assert.assertTrue( + new File((arrayOfAssociatedFiles[arrayOfAssociatedFiles.length - 1])).exists(), + "Checking that expected file path exists"); + Assert.assertTrue( + new File((arrayOfAssociatedFiles[arrayOfAssociatedFiles.length - 1])).getName() + .contains(testAppend), + "Checking that appended value was added to file"); + } finally { + webDriver.quit(); } - - /** - * Test capture screenshot console logger. - */ - @Test(groups = TestCategories.SELENIUM) - public void testCaptureScreenshotConsoleLogger() { - WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); - try { - ConsoleLogger consoleLogger = new ConsoleLogger(); - SeleniumTestObject testObject = new SeleniumTestObject(webDriver, consoleLogger, - this.getTestObject().getFullyQualifiedTestName()); - this.setTestObject(testObject); - - // Open Google and take a screenshot - webDriver.navigate().to("http://www.google.com"); - boolean isSuccess = SeleniumUtilities.captureScreenshot(webDriver, testObject, "testAppend"); - - // Assert screenshot was NOT successful - Assert.assertFalse(isSuccess, "Expected Screenshot to NOT be successful."); - } finally { - webDriver.quit(); - } + } + + /** + * Test capture screenshot console logger. + */ + @Test(groups = TestCategories.SELENIUM) + public void testCaptureScreenshotConsoleLogger() { + WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); + try { + ConsoleLogger consoleLogger = new ConsoleLogger(); + SeleniumTestObject testObject = new SeleniumTestObject(webDriver, consoleLogger, + this.getTestObject().getFullyQualifiedTestName()); + this.setTestObject(testObject); + + // Open Google and take a screenshot + webDriver.navigate().to("http://www.google.com"); + boolean isSuccess = SeleniumUtilities.captureScreenshot(webDriver, testObject, "testAppend"); + + // Assert screenshot was NOT successful + Assert.assertFalse(isSuccess, "Expected Screenshot to NOT be successful."); + } finally { + webDriver.quit(); } - - /** - * Test capture screenshot custom directory file name. - */ - @Test(groups = TestCategories.SELENIUM) - public void testCaptureScreenshotCustomDirectoryFileName() { - WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); - try { - FileLogger fileLogger = (FileLogger) this.getTestObject().getLogger(); - SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, - this.getTestObject().getFullyQualifiedTestName()); - this.setTestObject(testObject); - - // Open Google and take a screenshot - webDriver.navigate().to("http://www.google.com"); - String dateTime = DateTimeFormatter.ofPattern(Logger.DEFAULT_DATE_TIME_FORMAT, - Locale.getDefault()).format(LocalDateTime.now(Clock.systemUTC())); - String filePath = SeleniumUtilities.captureScreenshot(webDriver, testObject, - fileLogger.getDirectory(), - StringProcessor.safeFormatter("%s - %s", "TestCustomName", dateTime)); - - Assert.assertEquals(filePath, - Paths.get(StringProcessor.safeFormatter("%s%s - %s%s", - fileLogger.getDirectory(), File.separator + "TestCustomName", dateTime, - ".png")).normalize().toString()); - Assert.assertTrue(new File(filePath).exists(), - "Checking that screenshot file exists at expected path."); - } finally { - webDriver.quit(); - } + } + + /** + * Test capture screenshot custom directory file name. + */ + @Test(groups = TestCategories.SELENIUM) + public void testCaptureScreenshotCustomDirectoryFileName() { + WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); + try { + FileLogger fileLogger = (FileLogger) this.getTestObject().getLogger(); + SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, + this.getTestObject().getFullyQualifiedTestName()); + this.setTestObject(testObject); + + // Open Google and take a screenshot + webDriver.navigate().to("http://www.google.com"); + String dateTime = DateTimeFormatter.ofPattern(Logger.DEFAULT_DATE_TIME_FORMAT, + Locale.getDefault()).format(LocalDateTime.now(Clock.systemUTC())); + String filePath = SeleniumUtilities.captureScreenshot(webDriver, testObject, + fileLogger.getDirectory(), + StringProcessor.safeFormatter("%s - %s", "TestCustomName", dateTime)); + + Assert.assertEquals(filePath, + Paths.get(StringProcessor.safeFormatter("%s%s - %s%s", + fileLogger.getDirectory(), File.separator + "TestCustomName", dateTime, + ".png")).normalize().toString()); + Assert.assertTrue(new File(filePath).exists(), + "Checking that screenshot file exists at expected path."); + } finally { + webDriver.quit(); } - - /** - * Test save page source no append. - */ - @Test(groups = TestCategories.SELENIUM) - public void testSavePageSourceNoAppend() { - WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); - try { - FileLogger fileLogger = (FileLogger) this.getTestObject().getLogger(); - SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, - this.getTestObject().getFullyQualifiedTestName()); - this.setTestObject(testObject); - - // Open Google and take a screenshot - webDriver.navigate().to("http://www.google.com"); - boolean isSuccess = SeleniumUtilities.savePageSource(webDriver, testObject); - - // Assert screenshot was successful - Assert.assertTrue(isSuccess, "Expected Screenshot to be successful."); - String[] arrayOfAssociatedFiles = testObject.getArrayOfAssociatedFiles(); - Assert.assertTrue( - new File((arrayOfAssociatedFiles[arrayOfAssociatedFiles.length - 1])).exists(), - "Checking that expected file path exists"); - } finally { - webDriver.quit(); - } + } + + /** + * Test save page source no append. + */ + @Test(groups = TestCategories.SELENIUM) + public void testSavePageSourceNoAppend() { + WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); + try { + FileLogger fileLogger = (FileLogger) this.getTestObject().getLogger(); + SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, + this.getTestObject().getFullyQualifiedTestName()); + this.setTestObject(testObject); + + // Open Google and take a screenshot + webDriver.navigate().to("http://www.google.com"); + boolean isSuccess = SeleniumUtilities.savePageSource(webDriver, testObject); + + // Assert screenshot was successful + Assert.assertTrue(isSuccess, "Expected Screenshot to be successful."); + String[] arrayOfAssociatedFiles = testObject.getArrayOfAssociatedFiles(); + Assert.assertTrue( + new File((arrayOfAssociatedFiles[arrayOfAssociatedFiles.length - 1])).exists(), + "Checking that expected file path exists"); + } finally { + webDriver.quit(); } - - /** - * Test save page source append. - */ - @Test(groups = TestCategories.SELENIUM) - public void testSavePageSourceAppend() { - WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); - try { - FileLogger fileLogger = (FileLogger) this.getTestObject().getLogger(); - SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, - this.getTestObject().getFullyQualifiedTestName()); - this.setTestObject(testObject); - - // Open Google and take a screenshot - webDriver.navigate().to("http://www.google.com"); - final String testAppend = "testAppend"; - boolean isSuccess = SeleniumUtilities.savePageSource(webDriver, testObject, testAppend); - - // Assert screenshot was successful - Assert.assertTrue(isSuccess, "Expected Screenshot to be successful."); - String[] arrayOfAssociatedFiles = testObject.getArrayOfAssociatedFiles(); - Assert.assertTrue( - new File((arrayOfAssociatedFiles[arrayOfAssociatedFiles.length - 1])).exists(), - "Checking that expected file path exists"); - Assert.assertTrue( - new File((arrayOfAssociatedFiles[arrayOfAssociatedFiles.length - 1])).getName() - .contains(testAppend), - "Checking that appended value was added to file"); - } finally { - webDriver.quit(); - } + } + + /** + * Test save page source append. + */ + @Test(groups = TestCategories.SELENIUM) + public void testSavePageSourceAppend() { + WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); + try { + FileLogger fileLogger = (FileLogger) this.getTestObject().getLogger(); + SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, + this.getTestObject().getFullyQualifiedTestName()); + this.setTestObject(testObject); + + // Open Google and take a screenshot + webDriver.navigate().to("http://www.google.com"); + final String testAppend = "testAppend"; + boolean isSuccess = SeleniumUtilities.savePageSource(webDriver, testObject, testAppend); + + // Assert screenshot was successful + Assert.assertTrue(isSuccess, "Expected Screenshot to be successful."); + String[] arrayOfAssociatedFiles = testObject.getArrayOfAssociatedFiles(); + Assert.assertTrue( + new File((arrayOfAssociatedFiles[arrayOfAssociatedFiles.length - 1])).exists(), + "Checking that expected file path exists"); + Assert.assertTrue( + new File((arrayOfAssociatedFiles[arrayOfAssociatedFiles.length - 1])).getName() + .contains(testAppend), + "Checking that appended value was added to file"); + } finally { + webDriver.quit(); } - - /** - * Test save page source append. - */ - @Test(groups = TestCategories.SELENIUM) - public void testSavePageSourceNullWebDriver() { - WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); - try { - FileLogger fileLogger = (FileLogger) this.getTestObject().getLogger(); - SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, - this.getTestObject().getFullyQualifiedTestName()); - this.setTestObject(testObject); - - // Open Google and take a screenshot - webDriver.navigate().to("http://www.google.com"); - final String testAppend = "testAppend"; - boolean isSuccess = SeleniumUtilities.savePageSource(null, testObject, testAppend); - - // Assert screenshot was not successful - Assert.assertFalse(isSuccess, "Expected Screenshot to be successful."); - } finally { - webDriver.quit(); - } + } + + /** + * Test save page source append. + */ + @Test(groups = TestCategories.SELENIUM) + public void testSavePageSourceNullWebDriver() { + WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); + try { + FileLogger fileLogger = (FileLogger) this.getTestObject().getLogger(); + SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, + this.getTestObject().getFullyQualifiedTestName()); + this.setTestObject(testObject); + + // Open Google and take a screenshot + webDriver.navigate().to("http://www.google.com"); + final String testAppend = "testAppend"; + boolean isSuccess = SeleniumUtilities.savePageSource(null, testObject, testAppend); + + // Assert screenshot was not successful + Assert.assertFalse(isSuccess, "Expected Screenshot to be successful."); + } finally { + webDriver.quit(); } - - - /** - * Test save page source custom directory file name. - */ - @Test(groups = TestCategories.SELENIUM) - public void testSavePageSourceCustomDirectoryFileName() { - WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); - try { - FileLogger fileLogger = (FileLogger) this.getTestObject().getLogger(); - SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, - this.getTestObject().getFullyQualifiedTestName()); - this.setTestObject(testObject); - - // Open Google and take a screenshot - webDriver.navigate().to("http://www.google.com"); - String dateTime = DateTimeFormatter.ofPattern(Logger.DEFAULT_DATE_TIME_FORMAT, - Locale.getDefault()).format(LocalDateTime.now(Clock.systemUTC())); - String filePath = SeleniumUtilities.savePageSource(webDriver, testObject, - fileLogger.getDirectory(), - StringProcessor.safeFormatter("%s - %s", "TestCustomName", dateTime)); - - // Assert File Path returned from Screenshot is the same as expected file path. - Assert.assertEquals(filePath, - Paths.get(StringProcessor.safeFormatter("%s%s - %s%s", - fileLogger.getDirectory(), File.separator + "TestCustomName", dateTime, - ".txt")).normalize().toString()); - Assert.assertTrue(new File(filePath).exists(), - "Checking that page source file exists at expected path."); - String[] arrayOfAssociatedFiles = testObject.getArrayOfAssociatedFiles(); - Assert.assertTrue( - new File((arrayOfAssociatedFiles[arrayOfAssociatedFiles.length - 1])).exists(), - "Checking that expected file path exists"); - } finally { - webDriver.quit(); - } + } + + + /** + * Test save page source custom directory file name. + */ + @Test(groups = TestCategories.SELENIUM) + public void testSavePageSourceCustomDirectoryFileName() { + WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); + try { + FileLogger fileLogger = (FileLogger) this.getTestObject().getLogger(); + SeleniumTestObject testObject = new SeleniumTestObject(webDriver, fileLogger, + this.getTestObject().getFullyQualifiedTestName()); + this.setTestObject(testObject); + + // Open Google and take a screenshot + webDriver.navigate().to("http://www.google.com"); + String dateTime = DateTimeFormatter.ofPattern(Logger.DEFAULT_DATE_TIME_FORMAT, + Locale.getDefault()).format(LocalDateTime.now(Clock.systemUTC())); + String filePath = SeleniumUtilities.savePageSource(webDriver, testObject, + fileLogger.getDirectory(), + StringProcessor.safeFormatter("%s - %s", "TestCustomName", dateTime)); + + // Assert File Path returned from Screenshot is the same as expected file path. + Assert.assertEquals(filePath, + Paths.get(StringProcessor.safeFormatter("%s%s - %s%s", + fileLogger.getDirectory(), File.separator + "TestCustomName", dateTime, + ".txt")).normalize().toString()); + Assert.assertTrue(new File(filePath).exists(), + "Checking that page source file exists at expected path."); + String[] arrayOfAssociatedFiles = testObject.getArrayOfAssociatedFiles(); + Assert.assertTrue( + new File((arrayOfAssociatedFiles[arrayOfAssociatedFiles.length - 1])).exists(), + "Checking that expected file path exists"); + } finally { + webDriver.quit(); } - - /** - * Test save page source console logger. - */ - @Test(groups = TestCategories.SELENIUM) - public void testSavePageSourceConsoleLogger() { - WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); - try { - ConsoleLogger consoleLogger = new ConsoleLogger(); - SeleniumTestObject testObject = new SeleniumTestObject(webDriver, consoleLogger, - this.getTestObject().getFullyQualifiedTestName()); - this.setTestObject(testObject); - - // Open Google and take a screenshot - webDriver.navigate().to("http://www.google.com"); - boolean isSuccess = SeleniumUtilities.savePageSource(webDriver, testObject); - - // Assert screenshot was successful - Assert.assertTrue(isSuccess, "Expected Screenshot to be successful."); - String[] arrayOfAssociatedFiles = testObject.getArrayOfAssociatedFiles(); - Assert.assertTrue( - new File((arrayOfAssociatedFiles[arrayOfAssociatedFiles.length - 1])).exists(), - "Checking that expected file path exists"); - } finally { - webDriver.quit(); - } + } + + /** + * Test save page source console logger. + */ + @Test(groups = TestCategories.SELENIUM) + public void testSavePageSourceConsoleLogger() { + WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); + try { + ConsoleLogger consoleLogger = new ConsoleLogger(); + SeleniumTestObject testObject = new SeleniumTestObject(webDriver, consoleLogger, + this.getTestObject().getFullyQualifiedTestName()); + this.setTestObject(testObject); + + // Open Google and take a screenshot + webDriver.navigate().to("http://www.google.com"); + boolean isSuccess = SeleniumUtilities.savePageSource(webDriver, testObject); + + // Assert screenshot was successful + Assert.assertTrue(isSuccess, "Expected Screenshot to be successful."); + String[] arrayOfAssociatedFiles = testObject.getArrayOfAssociatedFiles(); + Assert.assertTrue( + new File((arrayOfAssociatedFiles[arrayOfAssociatedFiles.length - 1])).exists(), + "Checking that expected file path exists"); + } finally { + webDriver.quit(); } - - /** - * Test web element to web driver. - */ - @Test(groups = TestCategories.SELENIUM) - public void testWebElementToWebDriver() { - WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); - try { - WebDriverListener listener = new EventHandler(this.getLogger()); - webDriver = new EventFiringDecorator(listener).decorate(webDriver); - - ConsoleLogger consoleLogger = new ConsoleLogger(); - SeleniumTestObject testObject = new SeleniumTestObject(webDriver, consoleLogger, - this.getTestObject().getFullyQualifiedTestName()); - this.setTestObject(testObject); - - // Open Google and take a screenshot - webDriver.navigate().to("http://www.google.com"); - UIWaitFactory.getWaitDriver(webDriver).waitForPageLoad(); - WebElement input = webDriver.findElement(By.tagName("div")); - WebDriver webElementToWebDriver = SeleniumUtilities.webElementToWebDriver(input); - Assert.assertNotNull(webElementToWebDriver, "Expected extracted web driver to not be null"); - } finally { - webDriver.quit(); - } + } + + /** + * Test web element to web driver. + */ + @Test(groups = TestCategories.SELENIUM) + public void testWebElementToWebDriver() { + WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); + try { + WebDriverListener listener = new EventHandler(this.getLogger()); + webDriver = new EventFiringDecorator(listener).decorate(webDriver); + + ConsoleLogger consoleLogger = new ConsoleLogger(); + SeleniumTestObject testObject = new SeleniumTestObject(webDriver, consoleLogger, + this.getTestObject().getFullyQualifiedTestName()); + this.setTestObject(testObject); + + // Open Google and take a screenshot + webDriver.navigate().to("http://www.google.com"); + UIWaitFactory.getWaitDriver(webDriver).waitForPageLoad(); + WebElement input = webDriver.findElement(By.tagName("div")); + WebDriver webElementToWebDriver = SeleniumUtilities.webElementToWebDriver(input); + Assert.assertNotNull(webElementToWebDriver, "Expected extracted web driver to not be null"); + } finally { + webDriver.quit(); } - - /** - * Test kill driver. - */ - @Test(groups = TestCategories.SELENIUM) - public void testKillDriver() { - WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); - try { - ConsoleLogger consoleLogger = new ConsoleLogger(); - SeleniumTestObject testObject = new SeleniumTestObject(webDriver, consoleLogger, - this.getTestObject().getFullyQualifiedTestName()); - this.setTestObject(testObject); - - // Open Google then Kill the Driver - webDriver.navigate().to("http://www.google.com"); - SeleniumUtilities.killDriver(webDriver); - - // Assert that the Session ID is null in the Selenium Driver - Assert.assertNull(((RemoteWebDriver) webDriver).getSessionId(), - "Expected Selenium Driver Session ID to be null."); - } finally { - webDriver.quit(); - } + } + + /** + * Test kill driver. + */ + @Test(groups = TestCategories.SELENIUM) + public void testKillDriver() { + WebDriver webDriver = WebDriverFactory.getDefaultBrowser(); + try { + ConsoleLogger consoleLogger = new ConsoleLogger(); + SeleniumTestObject testObject = new SeleniumTestObject(webDriver, consoleLogger, + this.getTestObject().getFullyQualifiedTestName()); + this.setTestObject(testObject); + + // Open Google then Kill the Driver + webDriver.navigate().to("http://www.google.com"); + SeleniumUtilities.killDriver(webDriver); + + // Assert that the Session ID is null in the Selenium Driver + Assert.assertNull(((RemoteWebDriver) webDriver).getSessionId(), + "Expected Selenium Driver Session ID to be null."); + } finally { + webDriver.quit(); } + } } \ No newline at end of file diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/UIFindUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/UIFindUnitTest.java index 33287efa1..7acc458f5 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/UIFindUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/UIFindUnitTest.java @@ -12,6 +12,7 @@ import org.openqa.selenium.NotFoundException; import org.openqa.selenium.WebElement; import org.testng.Assert; +import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; /** @@ -24,13 +25,16 @@ public class UIFindUnitTest extends BaseSeleniumTest { */ private AutomationPageModel automationPageModel; + private UIFind find; + /** * Sets up the page models for the test. */ - public UIFind setUp() { + @BeforeMethod + private void setUp() { automationPageModel = new AutomationPageModel(this.getTestObject()); this.getWebDriver().navigate().to(automationPageModel.testSiteAutomationUrl); - return UIFindFactory.getFind(this.getWebDriver()); + find = UIFindFactory.getFind(this.getWebDriver()); } /** @@ -38,7 +42,7 @@ public UIFind setUp() { */ @Test(groups = TestCategories.SELENIUM) public void findElementFound() { - UIFind find = setUp(); +// UIFind find = setUp(); WebElement element = find.findElement(automationPageModel.automationNamesLabel); Assert.assertEquals(element.getText(),"Names"); } @@ -49,7 +53,7 @@ public void findElementFound() { */ @Test(groups = TestCategories.SELENIUM) public void findElementNotFound() { - UIFind find = setUp(); +// UIFind find = setUp(); Assert.assertNull(find.findElement(automationPageModel.notInPage, false)); } @@ -58,7 +62,7 @@ public void findElementNotFound() { */ @Test(groups = TestCategories.SELENIUM, expectedExceptions = NotFoundException.class) public void findElementCatchException() { - UIFind find = setUp(); +// UIFind find = setUp(); find.findElement(automationPageModel.notInPage, true); } @@ -67,7 +71,7 @@ public void findElementCatchException() { */ @Test(groups = TestCategories.SELENIUM) public void findElementsFound() { - UIFind find = setUp(); +// UIFind find = setUp(); List list = find.findElements(automationPageModel.dropdownToggleClassSelector); Assert.assertEquals(list.size(),2, "There are 2 elements with dropdown classes"); @@ -85,7 +89,7 @@ public void findElementsFound() { */ @Test(groups = TestCategories.SELENIUM) public void findElementsNotFound() { - UIFind find = setUp(); +// UIFind find = setUp(); List list = find.findElements(automationPageModel.notInPage, false); Assert.assertEquals(list.size(), 0); } @@ -95,7 +99,7 @@ public void findElementsNotFound() { */ @Test(groups = TestCategories.SELENIUM) public void findElementsNotFoundThrowException() { - UIFind find = setUp(); +// UIFind find = setUp(); List elements = find.findElements(automationPageModel.notInPage, false); Assert.assertEquals(elements.size(), 0); } @@ -105,7 +109,7 @@ public void findElementsNotFoundThrowException() { */ @Test(groups = TestCategories.SELENIUM) public void findElementWithTextElementNotFound() { - UIFind find = setUp(); +// UIFind find = setUp(); Assert.assertNull(find.findElementWithText(automationPageModel.notInPage, "notInPage", false), "Element was not found"); } @@ -116,7 +120,7 @@ public void findElementWithTextElementNotFound() { */ @Test(groups = TestCategories.SELENIUM) public void findElementWithText() { - UIFind find = setUp(); +// UIFind find = setUp(); String text = find.findElement(automationPageModel.automationShowDialog1).getText(); Assert.assertNotNull(find.findElementWithText(automationPageModel.automationShowDialog1, text), "Element was not found"); @@ -128,7 +132,7 @@ public void findElementWithText() { */ @Test(groups = TestCategories.SELENIUM) public void findElementWithTextNotFound() { - UIFind find = setUp(); +// UIFind find = setUp(); Assert.assertNull(find.findElementWithText(automationPageModel.homeButton, "#notfound", false), "Element was not found"); } @@ -139,7 +143,7 @@ public void findElementWithTextNotFound() { */ @Test(groups = TestCategories.SELENIUM) public void findIndexOfElementWithText() { - UIFind find = setUp(); +// UIFind find = setUp(); Assert.assertEquals(find.findIndexOfElementWithText(automationPageModel.flowerTable, "Red"), 3); } @@ -149,7 +153,7 @@ public void findIndexOfElementWithText() { */ @Test(groups = TestCategories.SELENIUM) public void findIndexOfElementWithTextNotFound() { - UIFind find = setUp(); +// UIFind find = setUp(); Assert.assertEquals(find.findIndexOfElementWithText(automationPageModel.flowerTable, "#notfound", false), -1); } @@ -160,7 +164,7 @@ public void findIndexOfElementWithTextNotFound() { */ @Test(groups = TestCategories.SELENIUM) public void findIndexOfElementWithTextWithNotFoundElement() { - UIFind find = setUp(); +// UIFind find = setUp(); Assert.assertEquals(find.findIndexOfElementWithText(automationPageModel.notInPage, "#notfound", false), -1); } @@ -171,7 +175,7 @@ public void findIndexOfElementWithTextWithNotFoundElement() { */ @Test(groups = TestCategories.SELENIUM) public void findIndexOfElementInCollection() { - UIFind find = setUp(); +// UIFind find = setUp(); Assert.assertEquals(find.findIndexOfElementWithText( find.findElements(automationPageModel.flowerTable), "10 in"), 0); } @@ -181,7 +185,7 @@ public void findIndexOfElementInCollection() { */ @Test(groups = TestCategories.SELENIUM, expectedExceptions = NotFoundException.class) public void findIndexOfElementInCollectionThrowException() { - UIFind find = setUp(); +// UIFind find = setUp(); Assert.assertEquals(find.findIndexOfElementWithText( find.findElements(automationPageModel.notInPage), "not In page"), 0); } @@ -192,7 +196,7 @@ public void findIndexOfElementInCollectionThrowException() { */ @Test(groups = TestCategories.SELENIUM) public void findIndexOfElementInCollectionNotFound() { - UIFind find = setUp(); +// UIFind find = setUp(); Assert.assertEquals(find.findIndexOfElementWithText(find.findElements(automationPageModel.flowerTable), "#notfound", false), -1); } @@ -203,7 +207,7 @@ public void findIndexOfElementInCollectionNotFound() { */ @Test(groups = TestCategories.SELENIUM) public void findIndexOfElementInCollectionEmptyInputList() { - UIFind find = UIFindFactory.getFind(this.getWebDriver()); +// UIFind find = UIFindFactory.getFind(this.getWebDriver()); int index = find.findIndexOfElementWithText( (List) null, "#notfound", false); Assert.assertEquals(index, -1); @@ -215,7 +219,7 @@ public void findIndexOfElementInCollectionEmptyInputList() { */ @Test(groups = TestCategories.SELENIUM) public void findIndexOfElementInCollectionTextNotFoundAssertIsTrue() { - UIFind find = setUp(); +// UIFind find = setUp(); int index = find.findIndexOfElementWithText(find.findElements(automationPageModel.flowerTable), "#notfound", false); Assert.assertEquals(index, -1); From 699284fbce5db4fbf93fb4888bc4e5b19dfdd860 Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Sat, 31 Dec 2022 15:55:42 -0600 Subject: [PATCH 71/91] delete setting up Automation Page Model for UI Wait Factory --- .../github/maqs/selenium/UIFindUnitTest.java | 20 +++---------------- .../maqs/selenium/UIWaitFactoryUnitTest.java | 4 ++-- 2 files changed, 5 insertions(+), 19 deletions(-) diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/UIFindUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/UIFindUnitTest.java index 7acc458f5..cdddcb142 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/UIFindUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/UIFindUnitTest.java @@ -25,6 +25,9 @@ public class UIFindUnitTest extends BaseSeleniumTest { */ private AutomationPageModel automationPageModel; + /** + * The UI Find to be used in the unit tests. + */ private UIFind find; /** @@ -42,7 +45,6 @@ private void setUp() { */ @Test(groups = TestCategories.SELENIUM) public void findElementFound() { -// UIFind find = setUp(); WebElement element = find.findElement(automationPageModel.automationNamesLabel); Assert.assertEquals(element.getText(),"Names"); } @@ -53,7 +55,6 @@ public void findElementFound() { */ @Test(groups = TestCategories.SELENIUM) public void findElementNotFound() { -// UIFind find = setUp(); Assert.assertNull(find.findElement(automationPageModel.notInPage, false)); } @@ -62,7 +63,6 @@ public void findElementNotFound() { */ @Test(groups = TestCategories.SELENIUM, expectedExceptions = NotFoundException.class) public void findElementCatchException() { -// UIFind find = setUp(); find.findElement(automationPageModel.notInPage, true); } @@ -71,7 +71,6 @@ public void findElementCatchException() { */ @Test(groups = TestCategories.SELENIUM) public void findElementsFound() { -// UIFind find = setUp(); List list = find.findElements(automationPageModel.dropdownToggleClassSelector); Assert.assertEquals(list.size(),2, "There are 2 elements with dropdown classes"); @@ -89,7 +88,6 @@ public void findElementsFound() { */ @Test(groups = TestCategories.SELENIUM) public void findElementsNotFound() { -// UIFind find = setUp(); List list = find.findElements(automationPageModel.notInPage, false); Assert.assertEquals(list.size(), 0); } @@ -99,7 +97,6 @@ public void findElementsNotFound() { */ @Test(groups = TestCategories.SELENIUM) public void findElementsNotFoundThrowException() { -// UIFind find = setUp(); List elements = find.findElements(automationPageModel.notInPage, false); Assert.assertEquals(elements.size(), 0); } @@ -109,7 +106,6 @@ public void findElementsNotFoundThrowException() { */ @Test(groups = TestCategories.SELENIUM) public void findElementWithTextElementNotFound() { -// UIFind find = setUp(); Assert.assertNull(find.findElementWithText(automationPageModel.notInPage, "notInPage", false), "Element was not found"); } @@ -120,7 +116,6 @@ public void findElementWithTextElementNotFound() { */ @Test(groups = TestCategories.SELENIUM) public void findElementWithText() { -// UIFind find = setUp(); String text = find.findElement(automationPageModel.automationShowDialog1).getText(); Assert.assertNotNull(find.findElementWithText(automationPageModel.automationShowDialog1, text), "Element was not found"); @@ -132,7 +127,6 @@ public void findElementWithText() { */ @Test(groups = TestCategories.SELENIUM) public void findElementWithTextNotFound() { -// UIFind find = setUp(); Assert.assertNull(find.findElementWithText(automationPageModel.homeButton, "#notfound", false), "Element was not found"); } @@ -143,7 +137,6 @@ public void findElementWithTextNotFound() { */ @Test(groups = TestCategories.SELENIUM) public void findIndexOfElementWithText() { -// UIFind find = setUp(); Assert.assertEquals(find.findIndexOfElementWithText(automationPageModel.flowerTable, "Red"), 3); } @@ -153,7 +146,6 @@ public void findIndexOfElementWithText() { */ @Test(groups = TestCategories.SELENIUM) public void findIndexOfElementWithTextNotFound() { -// UIFind find = setUp(); Assert.assertEquals(find.findIndexOfElementWithText(automationPageModel.flowerTable, "#notfound", false), -1); } @@ -164,7 +156,6 @@ public void findIndexOfElementWithTextNotFound() { */ @Test(groups = TestCategories.SELENIUM) public void findIndexOfElementWithTextWithNotFoundElement() { -// UIFind find = setUp(); Assert.assertEquals(find.findIndexOfElementWithText(automationPageModel.notInPage, "#notfound", false), -1); } @@ -175,7 +166,6 @@ public void findIndexOfElementWithTextWithNotFoundElement() { */ @Test(groups = TestCategories.SELENIUM) public void findIndexOfElementInCollection() { -// UIFind find = setUp(); Assert.assertEquals(find.findIndexOfElementWithText( find.findElements(automationPageModel.flowerTable), "10 in"), 0); } @@ -185,7 +175,6 @@ public void findIndexOfElementInCollection() { */ @Test(groups = TestCategories.SELENIUM, expectedExceptions = NotFoundException.class) public void findIndexOfElementInCollectionThrowException() { -// UIFind find = setUp(); Assert.assertEquals(find.findIndexOfElementWithText( find.findElements(automationPageModel.notInPage), "not In page"), 0); } @@ -196,7 +185,6 @@ public void findIndexOfElementInCollectionThrowException() { */ @Test(groups = TestCategories.SELENIUM) public void findIndexOfElementInCollectionNotFound() { -// UIFind find = setUp(); Assert.assertEquals(find.findIndexOfElementWithText(find.findElements(automationPageModel.flowerTable), "#notfound", false), -1); } @@ -207,7 +195,6 @@ public void findIndexOfElementInCollectionNotFound() { */ @Test(groups = TestCategories.SELENIUM) public void findIndexOfElementInCollectionEmptyInputList() { -// UIFind find = UIFindFactory.getFind(this.getWebDriver()); int index = find.findIndexOfElementWithText( (List) null, "#notfound", false); Assert.assertEquals(index, -1); @@ -219,7 +206,6 @@ public void findIndexOfElementInCollectionEmptyInputList() { */ @Test(groups = TestCategories.SELENIUM) public void findIndexOfElementInCollectionTextNotFoundAssertIsTrue() { -// UIFind find = setUp(); int index = find.findIndexOfElementWithText(find.findElements(automationPageModel.flowerTable), "#notfound", false); Assert.assertEquals(index, -1); diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/UIWaitFactoryUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/UIWaitFactoryUnitTest.java index acd8326c8..2319647d5 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/UIWaitFactoryUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/UIWaitFactoryUnitTest.java @@ -30,7 +30,7 @@ public class UIWaitFactoryUnitTest extends BaseSeleniumTest { */ @Test(groups = TestCategories.SELENIUM) public void getWaitDriverTest() { - new AutomationPageModel(this.getTestObject()); +// new AutomationPageModel(this.getTestObject()); UIWait waitDriver = UIWaitFactory.getWaitDriver(this.getWebDriver()); // Error string templates for assertion failures. @@ -47,7 +47,7 @@ public void getWaitDriverTest() { */ @Test(groups = TestCategories.SELENIUM) public void getWaitDriverWhenOneExists() { - new AutomationPageModel(this.getTestObject()); +// new AutomationPageModel(this.getTestObject()); UIWait firstWaitDriver = UIWaitFactory.getWaitDriver(this.getWebDriver()); UIWait secondWaitDriver = UIWaitFactory.getWaitDriver(this.getWebDriver()); From ed2e5f6f259d7dcde41e6a1b0c3cfd9bd090445a Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Sat, 31 Dec 2022 16:00:15 -0600 Subject: [PATCH 72/91] Revert "delete setting up Automation Page Model for UI Wait Factory" This reverts commit 699284fbce5db4fbf93fb4888bc4e5b19dfdd860. --- .../github/maqs/selenium/UIFindUnitTest.java | 20 ++++++++++++++++--- .../maqs/selenium/UIWaitFactoryUnitTest.java | 4 ++-- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/UIFindUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/UIFindUnitTest.java index cdddcb142..7acc458f5 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/UIFindUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/UIFindUnitTest.java @@ -25,9 +25,6 @@ public class UIFindUnitTest extends BaseSeleniumTest { */ private AutomationPageModel automationPageModel; - /** - * The UI Find to be used in the unit tests. - */ private UIFind find; /** @@ -45,6 +42,7 @@ private void setUp() { */ @Test(groups = TestCategories.SELENIUM) public void findElementFound() { +// UIFind find = setUp(); WebElement element = find.findElement(automationPageModel.automationNamesLabel); Assert.assertEquals(element.getText(),"Names"); } @@ -55,6 +53,7 @@ public void findElementFound() { */ @Test(groups = TestCategories.SELENIUM) public void findElementNotFound() { +// UIFind find = setUp(); Assert.assertNull(find.findElement(automationPageModel.notInPage, false)); } @@ -63,6 +62,7 @@ public void findElementNotFound() { */ @Test(groups = TestCategories.SELENIUM, expectedExceptions = NotFoundException.class) public void findElementCatchException() { +// UIFind find = setUp(); find.findElement(automationPageModel.notInPage, true); } @@ -71,6 +71,7 @@ public void findElementCatchException() { */ @Test(groups = TestCategories.SELENIUM) public void findElementsFound() { +// UIFind find = setUp(); List list = find.findElements(automationPageModel.dropdownToggleClassSelector); Assert.assertEquals(list.size(),2, "There are 2 elements with dropdown classes"); @@ -88,6 +89,7 @@ public void findElementsFound() { */ @Test(groups = TestCategories.SELENIUM) public void findElementsNotFound() { +// UIFind find = setUp(); List list = find.findElements(automationPageModel.notInPage, false); Assert.assertEquals(list.size(), 0); } @@ -97,6 +99,7 @@ public void findElementsNotFound() { */ @Test(groups = TestCategories.SELENIUM) public void findElementsNotFoundThrowException() { +// UIFind find = setUp(); List elements = find.findElements(automationPageModel.notInPage, false); Assert.assertEquals(elements.size(), 0); } @@ -106,6 +109,7 @@ public void findElementsNotFoundThrowException() { */ @Test(groups = TestCategories.SELENIUM) public void findElementWithTextElementNotFound() { +// UIFind find = setUp(); Assert.assertNull(find.findElementWithText(automationPageModel.notInPage, "notInPage", false), "Element was not found"); } @@ -116,6 +120,7 @@ public void findElementWithTextElementNotFound() { */ @Test(groups = TestCategories.SELENIUM) public void findElementWithText() { +// UIFind find = setUp(); String text = find.findElement(automationPageModel.automationShowDialog1).getText(); Assert.assertNotNull(find.findElementWithText(automationPageModel.automationShowDialog1, text), "Element was not found"); @@ -127,6 +132,7 @@ public void findElementWithText() { */ @Test(groups = TestCategories.SELENIUM) public void findElementWithTextNotFound() { +// UIFind find = setUp(); Assert.assertNull(find.findElementWithText(automationPageModel.homeButton, "#notfound", false), "Element was not found"); } @@ -137,6 +143,7 @@ public void findElementWithTextNotFound() { */ @Test(groups = TestCategories.SELENIUM) public void findIndexOfElementWithText() { +// UIFind find = setUp(); Assert.assertEquals(find.findIndexOfElementWithText(automationPageModel.flowerTable, "Red"), 3); } @@ -146,6 +153,7 @@ public void findIndexOfElementWithText() { */ @Test(groups = TestCategories.SELENIUM) public void findIndexOfElementWithTextNotFound() { +// UIFind find = setUp(); Assert.assertEquals(find.findIndexOfElementWithText(automationPageModel.flowerTable, "#notfound", false), -1); } @@ -156,6 +164,7 @@ public void findIndexOfElementWithTextNotFound() { */ @Test(groups = TestCategories.SELENIUM) public void findIndexOfElementWithTextWithNotFoundElement() { +// UIFind find = setUp(); Assert.assertEquals(find.findIndexOfElementWithText(automationPageModel.notInPage, "#notfound", false), -1); } @@ -166,6 +175,7 @@ public void findIndexOfElementWithTextWithNotFoundElement() { */ @Test(groups = TestCategories.SELENIUM) public void findIndexOfElementInCollection() { +// UIFind find = setUp(); Assert.assertEquals(find.findIndexOfElementWithText( find.findElements(automationPageModel.flowerTable), "10 in"), 0); } @@ -175,6 +185,7 @@ public void findIndexOfElementInCollection() { */ @Test(groups = TestCategories.SELENIUM, expectedExceptions = NotFoundException.class) public void findIndexOfElementInCollectionThrowException() { +// UIFind find = setUp(); Assert.assertEquals(find.findIndexOfElementWithText( find.findElements(automationPageModel.notInPage), "not In page"), 0); } @@ -185,6 +196,7 @@ public void findIndexOfElementInCollectionThrowException() { */ @Test(groups = TestCategories.SELENIUM) public void findIndexOfElementInCollectionNotFound() { +// UIFind find = setUp(); Assert.assertEquals(find.findIndexOfElementWithText(find.findElements(automationPageModel.flowerTable), "#notfound", false), -1); } @@ -195,6 +207,7 @@ public void findIndexOfElementInCollectionNotFound() { */ @Test(groups = TestCategories.SELENIUM) public void findIndexOfElementInCollectionEmptyInputList() { +// UIFind find = UIFindFactory.getFind(this.getWebDriver()); int index = find.findIndexOfElementWithText( (List) null, "#notfound", false); Assert.assertEquals(index, -1); @@ -206,6 +219,7 @@ public void findIndexOfElementInCollectionEmptyInputList() { */ @Test(groups = TestCategories.SELENIUM) public void findIndexOfElementInCollectionTextNotFoundAssertIsTrue() { +// UIFind find = setUp(); int index = find.findIndexOfElementWithText(find.findElements(automationPageModel.flowerTable), "#notfound", false); Assert.assertEquals(index, -1); diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/UIWaitFactoryUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/UIWaitFactoryUnitTest.java index 2319647d5..acd8326c8 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/UIWaitFactoryUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/UIWaitFactoryUnitTest.java @@ -30,7 +30,7 @@ public class UIWaitFactoryUnitTest extends BaseSeleniumTest { */ @Test(groups = TestCategories.SELENIUM) public void getWaitDriverTest() { -// new AutomationPageModel(this.getTestObject()); + new AutomationPageModel(this.getTestObject()); UIWait waitDriver = UIWaitFactory.getWaitDriver(this.getWebDriver()); // Error string templates for assertion failures. @@ -47,7 +47,7 @@ public void getWaitDriverTest() { */ @Test(groups = TestCategories.SELENIUM) public void getWaitDriverWhenOneExists() { -// new AutomationPageModel(this.getTestObject()); + new AutomationPageModel(this.getTestObject()); UIWait firstWaitDriver = UIWaitFactory.getWaitDriver(this.getWebDriver()); UIWait secondWaitDriver = UIWaitFactory.getWaitDriver(this.getWebDriver()); From e1e60e2056cce16e8777dfb3fabb4b7f26e8e859 Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Tue, 3 Jan 2023 02:13:10 -0600 Subject: [PATCH 73/91] update some small things for web service --- maqs-webservices/pom.xml | 10 +++--- .../webservices/WebServiceConfigUnitTest.java | 2 +- .../WebServiceDriverManagerUnitTest.java | 5 +-- .../WebServiceDriverPatchUnitTest.java | 2 +- .../WebServiceDriverPutUnitTest.java | 2 +- .../webservices/WebServiceDriverUnitTest.java | 2 +- .../WebServiceTestObjectUnitTest.java | 2 +- .../WebServiceUtilitiesUnitTest.java | 5 ++- .../maqs/webservices/models/Product.java | 34 +++++++------------ 9 files changed, 27 insertions(+), 37 deletions(-) diff --git a/maqs-webservices/pom.xml b/maqs-webservices/pom.xml index 0f40a8a04..d70027bea 100644 --- a/maqs-webservices/pom.xml +++ b/maqs-webservices/pom.xml @@ -17,6 +17,8 @@ 5.3.15 + 2.13.2 + 2.13.4.1 @@ -35,22 +37,22 @@ com.fasterxml.jackson.core jackson-core - 2.13.2 + ${jackson.version} com.fasterxml.jackson.core jackson-databind - 2.13.4.1 + ${jackson.databind.version} com.fasterxml.jackson.dataformat jackson-dataformat-xml - 2.13.2 + ${jackson.version} com.fasterxml.jackson.core jackson-annotations - 2.13.2 + ${jackson.version} org.springframework diff --git a/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceConfigUnitTest.java b/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceConfigUnitTest.java index b55a2274f..3aa6f5e80 100644 --- a/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceConfigUnitTest.java +++ b/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceConfigUnitTest.java @@ -57,4 +57,4 @@ public void getProxyPort() { Assert.assertEquals(WebServiceConfig.getProxyPort(), 8080, "Proxy Port is not the same"); } -} +} \ No newline at end of file diff --git a/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverManagerUnitTest.java b/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverManagerUnitTest.java index 2d3db5839..841fa83da 100644 --- a/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverManagerUnitTest.java +++ b/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverManagerUnitTest.java @@ -18,7 +18,6 @@ public class WebServiceDriverManagerUnitTest extends BaseGenericTest { /** * Test for Getting Web Service Driver using Supplier in constructor. - * */ @Test(groups = TestCategories.WEB_SERVICE) public void getWebServiceDriverWithSupplierTest() { @@ -34,7 +33,6 @@ public void getWebServiceDriverWithSupplierTest() { /** * Test for Getting Web Service Driver using Web Service Driver in constructor. - * */ @Test(groups = TestCategories.WEB_SERVICE) public void getWebServiceDriverTest() { @@ -48,7 +46,6 @@ public void getWebServiceDriverTest() { /** * Test for Getting Web Service Driver when Driver is null and instantiates * default Driver. - * */ @Test(groups = TestCategories.WEB_SERVICE) public void getWebServiceDriverNullDriver() { @@ -94,4 +91,4 @@ public void closeWebServiceDriverTest() { driverManager.close(); Assert.assertNull(driverManager.getBaseDriver(), "Expected Base Driver to be null."); } -} +} \ No newline at end of file diff --git a/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverPatchUnitTest.java b/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverPatchUnitTest.java index afd1f0dd5..f2dff395f 100644 --- a/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverPatchUnitTest.java +++ b/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverPatchUnitTest.java @@ -253,4 +253,4 @@ public void patchWithResponseWithExpectedStatus() throws IOException, Interrupte baseUrl + "/api/XML_JSON/Patch/1", MediaType.APP_JSON, req, HttpStatus.OK); Assert.assertNotNull(res); } -} +} \ No newline at end of file diff --git a/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverPutUnitTest.java b/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverPutUnitTest.java index efc9101a3..78997077b 100644 --- a/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverPutUnitTest.java +++ b/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverPutUnitTest.java @@ -222,4 +222,4 @@ public void putMoreParamsWithExpectedStatus() throws IOException, InterruptedExc WebServiceUtilities.createStringEntity(product, MediaType.APP_JSON), HttpStatus.OK); Assert.assertNotNull(res); } -} +} \ No newline at end of file diff --git a/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverUnitTest.java b/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverUnitTest.java index 53b642705..7f4f998e6 100644 --- a/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverUnitTest.java +++ b/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverUnitTest.java @@ -35,4 +35,4 @@ public void setHttpRequest() { webServiceDriver.setHttpRequestBuilder(HttpRequest.newBuilder()); Assert.assertNotNull(webServiceDriver.getHttpRequestBuilder()); } -} +} \ No newline at end of file diff --git a/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceTestObjectUnitTest.java b/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceTestObjectUnitTest.java index f07af3d83..a3c63054f 100644 --- a/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceTestObjectUnitTest.java +++ b/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceTestObjectUnitTest.java @@ -131,4 +131,4 @@ private Supplier getHttpClientSupplier() { private WebServiceDriver getWebServiceDriver() { return new WebServiceDriver(HttpRequest.newBuilder(URI.create(WebServiceConfig.getWebServiceUri()))); } -} +} \ No newline at end of file diff --git a/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceUtilitiesUnitTest.java b/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceUtilitiesUnitTest.java index 9904beda6..114d1546c 100644 --- a/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceUtilitiesUnitTest.java +++ b/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceUtilitiesUnitTest.java @@ -23,7 +23,6 @@ public class WebServiceUtilitiesUnitTest extends BaseWebServiceTest { */ private final Product product = new Product(1, "Milk", "Diary", BigDecimal.TEN); - /** * String to hold the URL. */ @@ -128,7 +127,7 @@ public void testCreateStringEntityXml() throws JsonProcessingException { */ @Test(groups = TestCategories.WEB_SERVICE) public void testSerializeJson() throws JsonProcessingException { - String expectedJson = "{\"id\":1,\"name\":\"Milk\",\"category\":\"Diary\",\"price\":10}"; + String expectedJson = "{\"xmlns\":\"http://schemas.datacontract.org/2004/07/MainTestService.Models\",\"id\":1,\"name\":\"Milk\",\"category\":\"Diary\",\"price\":10}"; String actualJson = WebServiceUtilities.serializeJson(this.product); Assert.assertEquals(actualJson, expectedJson, String.format( "the json values compared aren't equal, expected was %s while actual was %s", expectedJson, actualJson)); @@ -168,4 +167,4 @@ public void testCreateStringEntityCustomContentType() Object entity = WebServiceUtilities.createStringEntity(this.product, MediaType.APP_JSON); Assert.assertNotNull(entity, "Entity was not set correctly with custom charset and mime-type"); } -} +} \ No newline at end of file diff --git a/maqs-webservices/src/test/java/io/github/maqs/webservices/models/Product.java b/maqs-webservices/src/test/java/io/github/maqs/webservices/models/Product.java index 54751ea6d..8eb7df06f 100644 --- a/maqs-webservices/src/test/java/io/github/maqs/webservices/models/Product.java +++ b/maqs-webservices/src/test/java/io/github/maqs/webservices/models/Product.java @@ -39,30 +39,25 @@ public Product(int id, String name, String category, BigDecimal price) { this.price = price; } - // Used to populate the product class - public Product() { + /** + * Used to populate the product class. + * Needed to populate the class object, don't delete. + */ + private Product() { } - public void setId(int id) { - this.id = id; + public String getXmlns() { + return xmlns; } public int getId() { return id; } - public void setName(String name) { - this.name = name; - } - public String getName() { return name; } - public void setCategory(String category) { - this.category = category; - } - public String getCategory() { return category; } @@ -71,14 +66,11 @@ public BigDecimal getPrice() { return price; } - public void setPrice(BigDecimal price) { - this.price = price; - } - public String toString() { - return String.format("%s:%d\n", "Id", this.getId()) + String - .format("%s:%s\n", "Name", this.getName()) + String - .format("%s:%s\n", "Category", this.getCategory()) + String - .format("%s:%s\n", "Price", this.getPrice()); + return String.format("%s:%d\n", "Id", this.getId()) + + String.format("%s:%s\n", "Name", this.getName()) + + String.format("%s:%s\n", "Category", this.getCategory()) + + String.format("%s:%s\n", "Price", this.getPrice()) + + String.format("%s:%s\n", "XMLNS", this.getXmlns()); } -} +} \ No newline at end of file From 46e662fcc4609ec0a0c64149a06e4e06e1d61d2e Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Tue, 3 Jan 2023 02:29:08 -0600 Subject: [PATCH 74/91] pom updates --- maqs-webservices/pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/maqs-webservices/pom.xml b/maqs-webservices/pom.xml index d70027bea..79055ce6f 100644 --- a/maqs-webservices/pom.xml +++ b/maqs-webservices/pom.xml @@ -17,8 +17,8 @@ 5.3.15 - 2.13.2 - 2.13.4.1 + 2.14.0 + 2.14.0 @@ -60,4 +60,4 @@ ${spring.web.version} - + \ No newline at end of file From be998e5d35fadcc4124629beda90e83e073c780c Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Tue, 3 Jan 2023 02:47:25 -0600 Subject: [PATCH 75/91] update jackson version --- maqs-webservices/pom.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/maqs-webservices/pom.xml b/maqs-webservices/pom.xml index 79055ce6f..1fb13cf8d 100644 --- a/maqs-webservices/pom.xml +++ b/maqs-webservices/pom.xml @@ -18,7 +18,6 @@ 5.3.15 2.14.0 - 2.14.0 @@ -42,7 +41,7 @@ com.fasterxml.jackson.core jackson-databind - ${jackson.databind.version} + ${jackson.version} com.fasterxml.jackson.dataformat From af54d4080d8f8a19b91e14aa816c85b97d25e0a1 Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Tue, 3 Jan 2023 03:01:55 -0600 Subject: [PATCH 76/91] update folder name to match java naming case --- .../WebServiceDriverDeleteUnitTest.java | 2 +- .../WebServiceDriverGetUnitTest.java | 2 +- .../WebServiceDriverPatchUnitTest.java | 2 +- .../WebServiceDriverPostUnitTest.java | 2 +- .../WebServiceDriverPutUnitTest.java | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) rename maqs-webservices/src/test/java/io/github/maqs/webservices/{WebServiceDriverRequestUnitTest => webServiceDriverRequestUnitTest}/WebServiceDriverDeleteUnitTest.java (99%) rename maqs-webservices/src/test/java/io/github/maqs/webservices/{WebServiceDriverRequestUnitTest => webServiceDriverRequestUnitTest}/WebServiceDriverGetUnitTest.java (99%) rename maqs-webservices/src/test/java/io/github/maqs/webservices/{WebServiceDriverRequestUnitTest => webServiceDriverRequestUnitTest}/WebServiceDriverPatchUnitTest.java (99%) rename maqs-webservices/src/test/java/io/github/maqs/webservices/{WebServiceDriverRequestUnitTest => webServiceDriverRequestUnitTest}/WebServiceDriverPostUnitTest.java (99%) rename maqs-webservices/src/test/java/io/github/maqs/webservices/{WebServiceDriverRequestUnitTest => webServiceDriverRequestUnitTest}/WebServiceDriverPutUnitTest.java (99%) diff --git a/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverDeleteUnitTest.java b/maqs-webservices/src/test/java/io/github/maqs/webservices/webServiceDriverRequestUnitTest/WebServiceDriverDeleteUnitTest.java similarity index 99% rename from maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverDeleteUnitTest.java rename to maqs-webservices/src/test/java/io/github/maqs/webservices/webServiceDriverRequestUnitTest/WebServiceDriverDeleteUnitTest.java index bc6480385..3125423b5 100644 --- a/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverDeleteUnitTest.java +++ b/maqs-webservices/src/test/java/io/github/maqs/webservices/webServiceDriverRequestUnitTest/WebServiceDriverDeleteUnitTest.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) MAQS, All rights Reserved */ -package io.github.maqs.webservices.WebServiceDriverRequestUnitTest; +package io.github.maqs.webservices.webServiceDriverRequestUnitTest; import io.github.maqs.utilities.helper.TestCategories; import io.github.maqs.webservices.HttpClientFactory; diff --git a/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverGetUnitTest.java b/maqs-webservices/src/test/java/io/github/maqs/webservices/webServiceDriverRequestUnitTest/WebServiceDriverGetUnitTest.java similarity index 99% rename from maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverGetUnitTest.java rename to maqs-webservices/src/test/java/io/github/maqs/webservices/webServiceDriverRequestUnitTest/WebServiceDriverGetUnitTest.java index fd8bb3e3f..4d4bbc044 100644 --- a/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverGetUnitTest.java +++ b/maqs-webservices/src/test/java/io/github/maqs/webservices/webServiceDriverRequestUnitTest/WebServiceDriverGetUnitTest.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) MAQS, All rights Reserved */ -package io.github.maqs.webservices.WebServiceDriverRequestUnitTest; +package io.github.maqs.webservices.webServiceDriverRequestUnitTest; import io.github.maqs.utilities.helper.TestCategories; import io.github.maqs.webservices.HttpClientFactory; diff --git a/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverPatchUnitTest.java b/maqs-webservices/src/test/java/io/github/maqs/webservices/webServiceDriverRequestUnitTest/WebServiceDriverPatchUnitTest.java similarity index 99% rename from maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverPatchUnitTest.java rename to maqs-webservices/src/test/java/io/github/maqs/webservices/webServiceDriverRequestUnitTest/WebServiceDriverPatchUnitTest.java index f2dff395f..c98ede014 100644 --- a/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverPatchUnitTest.java +++ b/maqs-webservices/src/test/java/io/github/maqs/webservices/webServiceDriverRequestUnitTest/WebServiceDriverPatchUnitTest.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) MAQS, All rights Reserved */ -package io.github.maqs.webservices.WebServiceDriverRequestUnitTest; +package io.github.maqs.webservices.webServiceDriverRequestUnitTest; import io.github.maqs.webservices.HttpClientFactory; import io.github.maqs.webservices.MediaType; diff --git a/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverPostUnitTest.java b/maqs-webservices/src/test/java/io/github/maqs/webservices/webServiceDriverRequestUnitTest/WebServiceDriverPostUnitTest.java similarity index 99% rename from maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverPostUnitTest.java rename to maqs-webservices/src/test/java/io/github/maqs/webservices/webServiceDriverRequestUnitTest/WebServiceDriverPostUnitTest.java index 4db667fa1..99976fcae 100644 --- a/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverPostUnitTest.java +++ b/maqs-webservices/src/test/java/io/github/maqs/webservices/webServiceDriverRequestUnitTest/WebServiceDriverPostUnitTest.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) MAQS, All rights Reserved */ -package io.github.maqs.webservices.WebServiceDriverRequestUnitTest; +package io.github.maqs.webservices.webServiceDriverRequestUnitTest; import io.github.maqs.utilities.helper.TestCategories; import io.github.maqs.webservices.HttpClientFactory; diff --git a/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverPutUnitTest.java b/maqs-webservices/src/test/java/io/github/maqs/webservices/webServiceDriverRequestUnitTest/WebServiceDriverPutUnitTest.java similarity index 99% rename from maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverPutUnitTest.java rename to maqs-webservices/src/test/java/io/github/maqs/webservices/webServiceDriverRequestUnitTest/WebServiceDriverPutUnitTest.java index 78997077b..43e27ca17 100644 --- a/maqs-webservices/src/test/java/io/github/maqs/webservices/WebServiceDriverRequestUnitTest/WebServiceDriverPutUnitTest.java +++ b/maqs-webservices/src/test/java/io/github/maqs/webservices/webServiceDriverRequestUnitTest/WebServiceDriverPutUnitTest.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) MAQS, All rights Reserved */ -package io.github.maqs.webservices.WebServiceDriverRequestUnitTest; +package io.github.maqs.webservices.webServiceDriverRequestUnitTest; import io.github.maqs.webservices.HttpClientFactory; import io.github.maqs.webservices.MediaType; From 3d06c4a6c32c050473977a8658c66694b64945e7 Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Thu, 12 Jan 2023 23:05:42 -0600 Subject: [PATCH 77/91] changed to MAQS org --- maqs-appium/config.xml | 2 +- maqs-nosql/pom.xml | 8 ++++---- .../github}/maqs/nosql/BaseMongoTest.java | 7 ++++--- .../github}/maqs/nosql/IMongoTestObject.java | 6 +++--- .../github}/maqs/nosql/MongoDBConfig.java | 8 ++++---- .../github}/maqs/nosql/MongoDBDriver.java | 4 ++-- .../github}/maqs/nosql/MongoDriverManager.java | 14 +++++++------- .../github}/maqs/nosql/MongoFactory.java | 6 ++---- .../github}/maqs/nosql/MongoTestObject.java | 10 +++++----- .../github}/maqs/nosql/BaseMongoUnitTest.java | 8 +++++--- .../github}/maqs/nosql/MongoDBConfigUnitTest.java | 6 +++--- .../github}/maqs/nosql/MongoDBDriverUnitTest.java | 6 +++--- .../maqs/nosql/MongoDBFunctionalUnitTest.java | 13 +++++++------ .../maqs/nosql/MongoDriverManagerUnitTest.java | 6 +++--- .../maqs/nosql/MongoTestObjectUnitTest.java | 7 ++++--- .../maqs/selenium/SeleniumConfigUnitTest.java | 3 +-- 16 files changed, 58 insertions(+), 56 deletions(-) rename maqs-nosql/src/main/java/{com/cognizantsoftvision => io/github}/maqs/nosql/BaseMongoTest.java (94%) rename maqs-nosql/src/main/java/{com/cognizantsoftvision => io/github}/maqs/nosql/IMongoTestObject.java (87%) rename maqs-nosql/src/main/java/{com/cognizantsoftvision => io/github}/maqs/nosql/MongoDBConfig.java (83%) rename maqs-nosql/src/main/java/{com/cognizantsoftvision => io/github}/maqs/nosql/MongoDBDriver.java (97%) rename maqs-nosql/src/main/java/{com/cognizantsoftvision => io/github}/maqs/nosql/MongoDriverManager.java (87%) rename maqs-nosql/src/main/java/{com/cognizantsoftvision => io/github}/maqs/nosql/MongoFactory.java (89%) rename maqs-nosql/src/main/java/{com/cognizantsoftvision => io/github}/maqs/nosql/MongoTestObject.java (87%) rename maqs-nosql/src/test/java/{com/cognizantsoftvision => io/github}/maqs/nosql/BaseMongoUnitTest.java (91%) rename maqs-nosql/src/test/java/{com/cognizantsoftvision => io/github}/maqs/nosql/MongoDBConfigUnitTest.java (88%) rename maqs-nosql/src/test/java/{com/cognizantsoftvision => io/github}/maqs/nosql/MongoDBDriverUnitTest.java (93%) rename maqs-nosql/src/test/java/{com/cognizantsoftvision => io/github}/maqs/nosql/MongoDBFunctionalUnitTest.java (93%) rename maqs-nosql/src/test/java/{com/cognizantsoftvision => io/github}/maqs/nosql/MongoDriverManagerUnitTest.java (96%) rename maqs-nosql/src/test/java/{com/cognizantsoftvision => io/github}/maqs/nosql/MongoTestObjectUnitTest.java (94%) diff --git a/maqs-appium/config.xml b/maqs-appium/config.xml index 14607a7d0..d1fa629fa 100644 --- a/maqs-appium/config.xml +++ b/maqs-appium/config.xml @@ -70,7 +70,7 @@ - JMAQS + maqs-Framework NEVER_CHECKIN_A_REAL_KEY portrait Chrome diff --git a/maqs-nosql/pom.xml b/maqs-nosql/pom.xml index 4eb7307ca..851c82aa6 100644 --- a/maqs-nosql/pom.xml +++ b/maqs-nosql/pom.xml @@ -5,12 +5,12 @@ 4.0.0 - com.cognizantsoftvision.maqs + io.github.maqs maqs-java ${revision} - com.cognizantsoftvision.maqs.noSQL + io.github.maqs.noSQL maqs-noSQL MAQS NoSQL Testing Module ${revision} @@ -21,12 +21,12 @@ - com.cognizantsoftvision.maqs.base + io.github.maqs.base maqs-base ${project.version} - com.cognizantsoftvision.maqs.utilities + io.github.maqs.utilities maqs-utilities ${project.version} compile diff --git a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/BaseMongoTest.java b/maqs-nosql/src/main/java/io/github/maqs/nosql/BaseMongoTest.java similarity index 94% rename from maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/BaseMongoTest.java rename to maqs-nosql/src/main/java/io/github/maqs/nosql/BaseMongoTest.java index 50ea6fc89..1d3ae9d04 100644 --- a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/BaseMongoTest.java +++ b/maqs-nosql/src/main/java/io/github/maqs/nosql/BaseMongoTest.java @@ -1,11 +1,12 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ -package com.cognizantsoftvision.maqs.nosql; +package io.github.maqs.nosql; + -import com.cognizantsoftvision.maqs.base.BaseExtendableTest; import com.mongodb.client.MongoCollection; +import io.github.maqs.base.BaseExtendableTest; import java.util.function.Supplier; import org.bson.Document; import org.testng.ITestResult; diff --git a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/IMongoTestObject.java b/maqs-nosql/src/main/java/io/github/maqs/nosql/IMongoTestObject.java similarity index 87% rename from maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/IMongoTestObject.java rename to maqs-nosql/src/main/java/io/github/maqs/nosql/IMongoTestObject.java index 50f45ea32..ee8c49e11 100644 --- a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/IMongoTestObject.java +++ b/maqs-nosql/src/main/java/io/github/maqs/nosql/IMongoTestObject.java @@ -1,11 +1,11 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ -package com.cognizantsoftvision.maqs.nosql; +package io.github.maqs.nosql; -import com.cognizantsoftvision.maqs.base.ITestObject; import com.mongodb.client.MongoCollection; +import io.github.maqs.base.ITestObject; import java.util.function.Supplier; import org.bson.Document; diff --git a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDBConfig.java b/maqs-nosql/src/main/java/io/github/maqs/nosql/MongoDBConfig.java similarity index 83% rename from maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDBConfig.java rename to maqs-nosql/src/main/java/io/github/maqs/nosql/MongoDBConfig.java index 5aa790599..76e0f5fb9 100644 --- a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDBConfig.java +++ b/maqs-nosql/src/main/java/io/github/maqs/nosql/MongoDBConfig.java @@ -1,11 +1,11 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ -package com.cognizantsoftvision.maqs.nosql; +package io.github.maqs.nosql; -import com.cognizantsoftvision.maqs.utilities.helper.Config; -import com.cognizantsoftvision.maqs.utilities.helper.ConfigSection; +import io.github.maqs.utilities.helper.Config; +import io.github.maqs.utilities.helper.ConfigSection; /** * The MongoDB Config class. diff --git a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDBDriver.java b/maqs-nosql/src/main/java/io/github/maqs/nosql/MongoDBDriver.java similarity index 97% rename from maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDBDriver.java rename to maqs-nosql/src/main/java/io/github/maqs/nosql/MongoDBDriver.java index b68677a51..abd7b0bdb 100644 --- a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDBDriver.java +++ b/maqs-nosql/src/main/java/io/github/maqs/nosql/MongoDBDriver.java @@ -1,8 +1,8 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ -package com.cognizantsoftvision.maqs.nosql; +package io.github.maqs.nosql; import com.mongodb.MongoClientSettings; import com.mongodb.client.MongoClient; diff --git a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDriverManager.java b/maqs-nosql/src/main/java/io/github/maqs/nosql/MongoDriverManager.java similarity index 87% rename from maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDriverManager.java rename to maqs-nosql/src/main/java/io/github/maqs/nosql/MongoDriverManager.java index 390a23207..77b145f33 100644 --- a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoDriverManager.java +++ b/maqs-nosql/src/main/java/io/github/maqs/nosql/MongoDriverManager.java @@ -1,15 +1,15 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ -package com.cognizantsoftvision.maqs.nosql; +package io.github.maqs.nosql; -import com.cognizantsoftvision.maqs.base.BaseTestObject; -import com.cognizantsoftvision.maqs.base.DriverManager; -import com.cognizantsoftvision.maqs.utilities.logging.LoggingConfig; -import com.cognizantsoftvision.maqs.utilities.logging.LoggingEnabled; -import com.cognizantsoftvision.maqs.utilities.logging.MessageType; import com.mongodb.client.MongoCollection; +import io.github.maqs.base.BaseTestObject; +import io.github.maqs.base.DriverManager; +import io.github.maqs.utilities.logging.LoggingConfig; +import io.github.maqs.utilities.logging.LoggingEnabled; +import io.github.maqs.utilities.logging.MessageType; import java.util.function.Supplier; import org.bson.Document; diff --git a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoFactory.java b/maqs-nosql/src/main/java/io/github/maqs/nosql/MongoFactory.java similarity index 89% rename from maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoFactory.java rename to maqs-nosql/src/main/java/io/github/maqs/nosql/MongoFactory.java index ae34995fd..f8e2c08a0 100644 --- a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoFactory.java +++ b/maqs-nosql/src/main/java/io/github/maqs/nosql/MongoFactory.java @@ -1,16 +1,14 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ -package com.cognizantsoftvision.maqs.nosql; +package io.github.maqs.nosql; import static com.mongodb.client.MongoClients.create; import com.mongodb.MongoClientException; -import com.mongodb.MongoClientSettings; import com.mongodb.MongoException; import com.mongodb.client.MongoClient; -import com.mongodb.client.MongoClients; import com.mongodb.client.MongoCollection; import com.mongodb.client.MongoDatabase; import org.bson.Document; diff --git a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoTestObject.java b/maqs-nosql/src/main/java/io/github/maqs/nosql/MongoTestObject.java similarity index 87% rename from maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoTestObject.java rename to maqs-nosql/src/main/java/io/github/maqs/nosql/MongoTestObject.java index be1c0e454..a43e5a40f 100644 --- a/maqs-nosql/src/main/java/com/cognizantsoftvision/maqs/nosql/MongoTestObject.java +++ b/maqs-nosql/src/main/java/io/github/maqs/nosql/MongoTestObject.java @@ -1,12 +1,12 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ -package com.cognizantsoftvision.maqs.nosql; +package io.github.maqs.nosql; -import com.cognizantsoftvision.maqs.base.BaseTestObject; -import com.cognizantsoftvision.maqs.utilities.logging.Logger; import com.mongodb.client.MongoCollection; +import io.github.maqs.base.BaseTestObject; +import io.github.maqs.utilities.logging.ILogger; import java.util.function.Supplier; import org.bson.Document; @@ -24,7 +24,7 @@ public class MongoTestObject extends BaseTestObject implements IMongoTestObject * @param fullyQualifiedTestName The test's fully qualified test name */ public MongoTestObject(String connectionString, String databaseString, String collectionString, - Logger logger, String fullyQualifiedTestName) { + ILogger logger, String fullyQualifiedTestName) { super(logger, fullyQualifiedTestName); this.getManagerStore().put((MongoDriverManager.class).getCanonicalName(), new MongoDriverManager(connectionString,databaseString,collectionString, this)); diff --git a/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/BaseMongoUnitTest.java b/maqs-nosql/src/test/java/io/github/maqs/nosql/BaseMongoUnitTest.java similarity index 91% rename from maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/BaseMongoUnitTest.java rename to maqs-nosql/src/test/java/io/github/maqs/nosql/BaseMongoUnitTest.java index c6962205a..1a5f9844f 100644 --- a/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/BaseMongoUnitTest.java +++ b/maqs-nosql/src/test/java/io/github/maqs/nosql/BaseMongoUnitTest.java @@ -1,10 +1,10 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ -package com.cognizantsoftvision.maqs.nosql; +package io.github.maqs.nosql; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; +import io.github.maqs.utilities.helper.TestCategories; import org.testng.Assert; import org.testng.annotations.Test; @@ -30,6 +30,7 @@ public void testGetMongoDBDriver() { */ @Test(groups = TestCategories.MONGO) public void testSetMongoDBDriver() { + this.setMongoDBDriver(new MongoDBDriver()); int hashCode = this.getMongoDBDriver().hashCode(); try { this.setMongoDBDriver(new MongoDBDriver()); @@ -45,6 +46,7 @@ public void testSetMongoDBDriver() { */ @Test(groups = TestCategories.MONGO) public void testOverrideConnectionDriverWithMongoDBDriver() { + this.setMongoDBDriver(new MongoDBDriver()); overrideConnectionDriver(this.getMongoDBDriver()); Assert.assertNotNull(getMongoDBDriver()); overrideConnectionDriver(this.getBaseConnectionString(), diff --git a/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBConfigUnitTest.java b/maqs-nosql/src/test/java/io/github/maqs/nosql/MongoDBConfigUnitTest.java similarity index 88% rename from maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBConfigUnitTest.java rename to maqs-nosql/src/test/java/io/github/maqs/nosql/MongoDBConfigUnitTest.java index d5fe4fa84..ddb830036 100644 --- a/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBConfigUnitTest.java +++ b/maqs-nosql/src/test/java/io/github/maqs/nosql/MongoDBConfigUnitTest.java @@ -1,10 +1,10 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ -package com.cognizantsoftvision.maqs.nosql; +package io.github.maqs.nosql; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; +import io.github.maqs.utilities.helper.TestCategories; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBDriverUnitTest.java b/maqs-nosql/src/test/java/io/github/maqs/nosql/MongoDBDriverUnitTest.java similarity index 93% rename from maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBDriverUnitTest.java rename to maqs-nosql/src/test/java/io/github/maqs/nosql/MongoDBDriverUnitTest.java index 86acfc16c..cf5946863 100644 --- a/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBDriverUnitTest.java +++ b/maqs-nosql/src/test/java/io/github/maqs/nosql/MongoDBDriverUnitTest.java @@ -1,12 +1,12 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ -package com.cognizantsoftvision.maqs.nosql; +package io.github.maqs.nosql; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; import com.mongodb.client.MongoClient; import com.mongodb.client.MongoCollection; +import io.github.maqs.utilities.helper.TestCategories; import org.bson.Document; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBFunctionalUnitTest.java b/maqs-nosql/src/test/java/io/github/maqs/nosql/MongoDBFunctionalUnitTest.java similarity index 93% rename from maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBFunctionalUnitTest.java rename to maqs-nosql/src/test/java/io/github/maqs/nosql/MongoDBFunctionalUnitTest.java index 5e784b07f..b70cfa078 100644 --- a/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDBFunctionalUnitTest.java +++ b/maqs-nosql/src/test/java/io/github/maqs/nosql/MongoDBFunctionalUnitTest.java @@ -1,18 +1,19 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ -package com.cognizantsoftvision.maqs.nosql; +package io.github.maqs.nosql; + -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; import com.mongodb.client.model.Filters; +import io.github.maqs.utilities.helper.TestCategories; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; import org.bson.Document; import org.bson.conversions.Bson; import org.testng.Assert; import org.testng.annotations.Test; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; /** * The Mongo Database Functional unit test class. diff --git a/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDriverManagerUnitTest.java b/maqs-nosql/src/test/java/io/github/maqs/nosql/MongoDriverManagerUnitTest.java similarity index 96% rename from maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDriverManagerUnitTest.java rename to maqs-nosql/src/test/java/io/github/maqs/nosql/MongoDriverManagerUnitTest.java index 9bcdfd457..740e161fa 100644 --- a/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoDriverManagerUnitTest.java +++ b/maqs-nosql/src/test/java/io/github/maqs/nosql/MongoDriverManagerUnitTest.java @@ -1,11 +1,11 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ -package com.cognizantsoftvision.maqs.nosql; +package io.github.maqs.nosql; -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; import com.mongodb.client.MongoCollection; +import io.github.maqs.utilities.helper.TestCategories; import org.bson.Document; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoTestObjectUnitTest.java b/maqs-nosql/src/test/java/io/github/maqs/nosql/MongoTestObjectUnitTest.java similarity index 94% rename from maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoTestObjectUnitTest.java rename to maqs-nosql/src/test/java/io/github/maqs/nosql/MongoTestObjectUnitTest.java index ab5f2132d..1624413d2 100644 --- a/maqs-nosql/src/test/java/com/cognizantsoftvision/maqs/nosql/MongoTestObjectUnitTest.java +++ b/maqs-nosql/src/test/java/io/github/maqs/nosql/MongoTestObjectUnitTest.java @@ -1,13 +1,14 @@ /* - * Copyright 2022 (C) Cognizant SoftVision, All rights Reserved + * Copyright 2022 (C) MAQS, All rights Reserved */ -package com.cognizantsoftvision.maqs.nosql; +package io.github.maqs.nosql; + -import com.cognizantsoftvision.maqs.utilities.helper.TestCategories; import com.mongodb.ConnectionString; import com.mongodb.MongoClientSettings; import com.mongodb.client.MongoCollection; +import io.github.maqs.utilities.helper.TestCategories; import org.bson.Document; import org.testng.Assert; import org.testng.annotations.Test; diff --git a/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumConfigUnitTest.java b/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumConfigUnitTest.java index d9205283b..a6b36837a 100644 --- a/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumConfigUnitTest.java +++ b/maqs-selenium/src/test/java/io/github/maqs/selenium/SeleniumConfigUnitTest.java @@ -55,8 +55,7 @@ public void getBrowserName() { @Test(groups = TestCategories.SELENIUM) public void getWebsiteBase() { String website = SeleniumConfig.getWebSiteBase(); - Assert.assertTrue(website.equalsIgnoreCase( - "https://maqs-framework.github.io/TestingSite/Automation/")); + Assert.assertTrue(website.equalsIgnoreCase("https://maqs-framework.github.io/TestingSite/Automation/")); } /** From f7f7b0bd4bb78bb7f9ddd70e7be3408ce3bf0d87 Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Fri, 10 Feb 2023 19:29:14 -0600 Subject: [PATCH 78/91] Update pom.xml --- maqs-nosql/pom.xml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/maqs-nosql/pom.xml b/maqs-nosql/pom.xml index 851c82aa6..3dcd4cf21 100644 --- a/maqs-nosql/pom.xml +++ b/maqs-nosql/pom.xml @@ -5,9 +5,9 @@ 4.0.0 - io.github.maqs - maqs-java - ${revision} + io.github.openmaqs + openmaqs-java + 3.0.1-SNAPSHOT io.github.maqs.noSQL @@ -21,13 +21,13 @@ - io.github.maqs.base - maqs-base + io.github.openmaqs.base + openmaqs-base ${project.version} - io.github.maqs.utilities - maqs-utilities + io.github.openmaqs.utilities + openmaqs-utilities ${project.version} compile From a117f9e889c11da21d524930df6aae5921678dbc Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Fri, 10 Feb 2023 19:42:19 -0600 Subject: [PATCH 79/91] update mongo sql content for openmaqs --- {maqs-nosql => openmaqs-nosql}/config.xml | 4 ++-- {maqs-nosql => openmaqs-nosql}/pom.xml | 4 ++-- .../github/openmaqs}/nosql/BaseMongoTest.java | 4 ++-- .../openmaqs}/nosql/IMongoTestObject.java | 4 ++-- .../github/openmaqs}/nosql/MongoDBConfig.java | 16 ++++++------- .../github/openmaqs}/nosql/MongoDBDriver.java | 2 +- .../openmaqs}/nosql/MongoDriverManager.java | 12 +++++----- .../github/openmaqs}/nosql/MongoFactory.java | 2 +- .../openmaqs}/nosql/MongoTestObject.java | 6 ++--- .../openmaqs}/nosql/BaseMongoUnitTest.java | 16 ++++++------- .../nosql/MongoDBConfigUnitTest.java | 12 +++++----- .../nosql/MongoDBDriverUnitTest.java | 16 ++++++------- .../nosql/MongoDBFunctionalUnitTest.java | 13 +++++----- .../nosql/MongoDriverManagerUnitTest.java | 24 +++++++++---------- .../nosql/MongoTestObjectUnitTest.java | 14 +++++------ .../utilities/helper/ConfigSection.java | 5 ++++ .../utilities/helper/TestCategories.java | 5 ++++ 17 files changed, 84 insertions(+), 75 deletions(-) rename {maqs-nosql => openmaqs-nosql}/config.xml (97%) rename {maqs-nosql => openmaqs-nosql}/pom.xml (94%) rename {maqs-nosql/src/main/java/io/github/maqs => openmaqs-nosql/src/main/java/io/github/openmaqs}/nosql/BaseMongoTest.java (97%) rename {maqs-nosql/src/main/java/io/github/maqs => openmaqs-nosql/src/main/java/io/github/openmaqs}/nosql/IMongoTestObject.java (93%) rename {maqs-nosql/src/main/java/io/github/maqs => openmaqs-nosql/src/main/java/io/github/openmaqs}/nosql/MongoDBConfig.java (61%) rename {maqs-nosql/src/main/java/io/github/maqs => openmaqs-nosql/src/main/java/io/github/openmaqs}/nosql/MongoDBDriver.java (99%) rename {maqs-nosql/src/main/java/io/github/maqs => openmaqs-nosql/src/main/java/io/github/openmaqs}/nosql/MongoDriverManager.java (91%) rename {maqs-nosql/src/main/java/io/github/maqs => openmaqs-nosql/src/main/java/io/github/openmaqs}/nosql/MongoFactory.java (97%) rename {maqs-nosql/src/main/java/io/github/maqs => openmaqs-nosql/src/main/java/io/github/openmaqs}/nosql/MongoTestObject.java (93%) rename {maqs-nosql/src/test/java/io/github/maqs => openmaqs-nosql/src/test/java/io/github/openmaqs}/nosql/BaseMongoUnitTest.java (87%) rename {maqs-nosql/src/test/java/io/github/maqs => openmaqs-nosql/src/test/java/io/github/openmaqs}/nosql/MongoDBConfigUnitTest.java (83%) rename {maqs-nosql/src/test/java/io/github/maqs => openmaqs-nosql/src/test/java/io/github/openmaqs}/nosql/MongoDBDriverUnitTest.java (87%) rename {maqs-nosql/src/test/java/io/github/maqs => openmaqs-nosql/src/test/java/io/github/openmaqs}/nosql/MongoDBFunctionalUnitTest.java (90%) rename {maqs-nosql/src/test/java/io/github/maqs => openmaqs-nosql/src/test/java/io/github/openmaqs}/nosql/MongoDriverManagerUnitTest.java (89%) rename {maqs-nosql/src/test/java/io/github/maqs => openmaqs-nosql/src/test/java/io/github/openmaqs}/nosql/MongoTestObjectUnitTest.java (91%) diff --git a/maqs-nosql/config.xml b/openmaqs-nosql/config.xml similarity index 97% rename from maqs-nosql/config.xml rename to openmaqs-nosql/config.xml index 54da3ca88..65cb1a9c5 100644 --- a/maqs-nosql/config.xml +++ b/openmaqs-nosql/config.xml @@ -32,10 +32,10 @@ ./target/logs - + mongodb://localhost:27017 MongoDatabaseTest MongoTestCollection 30 - + diff --git a/maqs-nosql/pom.xml b/openmaqs-nosql/pom.xml similarity index 94% rename from maqs-nosql/pom.xml rename to openmaqs-nosql/pom.xml index 3dcd4cf21..31d5632b3 100644 --- a/maqs-nosql/pom.xml +++ b/openmaqs-nosql/pom.xml @@ -10,8 +10,8 @@ 3.0.1-SNAPSHOT - io.github.maqs.noSQL - maqs-noSQL + io.github.openmaqsnoSQL + openmaqs-noSQL MAQS NoSQL Testing Module ${revision} diff --git a/maqs-nosql/src/main/java/io/github/maqs/nosql/BaseMongoTest.java b/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/BaseMongoTest.java similarity index 97% rename from maqs-nosql/src/main/java/io/github/maqs/nosql/BaseMongoTest.java rename to openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/BaseMongoTest.java index 1d3ae9d04..2d3b04454 100644 --- a/maqs-nosql/src/main/java/io/github/maqs/nosql/BaseMongoTest.java +++ b/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/BaseMongoTest.java @@ -2,11 +2,11 @@ * Copyright 2022 (C) MAQS, All rights Reserved */ -package io.github.maqs.nosql; +package io.github.openmaqs.nosql; import com.mongodb.client.MongoCollection; -import io.github.maqs.base.BaseExtendableTest; +import io.github.openmaqs.base.BaseExtendableTest; import java.util.function.Supplier; import org.bson.Document; import org.testng.ITestResult; diff --git a/maqs-nosql/src/main/java/io/github/maqs/nosql/IMongoTestObject.java b/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/IMongoTestObject.java similarity index 93% rename from maqs-nosql/src/main/java/io/github/maqs/nosql/IMongoTestObject.java rename to openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/IMongoTestObject.java index ee8c49e11..fca621934 100644 --- a/maqs-nosql/src/main/java/io/github/maqs/nosql/IMongoTestObject.java +++ b/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/IMongoTestObject.java @@ -2,10 +2,10 @@ * Copyright 2022 (C) MAQS, All rights Reserved */ -package io.github.maqs.nosql; +package io.github.openmaqs.nosql; import com.mongodb.client.MongoCollection; -import io.github.maqs.base.ITestObject; +import io.github.openmaqs.base.ITestObject; import java.util.function.Supplier; import org.bson.Document; diff --git a/maqs-nosql/src/main/java/io/github/maqs/nosql/MongoDBConfig.java b/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/MongoDBConfig.java similarity index 61% rename from maqs-nosql/src/main/java/io/github/maqs/nosql/MongoDBConfig.java rename to openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/MongoDBConfig.java index 76e0f5fb9..395feef0d 100644 --- a/maqs-nosql/src/main/java/io/github/maqs/nosql/MongoDBConfig.java +++ b/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/MongoDBConfig.java @@ -2,10 +2,10 @@ * Copyright 2022 (C) MAQS, All rights Reserved */ -package io.github.maqs.nosql; +package io.github.openmaqs.nosql; -import io.github.maqs.utilities.helper.Config; -import io.github.maqs.utilities.helper.ConfigSection; +import io.github.openmaqs.utilities.helper.Config; +import io.github.openmaqs.utilities.helper.ConfigSection; /** * The MongoDB Config class. @@ -18,14 +18,14 @@ private MongoDBConfig() { /** * The MongoDB configuration section. */ - private static final ConfigSection MONGO_SECTION = ConfigSection.MONGO_MAQS; + private static final ConfigSection NOSQL_MAQS = ConfigSection.NOSQL_MAQS; /** * Get the client connection string. * @return The connection type */ public static String getConnectionString() { - return Config.getValueForSection(MONGO_SECTION, "MongoConnectionString"); + return Config.getValueForSection(NOSQL_MAQS, "MongoConnectionString"); } /** @@ -33,7 +33,7 @@ public static String getConnectionString() { * @return The database name */ public static String getDatabaseString() { - return Config.getValueForSection(MONGO_SECTION, "MongoDatabase"); + return Config.getValueForSection(NOSQL_MAQS, "MongoDatabase"); } /** @@ -41,7 +41,7 @@ public static String getDatabaseString() { * @return The mongo collection string */ public static String getCollectionString() { - return Config.getValueForSection(MONGO_SECTION, "MongoCollection"); + return Config.getValueForSection(NOSQL_MAQS, "MongoCollection"); } /** @@ -50,6 +50,6 @@ public static String getCollectionString() { * of 30 seconds when no config.xml key is found */ public static int getQueryTimeout() { - return Integer.parseInt(Config.getValueForSection(MONGO_SECTION, "MongoTimeout", "30")); + return Integer.parseInt(Config.getValueForSection(NOSQL_MAQS, "MongoTimeout", "30")); } } diff --git a/maqs-nosql/src/main/java/io/github/maqs/nosql/MongoDBDriver.java b/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/MongoDBDriver.java similarity index 99% rename from maqs-nosql/src/main/java/io/github/maqs/nosql/MongoDBDriver.java rename to openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/MongoDBDriver.java index abd7b0bdb..d8d04dca1 100644 --- a/maqs-nosql/src/main/java/io/github/maqs/nosql/MongoDBDriver.java +++ b/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/MongoDBDriver.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) MAQS, All rights Reserved */ -package io.github.maqs.nosql; +package io.github.openmaqs.nosql; import com.mongodb.MongoClientSettings; import com.mongodb.client.MongoClient; diff --git a/maqs-nosql/src/main/java/io/github/maqs/nosql/MongoDriverManager.java b/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/MongoDriverManager.java similarity index 91% rename from maqs-nosql/src/main/java/io/github/maqs/nosql/MongoDriverManager.java rename to openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/MongoDriverManager.java index 77b145f33..c4c045c1a 100644 --- a/maqs-nosql/src/main/java/io/github/maqs/nosql/MongoDriverManager.java +++ b/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/MongoDriverManager.java @@ -2,14 +2,14 @@ * Copyright 2022 (C) MAQS, All rights Reserved */ -package io.github.maqs.nosql; +package io.github.openmaqs.nosql; import com.mongodb.client.MongoCollection; -import io.github.maqs.base.BaseTestObject; -import io.github.maqs.base.DriverManager; -import io.github.maqs.utilities.logging.LoggingConfig; -import io.github.maqs.utilities.logging.LoggingEnabled; -import io.github.maqs.utilities.logging.MessageType; +import io.github.openmaqs.base.BaseTestObject; +import io.github.openmaqs.base.DriverManager; +import io.github.openmaqs.utilities.logging.LoggingConfig; +import io.github.openmaqs.utilities.logging.LoggingEnabled; +import io.github.openmaqs.utilities.logging.MessageType; import java.util.function.Supplier; import org.bson.Document; diff --git a/maqs-nosql/src/main/java/io/github/maqs/nosql/MongoFactory.java b/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/MongoFactory.java similarity index 97% rename from maqs-nosql/src/main/java/io/github/maqs/nosql/MongoFactory.java rename to openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/MongoFactory.java index f8e2c08a0..13848b60a 100644 --- a/maqs-nosql/src/main/java/io/github/maqs/nosql/MongoFactory.java +++ b/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/MongoFactory.java @@ -2,7 +2,7 @@ * Copyright 2022 (C) MAQS, All rights Reserved */ -package io.github.maqs.nosql; +package io.github.openmaqs.nosql; import static com.mongodb.client.MongoClients.create; diff --git a/maqs-nosql/src/main/java/io/github/maqs/nosql/MongoTestObject.java b/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/MongoTestObject.java similarity index 93% rename from maqs-nosql/src/main/java/io/github/maqs/nosql/MongoTestObject.java rename to openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/MongoTestObject.java index a43e5a40f..358d7dc5b 100644 --- a/maqs-nosql/src/main/java/io/github/maqs/nosql/MongoTestObject.java +++ b/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/MongoTestObject.java @@ -2,11 +2,11 @@ * Copyright 2022 (C) MAQS, All rights Reserved */ -package io.github.maqs.nosql; +package io.github.openmaqs.nosql; import com.mongodb.client.MongoCollection; -import io.github.maqs.base.BaseTestObject; -import io.github.maqs.utilities.logging.ILogger; +import io.github.openmaqs.base.BaseTestObject; +import io.github.openmaqs.utilities.logging.ILogger; import java.util.function.Supplier; import org.bson.Document; diff --git a/maqs-nosql/src/test/java/io/github/maqs/nosql/BaseMongoUnitTest.java b/openmaqs-nosql/src/test/java/io/github/openmaqs/nosql/BaseMongoUnitTest.java similarity index 87% rename from maqs-nosql/src/test/java/io/github/maqs/nosql/BaseMongoUnitTest.java rename to openmaqs-nosql/src/test/java/io/github/openmaqs/nosql/BaseMongoUnitTest.java index 1a5f9844f..56e4f1c0d 100644 --- a/maqs-nosql/src/test/java/io/github/maqs/nosql/BaseMongoUnitTest.java +++ b/openmaqs-nosql/src/test/java/io/github/openmaqs/nosql/BaseMongoUnitTest.java @@ -2,9 +2,9 @@ * Copyright 2022 (C) MAQS, All rights Reserved */ -package io.github.maqs.nosql; +package io.github.openmaqs.nosql; -import io.github.maqs.utilities.helper.TestCategories; +import io.github.openmaqs.utilities.helper.TestCategories; import org.testng.Assert; import org.testng.annotations.Test; @@ -16,7 +16,7 @@ public class BaseMongoUnitTest extends BaseMongoTest { /** * Test the get mongo db driver. */ - @Test(groups = TestCategories.MONGO) + @Test(groups = TestCategories.NOSQL) public void testGetMongoDBDriver() { this.setMongoDBDriver(new MongoDBDriver( MongoDBConfig.getConnectionString(), MongoDBConfig.getDatabaseString(), MongoDBConfig.getCollectionString())); @@ -28,7 +28,7 @@ public void testGetMongoDBDriver() { /** * Test the set mongo db driver. */ - @Test(groups = TestCategories.MONGO) + @Test(groups = TestCategories.NOSQL) public void testSetMongoDBDriver() { this.setMongoDBDriver(new MongoDBDriver()); int hashCode = this.getMongoDBDriver().hashCode(); @@ -44,7 +44,7 @@ public void testSetMongoDBDriver() { /** * Test the override connection driver with the mongo db driver. */ - @Test(groups = TestCategories.MONGO) + @Test(groups = TestCategories.NOSQL) public void testOverrideConnectionDriverWithMongoDBDriver() { this.setMongoDBDriver(new MongoDBDriver()); overrideConnectionDriver(this.getMongoDBDriver()); @@ -57,7 +57,7 @@ public void testOverrideConnectionDriverWithMongoDBDriver() { /** * Test getting the connection string. */ - @Test(groups = TestCategories.MONGO) + @Test(groups = TestCategories.NOSQL) public void testGetBaseMongoConnectionStringTest() { String connection = this.getBaseConnectionString(); Assert.assertEquals(connection, "mongodb://localhost:27017", "connection strings do not match"); @@ -66,7 +66,7 @@ public void testGetBaseMongoConnectionStringTest() { /** * Test getting the database string. */ - @Test(groups = TestCategories.MONGO) + @Test(groups = TestCategories.NOSQL) public void testGetBaseMongoStringTest() { String databaseString = this.getBaseDatabaseString(); Assert.assertEquals(databaseString, "MongoDatabaseTest", "database string do not match"); @@ -75,7 +75,7 @@ public void testGetBaseMongoStringTest() { /** * Test getting the connection string. */ - @Test(groups = TestCategories.MONGO) + @Test(groups = TestCategories.NOSQL) public void testGetBaseMongoCollectionStringTest() { String collection = this.getBaseCollectionString(); Assert.assertEquals(collection, "MongoTestCollection", "collection strings do not match"); diff --git a/maqs-nosql/src/test/java/io/github/maqs/nosql/MongoDBConfigUnitTest.java b/openmaqs-nosql/src/test/java/io/github/openmaqs/nosql/MongoDBConfigUnitTest.java similarity index 83% rename from maqs-nosql/src/test/java/io/github/maqs/nosql/MongoDBConfigUnitTest.java rename to openmaqs-nosql/src/test/java/io/github/openmaqs/nosql/MongoDBConfigUnitTest.java index ddb830036..171db0e41 100644 --- a/maqs-nosql/src/test/java/io/github/maqs/nosql/MongoDBConfigUnitTest.java +++ b/openmaqs-nosql/src/test/java/io/github/openmaqs/nosql/MongoDBConfigUnitTest.java @@ -2,9 +2,9 @@ * Copyright 2022 (C) MAQS, All rights Reserved */ -package io.github.maqs.nosql; +package io.github.openmaqs.nosql; -import io.github.maqs.utilities.helper.TestCategories; +import io.github.openmaqs.utilities.helper.TestCategories; import org.testng.Assert; import org.testng.annotations.Test; @@ -16,7 +16,7 @@ public class MongoDBConfigUnitTest { /** * Test getting the connection string. */ - @Test(groups = TestCategories.MONGO) + @Test(groups = TestCategories.NOSQL) public void testGetMongoDBConnectionStringTest() { String connection = MongoDBConfig.getConnectionString(); Assert.assertEquals(connection, "mongodb://localhost:27017", "connection strings do not match"); @@ -25,7 +25,7 @@ public void testGetMongoDBConnectionStringTest() { /** * Test getting the database string. */ - @Test(groups = TestCategories.MONGO) + @Test(groups = TestCategories.NOSQL) public void testGetMongoDBDatabaseStringTest() { String databaseString = MongoDBConfig.getDatabaseString(); Assert.assertEquals(databaseString, "MongoDatabaseTest", "database string do not match"); @@ -34,7 +34,7 @@ public void testGetMongoDBDatabaseStringTest() { /** * Test getting the connection string. */ - @Test(groups = TestCategories.MONGO) + @Test(groups = TestCategories.NOSQL) public void testGetMongoDBCollectionStringTest() { String collection = MongoDBConfig.getCollectionString(); Assert.assertEquals(collection, "MongoTestCollection", "collection strings do not match"); @@ -43,7 +43,7 @@ public void testGetMongoDBCollectionStringTest() { /** * Test getting the timeout value. */ - @Test(groups = TestCategories.MONGO) + @Test(groups = TestCategories.NOSQL) public void testGetMongoDBQueryTimeout() { int databaseTimeout = MongoDBConfig.getQueryTimeout(); Assert.assertEquals(databaseTimeout, 30, "Timeout is incorrect"); diff --git a/maqs-nosql/src/test/java/io/github/maqs/nosql/MongoDBDriverUnitTest.java b/openmaqs-nosql/src/test/java/io/github/openmaqs/nosql/MongoDBDriverUnitTest.java similarity index 87% rename from maqs-nosql/src/test/java/io/github/maqs/nosql/MongoDBDriverUnitTest.java rename to openmaqs-nosql/src/test/java/io/github/openmaqs/nosql/MongoDBDriverUnitTest.java index cf5946863..668567efb 100644 --- a/maqs-nosql/src/test/java/io/github/maqs/nosql/MongoDBDriverUnitTest.java +++ b/openmaqs-nosql/src/test/java/io/github/openmaqs/nosql/MongoDBDriverUnitTest.java @@ -2,11 +2,11 @@ * Copyright 2022 (C) MAQS, All rights Reserved */ -package io.github.maqs.nosql; +package io.github.openmaqs.nosql; import com.mongodb.client.MongoClient; import com.mongodb.client.MongoCollection; -import io.github.maqs.utilities.helper.TestCategories; +import io.github.openmaqs.utilities.helper.TestCategories; import org.bson.Document; import org.testng.Assert; import org.testng.annotations.Test; @@ -20,7 +20,7 @@ public class MongoDBDriverUnitTest extends BaseMongoTest { /** * Test setting up the mongo db driver. */ - @Test(groups = TestCategories.MONGO) + @Test(groups = TestCategories.NOSQL) public void testMongoDBDriver() { MongoCollection collection = MongoFactory.getDefaultCollection(); MongoDBDriver driver = new MongoDBDriver(collection); @@ -37,7 +37,7 @@ public void testMongoDBDriver() { /** * Test getting the mongo client. */ - @Test(groups = TestCategories.MONGO) + @Test(groups = TestCategories.NOSQL) public void testGetMongoClient() { this.setMongoDBDriver(new MongoDBDriver()); MongoClient client = this.getMongoDBDriver().getMongoClient(); @@ -47,7 +47,7 @@ public void testGetMongoClient() { /** * Test setting the mongo client. */ - @Test(groups = TestCategories.MONGO) + @Test(groups = TestCategories.NOSQL) public void testSetMongoClient() { this.setMongoDBDriver(new MongoDBDriver()); this.getMongoDBDriver().setMongoClient(MongoDBConfig.getConnectionString()); @@ -57,7 +57,7 @@ public void testSetMongoClient() { /** * Test the list all collection items helper function. */ - @Test(groups = TestCategories.MONGO) + @Test(groups = TestCategories.NOSQL) public void testListAllCollectionItems() { this.setMongoDBDriver(new MongoDBDriver()); List collectionItems = this.getMongoDBDriver().listAllCollectionItems(); @@ -68,7 +68,7 @@ public void testListAllCollectionItems() { Assert.assertEquals(collectionItems.size(), 4); } - @Test(groups = TestCategories.MONGO) + @Test(groups = TestCategories.NOSQL) public void testIsCollectionEmpty() { boolean collection = this.getMongoDBDriver().isCollectionEmpty(); Assert.assertTrue(collection); @@ -77,7 +77,7 @@ public void testIsCollectionEmpty() { /** * Test the count all collection items helper function */ - @Test(groups = TestCategories.MONGO) + @Test(groups = TestCategories.NOSQL) public void testCountAllItemsInCollection() { Assert.assertEquals(this.getMongoDBDriver().countAllItemsInCollection(), 4); } diff --git a/maqs-nosql/src/test/java/io/github/maqs/nosql/MongoDBFunctionalUnitTest.java b/openmaqs-nosql/src/test/java/io/github/openmaqs/nosql/MongoDBFunctionalUnitTest.java similarity index 90% rename from maqs-nosql/src/test/java/io/github/maqs/nosql/MongoDBFunctionalUnitTest.java rename to openmaqs-nosql/src/test/java/io/github/openmaqs/nosql/MongoDBFunctionalUnitTest.java index b70cfa078..abac186f2 100644 --- a/maqs-nosql/src/test/java/io/github/maqs/nosql/MongoDBFunctionalUnitTest.java +++ b/openmaqs-nosql/src/test/java/io/github/openmaqs/nosql/MongoDBFunctionalUnitTest.java @@ -2,11 +2,10 @@ * Copyright 2022 (C) MAQS, All rights Reserved */ -package io.github.maqs.nosql; - +package io.github.openmaqs.nosql; import com.mongodb.client.model.Filters; -import io.github.maqs.utilities.helper.TestCategories; +import io.github.openmaqs.utilities.helper.TestCategories; import java.util.ArrayList; import java.util.List; import java.util.Objects; @@ -23,7 +22,7 @@ public class MongoDBFunctionalUnitTest extends BaseMongoTest { /** * Test the collection works as expected when getting the login id. */ - @Test(groups = TestCategories.MONGO) + @Test(groups = TestCategories.NOSQL) public void testMongoGetLoginID() { Bson filter = Filters.eq("lid", "test3"); //String value = this.getMongoDBDriver().getCollection().find(filter).ToList()[0]["lid"].ToString(); @@ -34,7 +33,7 @@ public void testMongoGetLoginID() { /** * Test the collection works as expected when running a query and returning the first result. */ - @Test(groups = TestCategories.MONGO) + @Test(groups = TestCategories.NOSQL) public void testMongoQueryAndReturnFirst() { Bson filter = Filters.eq("lid", "test3"); // MongoCollection document = this.getMongoDBDriver().getCollection().find(filter).ToList().First(); @@ -45,7 +44,7 @@ public void testMongoQueryAndReturnFirst() { /** * Test the collection works as expected when finding a list with a key. */ - @Test(groups = TestCategories.MONGO) + @Test(groups = TestCategories.NOSQL) public void testMongoFindListWithKey() { //var filter = Builders.Filter.Exists("lid"); Bson filter = Filters.exists("lid"); @@ -60,7 +59,7 @@ public void testMongoFindListWithKey() { /** * Test the collection works as expected. */ - @Test(groups = TestCategories.MONGO) + @Test(groups = TestCategories.NOSQL) public void testMongoLinqQuery() { /* QueryBuilder queries = diff --git a/maqs-nosql/src/test/java/io/github/maqs/nosql/MongoDriverManagerUnitTest.java b/openmaqs-nosql/src/test/java/io/github/openmaqs/nosql/MongoDriverManagerUnitTest.java similarity index 89% rename from maqs-nosql/src/test/java/io/github/maqs/nosql/MongoDriverManagerUnitTest.java rename to openmaqs-nosql/src/test/java/io/github/openmaqs/nosql/MongoDriverManagerUnitTest.java index 740e161fa..4ba9e5711 100644 --- a/maqs-nosql/src/test/java/io/github/maqs/nosql/MongoDriverManagerUnitTest.java +++ b/openmaqs-nosql/src/test/java/io/github/openmaqs/nosql/MongoDriverManagerUnitTest.java @@ -2,10 +2,10 @@ * Copyright 2022 (C) MAQS, All rights Reserved */ -package io.github.maqs.nosql; +package io.github.openmaqs.nosql; import com.mongodb.client.MongoCollection; -import io.github.maqs.utilities.helper.TestCategories; +import io.github.openmaqs.utilities.helper.TestCategories; import org.bson.Document; import org.testng.Assert; import org.testng.annotations.Test; @@ -18,7 +18,7 @@ public class MongoDriverManagerUnitTest extends BaseMongoTest{ /** * Test overriding the default driver. */ - @Test(groups = TestCategories.MONGO) + @Test(groups = TestCategories.NOSQL) public void respectDefaultDriverOverride() { MongoDBDriver mongoDriver = new MongoDBDriver(); this.getTestObject().getMongoDBManager().overrideDriver(mongoDriver); @@ -30,7 +30,7 @@ public void respectDefaultDriverOverride() { /** * Override driver with the collection string. */ - @Test(groups = TestCategories.MONGO) + @Test(groups = TestCategories.NOSQL) public void respectCollectionDriverOverride() { // MongoDBConfig.GetConnectionString(), MongoDBConfig.GetDatabaseString(), collectionString MongoDBDriver mongoDriver = new MongoDBDriver(MongoDBConfig.getCollectionString()); @@ -41,7 +41,7 @@ public void respectCollectionDriverOverride() { /** * Override drive with all 3 connection parameters. */ - @Test(groups = TestCategories.MONGO) + @Test(groups = TestCategories.NOSQL) public void respectDriverConnectionsOverride() { MongoDBDriver mongoDriver = new MongoDBDriver(MongoDBConfig.getConnectionString(), MongoDBConfig.getDatabaseString(), MongoDBConfig.getCollectionString()); @@ -52,7 +52,7 @@ public void respectDriverConnectionsOverride() { /** * Override driver directly. */ - @Test(groups = TestCategories.MONGO) + @Test(groups = TestCategories.NOSQL) public void respectDirectDriverOverride() { MongoDBDriver mongoDriver = new MongoDBDriver(MongoDBConfig.getCollectionString()); this.setMongoDBDriver(mongoDriver); @@ -62,7 +62,7 @@ public void respectDirectDriverOverride() { /** * Override driver with new driver. */ - @Test(groups = TestCategories.MONGO) + @Test(groups = TestCategories.NOSQL) public void respectNewDriverOverride() { MongoDBDriver mongoDriver = new MongoDBDriver(MongoDBConfig.getCollectionString()); this.getTestObject().overrideMongoDBDriver(mongoDriver); @@ -72,7 +72,7 @@ public void respectNewDriverOverride() { /** * Override drive with collection function. */ - @Test(groups = TestCategories.MONGO) + @Test(groups = TestCategories.NOSQL) public void respectCollectionOverride() { MongoCollection collection = MongoFactory.getDefaultCollection(); this.getTestObject().overrideMongoDBDriver(() -> collection); @@ -82,7 +82,7 @@ public void respectCollectionOverride() { /** * Override drive with all 3 connection strings. */ - @Test(groups = TestCategories.MONGO) + @Test(groups = TestCategories.NOSQL) public void respectDriverConnectionStingsOverride() { MongoCollection collection = this.getMongoDBDriver().getCollection(); this.getTestObject().overrideMongoDBDriver(MongoDBConfig.getConnectionString(), @@ -93,7 +93,7 @@ public void respectDriverConnectionStingsOverride() { /** * Override in base with collection function. */ - @Test(groups = TestCategories.MONGO) + @Test(groups = TestCategories.NOSQL) public void respectCollectionOverrideInBase() { MongoCollection collection = MongoFactory.getDefaultCollection(); this.overrideConnectionDriver(() -> collection); @@ -103,7 +103,7 @@ public void respectCollectionOverrideInBase() { /** * Override in base with new driver. */ - @Test(groups = TestCategories.MONGO) + @Test(groups = TestCategories.NOSQL) public void RespectDriverOverrideInBase() { MongoCollection collection = MongoFactory.getDefaultCollection(); this.overrideConnectionDriver(new MongoDBDriver(collection)); @@ -113,7 +113,7 @@ public void RespectDriverOverrideInBase() { /** * Override drive with strings in base. */ - @Test(groups = TestCategories.MONGO) + @Test(groups = TestCategories.NOSQL) public void RespectConnectionStingsOverrideInBase() { MongoCollection collection = this.getMongoDBDriver().getCollection(); this.overrideConnectionDriver(MongoDBConfig.getConnectionString(), diff --git a/maqs-nosql/src/test/java/io/github/maqs/nosql/MongoTestObjectUnitTest.java b/openmaqs-nosql/src/test/java/io/github/openmaqs/nosql/MongoTestObjectUnitTest.java similarity index 91% rename from maqs-nosql/src/test/java/io/github/maqs/nosql/MongoTestObjectUnitTest.java rename to openmaqs-nosql/src/test/java/io/github/openmaqs/nosql/MongoTestObjectUnitTest.java index 1624413d2..a5f93356f 100644 --- a/maqs-nosql/src/test/java/io/github/maqs/nosql/MongoTestObjectUnitTest.java +++ b/openmaqs-nosql/src/test/java/io/github/openmaqs/nosql/MongoTestObjectUnitTest.java @@ -2,13 +2,13 @@ * Copyright 2022 (C) MAQS, All rights Reserved */ -package io.github.maqs.nosql; +package io.github.openmaqs.nosql; import com.mongodb.ConnectionString; import com.mongodb.MongoClientSettings; import com.mongodb.client.MongoCollection; -import io.github.maqs.utilities.helper.TestCategories; +import io.github.openmaqs.utilities.helper.TestCategories; import org.bson.Document; import org.testng.Assert; import org.testng.annotations.Test; @@ -21,7 +21,7 @@ public class MongoTestObjectUnitTest extends BaseMongoTest { /** * Tests if the collection override is respected. */ - @Test(groups = TestCategories.MONGO) + @Test(groups = TestCategories.NOSQL) public void overrideCollectionFunction() { MongoCollection collection = this.getMongoDBDriver().getCollection(); MongoCollection newCollection = MongoFactory.getDefaultCollection(); @@ -35,7 +35,7 @@ public void overrideCollectionFunction() { /** * Tests if the connection string overrides respected. */ - @Test(groups = TestCategories.MONGO) + @Test(groups = TestCategories.NOSQL) public void overrideConnectionStrings() { MongoCollection collection = this.getMongoDBDriver().getCollection(); this.getTestObject().overrideMongoDBDriver(MongoDBConfig.getConnectionString(), @@ -48,7 +48,7 @@ public void overrideConnectionStrings() { /** * Tests if the driver override respected. */ - @Test(groups = TestCategories.MONGO) + @Test(groups = TestCategories.NOSQL) public void overrideDriver() { MongoDBDriver firstDriver = this.getMongoDBDriver(); MongoDBDriver newDriver = new MongoDBDriver(MongoFactory.getDefaultCollection()); @@ -62,7 +62,7 @@ public void overrideDriver() { /** * Tests if the custom driver is overridable. */ - @Test(groups = TestCategories.MONGO) + @Test(groups = TestCategories.NOSQL) public void overrideWithCustomDriver() { MongoDBDriver firstDriver = this.getMongoDBDriver(); @@ -82,7 +82,7 @@ public void overrideWithCustomDriver() { /** * Make sure the test objects map properly. */ - @Test(groups = TestCategories.MONGO) + @Test(groups = TestCategories.NOSQL) public void TestMongoDBTestObjectMapCorrectly() { Assert.assertEquals(this.getTestObject().getLogger(), this.getLogger(), "Logs don't match"); //Assert.assertEquals(this.getTestObject().getPerfTimerCollection(), this.getPerfTimerCollection(), "Perf Timer Collections don't match"); diff --git a/openmaqs-utilities/src/main/java/io/github/openmaqs/utilities/helper/ConfigSection.java b/openmaqs-utilities/src/main/java/io/github/openmaqs/utilities/helper/ConfigSection.java index e25f2a3f1..739ea40ff 100644 --- a/openmaqs-utilities/src/main/java/io/github/openmaqs/utilities/helper/ConfigSection.java +++ b/openmaqs-utilities/src/main/java/io/github/openmaqs/utilities/helper/ConfigSection.java @@ -40,6 +40,11 @@ public enum ConfigSection { */ GLOBAL_MAQS("GlobalMaqs"), + /** + * The default no sql maqs section. + */ + NOSQL_MAQS("NoSQLMaqs"), + /** * The default playwright maqs section. */ diff --git a/openmaqs-utilities/src/main/java/io/github/openmaqs/utilities/helper/TestCategories.java b/openmaqs-utilities/src/main/java/io/github/openmaqs/utilities/helper/TestCategories.java index b1b039eb7..86a2fc60a 100644 --- a/openmaqs-utilities/src/main/java/io/github/openmaqs/utilities/helper/TestCategories.java +++ b/openmaqs-utilities/src/main/java/io/github/openmaqs/utilities/helper/TestCategories.java @@ -42,6 +42,11 @@ private TestCategories() { */ public static final String FRAMEWORK = "Base Framework Unit Tests"; + /** + * String for no sql unit test category. + */ + public static final String NOSQL = "No SQL Framework Unit Tests"; + /** * String for playwright unit test category. */ From 3a8845ef53d0ea5149e206958090b6b3cc722d24 Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Sat, 11 Feb 2023 15:00:52 -0600 Subject: [PATCH 80/91] revert fixes --- .github/labeler.yml | 6 +++++- .github/workflows/maven.yml | 2 +- .../io/github/openmaqs/appium/AppiumConfigUnitTest.java | 4 ++-- openmaqs-nosql/pom.xml | 4 ++-- pom.xml | 1 + 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/labeler.yml b/.github/labeler.yml index e00c3d4db..65387e057 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -25,6 +25,10 @@ database: - openmaqs-database/* - openmaqs-database/**/* +nosql: + - openmaqs-nosql/* + - openmaqs-nosql/**/* + devops: - .dependabot/* - .github/* @@ -36,4 +40,4 @@ accessibility: playwright: - openmaqs-playwright/* - - openmaqs-playwright/**/* + - openmaqs-playwright/**/* \ No newline at end of file diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 650a0cdb7..f12a95b69 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -109,7 +109,7 @@ jobs: strategy: fail-fast: false matrix: - module-name: [ openmaqs-utilities, openmaqs-base, openmaqs-appium, openmaqs-selenium, openmaqs-webservices, openmaqs-cucumber, openmaqs-accessibility, openmaqs-database, openmaqs-playwright ] + module-name: [ openmaqs-utilities, openmaqs-base, openmaqs-appium, openmaqs-selenium, openmaqs-webservices, openmaqs-cucumber, openmaqs-accessibility, openmaqs-database, openmaqs-nosql, openmaqs-playwright ] steps: - name: Check if tests can be run if: matrix.module-name == 'openmaqs-appium' && github.actor == 'dependabot[bot]' diff --git a/openmaqs-appium/src/test/java/io/github/openmaqs/appium/AppiumConfigUnitTest.java b/openmaqs-appium/src/test/java/io/github/openmaqs/appium/AppiumConfigUnitTest.java index 28b35246c..aed7697cf 100644 --- a/openmaqs-appium/src/test/java/io/github/openmaqs/appium/AppiumConfigUnitTest.java +++ b/openmaqs-appium/src/test/java/io/github/openmaqs/appium/AppiumConfigUnitTest.java @@ -74,7 +74,7 @@ public void testGetCapabilitiesAsStrings() { SoftAssert softAssert = new SoftAssert(); softAssert.assertTrue(capabilitiesAsStrings.containsKey(username)); - softAssert.assertEquals(capabilitiesAsStrings.get(username), "JMAQS"); + softAssert.assertEquals(capabilitiesAsStrings.get(username), "maqs-Framework<"); softAssert.assertTrue(capabilitiesAsStrings.containsKey(accessKey)); softAssert .assertNotEquals(capabilitiesAsStrings.get(accessKey), ""); @@ -94,7 +94,7 @@ public void testGetCapabilitiesAsObjects() { SoftAssert softAssert = new SoftAssert(); softAssert.assertTrue(capabilitiesAsObjects.containsKey(username)); - softAssert.assertEquals(capabilitiesAsObjects.get(username), "JMAQS"); + softAssert.assertEquals(capabilitiesAsObjects.get(username), "maqs-Framework<"); softAssert.assertTrue(capabilitiesAsObjects.containsKey(accessKey)); softAssert .assertNotEquals(capabilitiesAsObjects.get(accessKey), ""); diff --git a/openmaqs-nosql/pom.xml b/openmaqs-nosql/pom.xml index 31d5632b3..455c7c1c5 100644 --- a/openmaqs-nosql/pom.xml +++ b/openmaqs-nosql/pom.xml @@ -10,8 +10,8 @@ 3.0.1-SNAPSHOT - io.github.openmaqsnoSQL - openmaqs-noSQL + io.github.openmaqs.nosql + openmaqs-nosql MAQS NoSQL Testing Module ${revision} diff --git a/pom.xml b/pom.xml index 03a3fe48a..9ee7d65e8 100644 --- a/pom.xml +++ b/pom.xml @@ -51,6 +51,7 @@ openmaqs-appium openmaqs-webservices openmaqs-database + openmaqs-nosql openmaqs-cucumber openmaqs-accessibility openmaqs-playwright From 7b25b191c1ee70c32b94d6c9e3a67e86f71e43de Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Sat, 11 Feb 2023 15:04:57 -0600 Subject: [PATCH 81/91] checkstyle fixes --- docker/docker-compose.yml | 7 ++++++- openmaqs-nosql/pom.xml | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 44c3c95f1..4b0fc8ccf 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -12,4 +12,9 @@ services: mongo: extends: file: ./MAQSMongoDB/docker-compose.yml - service: mongo \ No newline at end of file + service: mongo + + imap: + extends: + file: ./MAQSEmail/docker-compose.yml + service: imap diff --git a/openmaqs-nosql/pom.xml b/openmaqs-nosql/pom.xml index 455c7c1c5..92d70f583 100644 --- a/openmaqs-nosql/pom.xml +++ b/openmaqs-nosql/pom.xml @@ -7,7 +7,7 @@ io.github.openmaqs openmaqs-java - 3.0.1-SNAPSHOT + ${revision} io.github.openmaqs.nosql From bf682c181acfaf65c279f1f6c80ddfebf129f315 Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Sat, 11 Feb 2023 15:07:57 -0600 Subject: [PATCH 82/91] checkstyle fixes --- .../src/main/java/io/github/openmaqs/nosql/BaseMongoTest.java | 2 +- .../main/java/io/github/openmaqs/nosql/IMongoTestObject.java | 2 +- .../src/main/java/io/github/openmaqs/nosql/MongoDBConfig.java | 2 +- .../src/main/java/io/github/openmaqs/nosql/MongoDBDriver.java | 2 +- .../main/java/io/github/openmaqs/nosql/MongoDriverManager.java | 2 +- .../src/main/java/io/github/openmaqs/nosql/MongoFactory.java | 2 +- .../src/main/java/io/github/openmaqs/nosql/MongoTestObject.java | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/BaseMongoTest.java b/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/BaseMongoTest.java index 2d3b04454..3eba89e77 100644 --- a/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/BaseMongoTest.java +++ b/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/BaseMongoTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) MAQS, All rights Reserved + * Copyright 2022 (C) OpenMAQSMAQS, All rights Reserved */ package io.github.openmaqs.nosql; diff --git a/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/IMongoTestObject.java b/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/IMongoTestObject.java index fca621934..c7797e686 100644 --- a/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/IMongoTestObject.java +++ b/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/IMongoTestObject.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) MAQS, All rights Reserved + * Copyright 2022 (C) OpenMAQS, All rights Reserved */ package io.github.openmaqs.nosql; diff --git a/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/MongoDBConfig.java b/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/MongoDBConfig.java index 395feef0d..d63b41331 100644 --- a/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/MongoDBConfig.java +++ b/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/MongoDBConfig.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) MAQS, All rights Reserved + * Copyright 2022 (C) OpenMAQS, All rights Reserved */ package io.github.openmaqs.nosql; diff --git a/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/MongoDBDriver.java b/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/MongoDBDriver.java index d8d04dca1..6c826242d 100644 --- a/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/MongoDBDriver.java +++ b/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/MongoDBDriver.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) MAQS, All rights Reserved + * Copyright 2022 (C) OpenMAQS, All rights Reserved */ package io.github.openmaqs.nosql; diff --git a/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/MongoDriverManager.java b/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/MongoDriverManager.java index c4c045c1a..36e9b3372 100644 --- a/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/MongoDriverManager.java +++ b/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/MongoDriverManager.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) MAQS, All rights Reserved + * Copyright 2022 (C) OpenMAQS, All rights Reserved */ package io.github.openmaqs.nosql; diff --git a/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/MongoFactory.java b/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/MongoFactory.java index 13848b60a..2a977bf91 100644 --- a/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/MongoFactory.java +++ b/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/MongoFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) MAQS, All rights Reserved + * Copyright 2022 (C) OpenMAQS, All rights Reserved */ package io.github.openmaqs.nosql; diff --git a/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/MongoTestObject.java b/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/MongoTestObject.java index 358d7dc5b..a763180db 100644 --- a/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/MongoTestObject.java +++ b/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/MongoTestObject.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) MAQS, All rights Reserved + * Copyright 2022 (C) OpenMAQS, All rights Reserved */ package io.github.openmaqs.nosql; From 4ba3b8396ada97e61040ce74f55e2eecf0cdd6ae Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Sat, 11 Feb 2023 15:10:22 -0600 Subject: [PATCH 83/91] checkstyle fixes --- .../resources/testFiles/integration-test-target-complex.html | 2 +- .../src/test/resources/testFiles/integration-test-target.html | 2 +- .../main/java/io/github/openmaqs/nosql/MongoDriverManager.java | 2 +- .../test/java/io/github/openmaqs/nosql/BaseMongoUnitTest.java | 2 +- .../java/io/github/openmaqs/nosql/MongoDBConfigUnitTest.java | 2 +- .../java/io/github/openmaqs/nosql/MongoDBDriverUnitTest.java | 2 +- .../io/github/openmaqs/nosql/MongoDBFunctionalUnitTest.java | 2 +- .../io/github/openmaqs/nosql/MongoDriverManagerUnitTest.java | 2 +- .../java/io/github/openmaqs/nosql/MongoTestObjectUnitTest.java | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/openmaqs-accessibility/src/test/resources/testFiles/integration-test-target-complex.html b/openmaqs-accessibility/src/test/resources/testFiles/integration-test-target-complex.html index 525a22ca7..3404b8684 100644 --- a/openmaqs-accessibility/src/test/resources/testFiles/integration-test-target-complex.html +++ b/openmaqs-accessibility/src/test/resources/testFiles/integration-test-target-complex.html @@ -1,5 +1,5 @@ diff --git a/openmaqs-accessibility/src/test/resources/testFiles/integration-test-target.html b/openmaqs-accessibility/src/test/resources/testFiles/integration-test-target.html index b079563d8..3acb7ed7b 100644 --- a/openmaqs-accessibility/src/test/resources/testFiles/integration-test-target.html +++ b/openmaqs-accessibility/src/test/resources/testFiles/integration-test-target.html @@ -1,5 +1,5 @@ diff --git a/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/MongoDriverManager.java b/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/MongoDriverManager.java index 36e9b3372..a160d9b3c 100644 --- a/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/MongoDriverManager.java +++ b/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/MongoDriverManager.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) OpenMAQS, All rights Reserved + * Copyright 2023 (C) OpenMAQS, All rights Reserved */ package io.github.openmaqs.nosql; diff --git a/openmaqs-nosql/src/test/java/io/github/openmaqs/nosql/BaseMongoUnitTest.java b/openmaqs-nosql/src/test/java/io/github/openmaqs/nosql/BaseMongoUnitTest.java index 56e4f1c0d..aaadacff7 100644 --- a/openmaqs-nosql/src/test/java/io/github/openmaqs/nosql/BaseMongoUnitTest.java +++ b/openmaqs-nosql/src/test/java/io/github/openmaqs/nosql/BaseMongoUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) MAQS, All rights Reserved + * Copyright 2023 (C) OpenMAQS, All rights Reserved */ package io.github.openmaqs.nosql; diff --git a/openmaqs-nosql/src/test/java/io/github/openmaqs/nosql/MongoDBConfigUnitTest.java b/openmaqs-nosql/src/test/java/io/github/openmaqs/nosql/MongoDBConfigUnitTest.java index 171db0e41..cdd3a58fe 100644 --- a/openmaqs-nosql/src/test/java/io/github/openmaqs/nosql/MongoDBConfigUnitTest.java +++ b/openmaqs-nosql/src/test/java/io/github/openmaqs/nosql/MongoDBConfigUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) MAQS, All rights Reserved + * Copyright 2023 (C) OpenMAQS, All rights Reserved */ package io.github.openmaqs.nosql; diff --git a/openmaqs-nosql/src/test/java/io/github/openmaqs/nosql/MongoDBDriverUnitTest.java b/openmaqs-nosql/src/test/java/io/github/openmaqs/nosql/MongoDBDriverUnitTest.java index 668567efb..75273eeea 100644 --- a/openmaqs-nosql/src/test/java/io/github/openmaqs/nosql/MongoDBDriverUnitTest.java +++ b/openmaqs-nosql/src/test/java/io/github/openmaqs/nosql/MongoDBDriverUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) MAQS, All rights Reserved + * Copyright 2023 (C) OpenMAQS, All rights Reserved */ package io.github.openmaqs.nosql; diff --git a/openmaqs-nosql/src/test/java/io/github/openmaqs/nosql/MongoDBFunctionalUnitTest.java b/openmaqs-nosql/src/test/java/io/github/openmaqs/nosql/MongoDBFunctionalUnitTest.java index abac186f2..f9b4e0227 100644 --- a/openmaqs-nosql/src/test/java/io/github/openmaqs/nosql/MongoDBFunctionalUnitTest.java +++ b/openmaqs-nosql/src/test/java/io/github/openmaqs/nosql/MongoDBFunctionalUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) MAQS, All rights Reserved + * Copyright 2023 (C) OpenMAQS, All rights Reserved */ package io.github.openmaqs.nosql; diff --git a/openmaqs-nosql/src/test/java/io/github/openmaqs/nosql/MongoDriverManagerUnitTest.java b/openmaqs-nosql/src/test/java/io/github/openmaqs/nosql/MongoDriverManagerUnitTest.java index 4ba9e5711..674d3d0a9 100644 --- a/openmaqs-nosql/src/test/java/io/github/openmaqs/nosql/MongoDriverManagerUnitTest.java +++ b/openmaqs-nosql/src/test/java/io/github/openmaqs/nosql/MongoDriverManagerUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) MAQS, All rights Reserved + * Copyright 2023 (C) OpenMAQS, All rights Reserved */ package io.github.openmaqs.nosql; diff --git a/openmaqs-nosql/src/test/java/io/github/openmaqs/nosql/MongoTestObjectUnitTest.java b/openmaqs-nosql/src/test/java/io/github/openmaqs/nosql/MongoTestObjectUnitTest.java index a5f93356f..f38120d37 100644 --- a/openmaqs-nosql/src/test/java/io/github/openmaqs/nosql/MongoTestObjectUnitTest.java +++ b/openmaqs-nosql/src/test/java/io/github/openmaqs/nosql/MongoTestObjectUnitTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) MAQS, All rights Reserved + * Copyright 2023 (C) OpenMAQS, All rights Reserved */ package io.github.openmaqs.nosql; From d6084c83c44320a2b2ac35a9f917524a22a03f0e Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Sat, 11 Feb 2023 15:13:02 -0600 Subject: [PATCH 84/91] checkstyle fixes --- .../src/main/java/io/github/openmaqs/nosql/BaseMongoTest.java | 2 +- .../main/java/io/github/openmaqs/nosql/IMongoTestObject.java | 2 +- .../src/main/java/io/github/openmaqs/nosql/MongoDBConfig.java | 2 +- .../src/main/java/io/github/openmaqs/nosql/MongoDBDriver.java | 2 +- .../src/main/java/io/github/openmaqs/nosql/MongoFactory.java | 2 +- .../src/main/java/io/github/openmaqs/nosql/MongoTestObject.java | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/BaseMongoTest.java b/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/BaseMongoTest.java index 3eba89e77..453c72844 100644 --- a/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/BaseMongoTest.java +++ b/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/BaseMongoTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) OpenMAQSMAQS, All rights Reserved + * Copyright 2023 (C) OpenMAQS, All rights Reserved */ package io.github.openmaqs.nosql; diff --git a/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/IMongoTestObject.java b/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/IMongoTestObject.java index c7797e686..9b9cf3e34 100644 --- a/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/IMongoTestObject.java +++ b/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/IMongoTestObject.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) OpenMAQS, All rights Reserved + * Copyright 2023 (C) OpenMAQS, All rights Reserved */ package io.github.openmaqs.nosql; diff --git a/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/MongoDBConfig.java b/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/MongoDBConfig.java index d63b41331..b30fb9e35 100644 --- a/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/MongoDBConfig.java +++ b/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/MongoDBConfig.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) OpenMAQS, All rights Reserved + * Copyright 2023 (C) OpenMAQS, All rights Reserved */ package io.github.openmaqs.nosql; diff --git a/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/MongoDBDriver.java b/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/MongoDBDriver.java index 6c826242d..dc56c09ef 100644 --- a/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/MongoDBDriver.java +++ b/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/MongoDBDriver.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) OpenMAQS, All rights Reserved + * Copyright 2023 (C) OpenMAQS, All rights Reserved */ package io.github.openmaqs.nosql; diff --git a/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/MongoFactory.java b/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/MongoFactory.java index 2a977bf91..5a314f541 100644 --- a/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/MongoFactory.java +++ b/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/MongoFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) OpenMAQS, All rights Reserved + * Copyright 2023 (C) OpenMAQS, All rights Reserved */ package io.github.openmaqs.nosql; diff --git a/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/MongoTestObject.java b/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/MongoTestObject.java index a763180db..a9c98bea0 100644 --- a/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/MongoTestObject.java +++ b/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/MongoTestObject.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 (C) OpenMAQS, All rights Reserved + * Copyright 2023 (C) OpenMAQS, All rights Reserved */ package io.github.openmaqs.nosql; From d7e329c74131e97d1c010fe9a039f96fac806dac Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Sat, 11 Feb 2023 15:22:01 -0600 Subject: [PATCH 85/91] appium test fix --- .../java/io/github/openmaqs/appium/AppiumConfigUnitTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openmaqs-appium/src/test/java/io/github/openmaqs/appium/AppiumConfigUnitTest.java b/openmaqs-appium/src/test/java/io/github/openmaqs/appium/AppiumConfigUnitTest.java index aed7697cf..746704808 100644 --- a/openmaqs-appium/src/test/java/io/github/openmaqs/appium/AppiumConfigUnitTest.java +++ b/openmaqs-appium/src/test/java/io/github/openmaqs/appium/AppiumConfigUnitTest.java @@ -74,7 +74,7 @@ public void testGetCapabilitiesAsStrings() { SoftAssert softAssert = new SoftAssert(); softAssert.assertTrue(capabilitiesAsStrings.containsKey(username)); - softAssert.assertEquals(capabilitiesAsStrings.get(username), "maqs-Framework<"); + softAssert.assertEquals(capabilitiesAsStrings.get(username), "maqs-Framework"); softAssert.assertTrue(capabilitiesAsStrings.containsKey(accessKey)); softAssert .assertNotEquals(capabilitiesAsStrings.get(accessKey), ""); @@ -94,7 +94,7 @@ public void testGetCapabilitiesAsObjects() { SoftAssert softAssert = new SoftAssert(); softAssert.assertTrue(capabilitiesAsObjects.containsKey(username)); - softAssert.assertEquals(capabilitiesAsObjects.get(username), "maqs-Framework<"); + softAssert.assertEquals(capabilitiesAsObjects.get(username), "maqs-Framework"); softAssert.assertTrue(capabilitiesAsObjects.containsKey(accessKey)); softAssert .assertNotEquals(capabilitiesAsObjects.get(accessKey), ""); From 9eba0d7c3b95375110d44b10998aeeedfe50aa38 Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Tue, 14 Feb 2023 14:30:06 -0600 Subject: [PATCH 86/91] update some files --- .../io/github/openmaqs/nosql/MongoDBDriver.java | 15 +-------------- .../io/github/openmaqs/nosql/MongoFactory.java | 5 ++--- .../openmaqs/nosql/MongoDBDriverUnitTest.java | 2 +- 3 files changed, 4 insertions(+), 18 deletions(-) diff --git a/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/MongoDBDriver.java b/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/MongoDBDriver.java index dc56c09ef..bad9e7df1 100644 --- a/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/MongoDBDriver.java +++ b/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/MongoDBDriver.java @@ -17,7 +17,7 @@ * The MongoDB Driver class. * Wraps the MongoCollection and related helper functions. */ -public class MongoDBDriver implements AutoCloseable { +public class MongoDBDriver { /** * Initializes a new instance of the MongoDBDriver class. @@ -166,17 +166,4 @@ public List listAllCollectionItems() { public boolean isCollectionEmpty() { return this.getCollection().countDocuments() == 0; } - - /** - * Counts all the items in the collection. - * @return Number of items in the collection - */ - public int countAllItemsInCollection() { - return (int) this.getCollection().countDocuments(); - } - - @Override - public void close() { - this.getMongoClient().close(); - } } diff --git a/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/MongoFactory.java b/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/MongoFactory.java index 5a314f541..f50d74d33 100644 --- a/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/MongoFactory.java +++ b/openmaqs-nosql/src/main/java/io/github/openmaqs/nosql/MongoFactory.java @@ -4,11 +4,10 @@ package io.github.openmaqs.nosql; -import static com.mongodb.client.MongoClients.create; - import com.mongodb.MongoClientException; import com.mongodb.MongoException; import com.mongodb.client.MongoClient; +import com.mongodb.client.MongoClients; import com.mongodb.client.MongoCollection; import com.mongodb.client.MongoDatabase; import org.bson.Document; @@ -39,7 +38,7 @@ public static MongoCollection getDefaultCollection() { */ public static MongoCollection getCollection( String connectionString, String databaseString, String collectionString) { - try (MongoClient mongoClient = create(connectionString)) { + try (MongoClient mongoClient = MongoClients.create(connectionString)) { MongoDatabase database = mongoClient.getDatabase(databaseString); return database.getCollection(collectionString); } catch (MongoClientException e) { diff --git a/openmaqs-nosql/src/test/java/io/github/openmaqs/nosql/MongoDBDriverUnitTest.java b/openmaqs-nosql/src/test/java/io/github/openmaqs/nosql/MongoDBDriverUnitTest.java index 75273eeea..fc107e27b 100644 --- a/openmaqs-nosql/src/test/java/io/github/openmaqs/nosql/MongoDBDriverUnitTest.java +++ b/openmaqs-nosql/src/test/java/io/github/openmaqs/nosql/MongoDBDriverUnitTest.java @@ -79,6 +79,6 @@ public void testIsCollectionEmpty() { */ @Test(groups = TestCategories.NOSQL) public void testCountAllItemsInCollection() { - Assert.assertEquals(this.getMongoDBDriver().countAllItemsInCollection(), 4); + Assert.assertEquals(this.getMongoDBDriver().getCollection().countDocuments(), 4); } } From 2159484acf63ab12e4fd2fc4fd879af35279c5ca Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Tue, 14 Feb 2023 14:32:01 -0600 Subject: [PATCH 87/91] update some files --- docker/docker-compose.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 4b0fc8ccf..362dc41bc 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -13,8 +13,3 @@ services: extends: file: ./MAQSMongoDB/docker-compose.yml service: mongo - - imap: - extends: - file: ./MAQSEmail/docker-compose.yml - service: imap From a500a53721e9e5460e3578da388677b02722d3a2 Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Tue, 14 Feb 2023 14:34:23 -0600 Subject: [PATCH 88/91] Update docker-compose.yml --- docker/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 362dc41bc..44c3c95f1 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -12,4 +12,4 @@ services: mongo: extends: file: ./MAQSMongoDB/docker-compose.yml - service: mongo + service: mongo \ No newline at end of file From 4c80010502edf6728799708908a20bc2a55b1bca Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Wed, 12 Jul 2023 17:40:35 -0500 Subject: [PATCH 89/91] update mongo db version --- openmaqs-nosql/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openmaqs-nosql/pom.xml b/openmaqs-nosql/pom.xml index 92d70f583..48aef81e0 100644 --- a/openmaqs-nosql/pom.xml +++ b/openmaqs-nosql/pom.xml @@ -12,11 +12,11 @@ io.github.openmaqs.nosql openmaqs-nosql - MAQS NoSQL Testing Module + OpenMAQS NoSQL Testing Module ${revision} - 4.5.0 + 4.10.2 From 062a6ae3844c8988511c0323063b94f6f55d69f3 Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Tue, 16 Jan 2024 09:30:27 -0600 Subject: [PATCH 90/91] update yaml file to set up mongodb database --- .github/actions/startdeps/action.yml | 6 +++++- docker/MAQSMongoDB/docker-compose.yml | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/actions/startdeps/action.yml b/.github/actions/startdeps/action.yml index f015a4b4c..d6c5f23db 100644 --- a/.github/actions/startdeps/action.yml +++ b/.github/actions/startdeps/action.yml @@ -20,7 +20,11 @@ runs: shell: pwsh #run: docker-compose -f docker/MAQSService/docker-compose.yml -p OpenMAQS/maqs-java up -d run: Start-Process -FilePath "dotnet" -ArgumentList "run --project docker/MAQSService/MainTestService/MainTestService.csproj" - - name: Build the docker-compose stack + - name: Build the MAQS database docker stack if: inputs.module-name == 'openmaqs-database' shell: bash run: docker-compose -f docker/MAQSSQLServer/docker-compose.yml -p OpenMAQS/openmaqs-java up -d + - name: Build the MAQS MongoDB docker stack + if: inputs.module-name == 'openmaqs-nosql' + shell: bash + run: docker-compose -f docker/MAQSMongoDB/docker-compose.yml -p OpenMAQS/openmaqs-java up -d \ No newline at end of file diff --git a/docker/MAQSMongoDB/docker-compose.yml b/docker/MAQSMongoDB/docker-compose.yml index 10479a005..e62d8a966 100644 --- a/docker/MAQSMongoDB/docker-compose.yml +++ b/docker/MAQSMongoDB/docker-compose.yml @@ -20,4 +20,4 @@ services: ME_CONFIG_MONGODB_ADMINPASSWORD: # Run a custom bash script that bootstraps the database after it is started. - command: [ '/bin/bash', '/mnt/host/initialize_and_start_sqlserver.sh' ] \ No newline at end of file +# command: [ '/bin/bash', '/mnt/host/initialize_and_start_sqlserver.sh' ] \ No newline at end of file From a529fd2965dd7a656ee67511d81e8205ad140c04 Mon Sep 17 00:00:00 2001 From: Jon Reding Date: Tue, 16 Jan 2024 09:32:03 -0600 Subject: [PATCH 91/91] update yaml file to setup mongodb database --- docker/MAQSMongoDB/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/MAQSMongoDB/docker-compose.yml b/docker/MAQSMongoDB/docker-compose.yml index e62d8a966..10479a005 100644 --- a/docker/MAQSMongoDB/docker-compose.yml +++ b/docker/MAQSMongoDB/docker-compose.yml @@ -20,4 +20,4 @@ services: ME_CONFIG_MONGODB_ADMINPASSWORD: # Run a custom bash script that bootstraps the database after it is started. -# command: [ '/bin/bash', '/mnt/host/initialize_and_start_sqlserver.sh' ] \ No newline at end of file + command: [ '/bin/bash', '/mnt/host/initialize_and_start_sqlserver.sh' ] \ No newline at end of file