feast-testing

Test and debug Feast feature stores with targeted pytest runs and registry inspection.

7.2k|1.4k|Updated Dec 10, 2018
One-click install
npx skills add https://github.com/feast-dev/feast --skill feast-testing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: feast-testing
Source: https://github.com/feast-dev/feast/tree/main/skills/feast-testing
Command: npx skills add https://github.com/feast-dev/feast --skill feast-testing

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Writing and debugging tests for Feast components (online stores, registries, feature views) requires knowing where tests live, which patterns to follow, and how to diagnose runtime failures like stale registries or empty online lookups. This Skill provides the test organization map, reusable test patterns, and debugging workflows for the Feast codebase.

Core Features & Use Cases

  • Targeted Test Execution: Run single test files, single test names, or subsystem suites with pytest, plus Makefile targets for unit and local integration tests.
  • Unit Test Patterns: Ready-to-adapt templates for testing online stores (with mocked clients), registry operations, SQL registry dialect DDL compilation, and end-to-end FeatureStore behavior with SQLite.
  • Debugging Playbooks: Diagnose stale registries, all-None online feature lookups, mypy type errors, protobuf deserialization failures, and feature server 500 errors using CLI commands like feast registry-dump and feast plan.
  • Use Case: You added a new online store implementation and need to write unit tests. Follow the online store test pattern with mocked clients, run the targeted pytest command, then verify end-to-end with a local SQLite-backed FeatureStore test.

Quick Start

Ask the assistant to write a unit test for a new Feast online store and run it with pytest against the unit test directory.

Frequently Asked Questions about feast-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run a single Feast unit test?

Run a single test file with python -m pytest followed by the test path, for example sdk/python/tests/unit/infra/online_store/test_dynamodb_online_store.py -v. Use the -k flag with a test name substring to run one specific test, or run make test-python-unit for the full fast unit suite.

How do I write a unit test for a new Feast online store?

Follow the pattern in test_dynamodb_online_store.py or test_redis.py: build a RepoConfig with your store config, mock the external client with unittest.mock, call online_write_batch, and assert the mock was invoked. Wrap async methods in asyncio.run inside the test.

Should my Feast test go in unit or integration?

If the test mocks external services, it belongs in sdk/python/tests/unit/. If it spins up real infrastructure like Redis, DynamoDB, or BigQuery, it belongs in sdk/python/tests/integration/ and typically runs in CI.

Why does get_online_features return None for all features?

All-None results usually come from an entity key serialization version mismatch, a wrong project name, or a TTL that expired the data. Check entity_key_serialization_version in feature_store.yaml and confirm materialization ran with feast feature-views list.

How do I inspect the Feast registry when debugging?

Run feast registry-dump to print the full registry as JSON, or use the Python API via store.registry.list_feature_views and list_entities. If definitions look stale, re-run feast apply or restart the process to bypass a cached registry TTL.

How do I test SQL registry DDL without a live database?

Compile the table with a target SQLAlchemy dialect, such as str(CreateTable(feature_views).compile(dialect=mysql.dialect())), and assert the emitted column types. Live round-trip behavior like large proto storage still needs an integration test against the mysql_registry fixture.