Pynt for .NET (xUnit)
Integrate Pynt with xUnit to enhance API security testing in .NET environments. Automate security scans within your test suites to detect and mitigate vulnerabilities as part of your CI/CD pipeline.
Last updated
Integrate Pynt with xUnit to enhance API security testing in .NET environments. Automate security scans within your test suites to detect and mitigate vulnerabilities as part of your CI/CD pipeline.
Last updated
💡 xUnit is a widely-used testing framework for .NET applications, known for its extensibility, simplicity, and integration with Visual Studio. It supports async tests, shared context, and rich assertions—making it ideal for unit, integration, and functional testing. xUnit helps ensure code correctness and reliability through automated and structured test execution.
Pynt integrates seamlessly with .NET test projects using xUnit. By observing traffic from your functional test executions, Pynt generates security tests that simulate real-world attacks and help identify critical vulnerabilities in your APIs.
This enables your .NET team to shift security testing left—during development—not after deployment.
Prepare your .NET environment
Ensure you have the installed (version 6 or later is recommended).
Install Pynt container
Follow the to install and run the Pynt container.
Clone or write your xUnit-based functional tests
You can use your existing API test suite, or follow the example below.
We’ve created a sample vscode project that tests login and transaction access for goat sample APIs.
Download it here:
Run the tests normally with:
To run Pynt on this test suite:
This will:
Intercept traffic from your functional tests
Automatically generate security test cases
Report vulnerabilities like Broken Auth, IDOR, and more
If your HttpClient configuration requires a specific CA certificate:
If no certificate exists, generate one:
Generate a certificate (Linux/macOS)
Make the script executable:
Run the script:
Then run your test with the generated certificate:
Would you like this page saved as markdown or added to your actual GitBook project?
Download
Download
If you're encountering issues with Pynt's CLI, visit the for solutions and tips.
For questions or help, reach out to the or join our Slack workspace.