-
-
Notifications
You must be signed in to change notification settings - Fork 4
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 tcms-api calls to pytest plugin. #30
Conversation
Running into a problem with XML-RPC client, protocol error 431, line too long. Still need to it work out and add testing. |
`=========================================================================================== test session starts =========================================================================================== tests/test_pytest_kiwitcms.py F =========================================================================================== 1 failed in 16.40s ============================================================================================ |
52ffdcf
to
20a9792
Compare
Let's start by using the same way to kick off the tests. I'm trying to start the plugin from the current git checkout without installing it (b/c I want to avoid installing every time something changes) with the following command:
and I do get a different result than you:
So am I starting the plugin correctly ? If no what's your command then ? |
@@ -76,3 +76,27 @@ def test_empty_variable(pytestconfig): | |||
result = testdir.runpytest("--kiwitcms", "-v") | |||
result.stderr.fnmatch_lines(["Exit: Option api_url is empty"]) | |||
assert result.ret == 1 | |||
|
|||
|
|||
def test_kiwitcms_pytest(testdir): |
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.
there are other test functions in this file which are using the config_test
fixture which contains the URL http://example.com
which is a real URL serving HTTP but nothing to do with Kiwi TCMS. Can that also be a source of your issues ?
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.
Not sure, will try this out as well.
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.
I don't think this is the issue
oh right, I am using |
OK, we've got to start speaking the same language here.
Explain how you setup your environment ? When I try executing this command I get:
The only way I can figure out how to do this is to actually install the plugin into the venv. Which means I have to install it every time when there's a change in the source code. Otherwise you will be running the installed version, not what is in the git checkout. So I need more details here.
Is that the error from your original comment that you are talking about? If that's the case formatting the traceback for readability will be mighty helpful.
What does "as expected" mean here? When I run this command I get a bunch of errors listed above. Are you getting the same errors or a different result? If different then what exactly ? |
I installed using
Yes, I'm constantly getting an error from the xmlrpc client
It looks like its failing whenever when trying to get the status Id of the test execution
Sorry, I should've been more clear, I meant when I run using Actually, I'm still not getting your result when I run using
|
OK, got it. IDK enough about editable mode installs but in any case we should strive for being able to run the plugin from source during CI & development. However this is probalby unrelated to the current error.
Your code seems to call
That hints to a problem with the remote API you are using. What's the Kiwi TCMS backend that you use, which version, how does your tcms.conf look like ? The actual reason for the 431 status code is explained here: In xmlrpc.client there is only 1 place where this error is raised so you could also debug that. |
For
When I run:
I get back this which seems fine. And as for the Kiwitcms version, I switched to the v8.9 tag which I assume is the latest stable version because of the issue I ran into that I had asked help for on Slack. My ~/.tcms.conf authenticated using the superuser ->
|
5cab447
to
7c4a67c
Compare
Hi, @atodorov I can't seem to be able to get past this error. I have tried running the Kiwitcms instance in docker container as well but haven't been able to get any progress and still getting the same error as running it on my host machine. And I can't find any reference to there being a limit to the length of a request body. Is it possible for me to use the public tenant to run the tests at the moment to see if the error happens there as well? |
Hi @atodorov, just wanted to check in on this. Is it possible to use the public tenant? |
All of the previous debug info looks good. You are using a local instance and seemingly you can query the backend and receive a result. So the issue must be on the py.test integration code. FTR There is already v9.0.1 which works with tcms-api 9.0. |
Can we start breaking up this PR and get some of the pieces merged. It will be easier when there are less moving parts. Commits 1 and 3 generally look good, I see only a few issues there. Should I comment here or you want to make another PR for them and adjust ? |
Yes, I don't see why not. Mind the versions though! See above for info. |
Rebase to latest and let's start solving this one piece by piece. |
Merged with changes as part of #40. |
Add tcms-api calls to pytest plugin to communicate and report test results Kiwi TCMS.
still wip.