GithubHelp home page GithubHelp logo

Comments (14)

MattKiazyk avatar MattKiazyk commented on August 14, 2024

I've come to realize that adding a -v onto the call gives you a verbose log that tells you what the actual issue is or at least leads you in the right direction.

from trcli.

iloy1004 avatar iloy1004 commented on August 14, 2024

I've come to realize that adding a -v onto the call gives you a verbose log that tells you what the actual issue is or at least leads you in the right direction.

Thanks Matt,
I've got this details with -v as your suggestion. do you happen to have any idea why api returns 400? URL also seems incorrect as it ended "/add_case/None".

**** Found test cases not matching any TestRail case (count: 1) Adding missing test cases to the suite. Adding test cases: 0/1 **** API Call method: POST url: https://tactio.testrail.io/index.php?/api/v2/add_case/None payload: {'title': 'Dashboard Dashboard Changing groups', 'custom_automation_id': 'Dashboard Changing groups.Dashboard Dashboard Changing groups'} response status code: 400 response body: {'error': 'Field :section_id is not a valid ID.'}

from trcli.

d-rede avatar d-rede commented on August 14, 2024

Hello @iloy1004

Thanks for bringing this to our attention. Can you provide a sample of the report with which we can reproduce the issue?

from trcli.

JonathansDCI avatar JonathansDCI commented on August 14, 2024

I also have this issue @d-rede. This is my first time working with testRailCLI and I was working my way to get the automated creation of test cases creating a proof of concept. I had our Testrail Admin create a new fake Project that has the automation_id as a string on test cases. There are no test cases, runs, etc. on this project.
Test-Results.zip

**** API Call
method: POST
url: https://xxxxxxxx.testrail.net/index.php?/api/v2/add_case/0
payload: {'title': 'Test2', 'custom_automation_id': 'TestProject1.SmokeTests.Test2'}
response status code: 400
response body: {'error': 'Field :section_id is not a valid section.'}


Adding test cases: 0/2
Field :section_id is not a valid section.

from trcli.

Testinator-X avatar Testinator-X commented on August 14, 2024

I also have this issue @d-rede. This is my first time working with testRailCLI and I was working my way to get the automated creation of test cases creating a proof of concept. I had our Testrail Admin create a new fake Project that has the automation_id as a string on test cases. There are no test cases, runs, etc. on this project. Test-Results.zip

**** API Call method: POST url: https://xxxxxxxx.testrail.net/index.php?/api/v2/add_case/0 payload: {'title': 'Test2', 'custom_automation_id': 'TestProject1.SmokeTests.Test2'} response status code: 400 response body: {'error': 'Field :section_id is not a valid section.'}

Adding test cases: 0/2 Field :section_id is not a valid section.

I‘ve checked your import file

<testsuite name="ddm-api-beta.dll" tests="2" skipped="0" failures="1" errors="0" time="1.2098879999999999" timestamp="2023-02-21T18:57:23" hostname="JONATHANS-LT" id="0" package="ddm-api-beta.dll">

The id you provide is id="0" but the id should match a section id you have in your project. I‘m quite sure there is no section with an ID of 0. change the ID to a section that exists in your project and it should work.

I think it’s quite the same problem as described here #71

from trcli.

d-rede avatar d-rede commented on August 14, 2024

Hey everyone!

Using the id attributes coming from the XML report was in fact undesired behavior and a fix was applied in v1.4.3. The id attributes are no longer being considered for sections and suites.

Note: If you are using a multisuite project, you should use the --suite-id command line option to pass the id of the suite you want your test run created in.

from trcli.

JonathansDCI avatar JonathansDCI commented on August 14, 2024

My test results file was generated by https://github.com/spekt/junit.testlogger. I don't even know what a section id is.

from trcli.

d-rede avatar d-rede commented on August 14, 2024

Hi there @JonathansDCI

Can you install TestRail CLI version 1.4.3 and try importing your test results again? The issue with the IDs in the report should no longer occur.

from trcli.

JonathansDCI avatar JonathansDCI commented on August 14, 2024

from trcli.

Testinator-X avatar Testinator-X commented on August 14, 2024

C:\Path\To\Your\Python\Directory\python.exe -m pip install --upgrade trcli

@d-rede this should be added to readme.

from trcli.

JonathansDCI avatar JonathansDCI commented on August 14, 2024

from trcli.

Testinator-X avatar Testinator-X commented on August 14, 2024

Lucky you! My problem from #71 has not been fixed, although the ticket has been closed. (Or I still don't know how to work around the problem via command line. )

from trcli.

JonathansDCI avatar JonathansDCI commented on August 14, 2024

Reading your bug #71 there is two slightly different issues, your error is complaining that you have a string value vs an int for id="foobar suite". My bug, which they fixed, is that https://github.com/spekt/junit.testlogger is outputting that ID="0" but I don't use that field at all (at least in a bare bones demo project). When I generate a junit file through the nunit console and transform it like the Sample Project, the id doesn't get generated in the junit file.

I suspect that although, there was a code change to ignore Id in the parsing, I suspect that there is some schema/transform/validation thingy still active before ID is even parsed, thus your id = string is still a problem,

from trcli.

iloy1004 avatar iloy1004 commented on August 14, 2024

Hello @JonathansDCI and @d-rede , thank you for your comments. I apologize for not checking the thread for a while.

I resolved the issue by deleting some test cases in TestRail that I haven't developed scripts for in Cypress. Although I'm not entirely sure if this is the correct solution, the same command to send results to TestRail is now working fine after removing the extra test cases.

Previously, I added a few extra test cases to serve as guidelines when creating scripts, similar to blueprints. This resulted in the test suite having a greater number of test cases than what I actually implemented in the code.

It's still mystery for me why the error said section ID in that situation.

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.