Skip to main content

A standardized test suite for rhosocial-activerecord backends, providing contracts for features, real-world scenarios, and benchmarks.

Project description

RhoSocial ActiveRecord Test Suite

⚠️ Development Stage Notice: This project is currently under development. Features may be added or removed at any time, and there may be defects or inconsistencies with actual implementations. Therefore, the documentation content is subject to change at any time and is for reference only.

PyPI version Python License: Apache 2.0

Overview

This package contains the standardized test suite for the RhoSocial ActiveRecord library. Its primary purpose is to provide a consistent set of test contracts that all official and third-party database backends must implement to ensure compatibility and reliability.

By separating the test definitions from the backend implementations, we can guarantee that all backends adhere to the same core functionalities and behaviors expected by the ActiveRecord interface.

Testing Philosophy

Our testing strategy is built on three core pillars:

  1. Feature Tests: Validate individual functionality points (e.g., where queries, save methods, BelongsTo relationships).
  2. Real-world Scenarios: Simulate actual business scenarios to verify complex interactions and data integrity.
  3. Performance Benchmarks: Measure and compare backend performance under standardized loads.

Structure

The test suite is organized into the following main categories, located in src/rhosocial/activerecord/testsuite/:

  • /feature: Core feature tests.
  • /realworld: Complex, real-world application scenarios.
  • /benchmark: Performance and load tests.

Capability-based Testing

The test suite includes an integrated pytest plugin that automatically checks if the current backend supports required capabilities. Tests using the @requires_capability decorator will be automatically skipped if the backend doesn't support the required features.

The plugin is registered automatically and available when the package is installed.

Usage for Backend Developers

If you are developing a database backend for RhoSocial ActiveRecord, you should include this test suite as a development dependency. Your backend's test runner will execute these tests against your implementation, using your provided database schema fixtures.

A typical workflow involves:

  1. Adding rhosocial-activerecord-testsuite to your pyproject.toml.
  2. Creating database schema fixtures that match the structure required by the tests.
  3. Running the test suite against your backend to identify and fix compatibility issues.
  4. Generating a compatibility report to document your backend's compliance level.

For detailed instructions, please refer to the main project's testing documentation.

Contributing

Contributions are welcome! Please refer to the main repository's contribution guidelines.

License

This project is licensed under the Apache 2.0 License. See the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rhosocial_activerecord_testsuite-1.0.0.dev9.tar.gz (187.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file rhosocial_activerecord_testsuite-1.0.0.dev9.tar.gz.

File metadata

File hashes

Hashes for rhosocial_activerecord_testsuite-1.0.0.dev9.tar.gz
Algorithm Hash digest
SHA256 9bc2df90fdb80d198022abdcca1346976c5dc732c5e4a5f289836c0dac2f8e2c
MD5 e516a91f7b5b97f67d03437543c60978
BLAKE2b-256 9b4688d29607d5fc7461b8a743c79e4c6c94407c698140a7294b96bab660a0fa

See more details on using hashes here.

Provenance

The following attestation bundles were made for rhosocial_activerecord_testsuite-1.0.0.dev9.tar.gz:

Publisher: publish.yml on rhosocial/python-activerecord-testsuite

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rhosocial_activerecord_testsuite-1.0.0.dev9-py3-none-any.whl.

File metadata

File hashes

Hashes for rhosocial_activerecord_testsuite-1.0.0.dev9-py3-none-any.whl
Algorithm Hash digest
SHA256 70f937d3da7e1b66b0e7359bbb232e2a90087456224193c62592785a0e6f49bd
MD5 29533a7803c8dbabda4829bf8b9ad078
BLAKE2b-256 40e521aa134267550d9aaa4615d5d629ac978d8c0dd37897944c024ab79a9dc7

See more details on using hashes here.

Provenance

The following attestation bundles were made for rhosocial_activerecord_testsuite-1.0.0.dev9-py3-none-any.whl:

Publisher: publish.yml on rhosocial/python-activerecord-testsuite

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page