microsoft / microsoft/AttackSurfaceAnalyzer

Refactor Collectors to enable Unit Testing

Open
#737 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C#
Stars
3k
Forks
294
PR merge metrics
No merged PRs in 30d

Description

Is your feature request related to a problem? Please describe.
Collectors currently have Functional tests but they do not have unit tests with mocked responses. This means that the collectors are difficult to test in the pipeline (see #735) and are only really tested locally.

Describe the solution you'd like
Refactor collectors so it is possible to mock the many interfaces and libraries they interact with and create unit tests that are safe to run in pipelines.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the collectors and the pipeline-testing concern in #735. Identify the interfaces and libraries each collector depends on, then determine how they can be mocked and covered with unit tests. Done means collectors have unit tests using mocked responses that are safe to run in pipelines.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
security, testing-qa
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.