-
Notifications
You must be signed in to change notification settings - Fork 87
Unit tests #27
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
First let me start by saying I'm a big fan of any and all software testing. Unit tests are great. I just want to point out that there is a decent testing capability and automated framework using the test/sample code @jacobwilliams wrote along with output validation using jsonlint (see #26) that is automated in the CMake build system. The tests, while perhaps somewhat ad hoc, have good coverage and test that the code behaves as expected, on a coarse level, and tests for regressions. I am posting this because I want people to know that it is at least moderately well tested code as is, even without more fine grained unit testing. |
-Fixes jacobwilliams#30: CMake tests 3 and 8 fail -Fixes jacobwilliams#49: tests dir should be under src -Maybe addresses jacobwilliams#27... I'll leave that up to @jacobwilliams -maybe concludes jacobwilliams#42... -Breaks SCons build: @jacobwilliams and @bruceravel, my python/SCons is too nonexistant to fix this myself.
-Fixes jacobwilliams#30: CMake tests 3 and 8 fail -Fixes jacobwilliams#49: tests dir should be under src -Maybe addresses jacobwilliams#27... I'll leave that up to @jacobwilliams -maybe concludes jacobwilliams#42... -Breaks SCons build: @jacobwilliams and @bruceravel, my python/SCons is too nonexistant to fix this myself.
-Fixes jacobwilliams#30: CMake tests 3 and 8 fail -Fixes jacobwilliams#49: tests dir should be under src -Maybe addresses jacobwilliams#27... I'll leave that up to @jacobwilliams -maybe concludes jacobwilliams#42... -Breaks SCons build: @jacobwilliams and @bruceravel, my python/SCons is too nonexistant to fix this myself.
-Fixes jacobwilliams#30: CMake tests 3 and 8 fail -Fixes jacobwilliams#49: tests dir should be under src -Maybe addresses jacobwilliams#27... I'll leave that up to @jacobwilliams -maybe concludes jacobwilliams#42... -Breaks SCons build: @jacobwilliams and @bruceravel, my python/SCons is too nonexistant to fix this myself. -Probably breaks visual studio build, @jacobwilliams: I can't work on this, I don't have access to visual studio -Tests return the number of errors encountered -CMake and build.sh scripts work fine, SCons and VS builds likely broken -CMake flags now distinguished between compiler flags (for all compilers) and fortran specific compiler flags
-Fixes jacobwilliams#30: CMake tests 3 and 8 fail -Fixes jacobwilliams#49: tests dir should be under src -Maybe addresses jacobwilliams#27... I'll leave that up to @jacobwilliams -maybe concludes jacobwilliams#42... -SCons build works and runs test with `scons test` -Probably breaks visual studio build, @jacobwilliams: I can't work on this, I don't have access to visual studio -Tests return the number of errors encountered -CMake and build.sh scripts work fine, VS build likely broken -CMake flags now distinguished between compiler flags (for all compilers) and fortran specific compiler flags -Small CMake bug fixed where CMake wasn't passing the requested GNU specific flags -CMake and build.sh have added options to compile for code coverage analysis with gcov when using GNU compiler
-Fixes jacobwilliams#30: CMake tests 3 and 8 fail -Fixes jacobwilliams#49: tests dir should be under src -Maybe addresses jacobwilliams#27... I'll leave that up to @jacobwilliams -maybe concludes jacobwilliams#42... -SCons build works and runs test with `scons test` -Probably breaks visual studio build, @jacobwilliams: I can't work on this, I don't have access to visual studio -Tests return the number of errors encountered -CMake and build.sh scripts work fine, VS build likely broken -CMake flags now distinguished between compiler flags (for all compilers) and fortran specific compiler flags -Small CMake bug fixed where CMake wasn't passing the requested GNU specific flags -CMake and build.sh have added options to compile for code coverage analysis with gcov when using GNU compiler
-Fixes jacobwilliams#30: CMake tests 3 and 8 fail -Fixes jacobwilliams#49: tests dir should be under src -Maybe addresses jacobwilliams#27... I'll leave that up to @jacobwilliams -maybe concludes jacobwilliams#42... -SCons build works and runs test with `scons test` -Probably breaks visual studio build, @jacobwilliams: I can't work on this, I don't have access to visual studio -Tests return the number of errors encountered -CMake and build.sh scripts work fine, VS build likely broken -CMake flags now distinguished between compiler flags (for all compilers) and fortran specific compiler flags -Small CMake bug fixed where CMake wasn't passing the requested GNU specific flags -CMake and build.sh have added options to compile for code coverage analysis with gcov when using GNU compiler
-Fixes jacobwilliams#30: CMake tests 3 and 8 fail -Fixes jacobwilliams#49: tests dir should be under src -Maybe addresses jacobwilliams#27... I'll leave that up to @jacobwilliams -maybe concludes jacobwilliams#42... -SCons build works and runs test with `scons test` -Probably breaks visual studio build, @jacobwilliams: I can't work on this, I don't have access to visual studio -Tests return the number of errors encountered -CMake and build.sh scripts work fine, VS build likely broken -CMake flags now distinguished between compiler flags (for all compilers) and fortran specific compiler flags -Small CMake bug fixed where CMake wasn't passing the requested GNU specific flags -CMake and build.sh have added options to compile for code coverage analysis with gcov when using GNU compiler
-Fixes jacobwilliams#30: CMake tests 3 and 8 fail -Fixes jacobwilliams#49: tests dir should be under src -Maybe addresses jacobwilliams#27... I'll leave that up to @jacobwilliams -maybe concludes jacobwilliams#42... -SCons build works and runs test with `scons test` -Probably breaks visual studio build, @jacobwilliams: I can't work on this, I don't have access to visual studio -Tests return the number of errors encountered -CMake and build.sh scripts work fine, VS build likely broken -CMake flags now distinguished between compiler flags (for all compilers) and fortran specific compiler flags -Small CMake bug fixed where CMake wasn't passing the requested GNU specific flags -CMake and build.sh have added options to compile for code coverage analysis with gcov when using GNU compiler
-Fixes jacobwilliams#30: CMake tests 3 and 8 fail -Fixes jacobwilliams#49: tests dir should be under src -Maybe addresses jacobwilliams#27... I'll leave that up to @jacobwilliams -maybe concludes jacobwilliams#42... -SCons build works and runs test with `scons test` -Probably breaks visual studio build, @jacobwilliams: I can't work on this, I don't have access to visual studio -Tests return the number of errors encountered -CMake and build.sh scripts work fine, VS build likely broken -CMake flags now distinguished between compiler flags (for all compilers) and fortran specific compiler flags -Small CMake bug fixed where CMake wasn't passing the requested GNU specific flags -CMake and build.sh have added options to compile for code coverage analysis with gcov when using GNU compiler
Close? Or to ask it differently, what needs to happen for this issue to be resolved? |
Let's keep open. Now that there's a good system in place, I'm going to add some more unit test. |
I put this comment regarding a better way to deal with stuff in the
|
Agreed. Ideally, it should be completely automated. |
I think we should either create subdirectories of the files directory named |
I just added a page to the wiki to track the procedures that aren’t called in any of the unit tests. Ideally, tests will be added in the future to address all issues there, and the wiki updated, to reflect the progress. |
Agree. One thing that shouldn't happen (that currently does), is files committed in the repo shouldn't be overwritten in place by the unit tests. That seems like bad practice. The "truth" files should be in one dir, and the unit test outputs generated in another, then compared. Great idea for the wiki. Definitely will work on getting all these routines tested. |
I updated the page on the wiki with the output of the FoBiS.py gcov analyzer markdown. I manually edited some of it and moved things around, but I think we could get this to auto-deploy in the future if that interests you, the same way we auto-deploy the ROBODoc documentation. Then, we could have a slightly nicer coverage display page than the one coveralls uses, with he breakdown of covered and uncovered procedures. Also, PR #86 address the issue wherein tests overwrite files committed to the repo. |
Here is a link to the updated wiki page with the test coverage: https://github.com/jacobwilliams/json-fortran/wiki/Coverage-Analysis |
The gcov analyzer in FoBiS.py is very young. If you want to use it, I can introduce any feature you want, e.g. for customizing the report theme and/or reports comments. Let me know of any features you like. See you soon. |
One thing that would be nice is to make the uncovered procedures report come before the covered procedure report, since they are more important to test. Also I customized the colors for the pie charts (green = covered = good, red = uncovered = bad!) but in general I think the output is great as is. |
Tomorrow, I will try to push a new version with customizable colors and with inverted order of covered/uncovered. See you soon. |
@jacobwilliams I’m wondering if we should close this given the decent test coverage we’re getting… we could always open a new issue regarding improving test coverage to some target, but having an issue that’s just “unit tests” makes it seem like there aren’t any and that the project doesn’t have good QA measures. |
Fair enough. Yes, we can continue to add to them. |
Need some rigorous unit tests.
The text was updated successfully, but these errors were encountered: