A comprehensive, modern test automation framework that combines API, Web, and Mobile testing into a unified BDD (Behavior-Driven Development) solution. Built with the latest technologies and best practices for scalable, maintainable test automation.
- Multi-Platform Testing: API, Web, and Mobile testing in one framework
- BDD Support: Cucumber and Gauge integration for business-readable tests
- Parallel Execution: Configurable parallel test execution for faster feedback
- Modern Dependencies: Latest versions of Selenium, Rest Assured, Appium, and more
- Cloud Integration: Ready for BrowserStack, AWS Device Farm, and other cloud platforms
- Docker Support: Complete containerized testing environment
- CI/CD Ready: GitHub Actions and Jenkins pipeline with comprehensive reporting
- Java 17: Latest LTS version with modern language features
- Selenium 4.18.1: Latest WebDriver with improved performance
- Rest Assured 5.4.0: Modern API testing with enhanced capabilities
- Appium 9.2.2: Latest mobile testing framework
- Cucumber 7.15.0: Latest BDD framework with improved features
- JUnit 5.10.2: Modern testing framework with parallel execution
- Maven 3.9.9: Latest build tool with improved dependency management
- Test Data Management: Faker library for realistic test data generation
- Security: Encrypted configuration management with environment variable support
- Monitoring: Prometheus and Grafana integration for test metrics
- Reporting: Multiple reporting options (Allure, Cucumber, JaCoCo)
- Mocking: WireMock integration for API mocking
- Database Testing: PostgreSQL support with TestContainers
- Performance Testing: Built-in performance testing capabilities
- 🆕 Self-Healing Locators: Automatic recovery from broken locators (AI optional)
The framework now includes self-healing for broken locators, reducing flaky test failures when the UI changes.
-
On
NoSuchElementException, the SelfHealingEngine is triggered. -
The engine captures a screenshot and a compact DOM snapshot.
-
It generates replacement locators via:
- Heuristic rules (text matches,
data-testid,aria-label,title,name, etc.) - AI suggestions (OpenAI models, optional)
- Fast‑path reuse of previously healed locators cached in
ModelStore.
- Heuristic rules (text matches,
-
The best candidate is tried and (optionally) persisted for future fast reuse.
Artifacts are written under:
reports/self-heal/<timestamp>/
├─ page.png # screenshot
├─ dom.txt # DOM outerHTML snapshot
└─ decision.log # ordered trace of the healing decision
Add these properties (in config.properties) and/or environment variables:
# Self-healing master switch
selfheal.enabled=true
# If true, only logs suggested fixes without applying them
selfheal.shadow_mode=false
# Enable AI-based candidate generation (optional)
selfheal.ai.enabled=true# Required only if AI is enabled
export OPENAI_API_KEY=sk-xxxxxxxxxxxxxxxxIf
OPENAI_API_KEYis missing, AI is automatically disabled and the engine falls back to heuristics.
No code changes required for test steps. The framework’s element finder automatically delegates to the self-healing engine when a locator fails:
WebElement el = elementFinder.findElement(By.id("possibly_brittle_id"));
// If brittle, engine tries AI/heuristics/fast-path and proceeds with a recovered By- Fast‑path reuse: when a healed locator is persisted for a page + original locator, it is tried first on the next failure.
- Shadow mode: set
selfheal.shadow_mode=trueto observe and log self‑healing without actually switching locators. - Deduping: candidates are de‑duplicated (insertion‑ordered) so AI suggestions are evaluated before heuristics.
- API Testing: ✅ All tests passing (3 Gauge scenarios)
- Mobile Testing: ✅ Build successful, ready for testing
- Web Testing: ✅ Core functionality working, unit tests removed due to Java compatibility
- Shared Utilities: ✅ All modules building successfully
- Functional Tests: API, Web, and Mobile scenarios working
- Integration Tests: Docker services and infrastructure tested
- Build Tests: All modules compile and build successfully
- Java 17 or higher
- Maven 3.9.9 or higher
- Docker and Docker Compose
- Git
git clone https://github.com/your-org/io.bdd_testing_frameworks.git
cd io.bdd_testing_frameworks# Copy environment configuration
cp config.properties.template config.properties
# Set environment variables (recommended for production)
export TEST_SLACK_TOKEN=your_slack_token
export TEST_DB_PASSWORD=your_db_password
export TEST_WEBHOOK=your_webhook_url# Start all services (Selenium Grid, Appium, Database, etc.)
docker-compose up -d
# Verify services are running
docker-compose ps# Run all tests
mvn clean test
# Run specific module tests
mvn test -pl api_testing
mvn test -pl web_testing
mvn test -pl mobile_testing
# Run with parallel execution
mvn test -Dparallel.threads=4
# Run specific test tags
mvn test -Dcucumber.filter.tags="@api"
mvn test -Dcucumber.filter.tags="@web"
mvn test -Dcucumber.filter.tags="@mobile"io.bdd_testing_frameworks/
├── api_testing/
│ ├── src/
│ │ ├── main/java/
│ │ │ ├── base/
│ │ │ ├── cucumber/
│ │ │ └── imp/
│ │ └── test/
│ │ ├── resources/
│ │ │ ├── features/
│ │ │ ├── payloads/
│ │ │ └── schemas/
│ │ └── java/
│ └── pom.xml
├── web_testing/
│ ├── src/
│ │ ├── main/java/
│ │ │ ├── base/
│ │ │ ├── browsers/
│ │ │ ├── driver/
│ │ │ ├── elements/
│ │ │ ├── helpers/
│ │ │ └── imp/
│ │ └── test/
│ │ ├── resources/
│ │ │ ├── features/
│ │ │ └── locators/
│ │ └── java/
│ └── pom.xml
├── mobile_testing/
│ ├── src/
│ │ ├── main/java/
│ │ │ ├── base/
│ │ │ ├── platform/
│ │ │ ├── platforms/
│ │ │ ├── helper/
│ │ │ └── imp/
│ │ └── test/
│ │ ├── resources/
│ │ │ ├── features/
│ │ │ ├── devices/
│ │ │ └── locators/
│ │ └── java/
│ └── pom.xml
├── mutual_methods/
│ ├── src/main/java/
│ │ ├── base/
│ │ ├── configuration/
│ │ ├── helper/
│ │ ├── imp/
│ │ └── utils/
│ └── pom.xml
├── docker-compose.yml
├── Jenkinsfile
├── pom.xml
└── README.md
Feature: Pet Store API
Scenario: Create and retrieve a pet
Given base url 'https://petstore.swagger.io'
And endpoint '/v2/pet'
And payload as file 'payloads/petPost.json' from resource
And Headers
| accept | application/json |
| Content-Type | application/json |
When Send post requests
Then Verify that the status code is 200
And Get 'id' from response and store it with 'petId' during scenario
And Get 'name' from response and store it with 'petName' during scenarioFeature: Web Application Testing
Scenario: Login functionality
Given Open 'chrome' and get 'https://example.com/login'
And Send keys 'username' to 'email' field
And Send keys 'password' to 'password' field
And Click on 'login' button
Then Verify that 'dashboard' element is visible
And Verify that 'welcome' text contains 'Welcome'Feature: Mobile App Testing
Scenario: App login
Given Get 'android' capabilities from resource with JSON 'device_capabilities.json' file and lunch app
And Send keys 'username' to 'username_field'
And Send keys 'password' to 'password_field'
And Click on 'login_button'
Then Verify that 'home_screen' element is visible# Slack Integration
export TEST_SLACK_TOKEN=your_slack_token
export TEST_WEBHOOK=your_webhook_url
# Database Configuration
export TEST_DB_PASSWORD=your_db_password
export TEST_CONNECTION_STRING=jdbc:postgresql://localhost:5432/testdb
# Test Configuration
export TEST_ENVIRONMENT=development
export TEST_PARALLEL_THREADS=4
export TEST_TIMEOUT=30
# Optional: AI for Self‑Healing
export OPENAI_API_KEY=sk-xxxxxxxxxxxxxxxx# Slack Configuration
slack_token=${TEST_SLACK_TOKEN}
webhook=${TEST_WEBHOOK}
# Database Configuration
connectionString=${TEST_CONNECTION_STRING}
dbClass=org.postgresql.Driver
dbUser=testuser
dbPassword=${TEST_DB_PASSWORD}
# Test Configuration
environment=${TEST_ENVIRONMENT}
parallel.threads=${TEST_PARALLEL_THREADS}
test.timeout=${TEST_TIMEOUT}
# Browser Configuration
default.browser=chrome
base.url=https://example.com
# Self-Healing
selfheal.enabled=true
selfheal.shadow_mode=false
selfheal.ai.enabled=false- Push to main: full test suite
- Pull Requests: validation before merge
Workflow Highlights
- Unit + API tests
- Build & package artifacts
- Docker & infra validation
- Allure/Cucumber reports
pipeline {
agent any
tools { maven 'Maven 3.9.9'; jdk 'Java 17' }
// ... see Jenkinsfile for complete configuration
}- Allure Reports (HTML, screenshots, logs)
- Cucumber Reports (BDD-specific)
- JaCoCo Coverage
- Custom summaries
mvn allure:report
mvn allure:serve
mvn jacoco:report- Env vars for sensitive data
- Encrypted config management
- Masked logging
- No hardcoded credentials
- Selenium Grid, Appium Server
- PostgreSQL, Redis
- WireMock, Prometheus, Grafana
docker-compose up -d
docker-compose up -d selenium-hub chrome firefox
docker-compose logs -f
docker-compose downparallel.threads=4
test.timeout=30
performance.mode=true
monitoring.enabled=true- Fork → Branch → Commit → Test → PR
- Keep tests > 80% coverage
- Follow Java + BDD style guides
- Major: Java 17, dependency upgrades
- New: Docker Compose
- New: Jenkins pipeline
- New: Faker-based TestDataHelper
- New: Security improvements
- New: Parallel execution
- New: Comprehensive reporting
- New: Monitoring and metrics
- New: Self‑Healing Locators (AI + heuristics)
- Improvement: Config management & error handling
- Improvement: Modernized architecture
- Initial BDD framework (API/Web/Mobile)
- Cucumber & Gauge integration
- Basic reporting
MIT — see LICENSE
- Docs: README + inline code
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Wiki: Project wiki
Happy Testing! 🧪✨