Inspiration

When developers review a pull request, it can be difficult to understand how a small code change affects other services. Running every test takes time, and choosing the right tests manually requires knowledge of the project.

I wanted to build a developer tool that recommends relevant tests and explains the reason behind each recommendation.

What it does

PR Impact Map analyzes a list of changed files and identifies:

  • Potentially affected services.
  • Recommended tests.
  • Dependency paths behind each recommendation.
  • Files that are not recognized by the graph.

For example, a change in the Payments service can also affect Orders and Gateway. The application shows this dependency chain and recommends the related tests.

How I built it

I built the backend using C#, ASP.NET Core 10, and Relate.

Relate stores the relationships between files, services, and tests. I use parameterized Cypher queries to find direct and indirect dependencies. The REST API processes the graph results and returns test recommendations with their dependency paths.

I also created PowerShell scripts to automate the setup and verify the demo.

Challenges I faced

One challenge was connecting ASP.NET Core to Relate's HTTP Query API. I encountered HTTP 400 and 502 errors and resolved them by changing how the JSON request body was sent.

Another challenge was handling files without known relationships. I improved the query and response processing to prevent incorrect recommendations for unknown files.

What I learned

  • Graph database modeling and Cypher queries.
  • Multi-hop dependency analysis.
  • HTTP API integration and debugging.
  • Automated setup and reproducible demo testing.

Accomplishments

The application successfully runs from a clean repository clone. Both demo scenarios passed, including dependency analysis and unknown-file handling.

What's next

  • GitHub pull request integration.
  • Automatic dependency discovery in .NET projects.
  • Interactive dependency visualization.
  • CI/CD integration for test recommendations.

The current prototype uses a predefined dependency graph and demonstrates how Relate can support explainable test recommendations.

AI assistance

I used ChatGPT for project planning, coding assistance, debugging, and documentation. I tested the application and verified its results locally.

Built With

Share this project:

Updates

Submission history