docs: cut 6.1.0 versions for docs, admin_docs, developer_docs, components

Snapshots all four versioned Docusaurus sections at v6.1.0. Built on
top of the version-cutting tooling work in chore/docs-cut-6.1.0-versions
so the snapshot benefits from:

- Auto-gen refresh before snapshotting (database pages from engine
  spec metadata, API reference from openapi.json, component pages
  from Storybook stories) — captured at the SHA we cut from rather
  than whatever happened to be on disk.
- Data-import freeze: country list, feature flag table, database
  diagnostics, and component metadata are copied into snapshot-local
  `_versioned_data/` dirs so the historical version doesn't silently
  mutate when the source files change.
- Depth-aware import-path rewriter that handles deeply-nested
  component MDX files referencing `../../../src/` from the snapshot.

Versioning behavior: `lastVersion` stays at `current` for every
section, so the canonical URLs (`/docs/...`, `/admin-docs/...`,
`/developer-docs/...`, `/components/...`) continue to render content
from master. The `current` version is consistently labeled "Next"
with an `unreleased` banner, and `6.1.0` is a historical pin
accessible only via its explicit version segment.

Component playground: previously `disabled: true` in versions-config.json,
now enabled and versioned. The plugin block in docusaurus.config.ts
was already gated only by the `disabled` flag, so no other code
changes were needed to bring it back online.

The frozen `databases.json` in the snapshot is the canonical 80-database
artifact from the latest committed state in master (preserved by the
generator's input-hash cache), not a fallback regenerated from a
local Flask environment.
This commit is contained in:
Claude Code
2026-05-12 17:28:00 -07:00
parent 8386c3a042
commit cbcfd9599f
2044 changed files with 87956 additions and 6 deletions

View File

@@ -0,0 +1,162 @@
---
title: Overview
sidebar_position: 1
---
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
# Overview
Apache Superset follows a comprehensive testing strategy that ensures code quality, reliability, and maintainability. This section covers all aspects of testing in the Superset ecosystem, from unit tests to end-to-end testing workflows.
## Testing Philosophy
Superset embraces a testing pyramid approach:
- **Unit Tests**: Fast, isolated tests for individual components and functions
- **Integration Tests**: Tests that verify component interactions and API endpoints
- **End-to-End Tests**: Full user journey testing in browser environments
## Testing Documentation
### Frontend Testing
- **[Frontend Testing](./frontend-testing)** - Jest, React Testing Library, and component testing strategies
### Backend Testing
- **[Backend Testing](./backend-testing)** - pytest, database testing, and API testing patterns
### End-to-End Testing
- **[E2E Testing](./e2e-testing)** - Playwright testing for complete user workflows
### CI/CD Integration
- **[CI/CD](./ci-cd)** - Continuous integration, automated testing, and deployment pipelines
## Testing Tools & Frameworks
### Frontend
- **Jest**: JavaScript testing framework for unit and integration tests
- **React Testing Library**: Component testing utilities focused on user behavior
- **Playwright**: Modern end-to-end testing for web applications
- **Storybook**: Component development and visual testing environment
### Backend
- **pytest**: Python testing framework with powerful fixtures and plugins
- **SQLAlchemy Test Utilities**: Database testing and transaction management
- **Flask Test Client**: API endpoint testing and request simulation
## Best Practices
### Writing Effective Tests
1. **Test Behavior, Not Implementation**: Focus on what the code should do, not how it does it
2. **Keep Tests Independent**: Each test should be able to run in isolation
3. **Use Descriptive Names**: Test names should clearly describe what is being tested
4. **Arrange, Act, Assert**: Structure tests with clear setup, execution, and verification phases
### Test Organization
- **Colocation**: Place test files near the code they test
- **Naming Conventions**: Use consistent naming patterns for test files and functions
- **Test Categories**: Organize tests by type (unit, integration, e2e)
- **Test Data Management**: Use factories and fixtures for consistent test data
## Running Tests
### Quick Commands
```bash
# Frontend unit tests
npm run test
# Backend unit tests
pytest tests/unit_tests/
# End-to-end tests
npm run playwright:test
# All tests with coverage
npm run test:coverage
```
### Test Development Workflow
1. **Write Failing Test**: Start with a test that describes the desired behavior
2. **Implement Feature**: Write the minimum code to make the test pass
3. **Refactor**: Improve code quality while keeping tests green
4. **Verify Coverage**: Ensure adequate test coverage for new code
## Testing in Development
### Test-Driven Development (TDD)
- Write tests before implementation
- Use tests to guide design decisions
- Maintain fast feedback loops
### Continuous Testing
- Run tests automatically on code changes
- Integrate testing into development workflow
- Use pre-commit hooks for test validation
## Getting Started
1. **Set up Testing Environment**: Follow the development setup guide
2. **Run Existing Tests**: Familiarize yourself with the test suite
3. **Write Your First Test**: Start with a simple unit test
4. **Learn Testing Patterns**: Study existing tests for patterns and conventions
## Topics to be covered:
- Testing strategy and pyramid
- Test-driven development (TDD) for plugins
- Continuous integration and automated testing
- Code coverage and quality metrics
- Testing tools and frameworks overview
- Mock data and test fixtures
- Performance testing and benchmarking
- Accessibility testing automation
- Cross-browser and device testing
- Regression testing strategies
## Testing Levels
### Unit Testing
- **Component testing** - Individual React components
- **Function testing** - Data transformation and utility functions
- **Hook testing** - Custom React hooks
- **Service testing** - API clients and business logic
### Integration Testing
- **API integration** - Backend service communication
- **Component integration** - Multi-component workflows
- **Data flow testing** - End-to-end data processing
- **Plugin lifecycle testing** - Installation and activation
### End-to-End Testing
- **User workflow testing** - Complete user journeys
- **Cross-browser testing** - Browser compatibility
- **Performance testing** - Load and stress testing
- **Accessibility testing** - Screen reader and keyboard navigation
## Testing Tools
- **Jest** - Unit and integration testing framework
- **React Testing Library** - Component testing utilities
- **Playwright** - End-to-end testing (replacing Cypress)
- **Storybook** - Component development and testing
---
*This documentation is under active development. Check back soon for updates!*