Skip to content

Add Gate 1 AST static vacuity analysis linter for UI test suites. - #3277

Open
copybara-service[bot] wants to merge 1 commit into
masterfrom
test_971169428
Open

Add Gate 1 AST static vacuity analysis linter for UI test suites.#3277
copybara-service[bot] wants to merge 1 commit into
masterfrom
test_971169428

Conversation

@copybara-service

@copybara-service copybara-service Bot commented Aug 28, 2026

Copy link
Copy Markdown

Add Gate 1 AST static vacuity analysis linter for UI test suites.

Key Capabilities Introduced in this CL:

  1. Gate 1 Static AST Vacuity Analysis Linter (tests/ui/lint_vacuity.py):
    • Recursively parses test ASTs to detect anti-patterns including
      conditional assertions (if blocks guarding assertions), vacuous tests with
      0 assertions or expects, empty or whitespace locators, and keyword
      selector arguments.
    • Respects hermetic runfiles and sandbox directory hierarchies, enforcing
      non-zero test file discovery.
  2. Presubmit & CI Linter Targets:
    • Integrates lint_vacuity_test in tests/ui/BUILD and kokoro_build_testing.sh.
    • Ensures all UI test suites maintain 0 vacuity violations.

@copybara-service copybara-service Bot changed the title Introduces static AST vacuity linter to audit test suites against tautological and vacuous assertions: Add Gate 1 AST static vacuity analysis linter to prevent silent test omissions and conditional asserts. Sep 1, 2026
@copybara-service
copybara-service Bot force-pushed the test_971169428 branch 3 times, most recently from cc98870 to 28e34b0 Compare September 3, 2026 06:01
@copybara-service copybara-service Bot changed the title Add Gate 1 AST static vacuity analysis linter to prevent silent test omissions and conditional asserts. Add Gate 1 AST static vacuity analysis linter for UI test suites. Sep 3, 2026
Key Capabilities Introduced in this CL:
1. Gate 1 Static AST Vacuity Analysis Linter (tests/ui/lint_vacuity.py):
   - Recursively parses test ASTs to detect anti-patterns including
     conditional assertions (if blocks guarding assertions), vacuous tests with
     0 assertions or expects, empty or whitespace locators, and keyword
     selector arguments.
   - Respects hermetic runfiles and sandbox directory hierarchies, enforcing
     non-zero test file discovery.
2. Presubmit & CI Linter Targets:
   - Integrates lint_vacuity_test in tests/ui/BUILD and kokoro_build_testing.sh.
   - Ensures all UI test suites maintain 0 vacuity violations.

PiperOrigin-RevId: 971169428
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants