allankp / pytest-testrail

pytest plugin for integration with TestRail, for creating testruns and updating results
MIT License
95 stars 125 forks source link

Comment(custom_comment) is not added when tests are "Passed" #148

Open VirgiliusMaximus opened 3 years ago

VirgiliusMaximus commented 3 years ago

Describe the bug Comment is not added to TestRail when tests are marked as "Passed" only when are "Failed" Tried with config file and also using: py.test --testrail --tr-config=<settings file>.cfg --tc-custom-comment="mycomment"

My config:

[API]
url = https://my_testrail_address/
email = my@email.com
password = my_pass

[TESTRUN]
assignedto_id = 1
project_id = 4
suite_id = 729
plan_id = 1301

[TESTCASE]
custom_comment = 'mycomment'

To Reproduce Steps to reproduce the behavior:

  1. Mark in your python tests some pass and fail tests, e.g:
    @testrail('C21976')
    def my_test():
    my_pass_test_here
    @testrail('C21977')
    def my_test():
    my_fail_test_here

    Note: C21976, C21977 is your case ID's from TestRail

Expected behavior Custom comment should be added in TestRail no matter of the test result(pass/fail).

Screenshots image image

Desktop (please complete the following information):

VStoilovskyi commented 2 years ago

@VirgiliusMaximus Not sure if it is a bug, current behavior is to post comment message on failure only(Custom message or received from pytest runner). It's not a big problem to change this behavior I guess, but need to discuss with @allankp at least