Skip to content
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

Incorrect Docs for CT all/0 and groups/0 callback functions. #6951

Closed
robertoaloi opened this issue Mar 1, 2023 · 7 comments · Fixed by #7189
Closed

Incorrect Docs for CT all/0 and groups/0 callback functions. #6951

robertoaloi opened this issue Mar 1, 2023 · 7 comments · Fixed by #7189
Assignees
Labels
bug Issue is reported as a bug team:PS Assigned to OTP team PS

Comments

@robertoaloi
Copy link
Contributor

robertoaloi commented Mar 1, 2023

The docs for ct_suite seem to contain inconsistent information.
For example, the ct_test_def() definition does not include the ct_testcase_ref() option which, instead, is available.
The ct_testcase_ref() option is explicitly mentioned in the guide on how to write a test suite.
Same goes for ct_group_ref().

@robertoaloi robertoaloi added the bug Issue is reported as a bug label Mar 1, 2023
@robertoaloi
Copy link
Contributor Author

Additionally, the example at:

https://www.erlang.org/doc/apps/common_test/write_test_chapter.html#test-case-groups

should be wrapped in a list.

groups() -> {tests1, [], [{tests2, [], [t2a,t2b]},
                           {tests3, [], [t31,t3b]}]}.

@rickard-green rickard-green added the team:PS Assigned to OTP team PS label Mar 6, 2023
@u3s u3s self-assigned this Mar 15, 2023
@u3s
Copy link
Contributor

u3s commented Mar 15, 2023

Thanks. You might be right, I remember being confused when reading that part as well.

We will have a look, but it might take some time because of priorities.

@u3s
Copy link
Contributor

u3s commented Mar 29, 2023

@robertoaloi
Copy link
Contributor Author

Hi @u3s and thanks for looking at this.

That is correct, I meant ct_testcase_ref(). Updating the issue description for clarity.

@robertoaloi
Copy link
Contributor Author

Also updated the link to:

https://www.erlang.org/doc/apps/common_test/write_test_chapter.html#test-case-groups

Where you can see a reference to {testcase,TestCase,TCRepeatProps} (a ct_testcase_ref()).

@paulo-ferraz-oliveira
Copy link
Contributor

There's some history related to ct_suite here. For example, ct_group_ref is not exported (as a type), nor is ct_testcase_ref, which is probably why we chose to not have them in the doc.s, as per this comment. Not saying that we shouldn't look for a solution to address @robertoaloi's worries; just giving extra context/info. so an informed decision is made. 👍

@u3s u3s linked a pull request Apr 28, 2023 that will close this issue
@u3s
Copy link
Contributor

u3s commented Apr 28, 2023

I've attached a PR to address this issue.

I tried to follow previous agreements (and basically not use any of *_ref types in docs explicitly).

Same goes for ct_group_ref().

What do you mean by that?
I think that it is implicitly included in docs for Module:all/0 and is inline with concept selected in the past. Am I missing something?

@paulo-ferraz-oliveira - thanks for historical reference, it helped.

@u3s u3s closed this as completed in #7189 May 5, 2023
u3s added a commit that referenced this issue May 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is reported as a bug team:PS Assigned to OTP team PS
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants