Skip to main content

Test Tools

info

Learn about testing tools and utilities in Fluvius Framework.

pytest

Running Tests

# Run all tests
pytest

# Run specific test file
pytest tests/test_user_aggregate.py

# Run with coverage
pytest --cov=myapp

Test Utilities

Test Helpers

from fluvius.testing import DomainTestCase

class TestUserDomain(DomainTestCase):
domain_class = UserDomain

async def test_create_user(self):
response = await self.process_command('create-user', {...})
assert response['name'] == 'John'

Next Steps