GithubHelp home page GithubHelp logo

Comments (14)

mcaballero-coding avatar mcaballero-coding commented on August 14, 2024 1

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.

bitcoder avatar bitcoder commented on August 14, 2024

Can you try to increase the timeout using the -t argument and see if that works?

from trcli.

mcaballero-coding avatar mcaballero-coding commented on August 14, 2024

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.

bitcoder avatar bitcoder commented on August 14, 2024

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.

mcaballero-coding avatar mcaballero-coding commented on August 14, 2024

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.

mcaballero-coding avatar mcaballero-coding commented on August 14, 2024

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.

bitcoder avatar bitcoder commented on August 14, 2024

what host is that one "my_host.testrail.io"?

from trcli.

Shubham22100 avatar Shubham22100 commented on August 14, 2024

I am same issue while uploading test results . can anyone assist here . i have started new discussion also #255

from trcli.

mcaballero-coding avatar mcaballero-coding commented on August 14, 2024

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:

  1. 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 ... '
  2. 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.

Shubham22100 avatar Shubham22100 commented on August 14, 2024

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.

Shubham22100 avatar Shubham22100 commented on August 14, 2024

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.

mcaballero-coding avatar mcaballero-coding commented on August 14, 2024

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.

Shubham22100 avatar Shubham22100 commented on August 14, 2024

How to use prints or prints the more details . Can you give me query and command?

from trcli.

mcaballero-coding avatar mcaballero-coding commented on August 14, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.