> For the complete documentation index, see [llms.txt](https://sealights-docs.tricentis.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sealights-docs.tricentis.com/sealights-agents-and-plugins/abap-agent/guides/poc-onboarding-for-automation.md).

# POC Onboarding for Automation

This guide walks you through a proof-of-concept demo of SeaLights Test Optimization for ABAP with Tosca automation tests. By the end of this guide you will have demonstrated that SeaLights correctly identifies which tests are impacted by a specific code change.

## Prerequisites

Before you begin, make sure the following are in place:

{% hint style="warning" %}
**POC-specific prerequisite:** The customer must provide an already-imported transport ID that contains **code changes** known to impact one or more of the automation tests that will be run during the demo.
{% endhint %}

{% stepper %}
{% step %}

### Set up the agent

Initialize the ABAP agent on the machine where it is installed. This generates the encryption key and default configuration file.
{% endstep %}

{% step %}

### Connect to SeaLights

Store your SeaLights agent token in the encrypted configuration so the agent can communicate with the SeaLights platform.
{% endstep %}

{% step %}

### Create an RFC Destination

Create an RFC Destination for each SAP system (QAS and PRD) that the agent needs to connect to.

{% hint style="info" %}
Repeat this command for every SAP system the pipeline will use (for example, once for QAS and once for PRD).
{% endhint %}
{% endstep %}

{% step %}

### Create a pipeline

Link your QAS and Production systems to a SeaLights application by creating a pipeline.
{% endstep %}

{% step %}

### Run the Initial Build Map

Create an Initial Build Map for the pipeline. This scans the QAS system for all ABAP code components that are in use in Production and sends them to SeaLights.

{% hint style="info" %}
The build map task runs two minutes after you issue this command. Wait for it to complete before proceeding.
{% endhint %}
{% endstep %}

{% step %}

### Start collecting Footprints

Enable the agent to collect Footprints data. When a test runs, the agent matches the ABAP components that were executed against objects in the latest build and sends this data to SeaLights.
{% endstep %}

{% step %}

### Observe the build in the SeaLights dashboard

Open the SeaLights dashboard and verify that your application appears with the initial build.

You should see:

* Your application listed with a build named after the pipeline.
* The build status shows as **completed**.

<figure><img src="/files/zAlkVA9inX9sVw7Ov2tL" alt="SeaLights dashboard showing the application with the initial build." width="563"><figcaption><p>The application appears in the SeaLights dashboard after the Initial Build Map completes.</p></figcaption></figure>
{% endstep %}

{% step %}

### Run tests in Tosca

Run your automation tests in Tosca. Make sure the Tosca playlist is configured with the correct **SeaLightsLabId** so the test execution is associated with your pipeline.

See [Run a Test in Tosca](/sealights-agents-and-plugins/abap-agent/test-tool-integrations/tosca/run-a-test-in-tosca.md) for detailed configuration instructions.

<figure><img src="/files/aEKgipAnb3SMCniHGsly" alt="Tosca Cloud playlist configuration showing SeaLightsLabId parameter." width="375"><figcaption><p>Set <strong>SeaLightsLabId</strong> to the lab ID configured in the <code>pipeline set</code> command.</p></figcaption></figure>

{% hint style="warning" %}
Make sure you set the `SeaLightsLabId` parameter in the Tosca playlist configuration. Without it, test results will not be associated with your pipeline.
{% endhint %}
{% endstep %}

{% step %}

### Wait for SeaLights to process the results

Wait approximately **2 minutes** for SeaLights to process the Footprints data from the test execution.
{% endstep %}

{% step %}

### Observe coverage in the SeaLights dashboard

Open the SeaLights Coverage Report for your application. Verify that the ABAP components exercised by your tests are showing as covered.

You should see:

* The ABAP components (Programs, Functions, Classes) that your tests exercised listed as covered.
* If no coverage appears, verify that the `SeaLightsLabId` matches your pipeline and that the Footprints task is running.

<figure><img src="/files/DEDlJN2Mx37VaS9qmg0J" alt="SeaLights Coverage Report showing covered ABAP components."><figcaption><p>The Coverage Report shows which ABAP components are covered by Tosca tests.</p></figcaption></figure>
{% endstep %}

{% step %}

### Enable Test Optimization (TIA)

Enable Test Optimization for your application in the SeaLights dashboard. This tells SeaLights to recommend only the tests impacted by code changes instead of the full test suite.
{% endstep %}

{% step %}

### Import the transport using the watcher

Use the watcher to process the specific transport that contains the known code changes. This creates a Build Modification in SeaLights that represents the code change.
{% endstep %}

{% step %}

### Re-run the tests in Tosca

Run the same tests in Tosca again. With Test Optimization enabled, SeaLights will recommend only the tests that are impacted by the code change in the transport. Observe that only the expected impacted tests actually run.
{% endstep %}

{% step %}

### Observe the Test Optimization results

Open the SeaLights **Test Optimization** screen for your application.

You should see:

* Only the tests impacted by the transport's code changes were executed.
* The **Recommended Tests** column shows which tests SeaLights selected.
* The code-to-test mapping shows the relationship between the transported code changes and the tests that cover them.
  {% endstep %}
  {% endstepper %}

## Troubleshooting

For additional help, see [Troubleshooting the ABAP Agent](/sealights-agents-and-plugins/abap-agent/troubleshooting-the-abap-agent.md).

## What's next?

The POC demo is complete. If the customer is satisfied with the results, proceed to the [Customer Onboarding for Automation](/sealights-agents-and-plugins/abap-agent/guides/customer-onboarding-for-automation.md) guide to set up continuous test optimization.
