Skip to main content
This guide helps you verify that QWED is integrated correctly into your application.

Why test your integration?

Without proper testing, you might:
  • ❌ Call LLM directly (bypassing verification)
  • ❌ Miss security vulnerabilities
  • ❌ Get incorrect verification results
  • ❌ Have silent failures in production

Quick validation checklist

Run this checklist to verify your integration:

Detailed test suite

1. Test API authentication

What to test: Verify API key is valid and working.
Expected result: Valid key works, invalid key raises AuthenticationError.

2. Test math verification

What to test: Math engine returns correct results.
Expected result: All assertions pass.

3. Test code security

What to test: Security vulnerabilities are detected.
Expected result: All dangerous patterns are blocked.

4. Test SQL injection detection

What to test: SQL injection attempts are caught.
Expected result: All injection patterns are detected.

5. Test error handling

What to test: QWED handles errors gracefully.
Expected result: Errors are caught and handled gracefully.

Integration validation script

Save this as test_qwed_integration.py and run it:
Run it:
Expected output:

Debugging failed tests

Problem: authentication fails

Symptoms:
Solutions:
  1. Check API key is correct
  2. Verify API key is active (not revoked)
  3. Check for extra spaces in key
  4. Regenerate API key if needed

Problem: math verification returns wrong results

Symptoms:
Solutions:
  1. Check verbose mode to see internal flow:
  2. Check trace to debug:
  3. Verify expression format is correct

Problem: security detection misses vulnerabilities

Symptoms:
Solutions:
  1. Check language parameter is correct
  2. Verify code string is properly formatted
  3. Enable strict mode:

Performance testing

Test response times

Expected: < 5 seconds for simple queries

Test batch processing


Continuous integration (CI) testing

GitHub Actions example


Next steps

Once all tests pass: Production deployment - Deploy with confidence
Monitoring - Track QWED in production
Troubleshooting - Debug common issues

Need help?

Can’t get tests to pass? We’re here to help: