-
-
Notifications
You must be signed in to change notification settings - Fork 132
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
Sync Up Existing Test Suites with x-common #331
Comments
Coincidentally, an issue for this topic has only recently been opened: exercism/problem-specifications#524 Perhaps you could chip in there? |
What do you think about the idea to directly parse the |
I think we should generate the tests programmatically. Some of the test
suites are already built in this way.
Take a look in the testgen directory and
https://github.com/exercism/xscala/blob/master/README.md . The testgen code
I have written isn't all that clean, but it works.
…On Wed, Feb 1, 2017 at 10:48 PM abo64 ***@***.***> wrote:
What do you think about the idea to directly parse the canonical-data.json
file as suggested in this Haskell issue
<exercism/haskell#487>?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#331 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABeHGwNgWrPhZPSCe8UemOP8f5_UNmv-ks5rYW4SgaJpZM4LyiJn>
.
|
@ricemery Yes, that looks like the right idea. I wonder whether we should even bother to generate extra Scala source code from the (btw, you use |
If I understand the Haskell PR correctly, they want their test code to read the JSON and build/execute test cases dynamically. Though I do agree it would make maintaining the test suites easier. I am using play json because I knew how to use the api. It is in no way a statement on play json being the best way to parse json. |
True, this approach works only if a closer look at the test suite is not required (which is the case in the Haskell track). Some issues:
I agree that these are a quite disruptive changes, and that might be reason enough to not go this way. |
Creating a Scala source is more work, but I really feel we should keep it that way. Every single exercise I try to solve, I start out with examining the tests. I really like having them be explicit and being able to run or debug them individually. To solve the problem of automatically keeping up-to-date with the canonical data, I think a better approach would be to write a generator that takes the canonical data and automatically creates the test file. |
All right, if that is the majority opinion I will of course follow. |
I'm sure you can do a much better job of building a generator than I did! I
will admit that my generators are ugly.
…On Fri, Feb 3, 2017 at 1:46 AM abo64 ***@***.***> wrote:
All right, if that is the majority opinion I will of course follow.
I will look upon it as a challenge to simplify this translation process. :)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#331 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABeHGyzWhZHm6DXAi-FJFnLrB8Tku04Lks5rYulIgaJpZM4LyiJn>
.
|
No, that is fine. |
Now the x-common JSON schema has become more standardized. My suggestion is: What do you think? |
So are you suggesting that we should make the basic test generator conform to the updated JSON schema? |
@ErikSchierboom Not really, but when I think about it: This is actually a good idea, too! :) As this issue is about being in sync with changes in x-common: My initial thought was only to monitor the issue and update our generators and test suites more or less in sync with it. |
We are not supposed to change the test data in exercism/problem-specifications#625, except for adding the If any PR there changes the test contents, it is a bug. 🐛 Of course, all the current generators will almost certainly stop functioning. |
@rbasso You are right. Maybe I should then say:
|
Sounds like a good plan! |
TestCaseGen should be modified to contain all possible json schema fields. Then hopefully the default generator will just work for most test suites. |
I just remembered one important thing... One of the central features of the new schema is that test data is completely separated from test grouping, so it is possible to write generators that are not sensible to test grouping, and they would continue working if the tests are regrouped/"renested", which is not considered a MAJOR change. In fact, if the test ordering is not changed, regrouping is considered simply a PATCH by the proposed semantic versioning. |
[WIP] Add CanonicalDataParser (issue #331)
There are continuous changes of existing tests in x-common.
Is there a good way to keep track and update the Scala tests?
Just to list some recent changes:
The text was updated successfully, but these errors were encountered: