The Mobiquity Automation Framework is a simple API testing framework that integrates with CircleCI pipeline.
Mac OS, IntelliJ IDE(version 11.0.11), Java(version 11.0.9), Gradle(version 5.2.1), RestAssured, Allure Report(version 2.14.0), TestNG, CircleCI.
The build.gradle file found on the Automation framework root folder contains all the common dependencies that are used in the project
Contains functionality that form the backbone of the framework
DriverFactory.java
- contains configurations to setup base url, setup excel data reader, logger and environments.
- contains configurations to read/edit Json files.
- contains configurations for different Http Methods.
- contains configurations to customise headers.
- contains configurations to update payloads and do response validations for COMMENT test cases.
- contains configurations to update payloads and do response validations for POST test cases.
- contains configurations to update payloads and do response validations for USER test cases.
- contains API configurations to update COMMENT, POST & USER different endpoints.
Contains logic or functionality needed to run tests with efficiency:
PropertyFileReader.java - reads element Json path, file path and other identifier types that are specified in the ".properties" files
ExcelUtility.java - contains configurations to read spreadsheet and store in memory
SetEnvironmentDataUtility.java - contains configurations to setup test environment
Contains different resource files used throughout the project:
API.properties - contains configurations URIs, file path, Json path
UserData.xlsx - external test data file that contains different test case's data
Mobiquity Automation Test Coverage.xlsx - Automation Test Coverage
testSuites - contains different xml Test Suites used in the project
- contains different Test cases used for the Mobiquity project.
-
Go to top menu bar and navigate to Run > Edit Configurations...
-
On the 'Run/Debug Configurations' window, 'Add New Configuration' by clicking the (+) at the top-left corner
-
Select 'Gradle'
-
Then fill in the fields below:
- Gradle projects: Mobiquity_SA_Project (Navigate to the project location)
- Tasks: clean run_mobiquity_test
- Arguments: --stacktrace
-
Press 'Apply', then 'Ok' button
-
Finally to run the test
- Press the Green Play button
- Or navigate to Run > Run 'Mobiquity_SA_Project [clean run_mobiquity_test]'
//OR
-
Execute command from terminal:
$ ./gradlew run_mobiquity_test
Screenshot
Reference: https://docs.qameta.io/allure/
-
Execute a test
-
From the terminal, navigate to the project root:
e.g. $ cd ~/Documents/Projects/Java/mobiquity_project
-
Execute the terminal command:
$ allure serve ./build/allure-results
//OR
-
Execute the terminal command:
a.1. Generate allure report :
$ allure generate allure-results --clean -o allure-report
a.2. wait for output:
'Report successfully generated to allure-report'
a.3. View report (report will open automatically)
$ allure serve allure-results
//OR
b.1. Generate allure report :
$ allure generate allure-results --clean -o allure-report
b.2. wait for output:
'Report successfully generated to allure-report'
b.3. Navigate to '/allure-report/index.html' in the project, then open index.html with any browser
.circleci - contains config.yml file with the configurations required for CI execution on CircleCI.