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

Consider replacing the CCK with a testdata folder #110

Open
mpkorstanje opened this issue Nov 17, 2022 · 3 comments
Open

Consider replacing the CCK with a testdata folder #110

mpkorstanje opened this issue Nov 17, 2022 · 3 comments

Comments

@mpkorstanje
Copy link
Contributor

mpkorstanje commented Nov 17, 2022

A bit of a chicken and egg problem with the perl tests here - they rely on the current published version of the CCK, whose messages don't include the new field, which is causing the failure. Any thoughts on how to address this @ehuelsmann?

@davidjgoss looking at the test I think we can change them a little so. So instead of comparing the round trip ndjson --> object --> ndjson and comparing the result we can do object --> ndjson --> object and compare that result. That way we don't need the CCK at all and the code will change along with that specific message object.

Though I think it would be even better to include a testdata folder with (for now) a single message that all implementations try to round trip. That way we won't have to update N implementations manually.

Originally posted by @mpkorstanje in #102 (comment)

@ciaranmcnulty
Copy link
Contributor

I think this is a good idea; how would the testdata be generated?

@mpkorstanje
Copy link
Contributor Author

mpkorstanje commented Jan 5, 2023

I think hand picking a few interesting cases from the current CCK should be sufficient.

For this repo we are mostly concerned with ensuring the serialization works. This means that both legs of a round trip work.

Wether or not the contents of a message is correct and consistent with the other messages in a report file isn't a concern here. So we don't need a cucumber implementation to generate them.

@ciaranmcnulty
Copy link
Contributor

I agree, pick some from CCK + https://github.com/cucumber/messages/blob/main/java/src/test/java/io/cucumber/messages/NdjsonSerializationTest.java and put them in a folder and we can just check encode->decode->encode works and results in the same things

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

No branches or pull requests

2 participants