Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Test Cases for RO-Crate Export with Fixed Output #487

Open
floWetzels opened this issue Jan 22, 2025 · 5 comments
Open
Assignees
Labels
Type: Bug Something is not working, and it is confirmed by maintainers to be a bug.

Comments

@floWetzels
Copy link
Collaborator

At the moment, all RO-Crate tests only check whether exporting and then importing an ARC yields the original object. Such a test case misses certain types of code changes, e.g. editing the context semantically does not result tests failing.

I suggest there should be at least one test case checking the export of a specific ARC or Investigation against a fixed json string. Such objects already exist in the code base, e.g. in tests/TestingUtils/TestObjects.ROCrate/[email protected]. However, no test uses this file.

@github-actions github-actions bot added the Status: Needs Triage This item is up for investigation. label Jan 22, 2025
@HLWeil HLWeil added Type: Bug Something is not working, and it is confirmed by maintainers to be a bug. and removed Status: Needs Triage This item is up for investigation. labels Jan 23, 2025
@HLWeil
Copy link
Member

HLWeil commented Feb 27, 2025

Was actually wondering a bit why no tests are failing after the big changes in #496.

Now the question is how we actually continue from here. Should we create a test file based on the ARCPrototype? E.g. writing the file using the current implementation and then manually control it?

@Freymaurer
Copy link
Collaborator

You could write .NET only tests checking against json schema?

@HLWeil
Copy link
Member

HLWeil commented Feb 28, 2025

Yes! Json schema won't be enough though but there is an RO-Crate validator.

The current plan would be to have an additional CI-job which would roughly look like this:

  • Requirements

    • .NET installed
    • RO-Crate Validator installed
  • Steps

    • Build ARCtrl
    • Download ArcPrototype
    • Read ARC and Write to RO-Crate
    • Validate using RO-Crate Validator

@floWetzels
Copy link
Collaborator Author

I think using the rocrate-validator for basic validation is a good idea. In the future, we can also validate against the ARC profiles, when they are implemented. But I think having a baseline metadata file for a full ARC is also a good idea.

E.g. writing the file using the current implementation and then manually control it?

@HLWeil Which current version do you mean? The one before the refactoring?

@HLWeil
Copy link
Member

HLWeil commented Mar 3, 2025

@HLWeil Which current version do you mean? The one before the refactoring?

That probably won't be of much help, as quite a few fields have changed. I'd say we double/triple check the current output manually and take that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something is not working, and it is confirmed by maintainers to be a bug.
Projects
Status: No status
Development

No branches or pull requests

3 participants