---
# System prepended metadata

title: '#170037580 - Simulate Response Mapping'

---

# #170037580 - Simulate Response Mapping

https://www.pivotaltracker.com/story/show/170037580

## Scenario Test

```gherkin=
Feature: Simulate Response Mapping

Scenario Outline: Button Simulate Shown
Given user already on biller config page
When user go to tab : <tab>
And user add product type 
And user add response mapping
Then button simulate shown

Examples:
| tab      |
| inquiry  |
| purchase |
| advice   |
| reversal |
| stock    | 
| callback |

Scenario Outline: Simulate Success
Given user go to tab : <tab>
Given button simulate shown
When user click button simulate
And user choose content type : <content_type>
And user input valid content 
And user click button run
Then user get message : <message>
And user verify the result of response mapping

Examples:
| tab      | content_type | message               |
| inquiry  | json         | Simulate success!     |
| purchase | xml          | Simulate success!     |
| advice   | url          | Simulate success!     |
| reversal | json         | Simulate success!     |
| stock    | xml          | Simulate success!     |
| callback | url          | Simulate success!     |

Scenario Outline: Simulate Failed - Invalid Content
Given user go to tab : <tab>
Given button simulate shown
When user click button simulate
And user choose content type : <content_type>
And user input invalid content 
And user click button run
Then user get message : <message>

Examples:
| tab      | content_type | message               |
| inquiry  | json         | Invalid JSON          |
| purchase | xml          | EOF                   |
| advice   | url          | invalid parse content |
| reversal | json         | Invalid JSON          |
| stock    | xml          | EOF                   |
| callback | url          | invalid parse content |

Scenario Outline: Simulate Failed - Invalid Mapping
Given user go to tab : <tab>
Given button simulate shown
When user click button simulate
And user input invalid content mapping
And user click button run
Then user get message : <message>

Examples:
| tab      | message                                 |
| inquiry  | Simulate unsuccessfull, check error log |
| purchase | Simulate unsuccessfull, check error log |
| advice   | Simulate unsuccessfull, check error log |
| reversal | Simulate unsuccessfull, check error log |
| stock    | Simulate unsuccessfull, check error log |
| callback | Simulate unsuccessfull, check error log |

```