[erlang-questions] common_test Automatic Naming
Thu Dec 10 11:38:04 CET 2009
Thanks a lot for the input! I'll take your suggestions into
consideration and put it on the Common Test to-do-list.
Jayson Vantuyl wrote:
> Options, in order of my preference, would be:
> 1. Options 3, 4, and 6.
> 2. Options 3 and 4.
> 3. An option in the module itself. Perhaps in a comment, a.l.a edoc. This could end up being used by edoc for indexes as well, so maybe it would be best to ask whoever is responsible for that if they care.
> 4. Change it so that if the top-level-dir is lib, it will try the next directory up. This is more "hopeful heuristics", but I don't think it would be bad. It seems like "lib" can't ever be what somebody wants, right? :/
> 5. Don't try to be smart about the top-level-dir at all. Backwards incompatible, but I'd be willing to be nobody cares.
> 6. A pluggable function, switchable with an option to run_test.
> On Dec 9, 2009, at 6:27 AM, Peter Andersson wrote:
> > The thought behind the naming scheme is that the directory on the level
> > above the test object directory is one that might represent a group of
> > test objects (not necessarily OTP applications under lib), and for that
> > reason is useful to include in the test name (i.e. it's included in the
> > name because it *could* be useful info, not because it's necessary).
> > Test names are described in the User's Guide (6.9 Log files), but it's
> > not explained there *why* "TopLevelDir" is part of the name (noted).
> > Maybe we could make it possible to configure the naming scheme in some
> > practical way, or at least make it optional to exclude the top level
> > directory in the test name. Or? What kind of override mechanism would
> > you prefer to see in a future version of Comon Test?
> > /Peter
> > Ericsson AB, Erlang/OTP
> > Jayson Vantuyl wrote:
> >> So, when I let common_test generate its HTML output, I get these names for my modules.
> >> I've got them in an Erlang-style libdir. So module foo comes out as lib.foo and has its tests at lib/foo-X.Y.Z/test/something_SUITE.erl.
> >> After doing some detective work, I determined that the name is generated by ct_run:get_name/1. I see that it appears to take the two directory names above the test directory as the name of the suite. What is the rationale behind this naming? Is there somewhere else I should put my tests? Is it ever going to be possible to override this naming scheme?
> >> Thanks,
More information about the erlang-questions