Skip to content

Create tests to actually compare generated map_item functions#83

Draft
dale-wahl wants to merge 22 commits into
masterfrom
map_item_testing_actual_tests
Draft

Create tests to actually compare generated map_item functions#83
dale-wahl wants to merge 22 commits into
masterfrom
map_item_testing_actual_tests

Conversation

@dale-wahl
Copy link
Copy Markdown
Member

Test Fixture Management:

  • Created a README.md for tests/fixtures/ explaining the layout and privacy considerations for real captured data used in map_item tests.
  • Updated .gitignore in tests/fixtures/ to ensure only intended files are tracked, protecting sensitive data.

4CAT Integration Support:

  • Added .env.example in tests/ as a template for configuring 4CAT API access, supporting map_item comparison tests.
  • Enhanced MissingMappedField in js/lib.js with a toJSON method to produce 4CAT-compatible serialization for missing fields.

Actual tests

Under development! Vision: use the "fixtures" (actual NDJSON Zeeschuimer output) -> run though the new map_item function for a given module -> compare that output to 4CAT's actual map_item output (via a new API endpoint).

If this work, we should be able to pull a new automated PR and use the test to run on any collected live data. The tests should help us find any bugs in the new map_item and thus be able to verify this crazy process works.

Current state
The testing kind of works, yay. And I made a translation errors doc that I want to feed into the prompt to try to avoid the same errors again.
The testing environment is... not great and I would like to clean it up a bit. JS testing is very new to me so I have been learning a lot here. (Currently a lot of trial and error...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant