Skip to content

test: add parser regression tests for cloud_scanner - #2347

Open
Tuba1809 wants to merge 1 commit into
utksh1:mainfrom
Tuba1809:test/cloud-scanner-parser-regression
Open

test: add parser regression tests for cloud_scanner#2347
Tuba1809 wants to merge 1 commit into
utksh1:mainfrom
Tuba1809:test/cloud-scanner-parser-regression

Conversation

@Tuba1809

Copy link
Copy Markdown

Description

Adds focused regression tests for the cloud_scanner parser to improve coverage of malformed, blank, whitespace-only, and noisy input while keeping the production parser behavior unchanged.

Changes Made

  • Added regression test for whitespace-only input
  • Added regression test for malformed parser output
  • Added test to verify the parser handles unrelated noisy lines safely
  • Added test to ensure valid findings are preserved when mixed with noisy lines
  • Added test to verify a stable result shape for empty parser output
  • Confirmed the parser does not raise exceptions for blank, whitespace-only, or malformed input
  • No production code was modified; only backend test coverage was expanded

Related Issues

Fixes #2091

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

How Has This Been Tested?

The focused backend parser test was executed locally.

python -m pytest testing/backend/test_cloud_scanner_plugin.py -v

Result: All tests passed successfully.

Checklist

  • My code follows the code style of this project.
  • I have performed a self-review of my own code.
  • I have commented my code where appropriate.
  • I have made corresponding changes to the documentation. (Not applicable for test-only changes.)
  • My changes generate no new warnings.

@utksh1 utksh1 added area:backend Backend API, database, or service work level:intermediate 35 pts difficulty label for moderate contributor PRs type:testing Testing work category bonus label labels Aug 4, 2026

@utksh1 utksh1 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the focused test change and its current checks are green. The PR still needs a current branch update before merge because it is behind main; I will not bypass the branch policy.

@utksh1
utksh1 force-pushed the test/cloud-scanner-parser-regression branch from 5cc3324 to 668dab7 Compare August 5, 2026 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:backend Backend API, database, or service work level:intermediate 35 pts difficulty label for moderate contributor PRs type:testing Testing work category bonus label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test(plugins): add malformed-output coverage for cloud_scanner parser

2 participants