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

Print out only the test cases name #3478

Closed
Formartha opened this issue May 16, 2018 · 4 comments
Closed

Print out only the test cases name #3478

Formartha opened this issue May 16, 2018 · 4 comments
Labels
type: question general question, might be closed after 2 weeks of inactivity

Comments

@Formartha
Copy link

Hi folks,
I wanted to know if there is a way print to terminal only the name of the tests and not the path.to.module:testname.

@pytestbot
Copy link
Contributor

GitMate.io thinks possibly related issues are #190 (Naming test methods "setup" causes different behavior), #1602 (pytest.print()), #1123 (does pytest support to this way to collect test cases?), #640 (Easy way to spit out all the failing test names as plain text), and #2317 (Dependency between tests).

@RonnyPfannschmidt RonnyPfannschmidt added the type: question general question, might be closed after 2 weeks of inactivity label May 16, 2018
@RonnyPfannschmidt
Copy link
Member

by default there is not, if you describe your use-case a bit in more detail we might be able to provide you with a solution or at least a path to one

@Formartha
Copy link
Author

Hi @RonnyPfannschmidt,
So, it's pretty hard to understand what happened in Jenkins because of the structure of printout in pytest.
for example :

09:23:22 testsuite/integration/aai/test_aai_model_loader_check_ingestion.py::TestAaiModel::test_retrieve_model PASSED [ 3%]
09:24:29 testsuite/integration/aai/test_aai_ncso_adapter_add_topology.py::TestAaiNcsoAdapterTopologyAdd::test_ncso_adapter_ncso_topoolgy PASSED [ 6%]
09:24:34 testsuite/integration/ncso/authorization/test_3595_authorization_prohibit_use_of_x_last_passwords.py::test_3595_authorization_prohobit_use_of_x_last_passwords PASSED [ 9%]
09:24:35 testsuite/integration/ncso/authorization/test_ncso_invalid_login.py::test_ncso_invalid_login PASSED [ 12%]
09:24:39 testsuite/integration/ncso/data_store/test_4469_gds_crud.py::test_4469_gds_crud PASSED [ 16%]
09:25:32 testsuite/integration/ncso/operability/test_2809-cloudmanager_add_plugins_both.py::test_2809_cloudmanager_add_plugins_both PASSED [ 19%]

That's not readable, I would wish to see the following :

test_ncso_adapter_ncso_topoolgy PASSED [ 6%]
test_3595_authorization_prohobit_use_of_x_last_passwords PASSED [ 9%]
test_ncso_invalid_login PASSED [ 12%]
test_4469_gds_crud PASSED [ 16%]
test_2809_cloudmanager_add_plugins_both PASSED [ 19%]

@nicoddemus
Copy link
Member

If we still want to pursue this we probably should open a new issue with a concrete proposal. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: question general question, might be closed after 2 weeks of inactivity
Projects
None yet
Development

No branches or pull requests

4 participants