Make it possible for AI Test to catch requests and store as test files
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3535627. --> Reported by: [marcus_johansson](https://www.drupal.org/user/385947) Related to !747 >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>Currently we have a module called AI Test that can reply responses against requests. This is great for Kernel and Functional tests.</p> <p>The problem however is that its quite hard to write these.</p> <p>We should make it possible for the AI Test module to catch these from other providers and then be able to export these as files for anyone wanting to replay them on the system for saving money or automated testing.</p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <ul> <li>Convert the current system to use content entities instead.</li> <li>Still put the files in the same place and make sure they are auto imported</li> <li>Add an event subscriber before, after and streaming the response, that catches the request and response data.</li> <li>Add a setting to set this up if you want to enable catching the responses.</li> <li>Also store the raw data from the provider.</li> </ul>
issue