pytest-testrail icon indicating copy to clipboard operation
pytest-testrail copied to clipboard

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

Open VirgiliusMaximus opened this issue 3 years ago • 1 comments

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 = [email protected]
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):

  • OS: CentOS 7
  • Browser: chrome
  • Python version: 3.6.12
  • Pytest-testrail version : 2.9.0

VirgiliusMaximus avatar May 12 '21 12:05 VirgiliusMaximus

@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

VStoilovskyi avatar Jan 17 '22 12:01 VStoilovskyi