Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.
 

Testrail helper error

#1

Hi,
I have testrail API 0.38 installed. I am having trouble uploading test results in Testrail thru’ the tool I am using.
The error it gives is: testrail.helper.TestRailError: A user email must be set in environment variable. Please give suggestions on resolution of the same.

"
(env) softnas@ubuntu ~/Softnas/softnas.test (master) $python testrail_publisher.py --project 6 --run 515 --plan 512 --version 4.2.3.2097 --robotfile /home/softnas/Softnas/softnas.test/tests/robot/Smoke/vmware_smoke_test.robot --output /home/softnas/Softnas/softnas.test/tests/robot/Smoke/output.xml

  • Create General Purpose VMDK thin disk : PASS

  • Create pool on top VM disk via API : PASS

  • Create filesystem volume from pool on top VM disk via API : PASS

  • Create block device volume from pool on top VM disk via API : PASS

45426 - Perform data transfers to volume using NFS Exports : PASS

45427 - Perform data transfers to volume using CIFS shares : PASS

45428 - Connect to iSCSI target and transfer some data on it : PASS

  • Reboot instance and check that all Disks/Pools/Volumes/Exports/Shares/LUNs are intact : PASS

  • Remove all the devices : PASS

Traceback (most recent call last):

File "testrail_publisher.py", line 200, in <module>

platform= platform_name)

File "testrail_publisher.py", line 13, in report_testrail

tr = TestRail(project_id=project_id)

File "/home/softnas/Softnas/softnas.test/env/local/lib/python2.7/site-packages/testrail/client.py", line 24, in init

self.api = API(email=email, key=key, url=url)

File "/home/softnas/Softnas/softnas.test/env/local/lib/python2.7/site-packages/testrail/api.py", line 118, in init

config = self._conf()

File "/home/softnas/Softnas/softnas.test/env/local/lib/python2.7/site-packages/testrail/api.py", line 149, in _conf

‘~/.testrail.conf’)

testrail.helper.TestRailError: A user email must be set in environment variable TESTRAIL_USER_EMAIL or in ~/.testrail.conf

(env) softnas@ubuntu ~/Softnas/softnas.test (master) $
"

0 Likes

#2

Hi Vikram,

Thanks for the post. Unfortunately, this error appears to be from a third-party Python script. Is your team using the Python code provided by Travis Pavek?

If so, we would recommend reviewing the documentation provided with the script for assistance or reaching out to the creator for support with this error message.

Regards,
Jon

0 Likes

#3

Thank you Jon. I was able to solve it with Python 2.7 itself. It required configuration of testrail.conf with some parameters.

1 Like