Testing Resources πŸ§ͺ

Overview

CardScan.ai maintains a public testing repository with sample insurance cards and test videos for validating your integration. These resources help ensure consistent testing across development, staging, and CI/CD environments.

All test cards are synthetic samples for testing purposes only. They do not contain real patient information.

Quick Start

  1. Clone the repository:

    git clone https://github.com/CardScan-ai/testing-resources.git
  2. Use sample cards from insurance-card-images/ for testing

  3. Use test videos from insurance-test-videos/ for automated testing

Browser Testing with Fake Webcam

Chrome Launch Flags

Test with consistent video input instead of a live webcam:

# macOS
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome \
  --use-fake-device-for-media-stream \
  --use-file-for-fake-video-capture=./path/to/test-video.y4m

# Windows
chrome.exe \
  --use-fake-device-for-media-stream \
  --use-file-for-fake-video-capture=./path/to/test-video.y4m

# Linux
google-chrome \
  --use-fake-device-for-media-stream \
  --use-file-for-fake-video-capture=./path/to/test-video.y4m

Cypress Integration

Configure Cypress to use test videos as webcam input:

1. Update cypress/plugins/index.js:

2. Run tests with video input:

3. Example test:

Testing Best Practices

1. Test Multiple Scenarios

  • Different card types and payers

  • Various video resolutions

  • Front and back card scanning

  • Error conditions and edge cases

2. Continuous Integration

Example GitHub Actions workflow:

Available Resources

The testing repository includes:

  • Sample card images - High-quality insurance card images (front/back)

  • Test videos - Pre-recorded scanning videos in multiple resolutions

  • Additional resources - Check the repository for the latest test materials

Support

Need help with testing?

Last updated

Was this helpful?