-
Notifications
You must be signed in to change notification settings - Fork 7
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
RFC: project scope #14
Comments
The scope of this project is pretty clear. The supported testing methods are the only reasonable way to test libraries such as Chronicles (that feature extensive compile-time configuration able to produce vastly different run-time results and having invalid states that should produce compilation errors) or Confutils (that has shell integration features). Fuzzing is another form of testing that requires compiling programs with custom toolchains and that will be simplified by this package. Finally, it's a place where we can experiment with enhancements to Nim's unit testing libraries (such as |
@arnetheduck -- you make a number of statements that I don't feel are strictly accurate. Maybe you could take a closer look at the implementation and offer some specific criticism to support your claims? I've stopped working on this project because it's not clear that my time is well-spent since a 20-line commit completely redefines the mechanisms by which testing occurs. It would be good to get some consensus on design direction. Personally, I think this project should try a little harder to integrate or subsume testament, to the benefit of both. For example, testament's approach permits trivial |
the vast majority of chronicles does not depend on compiler options - the formatting, introspection, runtime configuration, etc etc - the compile time stuff merely turns on and off certain features - if you can't do this testing without running a full process, something is wrong with your code already - all that running an external process does is check that you can glue it together at compile time
"a dump for various testing-related code - anything goes"? because it started out as a testament clone, but now there's the module test thing, and suddenly fuzzing and unittest should also go here? @disruptek "not accurate" isn't that.. accurate... so it's hard to respond to, but I can generally expand the points.
normally if you write test cases, you're better off with a single binary with lots of tests in it - it's only in exceptional cases, integration testing or poorly written applications that you need to isolate tests at the process boundary - true, it's a powerful isolation in that the OS takes care of releasing resources for you, but it hides issues in your library as well because the way the OS releases those resources is not generally applicable for more normal usage
lots of recompiling of the same code
where is the code for orchestrating a multi-process test (which is one reason you'd need an external test runner - ie start this process then that process then wait for that process to fininsh and start another one - this would be useful for a tcp server + client test)? the upstream tester from the nim compiler only has ugly hacks to deal with this, which break under parallel runs (which is why the parallel testing in the nim compiler is done by category which is suboptimal - higher granularity runs into race conditions)
Line 166 in 71708e2
Line 434 in 71708e2
normally, I can run the test with |
Simply, this is not for those cases. For those cases, suitable solutions exist in the form of If you have a better solution in mind, please share it. Only
...is in this repository and its use is described in the
I like this feature, too, and think it's nice that |
@arnetheduck, so what is the project scope of another brainchild of yours - nim-stew? Per your own advice, we need a place to experiment with testing-related functionality while gaining independence of the std lib. Also, I feel your objections here are sabotaging the progress of important work. How do you propose that we start implementing fuzzing tests in NBC? Have you actually studied the existing implementation by Kim who thumbed up the proposed plan? For better or worse, Chronicles currently relies on this form of testing. Do you propose that all progress on the library is halted until we spend weeks rewriting the testing framework to meet your ideals? |
@zah the scope is important so that we document and make informed decisions on what to fund and what not to fund presently, with due diligence - since the readme is out of date, it would be good to have it written down somewhere - both for ourselves and potential contributors. |
@disruptek this was not aimed at your work, of which we're very appreciative. It's more of a planning discussion to set a strategy for testing, and understand more what our needs are - we have testing needs all across the board, and chronicles/chronicles-like is but one small part of it. of the solutions I'd work towards in this space would be a integrated build and test tool such that developers don't need to bother to learn multiple commands - with multiple developers working and being onboarded on the same project, this is a significant cost. re multi-process, I've read both the code and the readme, the closest I can find being https://github.com/status-im/nim-testutils/#multiple-invocations - from what I can tell, it runs the same program with different options, but does not allow orchestrating. I've had similar issues with testament while developing
it doesn't - the test is described in the comment header but you still need testament to parse the comment and compare the outputs. it seems that this should be possible to do with the compiler api or |
Well, as I said, this repo meets a use-case for me that other test frameworks do not. I was happy to have an excuse to implement it and I'm happy to use it in my projects. I have a branch of I await your concrete "bright future" design document. It will be great to unify all these efforts! |
yeah, that sounds nice - I mean, it's effectively the same, except these tests that require compiling and running are a bit more convoluted to run, with compilation and all |
Are you saying your plan involves running tests without compiling them? Do you intend to run multiple NimScript test specs in a single VM instance? The reason I put my |
There are some missing features in Testament that drove the creation of Testutils (while it was part of the Chronicles repo): A major assumption in Testament is that the program will have the same output in all compilation modes (the single expected output is embedded in the program source). This is not the case in Chronicles where the compilation options dramatically change the expected output. For this reason, we decided to go with separate Besides compiling the program in different ways, you can also run the program in different ways (this is quite relevant for Confutils). This additional requirement lead to the current design where a |
Regarding this project, I'm curious about the scope and use case - there are several reasons why you don't want this kind of test running:
The text was updated successfully, but these errors were encountered: