<commit_before>.. _recorder:

########
Recorder
########

The Gatling Recorder helps you to quickly generate scenarios, by either acting as a HTTP proxy between the browser and the HTTP server or converting HAR (Http ARchive) files.
Either way, the Recorder generates a simple simulation that mimics your recorded navigation.

If you're using the bundle, you can launch it with the following script ``$GATLING_HOME/bin/recorder.sh``.
You will get a window that looks like this one:

.. image:: img/recorder.png

.. _recorder-config:

Configuration
=============

.. _recorder-port:

Listening proxy port
--------------------

In the Recorder, you have to define one port (for both HTTP and HTTPS): the local proxy port. This is the port your browser must connect to so that the Recorder is able to capture your navigation.

.. image:: img/recorder-listening-port.png

Then, you have to configure your browser to use the defined port.

Here is how to do with Firefox, open the browser Advanced settings, then go to the Network panel and update the connection settings:

.. image:: img/recorder-browser_advanced_settings.png

.. _recorder-https:

HTTPS mode
----------

On the contrary to regular proxies that act as a pass-though, the recorder acts as a man-in-the-middle and decrypt your HTTPS traffic.
The consequence is that it's identified by browsers as a security threat, so, one way or the other, you have to tell your browser that everything is fine.

The Recorder has 3 modes:

* Self-signed certificate (historical default)

The recorder will use the same self-signed certificate for every domain.
Browsers will prompt a security alert, and ask you if you want to add a security exception for this domain.
If it doesn't do so, it means that you've already registered a validated (by a standard Certificate Authority) certificate and it refuses to replace it by a less secured one.
You then have to remove it from your certificate registry.

.. warning:: Browsers will only prompt a security alert for the page domain, not for resource ones (typically, CNDs).
             The Recorder will list all such domains, you'll then have to directly visit every one the them and add a security exception for each.

* Provided KeyStore

One can pass a full Java keyStore (JKS or PKCS#12 format) that contains the certificate to be used.
This mode is useful if you have already generated a Java keystore for your application and want to reuse it for recording.

* On-the-fly certificate generation<commit_msg>Fix typo in recorder.rst<commit_after>.. _recorder:

########
Recorder
########

The Gatling Recorder helps you to quickly generate scenarios, by either acting as a HTTP proxy between the browser and the HTTP server or converting HAR (Http ARchive) files.
Either way, the Recorder generates a simple simulation that mimics your recorded navigation.

If you're using the bundle, you can launch it with the following script ``$GATLING_HOME/bin/recorder.sh``.
You will get a window that looks like this one:

.. image:: img/recorder.png

.. _recorder-config:

Configuration
=============

.. _recorder-port:

Listening proxy port
--------------------

In the Recorder, you have to define one port (for both HTTP and HTTPS): the local proxy port. This is the port your browser must connect to so that the Recorder is able to capture your navigation.

.. image:: img/recorder-listening-port.png

Then, you have to configure your browser to use the defined port.

Here is how to do with Firefox, open the browser Advanced settings, then go to the Network panel and update the connection settings:

.. image:: img/recorder-browser_advanced_settings.png

.. _recorder-https:

HTTPS mode
----------

On the contrary to regular proxies that act as a pass-though, the recorder acts as a man-in-the-middle and decrypt your HTTPS traffic.
The consequence is that it's identified by browsers as a security threat, so, one way or the other, you have to tell your browser that everything is fine.

The Recorder has 3 modes:

* Self-signed certificate (historical default)

The recorder will use the same self-signed certificate for every domain.
Browsers will prompt a security alert, and ask you if you want to add a security exception for this domain.
If it doesn't do so, it means that you've already registered a validated (by a standard Certificate Authority) certificate and it refuses to replace it by a less secured one.
You then have to remove it from your certificate registry.

.. warning:: Browsers will only prompt a security alert for the page domain, not for resource ones (typically, CDNs).
             The Recorder will list all such domains, you'll then have to directly visit every one of them and add a security exception for each.

* Provided KeyStore

One can pass a full Java keyStore (JKS or PKCS#12 format) that contains the certificate to be used.
This mode is useful if you have already generated a Java keystore for your application and want to reuse it for recording.

* On-the-fly certificate generation
{'fraction_non_alphanumeric': 0.06983684838838042, 'fraction_numerical': 0.001193792280143255, 'mean_word_length': 3.9236043095004898, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3369579', 'n_tokens_mistral': 1294, 'n_tokens_neox': 1239, 'n_words': 748}