This repository contains a unified test automation framework for end-to-end testing of both the UI and API layers of the Checkly application. It is built with a robust stack of modern automation tools.
- UI Automation: Uses Selenide for concise and stable browser-based tests.
- API Automation: Uses REST Assured for testing RESTful services.
- Test Runner: Powered by TestNG to allow for flexible test configuration and execution.
- Reporting: Generates detailed and interactive Allure Reports.
- Build Automation: Managed by Apache Maven.
- CI/CD: Integrated with GitHub Actions for continuous testing.
Before you begin, ensure you have the following installed on your system:
- Java Development Kit (JDK): Version 17
- Apache Maven: Version 3.8.x or higher
-
Clone the repository:
git clone https://github.com/gokulsam07/checkly.git cd checkly -
Install dependencies: Maven will automatically download all the required dependencies when you run your first test.
Test execution can be configured via properties files located in src/test/resources.
selenide.properties: Contains settings for the Selenide framework (e.g., browser, timeouts).login.properties: Contains credentials for running tests.
Note: For local runs, you can modify login.properties directly. However, for CI/CD, credentials are provided securely via GitHub Actions Secrets, which is the recommended practice.
checkly/
├── .github/workflows/ # GitHub Actions CI/CD pipelines
│ └── selenide.yml
├── src/main/java/
│ ├── pages/ # Page Object Models for UI tests
│ ├── rest/core/ # Core REST Assured implementation
│ └── ui/core/ # UI-specific utilities
├── src/test/java/
│ ├── api/ # API test classes
│ ├── ui/ # UI test classes
│ └── test/utils/ # Common test helpers
├── src/test/resources/
│ ├── login.properties # Credentials for testing
│ ├── selenide.properties # Selenide configuration
│ └── data/api/ # JSON request bodies for API tests
├── allure-results/ # Raw Allure test results (generated after test run)
├── checkly-api.xml # TestNG suite for API tests
├── checkly-ui.xml # TestNG suite for UI tests
└── pom.xml # Maven Project Object Model
All tests are executed using Maven from the command line. You can run the entire suite or target specific test types (UI, API) or groups.
This command executes the tests defined in the checkly-ui.xml TestNG suite.
mvn test -DsuiteXmlFiles=checkly-ui.xmlTo run UI tests in headless mode:
mvn test -DsuiteXmlFiles=checkly-ui.xml -Dselenide.headless=trueThis command executes the tests defined in the checkly-api.xml TestNG suite.
mvn test -DsuiteXmlFiles=checkly-api.xmlYou can run specific groups of tests (as defined in your test classes with @Test(groups = {"...})) by using the -Dgroups property.
# Example: Run tests tagged as 'smoke' from the UI suite
mvn test -DsuiteXmlFiles=checkly-ui.xml -Dgroups="smoke"
# Example: Run tests tagged as 'regression' from the API suite
mvn test -DsuiteXmlFiles=checkly-api.xml -Dgroups="regression"After running tests, Allure results are generated in the target/allure-results directory.
To generate and view the HTML report locally, run the following command:
mvn allure:reportThis will generate the report in the target/site/allure-maven-plugin directory. To open it in your browser, run:
mvn allure:serveThis project uses GitHub Actions for continuous integration. The workflow is defined in .github/workflows/selenide.yml.
- Manual Trigger: The workflow is triggered manually, allowing you to choose which suite to run (
uiorapi). - Test Execution: It checks out the code, sets up JDK 17, and runs the selected test suite using Maven.
- Report Generation: After the test run, it generates the Allure report.
- Report Deployment: The final HTML report is automatically deployed to GitHub Pages. You can find a link to the report in the "Summary" of the workflow run.
- Navigate to the Actions tab in the GitHub repository.
- Select the checkly-ci workflow from the sidebar.
- Click the Run workflow dropdown.
- Choose the
test-suite(uiorapi) you want to run. - Click the Run workflow button.