octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

functions missing tests: goal of tests?


From: mike sander
Subject: functions missing tests: goal of tests?
Date: Sun, 12 Jan 2014 22:03:00 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0


It has been asserted in a few threads recently that writing tests is a good entry point to octave development.

I have consulted some online resources to determine how to go about writing said tests. Specifically http://wiki.octave.org/Tests has some good information. I was thinking of tackling scripts wiithin scripts/general & scripts/miscellaneous as a starting point.

Software testing is a rather broad field. "write tests for untested functions" is a rather vague notion. I am trying to get my head around "what are the requirements?", "what needs to be tested"? etc. I am putting out a call for some guidance in this regard.

As i understand it, the tests within m files (and probably cc) are unit tests... and probably within the "grey box" testing category. ie. testing the code for various inputs to produce desired outputs, while having some knowledge of the inner workings of said code.

Given the above I believe the purpose of the tests with m files is to test correct behavior of these functions across a representative set of data types / data values. This includes returning an error for invalid inputs. Is this consistent with how other maintainers view m file tests? Should the tests include other criterion? An example could be 100% code coverage. Personally, I would include 100 % code coverage as a future goal.

Are there other requirements at a function level that I may be missing? Ideally tests should capture those as well. A link to said documentation would be appreciated.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]