Comments (14)
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.
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.
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.
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.
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.
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.
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.
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.
from trcli.
C:\Path\To\Your\Python\Directory\python.exe -m pip install --upgrade trcli
@d-rede this should be added to readme.
from trcli.
from trcli.
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.
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.
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)
- support Robot Framework 7.0 new output.xml format HOT 1
- --case-fields not working when I attempt to push data to some of the fields (i.e. Type, custom-field in Testrail ) HOT 7
- Test plan name for test runs HOT 3
- unable to import results for test cases having a very long title HOT 2
- Test plan name for test runs HOT 3
- Set automation_id case field when using --case-matcher: "property" HOT 1
- TRCLI failed on the ci cd HOT 5
- not able to upload results when report contains some chars in comment HOT 5
- Parsing testrail_case_field in Junit XML fails when using value but text is not empty
- Unable to parse field title in TestRailCase tag. Title is empty. HOT 15
- Please add parsing "Elapsed" time to parse_robot command. HOT 6
- Empty sections created while using matching based on automation_id
- Empty sections created while using matching based on automation_id HOT 1
- Network error when importing test case from a specific test suite HOT 4
- Connection error while uploading test results HOT 14
- 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
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.