reportportal / agent-Python-RobotFramework

Robot Framework integration for Report Portal
Apache License 2.0
59 stars 32 forks source link

Status is not displayed at prent level and Defect_type is null #58

Closed TestUserRobot closed 2 years ago

TestUserRobot commented 4 years ago

Packages: reportportal-client==5.0.2 robotframework-reportportal==5.0.1 robotframework==3.1.2

Here is the structure of my robot framework tests.

TestSuits
    -- Folder1
        -- suite1.robot
        -- suite2.robot
        -- __init__.robot ( With setup and Teardown)
    -- Folder2
        -- suite3.robot
        -- suite4.robot
        -- __init__.robot ( With setup and teardown)
    -- __init.robot ( With setup and Teardown)

Issues:

  1. [ ERROR ] Calling method start_keyword of listener robotframework_reportportal.listener failed: IndexError: list index out of range [ ERROR ] Calling method end_keyword of listener robotframework_reportportal.listener failed: IndexError: pop from empty list BUT, all the levels of the tests and logs are uploaded and launch completes successfully.
  2. I see that STATUS is null for all parent levels And STATUS is displayed only at TestCase level which are IN "TestSuite" files. As noted in https://github.com/reportportal/agent-Python-RobotFramework/issues/54 , updated the service.py as in 5.0.2 to STEP -> I see that STATUS is displayed at SUITE level , but not above that. 3) All the time, defect type is null 4) If all the TESTS are PASSED. Launch is IN_PROGRESS for ever.

And upon 'Force Finish' gives

Failed to force finish the launch: Unclassified error [org.hibernate.exception.SQLGrammarException: could not execute statement]
iivanou commented 4 years ago

@TestUserRobot Have you tried the latest code from the master branch?

iivanou commented 4 years ago
==============================================================================
Suite1 & Suite2                                                               
==============================================================================
Suite1 & Suite2.Suite1                                                        
==============================================================================
Suite1 & Suite2.Suite1.From Suite1 :: From 1 suite                            
==============================================================================
Suite1Test                                                            .in suite test 1 teardown
Suite1Test                                                            | PASS |
------------------------------------------------------------------------------
in suite 1 teardown
Suite1 & Suite2.Suite1.From Suite1 :: From 1 suite                    | PASS |
1 critical test, 1 passed, 0 failed
1 test total, 1 passed, 0 failed
==============================================================================
Suite1 & Suite2.Suite1                                                | PASS |
1 critical test, 1 passed, 0 failed
1 test total, 1 passed, 0 failed
==============================================================================
Suite1 & Suite2.Suite2                                                        
==============================================================================
Suite1 & Suite2.Suite2.From Suite2 :: From 1 suite                            
==============================================================================
Suite2Test                                                            .in suite test 2 teardown
Suite2Test                                                            | PASS |
------------------------------------------------------------------------------
in suite 1 teardown
Suite1 & Suite2.Suite2.From Suite2 :: From 1 suite                    | PASS |
1 critical test, 1 passed, 0 failed
1 test total, 1 passed, 0 failed
==============================================================================
Suite1 & Suite2.Suite2                                                | PASS |
1 critical test, 1 passed, 0 failed
1 test total, 1 passed, 0 failed
==============================================================================
Suite1 & Suite2                                                       | PASS |
2 critical tests, 2 passed, 0 failed
2 tests total, 2 passed, 0 failed
==============================================================================

image

Everything works well on my side with the code from the master branch.

TestUserRobot commented 4 years ago

Yes, I tried by cloning 'master' branch, it gives issue#4 as in my previous comments all the time. i.e. it is INPROGRESS for ever and displays

[ ERROR ] Calling method 'end_suite' of listener 'robotframework_reportportal.listener' failed: 

ResponseError: 5000: Unclassified error [org.hibernate.exception.SQLGrammarException: could not execute statement] 

at the end of the RUN.

TestUserRobot commented 4 years ago

image

TestUserRobot commented 4 years ago

Attached screenshot of my SUITS structure to be more accurate.

iivanou commented 4 years ago

Your suite structure does not make any impact on the code used in reporting.

suites]# tree
.
├── suite1
│   ├── from_suite1.robot
│   └── __init__.robot
└── suite2
    ├── from_suite2.robot
    └── __init__.robot

2 directories, 4 files

# robot --listener robotframework_reportportal.listener --variable RP_UUID:"xxx" --variable RP_ENDPOINT:"https://beta.demo.reportportal.io" --variable RP_LAUNCH:"ivan_ivanou_stats" --variable RP_PROJECT:"iivanou_personal" -b debug.log --loglevel DEBUG:INFO suites/
==============================================================================
Suites                                                                        
==============================================================================
Suites.Suite1                                                                 
==============================================================================
Suites.Suite1.From Suite1 :: From 1 suite                                     
==============================================================================
Suite1Test                                                            .in suite test 1 teardown
Suite1Test                                                            | PASS |
------------------------------------------------------------------------------
Suites.Suite1.From Suite1 :: From 1 suite                             | PASS |
1 critical test, 1 passed, 0 failed
1 test total, 1 passed, 0 failed
==============================================================================
in suite 1 teardown
Suites.Suite1                                                         | PASS |
1 critical test, 1 passed, 0 failed
1 test total, 1 passed, 0 failed
==============================================================================
Suites.Suite2                                                                 
==============================================================================
Suites.Suite2.From Suite2 :: From 1 suite                                     
==============================================================================
Suite2Test                                                            .in suite test 2 teardown
Suite2Test                                                            | PASS |
------------------------------------------------------------------------------
in suite 1 teardown
Suites.Suite2.From Suite2 :: From 1 suite                             | PASS |
1 critical test, 1 passed, 0 failed
1 test total, 1 passed, 0 failed
==============================================================================
in suite 2 teardown
Suites.Suite2                                                         | PASS |
1 critical test, 1 passed, 0 failed
1 test total, 1 passed, 0 failed
==============================================================================
Suites                                                                | PASS |
2 critical tests, 2 passed, 0 failed
2 tests total, 2 passed, 0 failed
==============================================================================

image

I won't be able to help you until you give something that can be reproduced.

TestUserRobot commented 4 years ago

Even the simple tests are failing with SQLGrammerException. I did migrate ReportPortal from 4.3 to 5.0 . Does it has anything to do with it ?

iivanou commented 4 years ago

Maybe. Let's redirect this question to @DzmitryHumianiuk

DzmitryHumianiuk commented 4 years ago

@pbortnik @Yumfriez rp migrated from v4.3 to v5.0

@TestUserRobot gets 5000 error on suite finish https://github.com/reportportal/agent-Python-RobotFramework/issues/58#issuecomment-612025508

DzmitryHumianiuk commented 4 years ago

a @TestUserRobot do you use /api/v1 or /api/v2 endpoint?

TestUserRobot commented 4 years ago

I am using Reportportal 5.0 and as per the debug logs, I see it is calling /api/v2.

HardNorth commented 2 years ago

@TestUserRobot Hello, from all I see in the thread you've unfortunately met a batch of issues and that's happened pretty while ago, that all these issues were fixed one-by-one. There is nothing in the latest versions of ReportPortal or our Robot Framework agent which can cause the same behavior (or I just don't know). I believe if you update on the latest ReportPortal version and the latest agent version all your troubles will go away.