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

[TESTS]: The test sample BOMs in the different formats should be consistent #513

Open
andreas-hilti opened this issue Aug 31, 2024 · 1 comment · May be fixed by #514
Open

[TESTS]: The test sample BOMs in the different formats should be consistent #513

andreas-hilti opened this issue Aug 31, 2024 · 1 comment · May be fixed by #514
Assignees
Labels
test-data related to test-resources and -data

Comments

@andreas-hilti
Copy link
Contributor

andreas-hilti commented Aug 31, 2024

Describe the feature

tools\src\test\resources\1.6 contains many valid BOMs in all three serialization formats (JSON, xml, textproto). However, in many cases their content varies in the three different forms. I would like to ensure that they represent the same content (as much as possible).
This would allow to test whether implementations support the three formats correctly (see for instance CycloneDX/cyclonedx-dotnet-library#331). This allowed me in particular to identify several issues in the cyclonedx-dotnet-library implementation.

If possible, this should also be respected when adding new samples in the future.

Possible solutions

Adjust the test sample files (using in most cases the JSON files as reference). (This applies only to the valid files that are available in the three formats.)

Alternatives

We could also add adjusted samples to the implementation repos (like cyclonedx-dotnet-library). However, this would lead to quite some duplication.

Additional context

The three format have slight differences, thus it might not be 100% semantically equivalent. However, the samples also highlight some inconsistences (and thus could also help to avoid future inconsistencies). One difference is for instance that the proto format does not distinguish between an empty list and a null value.

@jkowalleck jkowalleck added test-data related to test-resources and -data chore: QA A chore related to Quality Assurance and removed proposed core enhancement chore: QA A chore related to Quality Assurance labels Sep 2, 2024
@jkowalleck jkowalleck changed the title [FEATURE]: The test sample BOMs in the different formats should be consistent [TESTS]: The test sample BOMs in the different formats should be consistent Sep 2, 2024
@jkowalleck
Copy link
Member

@andreas-hilti is working on a solution: #514

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test-data related to test-resources and -data
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants