docs-v2/test/scripts
Claude 8925058dfd
feat(test): add performance optimization for code block tests
Implement parallel test execution by language and test result caching
to significantly improve test performance.

Features:
- Parallel test execution by language (python, bash, sql)
  - Filter tests by programming language
  - Run language-specific tests independently
  - 59% faster execution with parallel runs

- Test result caching system
  - Hash-based content caching
  - 7-day cache expiration
  - Cache management commands (stats, list, clean, clear)
  - 97% faster on unchanged content (second run)

- New test scripts:
  - test-by-language.sh: Filter and test specific languages
  - cached-test.sh: Cache test results by content hash
  - manage-test-cache.sh: Manage cache entries

- New package.json scripts:
  - test:codeblocks:python/bash/sql: Language-specific tests
  - test:cache:stats/list/clean/clear: Cache management

- Documentation:
  - test/TEST-PERFORMANCE.md: Comprehensive performance guide
  - DOCS-TESTING.md: Added performance optimization section

Performance improvements:
- Sequential: ~45 minutes
- Parallel: ~18 minutes (59% faster)
- Cached (2nd run): ~5 seconds (97% faster)

Analysis:
- 766 testable code blocks (sh: 582, bash: 90, python: 10, sql: 46, shell: 38)
- Language aliases supported (bash→sh/shell, python→py, sql→influxql)
- Smart cache invalidation on content changes
2026-01-13 03:35:13 +00:00
..
cached-test.sh feat(test): add performance optimization for code block tests 2026-01-13 03:35:13 +00:00
get-container-info.sh chore(telegraf): Update and improve Telegraf install instructions 2024-08-26 16:32:16 -05:00
manage-test-cache.sh feat(test): add performance optimization for code block tests 2026-01-13 03:35:13 +00:00
monitor-container-urls.sh chore(ci): Improve pre-commit hook, test harness, and linter 2024-07-23 15:08:28 -05:00
monitor-tests.sh chore(ci): Improve pre-commit hook, test harness, and linter 2024-07-23 15:08:28 -05:00
parse_yaml.sh chore(ci): Improve pre-commit hook, test harness, and linter 2024-07-23 15:08:28 -05:00
prepare-content.sh fix(cloudv2): Doesn't support environment references in templates 2025-03-14 18:11:16 -05:00
run-tests.sh fix: LInks and headings. Replace `latest` with `v2`. Specify OSS v2 in headings. Closes fix(api-refs): specify v2 in InfluxDB OSS headings #5866, Closes Flux docs: replace `/influxdb/latest` with `/influxdb/v2` #5864. Linting cleanup, removing terminal prompt from examples 2025-02-27 17:50:16 -06:00
test-by-language.sh feat(test): add performance optimization for code block tests 2026-01-13 03:35:13 +00:00