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

Improve Error message of Safeloader #5655

Open
Tracked by #5656
richtja opened this issue Apr 19, 2023 · 0 comments
Open
Tracked by #5656

Improve Error message of Safeloader #5655

richtja opened this issue Apr 19, 2023 · 0 comments
Labels
customer:Passt Requirements/issues raised by the Passt project enhancement

Comments

@richtja
Copy link
Contributor

richtja commented Apr 19, 2023

Is your feature request related to a problem? Please describe.
Right now, when the safeloader is not able to load tests from the test file, it doesn't provide any information about why tests were not found. This might be problematic when test writer make mistake like badly named test methods like this:

#! /usr/bin/python3

from avocado import Test

class MyTest(Test):
    def firsttest(self):
        pass

    def secondtest(self):
        assert False

with this example, the user doesn't have any information for debugging this problem:

avocado -V list test.py
Type Test Tag(s)

Resolver             Reference          Info
avocado-instrumented /tmp/wrong_test.py
golang               /tmp/wrong_test.py go binary not found
python-unittest      /tmp/wrong_test.py
robot                /tmp/wrong_test.py File "/tmp/wrong_test.py" does not end with ".robot"
exec-test            /tmp/wrong_test.py File "/tmp/wrong_test.py" does not exist or is not executable
tap                  /tmp/wrong_test.py File "/tmp/wrong_test.py" does not exist or is not executable

TEST TYPES SUMMARY
==================

Describe the solution you'd like
Let's provide more information form safeloader to debug this problem, something like this.

avocado -V list test.py
Type Test Tag(s)

Resolver             Reference          Info
avocado-instrumented /tmp/wrong_test.py no methods called `test_*`
golang               /tmp/wrong_test.py go binary not found
python-unittest      /tmp/wrong_test.py
robot                /tmp/wrong_test.py File "/tmp/wrong_test.py" does not end with ".robot"
exec-test            /tmp/wrong_test.py File "/tmp/wrong_test.py" does not exist or is not executable
tap                  /tmp/wrong_test.py File "/tmp/wrong_test.py" does not exist or is not executable

TEST TYPES SUMMARY
====
@richtja richtja added the customer:Passt Requirements/issues raised by the Passt project label May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer:Passt Requirements/issues raised by the Passt project enhancement
Projects
Status: Long Term (Next Q) Backlog
Development

No branches or pull requests

1 participant