Closed mwhit74 closed 7 years ago
A more detailed look at what unit tests need to written.
user_input.py tests
output.py tests I'm not sure if this needs explicit testing. Will evaluate in the future. May happen after version 1.0
mlob.py tests
[ ] node_location
[ ] add_trailing_load
[ ] get_axle_num
[ ] get_abs_axle_location
[ ] move_axle
[ ] calc_load_and_loc
[ ] calc_pier_reaction
[ ] calc_reactions
[ ] calc_shear
[ ] calc_moment
[ ] envelope_moment
[ ] envelope_shear
[ ] generate copy of arema load table w/ % diff -this will take some time to run, has to run all the cases for different lengths.
Didn't take the time to figure out how to spoof the user input testing. For v1.0 we are going to rely on the user being able to input the information correctly. It appears to work with the examples I have run on it.
There are multiple tests for each of the mlob related tests. These are the "basic" tests. I tested the functions by creating an excel file to mimic each function and ran the same input in the program and in the excel. I started with an independent excel for each function and ended up linking them all together. It's no mlob but it works for testing and may be useful to the user to understand what is going on.
Finally I wrote the test to compare program results with AREMA Table values. This was not as hard as I thought it was going to be. It takes about 15 minutes to run on my laptop. I used a lot of the code from this test to implement a user verification function on the production so the user can quickly and easily verify the accuracy of the program for themselves.
Add unit testing for mlob.