Skip to content
This repository has been archived by the owner on Oct 15, 2022. It is now read-only.

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

Open
VirgiliusMaximus opened this issue May 12, 2021 · 1 comment
Open

Comments

@VirgiliusMaximus
Copy link

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 VirgiliusMaximus changed the title Comment(custom comment) is not added when tests are "Passed" Comment(custom_comment) is not added when tests are "Passed" May 12, 2021
@VStoilovskyi
Copy link

@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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants