rebar3 icon indicating copy to clipboard operation
rebar3 copied to clipboard

Common Test SUITE template

Open max-au opened this issue 5 years ago • 10 comments

Contains boilerplate code and a few hints how Common Tests are to be used

max-au avatar May 09 '19 04:05 max-au

I finished one yesterday too and forgot to open it. it adds additional functionality to rebar3 new one minute.

tsloughter avatar May 09 '19 13:05 tsloughter

Personally not a fan of so many comments in a template. But I'm fine with being out voted on it and then we can just merge our PRs #2072 :)

tsloughter avatar May 09 '19 13:05 tsloughter

Personally not a fan of so many comments in a template.

Comments are great if it is the first time you see a template, but when it is the 100th they are just in the way. So IMO it depends on whether you want to help first time users or experienced developers more.

garazdawi avatar May 10 '19 13:05 garazdawi

@garazdawi my thoughts exactly. I figure the first time the user can use http://erlang.org/doc/apps/common_test/example_chapter.html

We could put a link to that in the template at the top. Or in the new usage output that is added in my PR.

tsloughter avatar May 10 '19 13:05 tsloughter

Agree, comments should be removed, let me update it. Not sure about export_all though, and compiler warning suppression.

max-au avatar May 10 '19 13:05 max-au

I'm more open to the comments than I am to a full list of functions :).

tsloughter avatar May 10 '19 14:05 tsloughter

@ferd @max-au I had a thought.

What if we added the CT suite with all the comments as a part of the app, lib and release/umbrella templates? So when the user generates a full project they get a detailed CT suite. But when generating a suite on its own a simpler template is used.

It looks like this one was updated to be simpler already so would be the one used in the latter?

tsloughter avatar Aug 27 '20 13:08 tsloughter

Yeah that sounds good to me. Showing to people where to put their tests in the initial template sounds good, and we can afford more docs into that one.

ferd avatar Aug 27 '20 13:08 ferd

I like this suggestion too. But I'm opposed to "export_all" (we had quite a history with it), and even more against suppressing the warning about it.

max-au avatar Aug 28 '20 23:08 max-au

@max-au can you revert to the original template you had and add it to the app.template, lib.template, escript.template, plugin.template, release.template and umbrella.template template files.

I'd prefer it included:

-compile(nowarn_export_all).
-compile(export_all).

But I suppose it doesn't have to.

tsloughter avatar Aug 31 '20 17:08 tsloughter