Comments (14)
I am not showing my real host name and username for privacy reasons.
However, i have managed to solve this issue. There was a proxy (from my company's side) that was blocking internet access to the testrail url, so there's nothing wrong with trcli.
Thank you for your help
from trcli.
Can you try to increase the timeout using the -t
argument and see if that works?
from trcli.
Hi @bitcoder , thanks for your answer. I tried incrementing the timeout (trcli -y --verbose -c "trcli-config.yml" -t 120 parse_junit -f "report.xml") but it returns the same error. The message error is printed instantly so I am guessing that this is not a timeout issue.
from trcli.
Hi @bitcoder , thanks for your answer. I tried incrementing the timeout (trcli -y --verbose -c "trcli-config.yml" -t 120 parse_junit -f "report.xml") but it returns the same error. The message error is printed instantly so I am guessing that this is not a timeout issue.
Can you share the complete output?
from trcli.
yes, this is it:
TestRail CLI v1.9.5
Copyright 2024 Gurock Software GmbH - www.gurock.com
Parser Results Execution Parameters
Report file: report.xml
Config file: trcli-config.yml
TestRail instance: https://my_host.testrail.io (user: [email protected])
Project: MY_PROJECT_NAME
Run title: Automated Test Run
Update run: No
Add to milestone: No
Auto-create entities: True
Parsing JUnit report.
Processed 28 test cases in section pytest.
Checking project.
**** API Call
method: GET
url: https://my_host.testrail.io/index.php?/api/v2/get_projects
**** API Call
method: GET
url: https://my_host.testrail.io/index.php?/api/v2/get_projects
**** API Call
method: GET
url: https://my_host.testrail.io/index.php?/api/v2/get_projects
**** API Call
method: GET
url: https://my_host.testrail.io/index.php?/api/v2/get_projects
Error detected while checking a project: 'Upload to TestRail failed due to a network error. Please make sure you have a valid network connection then try again.'
NOTE: i am not showing the real host name and username for privacy reasons.
from trcli.
In case it is helpful, doing some debugging i found that the error occurs at "__send_request()". It is a ConnectionError, which if printed (except ConnectionError as e: print(e)) says:
HTTPSConnectionPool(host='my_host.testrail.io', port=443): Max retries exceeded with url: /index.php?/api/v2/get_projects (Caused by ProxyError('Unable to connect to proxy', OSError('Tunnel connection failed: 403 Forbidden')))
Any idea on why this happens?
from trcli.
what host is that one "my_host.testrail.io"?
from trcli.
I am same issue while uploading test results . can anyone assist here . i have started new discussion also #255
from trcli.
I am same issue while uploading test results . can anyone assist here . i have started new discussion also #255
Hello @Shubham22100, I see you have a similar issue like i did. I solved it some time ago. My recommendations are:
- Look for more detail on the error. You can add "prints" to the trcli code so that it prints more detail. Also use the trcli command with "verbose", something like this: 'trcli -y --verbose ... '
- Make sure you don't have proxies that are limiting you network access. In my case this was the cause of the problem. My machine had some active proxies that my company installed that were limiting internet access to TestRail, so I basically asked them to remove them. You can do 'echo $http_proxy' and 'echo $https_proxy' in your terminal to see if you have these proxies.
Hope it helps
from trcli.
I have used trcli -n --verbose -c "trcli-config.yml" parse_junit --case-matcher "property" --suite-name "Smoke Testing Suite" -f "./test-results/junit-report.xml"
TestRail CLI v1.9.5
Copyright 2024 Gurock Software GmbH - www.gurock.com
Parser Results Execution Parameters
Report file: ./test-results/junit-report.xml
Config file: trcli-config.yml
Update run: No
Add to milestone: No
Auto-create entities: False
Parsing JUnit report.
Processed 1 test cases in section smokeTests\MusicGlE2E.Test.ts.
Checking project.
**** API Call
method: GET
url: https://lovullo.testrail.net/index.php?/api/v2/get_projects
**** API Call
method: GET
url: https://lovullo.testrail.net/index.php?/api/v2/get_projects
**** API Call
method: GET
url: https://lovullo.testrail.net/index.php?/api/v2/get_projects
**** API Call
method: GET
url: https://lovullo.testrail.net/index.php?/api/v2/get_projects
but still getting same error Error detected while checking a project: 'Upload to TestRail failed due to a network error. Please make sure you have a valid network connection then try again.'
from trcli.
Also I have try to run 'echo $http_proxy' and 'echo $https_proxy' in my terminal but nothing i am getting . it just return same http_proxy . Also checked with network team and they said u have access to test rail and i also can open manually and in browser.
from trcli.
Also I have try to run 'echo $http_proxy' and 'echo $https_proxy' in my terminal but nothing i am getting . it just return same http_proxy . Also checked with network team and they said u have access to test rail and i also can open manually and in browser.
Not really sure what could be the problem. You can do a ping and a curl (i think you need to use username and password for this) to TestRail from your machine to make sure you have access from there.
I also recommend you to read previous comments on this issue, for example those regarding the --t argument or the ProxyError that I was getting. If you puta some prints on the trcli code you could get more detail. In my case the error was ocurring at "__send_request()".
Other than that, let's hope that a person from TestRail can assist you with this. Hope you can solve it!
from trcli.
How to use prints or prints the more details . Can you give me query and command?
from trcli.
except ConnectionError as e: print(e)
I mean adding some prints at the .py scripts. In my case I added "except ConnectionError as e: print(e)" at the .py code of trcli, at the function "__send_request()".
from trcli.
Related Issues (20)
- Network error when importing test case from a specific test suite HOT 4
- Add options to import stdout/stderr from junit test as comment HOT 2
- not able to upload results when report contains some chars HOT 4
- Unable to update test results generated in junit format from pytest in CircleCI HOT 1
- Unable to update test results generated in junit format from Cypress in CircleCI
- With code first approach, trcli creates duplicates of test cases then chokes on deadlock trying to cleanup and fails
- Strict requirement on trcli requests version blocking requests update
- Support for sorting by test status when you have more than one test result being added to a single Test Case
- Add commands to create a new test run HOT 3
- Incorrect statuses mapping HOT 1
- Cypress Integration: KeyError: 'section_id' HOT 1
- No option to point to file path that contains a couple of reports or 1 report in 1 time
- Unable to use glob with junit, if there's only one file returned by the glob pattern
- Add possibility to update already created test case
- trcli fails to update existing suites, defaults to case duplication HOT 3
- TRCLI cannot update results to testrail website - custom_step_results is not a valid boolean
- Getting Deadlock error while uploading test results from trcli with junit(Deadlock found when trying to get lock; try restarting transaction)
- CLI command is not creating the testcese in Testrail in sequential Order. It is creating in uneven sequence. I have re-arrange them manually on testrail. HOT 4
- Test Run description wiped out when adding test results to test run
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from trcli.