qase-tms / qase-python

Qase TMS Python SDK
https://developers.qase.io
26 stars 26 forks source link

"Listener supports loading configuration both from environment variables and from tox.ini file." #8

Closed OrrinGradwell closed 2 years ago

OrrinGradwell commented 2 years ago

How does one go about configuring from environment variables in RF and/or how do we make use of tox.ini? The details around this is not explained nor clearly documented anywhere.

Please advise.

OrrinGradwell commented 2 years ago

I have even set the variable globally and when I echo them out, I do get them back, but only running robot --listener qasio.robotframework.Listener test.... produces the following error.

[ ERROR ] Taking listener 'qaseio.robotframework.Listener' into use failed: Importing listener 'qaseio.robotframework.Listener' failed: Creating instance failed: ValueError: Token and Project code should be provided
Traceback (most recent call last):
  File "/home/orrin/.local/lib/python3.9/site-packages/qaseio/robotframework/__init__.py", line 147, in __init__
    raise ValueError("Token and Project code should be provided")

Just to note, when I run tho cli with all the parameters specifying the token, name, ids etc... then it works...

OrrinGradwell commented 2 years ago

Managed to get it going but now all runs create a blank test run in QASE...

Cases matching your criteria are not found.

Following the documentation, everything matches as per the given example and this is till not producing what I am expecting

1ivliev commented 2 years ago

@OrrinGradwell Hi! Have you tried configuring tox.ini (for example, in the example folder) as follows?

[qase]
qase_api_token=api_key
qase_project=project_code
qase_run_name=New Robot Framework Run
qase_debug=True

The launch is performed as follows in the test folder: robot --listener qaseio.robotframework.Listener someTest.robot In this case, the launch is successful, tests are performed and the results are published in Qase TMS.

OrrinGradwell commented 2 years ago

@1ivliev Hi, THrough trial and error I managed to resolve all my issues regarding the talkback from RF to QASE and it's working now... What I do want to know is if it's possible to send extra data through to QASE from RF, such as which environment it was executed on and possible attachments... If you can point me to some documentation, that would be great.

1ivliev commented 2 years ago

@OrrinGradwell Unfortunately, this functionality has not yet been implemented. You can create a feature request or vote for existing ones on the public roadmap website - https://roadmap.qase.io

OrrinGradwell commented 2 years ago

Perfect thank you