OpenRegister Integration Tests

May 8, 2026 ยท View on GitHub

Quick Start

Run Tests in Both Storage Modes

# Automatically tests both normal storage AND magic mapper
./run-dual-storage-tests.sh

This script runs the Newman collection twice:

  1. Normal storage (objects in JSON blob table)
  2. Magic mapper (objects in dedicated SQL tables)

Run Single Mode

# Normal storage only
docker exec -u 33 nextcloud newman run \
  /var/www/html/custom_apps/openregister/tests/integration/openregister-crud.postman_collection.json \
  --reporters cli

# Magic mapper only
docker exec -u 33 -e ENABLE_MAGIC_MAPPER=true nextcloud newman run \
  /var/www/html/custom_apps/openregister/tests/integration/openregister-crud.postman_collection.json \
  --reporters cli

๐Ÿ“š Documentation

All documentation is in the Postman collection itself!

View in Postman

  1. Import openregister-crud.postman_collection.json into Postman
  2. Click on the collection name in the sidebar
  3. View the Description tab

You'll see complete documentation including:

  • Dual storage testing explanation
  • How to add new tests
  • Golden rules (Do's & Don'ts)
  • Common pitfalls
  • Examples

View in Newman Output

newman run openregister-crud.postman_collection.json --reporters cli

The collection description is shown at the start of the run.

View in CLI

# Extract and view the description
cat openregister-crud.postman_collection.json | jq -r '.info.description'

Files

  • openregister-crud.postman_collection.json - Main test collection (with full docs in description)
  • run-dual-storage-tests.sh - Smart runner for dual storage testing
  • test-import.csv - Test data for import/export tests

Expected Results

Both storage modes should pass all tests:

โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฆโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฆโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
โ•‘ Storage Mode            โ•‘ Tests    โ•‘ Failures โ•‘
โ• โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฌโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฌโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฃ
โ•‘ ๐Ÿ“ฆ Normal (JSON blob)   โ•‘ 199      โ•‘ 0        โ•‘
โ•‘ ๐Ÿ”ฎ Magic Mapper (SQL)   โ•‘ 199      โ•‘ 0        โ•‘
โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฉโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•ฉโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

If one mode fails โ†’ Storage compatibility bug!

Why No Separate Docs?

Documentation is in the collection description because:

  • โœ… Single source of truth
  • โœ… Always up-to-date with tests
  • โœ… Visible in Postman GUI
  • โœ… Included in Newman output
  • โœ… No separate files to maintain
  • โœ… Can be version controlled together

Want to read the docs? Just open the collection in Postman! ๐Ÿ“–