Systems and methods for simulation-based replay of integrated devices
A method of simulating device state changes in an integrated system includes receiving a transaction request from a client device, storing the transaction request as a first event in an event log, transmitting the transaction request to a terminal device, storing the transmission of the transaction request as a second event in the event log, receiving a device response from the terminal device, storing the device response as a third event in the event log, and when the integrated system is under test, a simulator replays the stored events in the integrated system under test.
1. A method of simulating interactions in a system under test including a first device and a second device, the method comprising:
obtaining a structured log of events associated with communications between the first device and the second device; and
simulating the interactions in the system under test using the structured log of events,
wherein the structured log of events includes a first event corresponding to an application programming interface (API) request provided by the first device to an API, and a second event corresponding to an API response provided by the API to the first device, and
wherein the structured log of events includes a third event corresponding to an API request provided by the API to the second device, and a fourth event corresponding to an API response provided by the second device to the API.
2. The method of claim 1 , wherein the first device is a point of sale (POS) device.
3. The method of claim 1 , wherein the second device is a personal identification number (PIN) pad.
4. The method of claim 1 , further comprising:
receiving a correlation identifier and the structured log of events; and
generating a test definition based on the correlation identifier and one or more events of the structured log of events.
5. The method of claim 4 , further comprising:
storing the test definition in a test repository.
6. The method of claim 4 , wherein each event of the structured log of events is correlated with the correlation identifier.
7. The method of claim 1 , further comprising:
logging the first event, the second event, the third event, and the fourth event; and
tagging the first event, the second event, the third event, and the fourth event with a correlation identifier.
8. The method of claim 1 , wherein the simulating the interactions in the system under test using the structured log of events comprises replaying the first event, the second event, the third event, and the fourth event.
9. A device for simulating interactions in a system under test including a first device and a second device, the device comprising:
a memory configured to store instructions; and
a processor configured to execute the instructions to perform operations comprising:
obtaining a structured log of events associated with communications between the first device and the second device; and
simulating the interactions in the system under test using the structured log of events,
wherein the structured log of events includes a first event corresponding to an application programming interface (API) request provided by the first device to an API, and a second event corresponding to an API response provided by the API to the first device, and
wherein the structured log of events includes a third event corresponding to an API request provided by the API to the second device, and a fourth event corresponding to an API response provided by the second device to the API.
10. The device of claim 9 , wherein the first device is a point of sale (POS) device.
11. The device of claim 9 , wherein the second device is a personal identification number (PIN) pad.
12. The device of claim 9 , wherein the operations further comprise:
receiving a correlation identifier and the structured log of events; and
generating a test definition based on the correlation identifier and one or more events of the structured log of events.
13. The device of claim 12 , wherein the operations further comprise:
storing the test definition in a test repository.
14. The device of claim 12 , wherein each event of the structured log of events is correlated with the correlation identifier.
15. The device of claim 9 , wherein the operations further comprise:
logging the first event, the second event, the third event, and the fourth event; and
tagging the first event, the second event, the third event, and the fourth event with a correlation identifier.
16. A non-transitory computer-readable medium storing instructions that, when executed by a processor of a device for simulating interactions in a system under test including a first device and a second device, cause the processor to perform operations comprising:
obtaining a structured log of events associated with communications between the first device and the second device; and
simulating the interactions in the system under test using the structured log of events,
wherein the structured log of events includes a first event corresponding to an application programming interface (API) request provided by the first device to an API, and a second event corresponding to an API response provided by the API to the first device, and
wherein the structured log of events includes a third event corresponding to an API request provided by the API to the second device, and a fourth event corresponding to an API response provided by the second device to the API.
17. The non-transitory computer-readable medium of claim 16 , wherein the first device is a point of sale (POS) device.
18. The non-transitory computer-readable medium of claim 16 , wherein the second device is a personal identification number (PIN) pad.
19. The non-transitory computer-readable medium of claim 16 , wherein the operations further comprise:
receiving a correlation identifier and the structured log of events; and
generating a test definition based on the correlation identifier and one or more events of the structured log of events.
20. The non-transitory computer-readable medium of claim 19 , wherein the operations further comprise:
storing the test definition in a test repository.