-
Notifications
You must be signed in to change notification settings - Fork 26
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
Refactor the testing scripts #411
Comments
I'd appreciate input on this. What's working for you, what isn't? Are there use cases that we're not handling well? And so on. |
Need to be able to test for
One location for all the scripts, rather than one in each testing directory. The current most “advanced” scripts are in the typesyn directory. |
|
+1 for @EliasC's comments. The report should be printed at the end. Also, it would be good to exclude files or directories – in modules I import some files, but don't want these files to be run as tests. |
I am possibly spoiled by multiple tests in one filehaving input source and output as embedded string and isolate them in different testcases instead of building namespace on top of filesystem directly positive result
negative result
|
I don't see why the input should be a string. Then you can't import files, lose editor support, plus we'll have to implement a "file system" instead of using the file system that we already have. I agree that there should be a good way to demand that:
Ideally, the test only runs once, even though we have more than one assertion. Summarising the input so far:
|
what do you mean by that? |
@kaeluka I mean that when I test the modules (in directory |
@supercooldave: OK. The test scripts will distinguish by the former ones having a corresponding .out file, and the latter ones not having them. Does that sound about right? |
Unit tests, rspec, Quickcheck etc will all be great in the future, but the goal of this fix is to improve what we have in a simple way to eliminate some minor deficiencies. |
@kaeluka Almost. a |
@supercooldave: agreed! Thanks for pointing that out! |
@kaeluka I didn't see why compile encore classes at runtime requires libllvm. I was thinking just calling shell commands in the testing language would be enough. |
@albertnetymk: I shouldn't have brought this up in this thread. We should discuss this outside of the thread :) Edit: messaged you on slack. |
@kaeluka Having multiple tests in the same file is essential for progressively testing a feature, IMO.
As for testing module, we could create module files on the fly, and remove them when the test is done. |
With the current design, you'd make a directory, called |
Agree to disagree. For the record, I don't believe having directory-per-feature is practical. |
Having the option is practical. If you don't want a directory, you're still able to write one monolithic test. |
In practice, we haven't had a directory-per-feature. We've had most features in one directory, which is even more impractical. The changes @kaeluka will do will lift the testing framework to the next level, not to the final level. |
+12 |
In case this wasn't said above, the |
@kaeluka I've changed my mind about the way files are excluded from tests. |
I don't like this solution... It's very hard to discover that magical file name if you're not aware of it. Plus, the testing framework's code would become more bug prone... |
I don't see how that is any better. The magic filename problem can be solved by just putting an empty |
This is better by not officially sanctioning disabling tests. If you want to disable so many tests, the code should not be merged, or the test directories deleted. Having lots of dead code is just going to create a mess. The tests can be re added (or the code merged) once the bugs have been fixed. But tests are supposed to prevent bugs from going in -- our response to tests not passing should not be to disable test suites. |
I think you are missing the point. The module system requires files not to be included as tests, but the files need to be there. Some of these files will be in subdirectories. I'm not just making these cases up. |
One final thing. It would be useful to be able to type "make" in any of the subdirectories and have only those tests run. |
It's not uncommon to disable a directory of tests, for one language feature requires multiple tests, and they need to be grouped within one folder if using fs directly. (One example we encountered is disabling It's true that we could delete the whole folder if we want to disable them, but I guess the reasoning goes for disabling a single test as well. However, that would be cumbersome. |
I agree with @albertnetymk. I don't think deleting failing test cases is a good thing. We'd too easily lose track of them. |
Different parts of the test directory use different scripts.
Matching warning/error messages on successful and unsuccessful compilation in test scripts is more complex than it needs to be.
The test script needs to be called in all test directories, and not copied. Support for checking for errors needs to be simplified.
The text was updated successfully, but these errors were encountered: