A customizable java automated testing framework for functionally testing web (including network traffic) & api services along with integration to AWS services and different databases. Framework also supports specifying configuration key value pairs in a config.properties file (located in the resources folder). Secrets can be encrypted and stored in the config.properties file and will be decrypted in memory at runtime - details on how to set that up are below.
Technologies used within the framework:
- java
- maven
- testng
- selenium
- browser mob
- mongodb
- aws java sdk
- Download & Install Java JDK
- Download & Configure [Maven] (https://maven.apache.org/download.cgi?Preferred=ftp://mirror.reverse.net/pub/apache/)
Run the following command
keytool -genseckey -keystore .keystore -storetype jceks -storepass "{store_pass}" -keyalg AES -keysize 256 -alias configPasswords -keypass "{key_pass}"
- Store the
.keystorefile in the user root of your system - Create a file with the contents below called
.vaultand store it in the user root of your system
STORE_PASSWORD=
KEY_PASSWORD=
- Specify the
STORE_PASSWORDandKEY_PASSWORDvalues in the file above with the values used when generating the keystore file
Configure which group of tests are run and which environment to run the tests on in the src/test/resources/testng.xml file
- Create a file with the contents below called
credentialsand store it in~/.aws/credentials
# Move this credentials file to (~/.aws/credentials)
# after you fill in your access and secret keys in the default profile
# WARNING: To avoid accidental leakage of your credentials,
# DO NOT keep this file in your source directory.
[default]
aws_access_key_id=
aws_secret_access_key=
[devprofile]
aws_access_key_id=
aws_secret_access_key=
[qaprofile]
aws_access_key_id=
aws_secret_access_key=
- Specify your
access key idandsecret access keyvalues in the file above for the given environment, follow the pattern above for additional environments.
mvn clean test -Denv={environment} -Dgroups={scope}
mvn clean test -Denv={environment} -Dgroups={scope} -Dselenium.grid={seleniumGrid_url}
mvn clean test -Denv=LOCAL -Dgroups={scope} -Dapphost={local_app_url}
In order to set up a local instance of a selenium grid, you can either do so by installing a selenium server or by installing Zalenium on your local box - follow the instructions on the link.
Go to the following path
target/surefire-reports/emailable-report.html