{"action":"created","issue":{"url":"https://api.github.com/repos/intuit/karate/issues/594","repository_url":"https://api.github.com/repos/intuit/karate","labels_url":"https://api.github.com/repos/intuit/karate/issues/594/labels{/name}","comments_url":"https://api.github.com/repos/intuit/karate/issues/594/comments","events_url":"https://api.github.com/repos/intuit/karate/issues/594/events","html_url":"https://github.com/intuit/karate/issues/594","id":381107621,"node_id":"MDU6SXNzdWUzODExMDc2MjE=","number":594,"title":"Feature Request: retry mechanism","user":{"login":"thinkerou","id":4488261,"node_id":"MDQ6VXNlcjQ0ODgyNjE=","avatar_url":"https://avatars2.githubusercontent.com/u/4488261?v=4","gravatar_id":"","url":"https://api.github.com/users/thinkerou","html_url":"https://github.com/thinkerou","followers_url":"https://api.github.com/users/thinkerou/followers","following_url":"https://api.github.com/users/thinkerou/following{/other_user}","gists_url":"https://api.github.com/users/thinkerou/gists{/gist_id}","starred_url":"https://api.github.com/users/thinkerou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thinkerou/subscriptions","organizations_url":"https://api.github.com/users/thinkerou/orgs","repos_url":"https://api.github.com/users/thinkerou/repos","events_url":"https://api.github.com/users/thinkerou/events{/privacy}","received_events_url":"https://api.github.com/users/thinkerou/received_events","type":"User","site_admin":false},"labels":[{"id":534240660,"node_id":"MDU6TGFiZWw1MzQyNDA2NjA=","url":"https://api.github.com/repos/intuit/karate/labels/enhancement","name":"enhancement","color":"0052cc","default":true}],"state":"open","locked":false,"assignee":{"login":"ptrthomas","id":915480,"node_id":"MDQ6VXNlcjkxNTQ4MA==","avatar_url":"https://avatars0.githubusercontent.com/u/915480?v=4","gravatar_id":"","url":"https://api.github.com/users/ptrthomas","html_url":"https://github.com/ptrthomas","followers_url":"https://api.github.com/users/ptrthomas/followers","following_url":"https://api.github.com/users/ptrthomas/following{/other_user}","gists_url":"https://api.github.com/users/ptrthomas/gists{/gist_id}","starred_url":"https://api.github.com/users/ptrthomas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ptrthomas/subscriptions","organizations_url":"https://api.github.com/users/ptrthomas/orgs","repos_url":"https://api.github.com/users/ptrthomas/repos","events_url":"https://api.github.com/users/ptrthomas/events{/privacy}","received_events_url":"https://api.github.com/users/ptrthomas/received_events","type":"User","site_admin":false},"assignees":[{"login":"ptrthomas","id":915480,"node_id":"MDQ6VXNlcjkxNTQ4MA==","avatar_url":"https://avatars0.githubusercontent.com/u/915480?v=4","gravatar_id":"","url":"https://api.github.com/users/ptrthomas","html_url":"https://github.com/ptrthomas","followers_url":"https://api.github.com/users/ptrthomas/followers","following_url":"https://api.github.com/users/ptrthomas/following{/other_user}","gists_url":"https://api.github.com/users/ptrthomas/gists{/gist_id}","starred_url":"https://api.github.com/users/ptrthomas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ptrthomas/subscriptions","organizations_url":"https://api.github.com/users/ptrthomas/orgs","repos_url":"https://api.github.com/users/ptrthomas/repos","events_url":"https://api.github.com/users/ptrthomas/events{/privacy}","received_events_url":"https://api.github.com/users/ptrthomas/received_events","type":"User","site_admin":false}],"milestone":null,"comments":5,"created_at":"2018-11-15T10:58:20Z","updated_at":"2018-11-15T12:36:52Z","closed_at":null,"author_association":"NONE","body":"The follow code can correctly run now:\r\n\r\n    Feature:\r\n      Background:\r\n      * url 'url'\r\n          \r\n      Scenario:\r\n      * def input =\r\n      \"\"\"\r\n      {\r\n        'form': {},\r\n        'query': {},\r\n      }\r\n      \"\"\"\r\n      * path '/rest/n/test'\r\n      * params input.query\r\n      * form fields input.form\r\n      * method post\r\n      * status 200\r\n      * math response contains { result: 1 }\r\n      * eval if (response.result != 1) karate.call('delete-user.feature'))\r\n\r\nSo, I hope hope `retryPost` method which can retry-post the scenario (it can auto check status).\r\n\r\nor:\r\n\r\n    ...\r\n    * eval if (responseStatus == 5xx) retryPost/retryGet/retryPut\r\n    * eval if (response.result != 1) retryPost/retryGet/retryPut\r\n\r\nHere `retryPost/retryGet/retryPut` only re-run the section code.\r\n\r\nfor example:\r\n\r\n    Feature:\r\n      Background:\r\n      * url 'url'\r\n      \r\n      Scenario:\r\n      # section 1\r\n      ...\r\n      * method post\r\n      * eval if () retryPost # only re-run section 1\r\n\r\n      # section 2\r\n      ...\r\n      * method post\r\n      *eval if () retryPost # only re-run section 2\r\n\r\nThanks a lot!\r\n \r\n"},"comment":{"url":"https://api.github.com/repos/intuit/karate/issues/comments/439025991","html_url":"https://github.com/intuit/karate/issues/594#issuecomment-439025991","issue_url":"https://api.github.com/repos/intuit/karate/issues/594","id":439025991,"node_id":"MDEyOklzc3VlQ29tbWVudDQzOTAyNTk5MQ==","user":{"login":"ptrthomas","id":915480,"node_id":"MDQ6VXNlcjkxNTQ4MA==","avatar_url":"https://avatars0.githubusercontent.com/u/915480?v=4","gravatar_id":"","url":"https://api.github.com/users/ptrthomas","html_url":"https://github.com/ptrthomas","followers_url":"https://api.github.com/users/ptrthomas/followers","following_url":"https://api.github.com/users/ptrthomas/following{/other_user}","gists_url":"https://api.github.com/users/ptrthomas/gists{/gist_id}","starred_url":"https://api.github.com/users/ptrthomas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ptrthomas/subscriptions","organizations_url":"https://api.github.com/users/ptrthomas/orgs","repos_url":"https://api.github.com/users/ptrthomas/repos","events_url":"https://api.github.com/users/ptrthomas/events{/privacy}","received_events_url":"https://api.github.com/users/ptrthomas/received_events","type":"User","site_admin":false},"created_at":"2018-11-15T12:36:52Z","updated_at":"2018-11-15T12:36:52Z","author_association":"CONTRIBUTOR","body":"@thinkerou thanks :) but then people will expect a callback for normal `match` also.\r\n\r\ninstead of this, you can use `* configure afterScenario = function(){}` to alert users. but normally I think this is too much complexity and no-one uses it ^_^"}}
{"actor":{"display_login":"ptrthomas"}}