{"action":"created","issue":{"url":"https://api.github.com/repos/robotframework/robotframework/issues/2874","repository_url":"https://api.github.com/repos/robotframework/robotframework","labels_url":"https://api.github.com/repos/robotframework/robotframework/issues/2874/labels{/name}","comments_url":"https://api.github.com/repos/robotframework/robotframework/issues/2874/comments","events_url":"https://api.github.com/repos/robotframework/robotframework/issues/2874/events","html_url":"https://github.com/robotframework/robotframework/issues/2874","id":333621082,"node_id":"MDU6SXNzdWUzMzM2MjEwODI=","number":2874,"title":"${TEST MESSAGE} set by Set Test Message is overwritten if any keyword in Test Teardown fails","user":{"login":"muige","id":16757987,"node_id":"MDQ6VXNlcjE2NzU3OTg3","avatar_url":"https://avatars1.githubusercontent.com/u/16757987?v=4","gravatar_id":"","url":"https://api.github.com/users/muige","html_url":"https://github.com/muige","followers_url":"https://api.github.com/users/muige/followers","following_url":"https://api.github.com/users/muige/following{/other_user}","gists_url":"https://api.github.com/users/muige/gists{/gist_id}","starred_url":"https://api.github.com/users/muige/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/muige/subscriptions","organizations_url":"https://api.github.com/users/muige/orgs","repos_url":"https://api.github.com/users/muige/repos","events_url":"https://api.github.com/users/muige/events{/privacy}","received_events_url":"https://api.github.com/users/muige/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-06-19T10:58:18Z","updated_at":"2018-06-20T09:45:48Z","closed_at":"2018-06-20T09:27:23Z","author_association":"NONE","body":"RF 3.0\r\nI've been trying to use `Set Test Message` keyword in Test Teardown, but RF seems to overwrite the ${TEST MESSAGE} if any of the Test Teardown keyword fail. I've even tried to use the keyword as the last one in Test Teardown.\r\n\r\nAlso, keywords failing in Suite Teardown might also overwrite the ${TEST MESSAGE}, but I haven't been able to catch this 100% accurately.\r\n\r\nThe documentation for `Set Test Message` isn't that clear about how it works in this regard:\r\n_In test teardown this keyword can alter the possible failure message, but otherwise failures override messages set by this keyword. Notice that in teardown the message is available as a built-in variable ${TEST MESSAGE}._\r\n\r\nReasoning, why this is a problem:\r\nPart of my test environment is a windows process that might crash suddenly. The crash will manifest itself as multiple different error messages (maybe 5-10). In a \"bad\" test run, there might be over 100 failing test cases and the CI system (TeamCity) shows the test message string as the stacktrace. When analyzing the test results we need to go over the failing test cases separately and currently it's manual work and with 100 failing tests takes a long time. \r\n\r\nSo, what we are trying is to check in Test Teardown if the process fail and prefix the ${TEST MESSAGE} with a common string. This way we would be able to script and regex easily the failing test that are because of the process crashing from the \"real\" test failures."},"comment":{"url":"https://api.github.com/repos/robotframework/robotframework/issues/comments/398690370","html_url":"https://github.com/robotframework/robotframework/issues/2874#issuecomment-398690370","issue_url":"https://api.github.com/repos/robotframework/robotframework/issues/2874","id":398690370,"node_id":"MDEyOklzc3VlQ29tbWVudDM5ODY5MDM3MA==","user":{"login":"muige","id":16757987,"node_id":"MDQ6VXNlcjE2NzU3OTg3","avatar_url":"https://avatars1.githubusercontent.com/u/16757987?v=4","gravatar_id":"","url":"https://api.github.com/users/muige","html_url":"https://github.com/muige","followers_url":"https://api.github.com/users/muige/followers","following_url":"https://api.github.com/users/muige/following{/other_user}","gists_url":"https://api.github.com/users/muige/gists{/gist_id}","starred_url":"https://api.github.com/users/muige/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/muige/subscriptions","organizations_url":"https://api.github.com/users/muige/orgs","repos_url":"https://api.github.com/users/muige/repos","events_url":"https://api.github.com/users/muige/events{/privacy}","received_events_url":"https://api.github.com/users/muige/received_events","type":"User","site_admin":false},"created_at":"2018-06-20T09:45:48Z","updated_at":"2018-06-20T09:45:48Z","author_association":"NONE","body":"I know I'm beating a dead horse here, but I don't now understand the `Set Test Message` keyword at all. If it is meant only for RF's internal use why not remove it or at least improve the documentation to state something like: \"This keyword will be overwritten by the framework, if either the Test Teardown or possible Suite Teardown fail\"."}}
{"actor":{"display_login":"muige"}}