Agentic Test Automation Framework β an extensible, plugin-based, multi-layered framework for test automation across API, Web UI, WebSocket, CLI, and AI/LLM validation.
Evolved from PyXTaf (uiXautomation), modernized for Python 3.12+.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Test Suites (pytest / behave) β
β Unit tests (ut/) β BDD/ATDD examples (bpt/) β Platform (agentic/) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Modeling Layer β
β RESTClient β Browser β CLIRunner β WSClient β LLMJudge β ChaosRunner β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Plugin Layer β
β Selenium β Playwright β Requests β httpx β WS β Paramiko β LLM βChaos β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Foundation Layer β
β ServiceLocator β Configuration (YAML) β Utils β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
The framework uses a ServiceLocator pattern with pluggable backends. Each plugin type defines an interface; concrete implementations are discovered at runtime via YAML configuration.
Implemented:
| Plugin Interface | Implementation | Purpose |
|---|---|---|
WebPlugin |
SeleniumPlugin (default) |
Browser automation (Selenium 4, headless) |
WebPlugin |
PlaywrightPlugin (optional) |
Browser automation (Playwright, headless) |
RESTPlugin |
RequestsPlugin (default) |
REST API testing (requests) |
RESTPlugin |
HttpxRESTPlugin (optional) |
REST API testing (httpx) |
WSPlugin |
WebSocketPlugin (optional) |
WebSocket streaming (websockets) |
CLIPlugin |
ParamikoPlugin |
SSH / CLI access |
MobilePlugin |
AppiumPlugin (stub / planned) |
Mobile automation β interface defined, concrete plugin not yet implemented |
LLMPlugin |
LLMJudgePlugin (optional) |
LLM response quality evaluation (OpenAI/Anthropic) |
ChaosPlugin |
K8sChaosPlugin (optional) |
K8s chaos engineering (pod kill, network partition, Flux suspend) |
Optional plugins require their dependency installed (
pip install agentic-taf[chaos], etc.) and a config.yml change to enable. Defaults remain Selenium + Requests.
Foundation (taf/foundation/)
ServiceLocatorβ Plugin discovery and dependency injection via metaclass-based registryConfigurationβ YAML-based config with environment variable overrides (TAF_PLUGIN_<NAME>_<KEY>)BasePluginβ Metaclass that auto-registers plugin implementationsUtilsβ Logger, YAML data model, connection cache, serialization traits
Modeling (taf/modeling/)
- High-level abstractions that compose plugin capabilities into test-friendly APIs
Browserβ Page navigation, screenshot, element interaction (wraps WebPlugin)RESTClientβ HTTP client with JSON encode/decode (wraps RESTPlugin)CLIRunnerβ SSH command execution (wraps CLIPlugin)WSClientβ WebSocket streaming withcollect(),collect_text(),send_and_receive()LLMJudgeβ LLM-as-judge withassert_quality()threshold assertions (OpenAI/Anthropic)ChaosRunnerβ Chaos experiment lifecycle withassert_resilient()retry/timeout
Test Suites (src/test/python/)
ut/β 293 framework unit tests (all pass)suites/agentic/api/β 21 E2E API tests (contract, functional, state machine)suites/agentic/security/β 8 E2E security tests (RBAC, secret exposure, injection)suites/agentic/ui/β 10 E2E UI tests (Playwright, engine-agnostic Page Objects)suites/agentic/ai/β 16 E2E AI tests: 11 baseline (test_ai.py) + 5 ground-truth & multi-turn (test_e2e_quality.py) β LLM-as-judge evaluation, adversarial, fallback; skip if LLM downsuites/agentic/chaos/β 4 chaos experiments (K8sChaosPlugin: pod kill, Flux suspend, concurrent)suites/agentic/load/β 4 load tests (API throughput, WebSocket scale, provision throughput, chat latency)suites/agentic/bdd/β 10 BDD scenarios via behave across 4 feature files (provisioning, chat, LLM routing, environment lifecycle) β separate from pytest E2E countsuites/agentic/reporting/β CI utility module (JUnit to OpenSearch push, not a test suite)bpt/β BDD/ATDD examples (Bing search, httpbin API)- Totals: 293 unit + 63 E2E (pytest) + 10 BDD (behave)
agentic-taf/
βββ src/
β βββ main/python/taf/ # Framework core
β β βββ foundation/
β β β βββ api/
β β β β βββ plugins/ # Plugin interfaces (8 types)
β β β β βββ ui/ # UI element abstractions
β β β β βββ svc/REST/ # REST client base class
β β β β βββ cli/ # CLI client base class
β β β β βββ ws/ # WebSocket client base class
β β β β βββ llm/ # LLM client base class
β β β β βββ chaos/ # Chaos client base class
β β β βββ plugins/ # Concrete implementations (8 implemented + 1 stub)
β β β β βββ web/selenium/ # SeleniumPlugin (default)
β β β β βββ web/playwright/ # PlaywrightPlugin (optional)
β β β β βββ svc/requests/ # RequestsPlugin (default)
β β β β βββ svc/httpx/ # HttpxRESTPlugin (optional)
β β β β βββ ws/websocket/ # WebSocketPlugin (optional)
β β β β βββ cli/paramiko/ # ParamikoPlugin
β β β β βββ mobile/appium/ # AppiumPlugin (stub / planned)
β β β β βββ llm/judge/ # LLMJudgePlugin (optional)
β β β β βββ chaos/k8s/ # K8sChaosPlugin (optional)
β β β βββ conf/ # YAML config + loader
β β β βββ servicelocator.py # Plugin DI container
β β β βββ utils/ # Logger, YAMLData, traits
β β βββ modeling/ # High-level test models (6 types)
β β βββ web/ # Browser + typed web controls
β β βββ svc/ # RESTClient
β β βββ cli/ # CLIRunner
β β βββ ws/ # WSClient
β β βββ llm/ # LLMJudge
β β βββ chaos/ # ChaosRunner
β β
β βββ test/python/
β βββ ut/ # Framework unit tests (293 tests)
β βββ suites/agentic/ # Platform E2E test suites
β β βββ api/ # API tests (21 tests)
β β βββ security/ # Security tests (8 tests)
β β βββ ui/ # UI tests (10 tests, Playwright)
β β β βββ pages/ # Page Objects (engine-agnostic)
β β βββ ai/ # AI tests (16 tests: test_ai 11 + test_e2e_quality 5)
β β βββ bdd/features/ # BDD scenarios (10 scenarios across 4 feature files, behave)
β β β βββ steps/ # Step definitions
β β βββ chaos/ # Chaos experiments (4 tests)
β β βββ load/ # Load & performance tests (4 tests)
β β βββ config/ # Environment configs
β β βββ contract/schemas/ # OpenAPI schema
β βββ bpt/ # BDD/ATDD examples
β
βββ Jenkinsfile # Jenkins CI pipeline (E2E stages gated by TAF_RUN_E2E)
βββ pyproject.toml # Build config + dependencies
βββ sonar-project.properties # SonarQube scanner config
βββ .github/workflows/ci.yml # CI: lint β test β contract β build β docker
βββ Dockerfile # Test runner container (Python 3.12 + Playwright)
βββ docker-compose.yml # Local dev services
βββ README.md
# From source (development)
pip install -r src/main/python/requirements-dev.txt
# Or via pyproject.toml extras
pip install -e ".[dev]"
# Run framework unit tests
PYTHONPATH=src/main/python pytest src/test/python/ut/ -vPlugins are configured via YAML and discovered by the ServiceLocator at runtime:
# taf/foundation/conf/config.yml
plugins:
web:
name: SeleniumPlugin
location: ../plugins/web/selenium
enabled: true
cli:
name: ParamikoPlugin
location: ../plugins/cli/paramiko
enabled: true
REST:
name: RequestsPlugin
location: ../plugins/svc/requests
enabled: true
mobile:
name: AppiumPlugin
location: ../plugins/mobile/appium
enabled: falseOverride via environment variables: TAF_PLUGIN_WEB_ENABLED=false
from taf.foundation import ServiceLocator
from taf.foundation.api.plugins import WebPlugin, RESTPlugin
# Get browser (resolves SeleniumPlugin based on config)
Browser = ServiceLocator.get_app_under_test(WebPlugin)
# Get REST client (resolves RequestsPlugin based on config)
client = ServiceLocator.get_client(RESTPlugin)from taf.modeling.web import Browser
from taf.modeling.web import WebButton, WebTextBox
browser = Browser(name='chrome', headless=True)
browser.launch('http://example.com')
txt_search = WebTextBox(id='search_box')
btn_go = WebButton(id='submit_btn')
txt_search.set('test query')
btn_go.click()This project was originally created as uiXautomation (PyXTaf) β a Python 2/3 compatible test automation framework with Selenium, Appium, Paramiko, and Requests plugins. It has been renamed to Agentic-TAF and modernized for Python 3.12+ with Selenium 4 support.
New plugin interfaces (Playwright, httpx, WebSocket, LLM-as-judge, K8s Chaos) and platform test suites (API, UI, AI, BDD, chaos, security, load β 63 E2E + 10 BDD) are implemented. AppiumPlugin is currently a stub (interface defined; concrete plugin planned for a future release). See docs/implementation-plan.md for the full roadmap.
Licensed under the Apache License, Version 2.0. See also
NOTICE for attribution requirements.
Prior versions of this project were distributed under LGPL-3.0; the relicense to Apache-2.0 applies to all source as of this commit. Refer to git history for the prior licensing terms if you forked before the relicense.
See AI_USAGE.md in the design-authority repo for the AI tools policy that applies to this codebase.
