-
Notifications
You must be signed in to change notification settings - Fork 517
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add ct-suite template #2072
base: main
Are you sure you want to change the base?
add ct-suite template #2072
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{description, "Common Test suite module"}. | ||
{variables, [ | ||
{name, "myapp", "Name of the Common Test suite to create"} | ||
]}. | ||
{template, "ct_suite.erl", "test/{{name}}_SUITE.erl"}. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
-module({{name}}_SUITE). | ||
|
||
-include_lib("common_test/include/ct.hrl"). | ||
-include_lib("stdlib/include/assert.hrl"). | ||
|
||
-compile(nowarn_export_all). | ||
-compile(export_all). | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Quite controversial discussion may start with this one. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you decide to keep |
||
|
||
suite() -> | ||
[]. | ||
|
||
all() -> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Including a dummy test would be good here 👌🏼 |
||
[]. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Probably not important, but indentation seems off here (5 v. 4). |
||
|
||
groups() -> | ||
[]. | ||
|
||
init_per_suite(Config) -> | ||
Config. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ... and here too (3 v. 4). |
||
|
||
end_per_suite(_Config) -> | ||
ok. | ||
|
||
init_per_group(_GroupName, Config) -> | ||
Config. | ||
|
||
end_per_group(_GroupName, _Config) -> | ||
ok. | ||
|
||
init_per_testcase(_Case, Config) -> | ||
Config. | ||
|
||
end_per_testcase(_Case, _Config) -> | ||
ok. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
myapp points what served as a copy-paste source ;-)