Generation

E2E Test

E2E Testing

Introduction

This guide explains how to generate E2E tests for complex scenarios with Skyramp using traces. Throughout this guide, we will demonstrate key capabilities using Skyramp’s Demo Shop, a simple e-commerce application for product and order management. Learn more about the Demo Shop.

Prerequisites

  • Skyramp CLI installed

  • Relevant libraries installed (ie Python, TypeScript libraries)

  • Docker installed and running (for trace collection only)

Refer to the Installation Guide if you haven't installed Skyramp yet.

Overview

An end-to-end (E2E) test validates an application's entire workflow from start to finish, simulating real-world user scenarios. It ensures that all integrated components, including front-end, back-end, and external systems, work together seamlessly to deliver the expected functionality and performance. 

To generate E2E tests that span across multiple endpoints or services, Skyramp requires a trace to generate the test case reliably.

What is a trace?

A trace is a log of a set of actions executed in a particular window or scenario in your system. Traces can be used to simulate real-world scenarios of product usage, and those traces can in turn be used to generate tests that give you confidence that said scenario will be resilient in production traffic.

Skyramp can function as a “Man-in-the-Middle” proxy that monitors your traffic and allows you to simply record the scenario you want to test. Skyramp can collect traffic from 3 different sources:

  • HTTP traffic from a browser UI

  • Backend traffic through the CLI

  • UI traces through the Playwright recorder

By following these simple steps, you'll be able to collect a trace that you can directly supply for the Skyramp test generation.

Start Trace Collection

Want to skip straight to test generation? Download the following Skyramp trace and Playwright trace and skip to “Generate E2E Test from Trace”

To start collecting traces, you need to run the following command. This command will spawn a new shell configured to collect all relevant backend network traffic as well as a Playwright Browser and Inspector. All visited web links traffic will also be part of the collected trace. The first time you run this command, it might take a while to bring up Skyramp.

skyramp generate trace \
--playwright \
--include "https://demoshop.skyramp.dev/api/*" \
--output e2e_test_trace.json \
--playwright-output

Explanation of Command

  • --playwright: Enable Playwright to capture UI activities (default: false)

  • --include: Specify a comma-separated list of URLs for Skyramp to collect traces for. Skyramp will only collect traces for those domains and exclude all others.

  • --output: Specify the name of the generated Skyramp trace file (default: skyramp_traces.json)

  • --playwright-output: Specify the name of the generated Playwright trace file (default: skyramp_playwright.zip)

Adjustments:

  • --exclude: Specify a comma-separated list of URLs for which you do not want Skyramp to collect traces. This flag takes precedence over --include if a URL is specified in both. --exclude will only exclude the domains specified and keep all other domains in the trace.

  • --docker-network: Specify the name (string) of your Docker network.

  • --docker-skyramp-port: Specify a port number for Skyramp (default=35142).

A Note on Including/Excluding URLs

When using the --include or --exclude flag, URLs need to be specified either as an exact path to the endpoint or in combination with a wildcard:

  • demoshop.skyramp.dev/api/v1/products will only filter for POST and GET of the products endpoint.

  • demoshop.skyramp.dev/products* will filter for all products endpoints + any nested endpoints.

  • demoshop.skyramp.dev/api/v1/products/* will filter only for any nested endpoints that require a product ID. It will not collect the traces of POST and GET products.

For endpoints that require path parameters, please replace the path parameter with the wildcard:

  • Convert demoshop.skyramp.dev/products/{product_id}/reviews to demoshop.skyramp.dev/products/*/reviews

Record Scenario

We now leverage the freshly spawned shell and Playwright Browser to collect the traces for our test scenario. Here is a quick summary of the scenario:

  1. Fetch session ID (via UI)

  2. Clear state (via cURL)

  3. Create new product (via cURL)

  4. Find product in product list (via UI)

  5. Create new order containing the new product (via UI)

  6. View newly created order (via UI)

  7. Delete newly created order (via cURL)

  8. Delete newly created product (via cURL)Let's get started!

1. Setup session (via UI)

  • To start, in the newly spawned Chromium browser, go to https://stg.demoshop.skyramp.dev/products . This will open the Demo Shop UI.

  • At the top of the page, you will see a section called Session ID with three words. Click on the Edit button, and fill in the session ID with any string (for this example, we will use skyramp-e2e-demo)

  • Save the session ID by clicking on the green checkmark.

  • Next, click “Clear State” to reset and begin your session recording.

  • This session ID will be used as your “Authorization” token for every API call made to the Demo Shop. You can save your session ID in an environment variable for re-use across the different network requests from the terminal:

    export SKYRAMP_TEST_TOKEN=skyramp-e2e-demo

2. Create new product (via cURL)

  • Now, let’s create a new product with the Demo Shop API

    curl -X POST https://demoshop.skyramp.dev/api/v1/products \
      -H "Content-Type: application/json" \
      -H "Authorization: Bearer $SKYRAMP_TEST_TOKEN" \
      -k \
      -d '{
        "name": "SkyPad Pro",
        "description": "High-performance tablet powered by Skyramp",
        "price": 999.99,
        "image_url": "https://shorturl.at/sZeO8",
        "category": "Tablets",
        "in_stock": true
      }'

3. Find product in product list (via UI)

  • Refresh your Chromium browser. This will cause your newly created product to appear on the Product Catalog.


3. Update the product price

  • Click on the “View Details” button in the “SkyPad Pro” tile.

  • Click on “Edit Product”

  • In the “Price” field, enter “1999.99” and click “Save Product”

4. Create new order containing the new product (via cURL)

  • From the original POST products API call, copy the product_id field that is returned in the response (product_id should be 24 if this entire recorded flow is done from a cleared session)

  • We will use this product_id to create a new order:

    curl -X POST https://demoshop.skyramp.dev/api/v1/orders \
      -H "Content-Type: application/json" \
      -H "Authorization: Bearer $SKYRAMP_TEST_TOKEN" \
      -k \
      -d '{
        "customer_email": "sahil@skyramp.dev",
        "items": [
          {
            "product_id": 24,
            "quantity": 2
          }
        ]
      }''

5. Find order in order list (via UI)

  • Click on the Orders tab in the navigation bar. Find your newly created order on the list.


6. Assert the total price of the order (via UI)

  • Click on “View Details” in the newly created order.

  • Assert that the price of the order appears correctly

    • Click on the button

    • Click on the total price of the order

    • This will ask you to generate an assertion that the element contains the text “$3999.98”. Click the checkmark.


7. Cancel newly created order (via UI)

  • From the order details page, click on “Cancel Order”

7. Delete newly created product (via UI)

  • Navigate to the Product Catalog

  • Click on the product you created during this session

  • Click on Delete Product

End Trace Collection

Once the scenario is completed, you can end the trace collection in the spawned shell with Ctrl + D. You will see for which endpoints Skyramp was also able to collect backend traces. Note that if the --include flag was not used to filter for specific domains, this might be a very long list.

Skyramp creates two trace files: e2e_test_trace.json and e2e_test_playwright.zip. The first file only contains the backend traces that were collected, while the zip file includes all collected traces from Playwright. Both traces will be used for the generation of the E2E test.

You can find sample traces for the test scenario here:

E2E Testing

Introduction

This guide explains how to generate E2E tests for complex scenarios with Skyramp using traces. Throughout this guide, we will demonstrate key capabilities using Skyramp’s Demo Shop, a simple e-commerce application for product and order management. Learn more about the Demo Shop.

Prerequisites

  • Skyramp CLI installed

  • Relevant libraries installed (ie Python, TypeScript libraries)

  • Docker installed and running (for trace collection only)

Refer to the Installation Guide if you haven't installed Skyramp yet.

Overview

An end-to-end (E2E) test validates an application's entire workflow from start to finish, simulating real-world user scenarios. It ensures that all integrated components, including front-end, back-end, and external systems, work together seamlessly to deliver the expected functionality and performance. 

To generate E2E tests that span across multiple endpoints or services, Skyramp requires a trace to generate the test case reliably.

What is a trace?

A trace is a log of a set of actions executed in a particular window or scenario in your system. Traces can be used to simulate real-world scenarios of product usage, and those traces can in turn be used to generate tests that give you confidence that said scenario will be resilient in production traffic.

Skyramp can function as a “Man-in-the-Middle” proxy that monitors your traffic and allows you to simply record the scenario you want to test. Skyramp can collect traffic from 3 different sources:

  • HTTP traffic from a browser UI

  • Backend traffic through the CLI

  • UI traces through the Playwright recorder

By following these simple steps, you'll be able to collect a trace that you can directly supply for the Skyramp test generation.

Start Trace Collection

Want to skip straight to test generation? Download the following Skyramp trace and Playwright trace and skip to “Generate E2E Test from Trace”

To start collecting traces, you need to run the following command. This command will spawn a new shell configured to collect all relevant backend network traffic as well as a Playwright Browser and Inspector. All visited web links traffic will also be part of the collected trace. The first time you run this command, it might take a while to bring up Skyramp.

skyramp generate trace \
--playwright \
--include "https://demoshop.skyramp.dev/api/*" \
--output e2e_test_trace.json \
--playwright-output

Explanation of Command

  • --playwright: Enable Playwright to capture UI activities (default: false)

  • --include: Specify a comma-separated list of URLs for Skyramp to collect traces for. Skyramp will only collect traces for those domains and exclude all others.

  • --output: Specify the name of the generated Skyramp trace file (default: skyramp_traces.json)

  • --playwright-output: Specify the name of the generated Playwright trace file (default: skyramp_playwright.zip)

Adjustments:

  • --exclude: Specify a comma-separated list of URLs for which you do not want Skyramp to collect traces. This flag takes precedence over --include if a URL is specified in both. --exclude will only exclude the domains specified and keep all other domains in the trace.

  • --docker-network: Specify the name (string) of your Docker network.

  • --docker-skyramp-port: Specify a port number for Skyramp (default=35142).

A Note on Including/Excluding URLs

When using the --include or --exclude flag, URLs need to be specified either as an exact path to the endpoint or in combination with a wildcard:

  • demoshop.skyramp.dev/api/v1/products will only filter for POST and GET of the products endpoint.

  • demoshop.skyramp.dev/products* will filter for all products endpoints + any nested endpoints.

  • demoshop.skyramp.dev/api/v1/products/* will filter only for any nested endpoints that require a product ID. It will not collect the traces of POST and GET products.

For endpoints that require path parameters, please replace the path parameter with the wildcard:

  • Convert demoshop.skyramp.dev/products/{product_id}/reviews to demoshop.skyramp.dev/products/*/reviews

Record Scenario

We now leverage the freshly spawned shell and Playwright Browser to collect the traces for our test scenario. Here is a quick summary of the scenario:

  1. Fetch session ID (via UI)

  2. Clear state (via cURL)

  3. Create new product (via cURL)

  4. Find product in product list (via UI)

  5. Create new order containing the new product (via UI)

  6. View newly created order (via UI)

  7. Delete newly created order (via cURL)

  8. Delete newly created product (via cURL)Let's get started!

1. Setup session (via UI)

  • To start, in the newly spawned Chromium browser, go to https://stg.demoshop.skyramp.dev/products . This will open the Demo Shop UI.

  • At the top of the page, you will see a section called Session ID with three words. Click on the Edit button, and fill in the session ID with any string (for this example, we will use skyramp-e2e-demo)

  • Save the session ID by clicking on the green checkmark.

  • Next, click “Clear State” to reset and begin your session recording.

  • This session ID will be used as your “Authorization” token for every API call made to the Demo Shop. You can save your session ID in an environment variable for re-use across the different network requests from the terminal:

    export SKYRAMP_TEST_TOKEN=skyramp-e2e-demo

2. Create new product (via cURL)

  • Now, let’s create a new product with the Demo Shop API

    curl -X POST https://demoshop.skyramp.dev/api/v1/products \
      -H "Content-Type: application/json" \
      -H "Authorization: Bearer $SKYRAMP_TEST_TOKEN" \
      -k \
      -d '{
        "name": "SkyPad Pro",
        "description": "High-performance tablet powered by Skyramp",
        "price": 999.99,
        "image_url": "https://shorturl.at/sZeO8",
        "category": "Tablets",
        "in_stock": true
      }'

3. Find product in product list (via UI)

  • Refresh your Chromium browser. This will cause your newly created product to appear on the Product Catalog.


3. Update the product price

  • Click on the “View Details” button in the “SkyPad Pro” tile.

  • Click on “Edit Product”

  • In the “Price” field, enter “1999.99” and click “Save Product”

4. Create new order containing the new product (via cURL)

  • From the original POST products API call, copy the product_id field that is returned in the response (product_id should be 24 if this entire recorded flow is done from a cleared session)

  • We will use this product_id to create a new order:

    curl -X POST https://demoshop.skyramp.dev/api/v1/orders \
      -H "Content-Type: application/json" \
      -H "Authorization: Bearer $SKYRAMP_TEST_TOKEN" \
      -k \
      -d '{
        "customer_email": "sahil@skyramp.dev",
        "items": [
          {
            "product_id": 24,
            "quantity": 2
          }
        ]
      }''

5. Find order in order list (via UI)

  • Click on the Orders tab in the navigation bar. Find your newly created order on the list.


6. Assert the total price of the order (via UI)

  • Click on “View Details” in the newly created order.

  • Assert that the price of the order appears correctly

    • Click on the button

    • Click on the total price of the order

    • This will ask you to generate an assertion that the element contains the text “$3999.98”. Click the checkmark.


7. Cancel newly created order (via UI)

  • From the order details page, click on “Cancel Order”

7. Delete newly created product (via UI)

  • Navigate to the Product Catalog

  • Click on the product you created during this session

  • Click on Delete Product

End Trace Collection

Once the scenario is completed, you can end the trace collection in the spawned shell with Ctrl + D. You will see for which endpoints Skyramp was also able to collect backend traces. Note that if the --include flag was not used to filter for specific domains, this might be a very long list.

Skyramp creates two trace files: e2e_test_trace.json and e2e_test_playwright.zip. The first file only contains the backend traces that were collected, while the zip file includes all collected traces from Playwright. Both traces will be used for the generation of the E2E test.

You can find sample traces for the test scenario here:

E2E Testing

Introduction

This guide explains how to generate E2E tests for complex scenarios with Skyramp using traces. Throughout this guide, we will demonstrate key capabilities using Skyramp’s Demo Shop, a simple e-commerce application for product and order management. Learn more about the Demo Shop.

Prerequisites

  • Skyramp CLI installed

  • Relevant libraries installed (ie Python, TypeScript libraries)

  • Docker installed and running (for trace collection only)

Refer to the Installation Guide if you haven't installed Skyramp yet.

Overview

An end-to-end (E2E) test validates an application's entire workflow from start to finish, simulating real-world user scenarios. It ensures that all integrated components, including front-end, back-end, and external systems, work together seamlessly to deliver the expected functionality and performance. 

To generate E2E tests that span across multiple endpoints or services, Skyramp requires a trace to generate the test case reliably.

What is a trace?

A trace is a log of a set of actions executed in a particular window or scenario in your system. Traces can be used to simulate real-world scenarios of product usage, and those traces can in turn be used to generate tests that give you confidence that said scenario will be resilient in production traffic.

Skyramp can function as a “Man-in-the-Middle” proxy that monitors your traffic and allows you to simply record the scenario you want to test. Skyramp can collect traffic from 3 different sources:

  • HTTP traffic from a browser UI

  • Backend traffic through the CLI

  • UI traces through the Playwright recorder

By following these simple steps, you'll be able to collect a trace that you can directly supply for the Skyramp test generation.

Start Trace Collection

Want to skip straight to test generation? Download the following Skyramp trace and Playwright trace and skip to “Generate E2E Test from Trace”

To start collecting traces, you need to run the following command. This command will spawn a new shell configured to collect all relevant backend network traffic as well as a Playwright Browser and Inspector. All visited web links traffic will also be part of the collected trace. The first time you run this command, it might take a while to bring up Skyramp.

skyramp generate trace \
--playwright \
--include "https://demoshop.skyramp.dev/api/*" \
--output e2e_test_trace.json \
--playwright-output

Explanation of Command

  • --playwright: Enable Playwright to capture UI activities (default: false)

  • --include: Specify a comma-separated list of URLs for Skyramp to collect traces for. Skyramp will only collect traces for those domains and exclude all others.

  • --output: Specify the name of the generated Skyramp trace file (default: skyramp_traces.json)

  • --playwright-output: Specify the name of the generated Playwright trace file (default: skyramp_playwright.zip)

Adjustments:

  • --exclude: Specify a comma-separated list of URLs for which you do not want Skyramp to collect traces. This flag takes precedence over --include if a URL is specified in both. --exclude will only exclude the domains specified and keep all other domains in the trace.

  • --docker-network: Specify the name (string) of your Docker network.

  • --docker-skyramp-port: Specify a port number for Skyramp (default=35142).

A Note on Including/Excluding URLs

When using the --include or --exclude flag, URLs need to be specified either as an exact path to the endpoint or in combination with a wildcard:

  • demoshop.skyramp.dev/api/v1/products will only filter for POST and GET of the products endpoint.

  • demoshop.skyramp.dev/products* will filter for all products endpoints + any nested endpoints.

  • demoshop.skyramp.dev/api/v1/products/* will filter only for any nested endpoints that require a product ID. It will not collect the traces of POST and GET products.

For endpoints that require path parameters, please replace the path parameter with the wildcard:

  • Convert demoshop.skyramp.dev/products/{product_id}/reviews to demoshop.skyramp.dev/products/*/reviews

Record Scenario

We now leverage the freshly spawned shell and Playwright Browser to collect the traces for our test scenario. Here is a quick summary of the scenario:

  1. Fetch session ID (via UI)

  2. Clear state (via cURL)

  3. Create new product (via cURL)

  4. Find product in product list (via UI)

  5. Create new order containing the new product (via UI)

  6. View newly created order (via UI)

  7. Delete newly created order (via cURL)

  8. Delete newly created product (via cURL)Let's get started!

1. Setup session (via UI)

  • To start, in the newly spawned Chromium browser, go to https://stg.demoshop.skyramp.dev/products . This will open the Demo Shop UI.

  • At the top of the page, you will see a section called Session ID with three words. Click on the Edit button, and fill in the session ID with any string (for this example, we will use skyramp-e2e-demo)

  • Save the session ID by clicking on the green checkmark.

  • Next, click “Clear State” to reset and begin your session recording.

  • This session ID will be used as your “Authorization” token for every API call made to the Demo Shop. You can save your session ID in an environment variable for re-use across the different network requests from the terminal:

    export SKYRAMP_TEST_TOKEN=skyramp-e2e-demo

2. Create new product (via cURL)

  • Now, let’s create a new product with the Demo Shop API

    curl -X POST https://demoshop.skyramp.dev/api/v1/products \
      -H "Content-Type: application/json" \
      -H "Authorization: Bearer $SKYRAMP_TEST_TOKEN" \
      -k \
      -d '{
        "name": "SkyPad Pro",
        "description": "High-performance tablet powered by Skyramp",
        "price": 999.99,
        "image_url": "https://shorturl.at/sZeO8",
        "category": "Tablets",
        "in_stock": true
      }'

3. Find product in product list (via UI)

  • Refresh your Chromium browser. This will cause your newly created product to appear on the Product Catalog.


3. Update the product price

  • Click on the “View Details” button in the “SkyPad Pro” tile.

  • Click on “Edit Product”

  • In the “Price” field, enter “1999.99” and click “Save Product”

4. Create new order containing the new product (via cURL)

  • From the original POST products API call, copy the product_id field that is returned in the response (product_id should be 24 if this entire recorded flow is done from a cleared session)

  • We will use this product_id to create a new order:

    curl -X POST https://demoshop.skyramp.dev/api/v1/orders \
      -H "Content-Type: application/json" \
      -H "Authorization: Bearer $SKYRAMP_TEST_TOKEN" \
      -k \
      -d '{
        "customer_email": "sahil@skyramp.dev",
        "items": [
          {
            "product_id": 24,
            "quantity": 2
          }
        ]
      }''

5. Find order in order list (via UI)

  • Click on the Orders tab in the navigation bar. Find your newly created order on the list.


6. Assert the total price of the order (via UI)

  • Click on “View Details” in the newly created order.

  • Assert that the price of the order appears correctly

    • Click on the button

    • Click on the total price of the order

    • This will ask you to generate an assertion that the element contains the text “$3999.98”. Click the checkmark.


7. Cancel newly created order (via UI)

  • From the order details page, click on “Cancel Order”

7. Delete newly created product (via UI)

  • Navigate to the Product Catalog

  • Click on the product you created during this session

  • Click on Delete Product

End Trace Collection

Once the scenario is completed, you can end the trace collection in the spawned shell with Ctrl + D. You will see for which endpoints Skyramp was also able to collect backend traces. Note that if the --include flag was not used to filter for specific domains, this might be a very long list.

Skyramp creates two trace files: e2e_test_trace.json and e2e_test_playwright.zip. The first file only contains the backend traces that were collected, while the zip file includes all collected traces from Playwright. Both traces will be used for the generation of the E2E test.

You can find sample traces for the test scenario here:

Python

Generate E2E Test from Trace

Run the following command in your terminal to generate the E2E test:

skyramp generate e2e rest \
--language python \
--framework pytest \
--trace e2e_test_trace.json \
--playwright-trace

Upon completion, Skyramp creates a fully executable Python test file (e2e_test.py) that can be run immediately.

Explanation of Command

Below are a few flags to customize the test generation. Additional flags are explained here.

  • NOTE: Unlike other commands, test generation from a trace does not require a specified URL - we extract all relevant information directly from the trace.

  • --language: Specifies the test output language.

  • --framework: Specifies the test execution framework of choice.

  • --trace: Points to the Skyramp-collected trace used to generate the test. We extract all relevant scenario and request information directly from this file.

  • --playwright-trace: Points to the Playwright trace used to generate the test. We extract all relevant scenario information and UI actions directly from this file.

Additional Flags

These flags will help you tune the E2E test. Additional flags are explained here.

  • --include: Specify a comma-separated list of URLs for Skyramp to generate requests. Using this flag will automatically exclude all other domains from the test.

  • --exclude: Specify a comma-separated list of URLs for which you do not want Skyramp to generate requests. This flag takes precedence over --include if a URL is specified in both. Using this flag will only exclude the domains specified in the command and keep all other domains in the test.

  • --output: Specify the name of the generated test file.

Execute the E2E Test

You can execute the generated tests without any additional adjustments to the code. Here are the benefits of a Skyramp UI Test:

Interweaving of UI Actions and Backend API Calls

Unlike Playwright, Skyramp allows you to simulate more complex customer scenarios by allowing the developer to define a test scenario using both UI actions and API calls.

Smart Selectors

Skyramp generates intelligent UI selectors that automatically adapt to application changes and avoids brittle selectors that break with every UI update. Instead of relying on fragile CSS classes or XPath positions, it creates robust selectors using semantic HTML structure, visual context, and multiple fallback strategies. This dramatically reduces test maintenance overhead, eliminates false test failures that block deployments, and allows teams to focus on building features rather than constantly fixing broken tests.

Hydration

Skyramp automatically adds intelligent waiting logic in the test to ensure that a web page fully loads its JavaScript code (a process otherwise known as hydration). These waits lead to less flaky tests since they ensure elements on the page being validated against appear and do not cause the test to timeout.

Modularization and Parameterization

If an E2E test is generated via the Skyramp Agentic Experience (available via VSCode Extension or MCP Server), the generated test will be automatically parameterized and modularized to make the test code more readable and allow for potential re-usability of code. For more information about the Skyramp Agentic Experience, please join the waitlist.

Run the Test

Run the test using Pytest. If you don’t have Pytest, refer to the Installation Guide for setup instructions:

python3 -m pytest --browser

The test automatically identifies the relevant path parameters, intelligently chains the different requests together, and executes the test against the captured URLs.

Review Test Results

We are using Pytest’s default test output in this guide, printing a line for each test that is being run and listing all failures at the end. You can adjust the output behavior by following this documentation.

Next Steps

Congratulations on generating an E2E test from record and replay traces! To learn more about how you can generate UI tests without backend traffic, refer to the UI Testing Documentation.

Related topics

Installation

Skyramp Demo Shop

UI Test

Python

Generate E2E Test from Trace

Run the following command in your terminal to generate the E2E test:

skyramp generate e2e rest \
--language python \
--framework pytest \
--trace e2e_test_trace.json \
--playwright-trace

Upon completion, Skyramp creates a fully executable Python test file (e2e_test.py) that can be run immediately.

Explanation of Command

Below are a few flags to customize the test generation. Additional flags are explained here.

  • NOTE: Unlike other commands, test generation from a trace does not require a specified URL - we extract all relevant information directly from the trace.

  • --language: Specifies the test output language.

  • --framework: Specifies the test execution framework of choice.

  • --trace: Points to the Skyramp-collected trace used to generate the test. We extract all relevant scenario and request information directly from this file.

  • --playwright-trace: Points to the Playwright trace used to generate the test. We extract all relevant scenario information and UI actions directly from this file.

Additional Flags

These flags will help you tune the E2E test. Additional flags are explained here.

  • --include: Specify a comma-separated list of URLs for Skyramp to generate requests. Using this flag will automatically exclude all other domains from the test.

  • --exclude: Specify a comma-separated list of URLs for which you do not want Skyramp to generate requests. This flag takes precedence over --include if a URL is specified in both. Using this flag will only exclude the domains specified in the command and keep all other domains in the test.

  • --output: Specify the name of the generated test file.

Execute the E2E Test

You can execute the generated tests without any additional adjustments to the code. Here are the benefits of a Skyramp UI Test:

Interweaving of UI Actions and Backend API Calls

Unlike Playwright, Skyramp allows you to simulate more complex customer scenarios by allowing the developer to define a test scenario using both UI actions and API calls.

Smart Selectors

Skyramp generates intelligent UI selectors that automatically adapt to application changes and avoids brittle selectors that break with every UI update. Instead of relying on fragile CSS classes or XPath positions, it creates robust selectors using semantic HTML structure, visual context, and multiple fallback strategies. This dramatically reduces test maintenance overhead, eliminates false test failures that block deployments, and allows teams to focus on building features rather than constantly fixing broken tests.

Hydration

Skyramp automatically adds intelligent waiting logic in the test to ensure that a web page fully loads its JavaScript code (a process otherwise known as hydration). These waits lead to less flaky tests since they ensure elements on the page being validated against appear and do not cause the test to timeout.

Modularization and Parameterization

If an E2E test is generated via the Skyramp Agentic Experience (available via VSCode Extension or MCP Server), the generated test will be automatically parameterized and modularized to make the test code more readable and allow for potential re-usability of code. For more information about the Skyramp Agentic Experience, please join the waitlist.

Run the Test

Run the test using Pytest. If you don’t have Pytest, refer to the Installation Guide for setup instructions:

python3 -m pytest --browser

The test automatically identifies the relevant path parameters, intelligently chains the different requests together, and executes the test against the captured URLs.

Review Test Results

We are using Pytest’s default test output in this guide, printing a line for each test that is being run and listing all failures at the end. You can adjust the output behavior by following this documentation.

Next Steps

Congratulations on generating an E2E test from record and replay traces! To learn more about how you can generate UI tests without backend traffic, refer to the UI Testing Documentation.

Related topics

Installation

Skyramp Demo Shop

UI Test

Python

Generate E2E Test from Trace

Run the following command in your terminal to generate the E2E test:

skyramp generate e2e rest \
--language python \
--framework pytest \
--trace e2e_test_trace.json \
--playwright-trace

Upon completion, Skyramp creates a fully executable Python test file (e2e_test.py) that can be run immediately.

Explanation of Command

Below are a few flags to customize the test generation. Additional flags are explained here.

  • NOTE: Unlike other commands, test generation from a trace does not require a specified URL - we extract all relevant information directly from the trace.

  • --language: Specifies the test output language.

  • --framework: Specifies the test execution framework of choice.

  • --trace: Points to the Skyramp-collected trace used to generate the test. We extract all relevant scenario and request information directly from this file.

  • --playwright-trace: Points to the Playwright trace used to generate the test. We extract all relevant scenario information and UI actions directly from this file.

Additional Flags

These flags will help you tune the E2E test. Additional flags are explained here.

  • --include: Specify a comma-separated list of URLs for Skyramp to generate requests. Using this flag will automatically exclude all other domains from the test.

  • --exclude: Specify a comma-separated list of URLs for which you do not want Skyramp to generate requests. This flag takes precedence over --include if a URL is specified in both. Using this flag will only exclude the domains specified in the command and keep all other domains in the test.

  • --output: Specify the name of the generated test file.

Execute the E2E Test

You can execute the generated tests without any additional adjustments to the code. Here are the benefits of a Skyramp UI Test:

Interweaving of UI Actions and Backend API Calls

Unlike Playwright, Skyramp allows you to simulate more complex customer scenarios by allowing the developer to define a test scenario using both UI actions and API calls.

Smart Selectors

Skyramp generates intelligent UI selectors that automatically adapt to application changes and avoids brittle selectors that break with every UI update. Instead of relying on fragile CSS classes or XPath positions, it creates robust selectors using semantic HTML structure, visual context, and multiple fallback strategies. This dramatically reduces test maintenance overhead, eliminates false test failures that block deployments, and allows teams to focus on building features rather than constantly fixing broken tests.

Hydration

Skyramp automatically adds intelligent waiting logic in the test to ensure that a web page fully loads its JavaScript code (a process otherwise known as hydration). These waits lead to less flaky tests since they ensure elements on the page being validated against appear and do not cause the test to timeout.

Modularization and Parameterization

If an E2E test is generated via the Skyramp Agentic Experience (available via VSCode Extension or MCP Server), the generated test will be automatically parameterized and modularized to make the test code more readable and allow for potential re-usability of code. For more information about the Skyramp Agentic Experience, please join the waitlist.

Run the Test

Run the test using Pytest. If you don’t have Pytest, refer to the Installation Guide for setup instructions:

python3 -m pytest --browser

The test automatically identifies the relevant path parameters, intelligently chains the different requests together, and executes the test against the captured URLs.

Review Test Results

We are using Pytest’s default test output in this guide, printing a line for each test that is being run and listing all failures at the end. You can adjust the output behavior by following this documentation.

Next Steps

Congratulations on generating an E2E test from record and replay traces! To learn more about how you can generate UI tests without backend traffic, refer to the UI Testing Documentation.

Related topics

Installation

Skyramp Demo Shop

UI Test

© 2025 Skyramp, Inc. All rights reserved.

© 2025 Skyramp, Inc. All rights reserved.

© 2025 Skyramp, Inc. All rights reserved.