[erlang-questions] How to get at data_dir from all/0 and groups/0 callbacks in common_test

Lukas Larsson garazdawi@REDACTED
Thu Jan 2 12:23:20 CET 2014


Unfortunately I don't think there is a way to do this. We've been talking
for a long time about adding someway to generate and parameterize testcases
for common_test, but so far there has not been enough time available to
come up with a good solution. I would not consider it bad form at all to
want to do this, but it is quite awkward with the currently available

You could (not saying it is a good or future compatible approach) use the
location of the current ?MODULE to calculate the location of the _data dir.


On Sun, Dec 15, 2013 at 9:46 PM, Peer Stritzinger <peerst@REDACTED> wrote:

> I'd like to auto-generate my testcases from the files found in the
> data_dir.
> Unfortunately I don't get passed a Config in my all/0 and groups/0
> testsuite callbacks.
> Is there another way of obtaining the path to data_dir in these callbacks?
> Or is it considered bad form to generate testcases from the files in
> data_dir (I could still iterate over the files in data_dir in single
> testcases whicht would do the same but have much worse reporting)
> Cheers,
> -- Peer
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140102/ab4747cf/attachment.htm>

More information about the erlang-questions mailing list