An innovative, all-in-one test automation framework that supports any type of testing: web, API, mobile, desktop, server, database, and more. Omnium is designed to be user-friendly, intelligent, and efficient, reducing the time and effort required to write and maintain automated tests.
- Universal Testing: One unified framework for all testing types (web, API, mobile, desktop, server, database)
- Smart Test Generation: AI-assisted test case creation and maintenance
- Self-Healing Tests: Automatically adapts to UI/API changes to reduce test maintenance
- Intelligent Element Location: Uses multiple strategies to find elements even when they change
- Parallel Execution: Built-in support for distributed testing to speed up test runs
- Data-Driven Testing: Advanced data management for handling large datasets
- Minimal Code: Intuitive API that requires less code to write and maintain tests
- Visual Reporting: Comprehensive and interactive test reports
- Cross-Platform: Works on Windows, macOS, and Linux
- Extensible Architecture: Easy to extend with custom adapters and plugins
pip install omnium-test-frameworkFor specific testing types, you can install the required dependencies:
# For web testing
pip install omnium-test-framework[web]
# For API testing
pip install omnium-test-framework[api]
# For mobile testing
pip install omnium-test-framework[mobile]
# For desktop testing
pip install omnium-test-framework[desktop]
# For all testing types
pip install omnium-test-framework[all]from omnium import TestCase
from omnium.adapters import web
from omnium.utils.decorators import tag
class GoogleSearch(TestCase):
def setup(self):
self.page = web.open("https://google.com")
def teardown(self):
self.page.close()
@tag("search", "smoke")
def test_search(self):
self.page.type("name=q", "Omnium Test Framework")
self.page.type("name=q", "\n")
self.page.wait_for_element("id=search")
self.assertions.assert_true(
"Omnium Test Framework" in self.page.get_text(),
"Search results should contain the search term"
)from omnium import TestCase
from omnium.adapters import api
class UserApiTest(TestCase):
def setup(self):
self.client = api.create_client("https://api.example.com")
@tag("api", "user")
def test_get_user(self):
response = self.client.get("users/1")
response.assert_status_code(200)
user = response.get_json()
self.assertions.assert_equal(user["id"], 1)from omnium import TestCase
from omnium.utils.decorators import data_driven
class CalculatorTest(TestCase):
@data_driven([
{"a": 1, "b": 2, "expected": 3},
{"a": -1, "b": 1, "expected": 0},
{"a": 10, "b": 20, "expected": 30}
])
def test_addition(self, a, b, expected):
result = a + b
self.assertions.assert_equal(result, expected)Run tests from the command line:
# Run all tests in the current directory
omnium
# Run tests in specific directories
omnium tests/web_tests tests/api_tests
# Run tests in parallel
omnium --parallel
# Run tests with specific tags
omnium --tags=smoke,regression
# Generate HTML and JSON reports
omnium --report-formats=html,jsonThe foundation for all tests, providing setup/teardown methods, assertions, and test execution.
- Web: For testing web applications (supports Selenium and Playwright)
- API: For testing REST, GraphQL, and SOAP APIs
- Mobile: For testing iOS and Android applications
- Desktop: For testing desktop applications
- Database: For testing database operations
- Server: For testing server-side applications
- Assertions: Rich set of assertion methods
- Data: Data generation and management
- Reporting: Test result reporting in multiple formats
- Decorators: For enhancing test methods (@retry, @data_driven, @tag, etc.)
Omnium can automatically recover from element locator failures by trying alternative strategies:
# Even if the ID changes, Omnium will try to find the element by other attributes
page.click("id=submit-button")Automatically waits for elements to be ready before interacting with them:
# No need for explicit waits - Omnium handles it automatically
page.click("css=.dynamic-element")Run tests in parallel to speed up test execution:
from omnium.core.test_suite import TestSuite
suite = TestSuite("My Test Suite")
suite.discover_tests("tests")
suite.set_parallel(True, max_workers=4)
results = suite.run()Contributions are welcome! Please feel free to submit a Pull Request.
See the full documentation for detailed usage instructions.
MIT License - Feel free to use and modify this framework for your projects.