E2E Test
Test Anatomy
Test File Anatomy
This section explains the key elements of the generated test file. The Skyramp generated test is editable and runnable like any other executable file.
The header of each test file shows when the test was generated and what command was used to generate it.
The body of the test file imports all relevant libraries and specifies the URL for all test requests.
The main test function replicates the scenario of interwoven backend API calls and UI actions recorded by the trace files, in exact chronological order of actions performed.
Test File Anatomy
This section explains the key elements of the generated test file. The Skyramp generated test is editable and runnable like any other executable file.
The header of each test file shows when the test was generated and what command was used to generate it.
The body of the test file imports all relevant libraries and specifies the URL for all test requests.
The main test function replicates the scenario of interwoven backend API calls and UI actions recorded by the trace files, in exact chronological order of actions performed.
Test File Anatomy
This section explains the key elements of the generated test file. The Skyramp generated test is editable and runnable like any other executable file.
The header of each test file shows when the test was generated and what command was used to generate it.
The body of the test file imports all relevant libraries and specifies the URL for all test requests.
The main test function replicates the scenario of interwoven backend API calls and UI actions recorded by the trace files, in exact chronological order of actions performed.
Python
# Generated by Skyramp v1.2.11 on 2025-08-08 09:51:10.326678 -0400 EDT m=+0.475189585
# Command: skyramp generate e2e rest \
# --playwright-trace e2e_test_playwright.zip \
# --trace e2e_test_trace.json \
# Import of required libraries
import skyramp
import os
import time
import pytest
import re
from playwright.sync_api import Page, expect
@pytest.fixture(scope="session")
def browser_context_args(browser_context_args, playwright):
return {"ignore_https_errors": True, "service_workers": "block"}
# URL for test requests
URL_demoshop = "https://demoshop.skyramp.dev"
def test_e_2_e(page: Page):
# Invocation of Skyramp Client
client = skyramp.Client()
# Definition of authentication header
headers = {}
if os.getenv("SKYRAMP_TEST_TOKEN") is not None:
headers["Authorization"] = "Bearer " + os.getenv("SKYRAMP_TEST_TOKEN")
page.goto("http://demoshop.skyramp.dev/products")
# Javascript download detected. Wait until potential hydration is completed
page.wait_for_timeout(1500)
page.get_by_role("button", name="Edit Session ID").click()
page.get_by_role("textbox").click()
page.get_by_role("textbox").fill("ybe-shoot")
page.get_by_role("textbox").press("ArrowDown")
page.get_by_role("textbox").fill("skyramp-e2e-demo")
page.get_by_role("button", name="Save Session ID").click()
# Javascript download detected. Wait until potential hydration is completed
page.wait_for_timeout(1500)
# Wait to finish any potential hydration
page.wait_for_timeout(1500)
with page.expect_response("**/api/v1/reset") as resp:
page.get_by_test_id("navbar-clear-state").click()
# Javascript download detected. Wait until potential hydration is completed
page.wait_for_timeout(1500)
# Request Body
products_POST_request_body = r'''{
"category": "Tablets",
"description": "High-performance tablet powered by Skyramp",
"image_url": "https://shorturl.at/sZeO8",
"in_stock": true,
"name": "SkyPad Pro",
"price": 999.99
}'''
# Execute Request
products_POST_response = client.send_request(
url=URL_demoshop,
path="/api/v1/products",
method="POST",
body=products_POST_request_body,
headers=headers
)
# Generated Assertions
assert products_POST_response.status_code == 201
page.goto("http://demoshop.skyramp.dev/products")
# Javascript download detected. Wait until potential hydration is completed
page.wait_for_timeout(1500)
page.get_by_test_id("product-SkyPad-Pro-view-details").click()
page.get_by_role("button", name="Edit Product").click()
page.get_by_test_id("product-detail-input-price").click()
page.get_by_test_id("product-detail-input-price").press("ArrowLeft")
page.get_by_test_id("product-detail-input-price").press("ArrowLeft")
page.get_by_test_id("product-detail-input-price").press("ArrowLeft")
page.get_by_test_id("product-detail-input-price").press("ArrowLeft")
page.get_by_test_id("product-detail-input-price").press("ArrowLeft")
page.get_by_test_id("product-detail-input-price").press("ArrowLeft")
playwright_request_1 = {
"category": "Tablets",
"description": "High-performance tablet powered by Skyramp",
"image_url": "https://shorturl.at/sZeO8",
"in_stock": True,
"name": "SkyPad Pro",
"price": 1999.99
}
page.get_by_test_id("product-detail-input-price").fill(str(skyramp.get_value(playwright_request_1, "price")))
# Wait to finish any potential hydration
page.wait_for_timeout(1500)
with page.expect_response("**/api/v1/products/24") as resp:
page.get_by_role("button", name="Save Product").click()
# Request Body
orders_POST_request_body = r'''{
"customer_email": "sahil@skyramp.dev",
"items": [
{
"product_id": 24,
"quantity": 2
}
]
}'''
# Execute Request
orders_POST_response = client.send_request(
url=URL_demoshop,
path="/api/v1/orders",
method="POST",
body=orders_POST_request_body,
headers=headers,
data_override={"items.0.product_id": skyramp.get_response_value(products_POST_response, "product_id")}
)
# Generated Assertions
assert orders_POST_response.status_code == 201
page.get_by_test_id("navbar-orders").click()
# Javascript download detected. Wait until potential hydration is completed
page.wait_for_timeout(1500)
page.get_by_test_id("order-sahil@skyramp.dev - 1 items").get_by_test_id("order-view-details-btn").click()
# Javascript download detected. Wait until potential hydration is completed
page.wait_for_timeout(1500)
expect(page.get_by_test_id("order-detail-value-total")).to_contain_text("$3999.98")
# Wait to finish any potential hydration
page.wait_for_timeout(1500)
with page.expect_response("**/api/v1/orders/13") as resp:
page.get_by_role("button", name="Cancel Order").click()
page.get_by_test_id("navbar-products").click()
# Javascript download detected. Wait until potential hydration is completed
page.wait_for_timeout(1500)
page.get_by_test_id("product-SkyPad-Pro-view-details").click()
# Wait to finish any potential hydration
page.wait_for_timeout(1500)
with page.expect_response("**/api/v1/products/24") as resp:
page.get_by_role("button", name="Delete Product").click()
Skyramp Differentiators
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.
Here is an example of a modularized test using the Skyramp Agent:
# Generated by Skyramp v1.2.9 on 2025-08-08 10:14:53.463035 -0400 EDT m=+22287.450243876
# Command: skyramp generate e2e rest \
# --framework pytest \
# --language python \
# --overwrite true \
# --playwright-trace e2e_test_playwright.zip \
# --trace e2e_test_trace.json \
# Import of required libraries
import skyramp
import os
import time
import pytest
import re
from playwright.sync_api import Page, expect
@pytest.fixture(scope="session")
def browser_context_args(browser_context_args, playwright):
return {"ignore_https_errors": True, "service_workers": "block"}
# URL for test requests
URL_demoshop = "https://demoshop.skyramp.dev"
def setup_session(page: Page):
page.goto("http://demoshop.skyramp.dev/products")
page.wait_for_timeout(1500)
page.get_by_role("button", name="Edit Session ID").click()
page.get_by_role("textbox").click()
page.get_by_role("textbox").fill("ybe-shoot")
page.get_by_role("textbox").press("ArrowDown")
page.get_by_role("textbox").fill("skyramp-e2e-demo")
page.get_by_role("button", name="Save Session ID").click()
page.wait_for_timeout(1500)
page.wait_for_timeout(1500)
with page.expect_response("**/api/v1/reset") as resp:
page.get_by_test_id("navbar-clear-state").click()
page.wait_for_timeout(1500)
def create_product(client, headers):
products_POST_request_body = r'''{
"category": "Tablets",
"description": "High-performance tablet powered by Skyramp",
"image_url": "https://shorturl.at/sZeO8",
"in_stock": true,
"name": "SkyPad Pro",
"price": 999.99
}'''
products_POST_response = client.send_request(
url=URL_demoshop,
path="/api/v1/products",
method="POST",
body=products_POST_request_body,
headers=headers
)
assert products_POST_response.status_code == 201
return products_POST_response
def edit_product(page: Page):
page.goto("http://demoshop.skyramp.dev/products")
page.wait_for_timeout(1500)
page.get_by_test_id("product-SkyPad-Pro-view-details").click()
page.get_by_role("button", name="Edit Product").click()
page.get_by_test_id("product-detail-input-price").click()
for _ in range(6):
page.get_by_test_id("product-detail-input-price").press("ArrowLeft")
page.get_by_test_id("product-detail-input-price").fill("1999.99")
page.wait_for_timeout(1500)
with page.expect_response("**/api/v1/products/24") as resp:
page.get_by_role("button", name="Save Product").click()
def create_order(client, headers, products_POST_response):
orders_POST_request_body = r'''{
"customer_email": "sahil@skyramp.dev",
"items": [
{
"product_id": 24,
"quantity": 2
}
]
}'''
orders_POST_response = client.send_request(
url=URL_demoshop,
path="/api/v1/orders",
method="POST",
body=orders_POST_request_body,
headers=headers,
data_override={"items.0.product_id": skyramp.get_response_value(products_POST_response, "product_id")}
)
assert orders_POST_response.status_code == 201
return orders_POST_response
def verify_order(page: Page):
page.get_by_test_id("navbar-orders").click()
page.wait_for_timeout(1500)
page.get_by_test_id("order-sahil@skyramp.dev - 1 items").get_by_test_id("order-view-details-btn").click()
page.wait_for_timeout(1500)
expect(page.get_by_test_id("order-detail-value-total")).to_contain_text("$3999.98")
page.wait_for_timeout(1500)
with page.expect_response("**/api/v1/orders/13") as resp:
page.get_by_role("button", name="Cancel Order").click()
def delete_product(page: Page):
page.get_by_test_id("navbar-products").click()
page.wait_for_timeout(1500)
page.get_by_test_id("product-SkyPad-Pro-view-details").click()
page.wait_for_timeout(1500)
with page.expect_response("**/api/v1/products/24") as resp:
page.get_by_role("button", name="Delete Product").click()
def test_e_2_e(page: Page):
client = skyramp.Client()
headers = {}
if os.getenv("SKYRAMP_TEST_TOKEN") is not None:
headers["Authorization"] = "Bearer " + os.getenv("SKYRAMP_TEST_TOKEN")
setup_session(page)
products_POST_response = create_product(client, headers)
edit_product(page)
create_order(client, headers, products_POST_response)
verify_order(page)
delete_product(page)
Python
# Generated by Skyramp v1.2.11 on 2025-08-08 09:51:10.326678 -0400 EDT m=+0.475189585
# Command: skyramp generate e2e rest \
# --playwright-trace e2e_test_playwright.zip \
# --trace e2e_test_trace.json \
# Import of required libraries
import skyramp
import os
import time
import pytest
import re
from playwright.sync_api import Page, expect
@pytest.fixture(scope="session")
def browser_context_args(browser_context_args, playwright):
return {"ignore_https_errors": True, "service_workers": "block"}
# URL for test requests
URL_demoshop = "https://demoshop.skyramp.dev"
def test_e_2_e(page: Page):
# Invocation of Skyramp Client
client = skyramp.Client()
# Definition of authentication header
headers = {}
if os.getenv("SKYRAMP_TEST_TOKEN") is not None:
headers["Authorization"] = "Bearer " + os.getenv("SKYRAMP_TEST_TOKEN")
page.goto("http://demoshop.skyramp.dev/products")
# Javascript download detected. Wait until potential hydration is completed
page.wait_for_timeout(1500)
page.get_by_role("button", name="Edit Session ID").click()
page.get_by_role("textbox").click()
page.get_by_role("textbox").fill("ybe-shoot")
page.get_by_role("textbox").press("ArrowDown")
page.get_by_role("textbox").fill("skyramp-e2e-demo")
page.get_by_role("button", name="Save Session ID").click()
# Javascript download detected. Wait until potential hydration is completed
page.wait_for_timeout(1500)
# Wait to finish any potential hydration
page.wait_for_timeout(1500)
with page.expect_response("**/api/v1/reset") as resp:
page.get_by_test_id("navbar-clear-state").click()
# Javascript download detected. Wait until potential hydration is completed
page.wait_for_timeout(1500)
# Request Body
products_POST_request_body = r'''{
"category": "Tablets",
"description": "High-performance tablet powered by Skyramp",
"image_url": "https://shorturl.at/sZeO8",
"in_stock": true,
"name": "SkyPad Pro",
"price": 999.99
}'''
# Execute Request
products_POST_response = client.send_request(
url=URL_demoshop,
path="/api/v1/products",
method="POST",
body=products_POST_request_body,
headers=headers
)
# Generated Assertions
assert products_POST_response.status_code == 201
page.goto("http://demoshop.skyramp.dev/products")
# Javascript download detected. Wait until potential hydration is completed
page.wait_for_timeout(1500)
page.get_by_test_id("product-SkyPad-Pro-view-details").click()
page.get_by_role("button", name="Edit Product").click()
page.get_by_test_id("product-detail-input-price").click()
page.get_by_test_id("product-detail-input-price").press("ArrowLeft")
page.get_by_test_id("product-detail-input-price").press("ArrowLeft")
page.get_by_test_id("product-detail-input-price").press("ArrowLeft")
page.get_by_test_id("product-detail-input-price").press("ArrowLeft")
page.get_by_test_id("product-detail-input-price").press("ArrowLeft")
page.get_by_test_id("product-detail-input-price").press("ArrowLeft")
playwright_request_1 = {
"category": "Tablets",
"description": "High-performance tablet powered by Skyramp",
"image_url": "https://shorturl.at/sZeO8",
"in_stock": True,
"name": "SkyPad Pro",
"price": 1999.99
}
page.get_by_test_id("product-detail-input-price").fill(str(skyramp.get_value(playwright_request_1, "price")))
# Wait to finish any potential hydration
page.wait_for_timeout(1500)
with page.expect_response("**/api/v1/products/24") as resp:
page.get_by_role("button", name="Save Product").click()
# Request Body
orders_POST_request_body = r'''{
"customer_email": "sahil@skyramp.dev",
"items": [
{
"product_id": 24,
"quantity": 2
}
]
}'''
# Execute Request
orders_POST_response = client.send_request(
url=URL_demoshop,
path="/api/v1/orders",
method="POST",
body=orders_POST_request_body,
headers=headers,
data_override={"items.0.product_id": skyramp.get_response_value(products_POST_response, "product_id")}
)
# Generated Assertions
assert orders_POST_response.status_code == 201
page.get_by_test_id("navbar-orders").click()
# Javascript download detected. Wait until potential hydration is completed
page.wait_for_timeout(1500)
page.get_by_test_id("order-sahil@skyramp.dev - 1 items").get_by_test_id("order-view-details-btn").click()
# Javascript download detected. Wait until potential hydration is completed
page.wait_for_timeout(1500)
expect(page.get_by_test_id("order-detail-value-total")).to_contain_text("$3999.98")
# Wait to finish any potential hydration
page.wait_for_timeout(1500)
with page.expect_response("**/api/v1/orders/13") as resp:
page.get_by_role("button", name="Cancel Order").click()
page.get_by_test_id("navbar-products").click()
# Javascript download detected. Wait until potential hydration is completed
page.wait_for_timeout(1500)
page.get_by_test_id("product-SkyPad-Pro-view-details").click()
# Wait to finish any potential hydration
page.wait_for_timeout(1500)
with page.expect_response("**/api/v1/products/24") as resp:
page.get_by_role("button", name="Delete Product").click()
Skyramp Differentiators
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.
Here is an example of a modularized test using the Skyramp Agent:
# Generated by Skyramp v1.2.9 on 2025-08-08 10:14:53.463035 -0400 EDT m=+22287.450243876
# Command: skyramp generate e2e rest \
# --framework pytest \
# --language python \
# --overwrite true \
# --playwright-trace e2e_test_playwright.zip \
# --trace e2e_test_trace.json \
# Import of required libraries
import skyramp
import os
import time
import pytest
import re
from playwright.sync_api import Page, expect
@pytest.fixture(scope="session")
def browser_context_args(browser_context_args, playwright):
return {"ignore_https_errors": True, "service_workers": "block"}
# URL for test requests
URL_demoshop = "https://demoshop.skyramp.dev"
def setup_session(page: Page):
page.goto("http://demoshop.skyramp.dev/products")
page.wait_for_timeout(1500)
page.get_by_role("button", name="Edit Session ID").click()
page.get_by_role("textbox").click()
page.get_by_role("textbox").fill("ybe-shoot")
page.get_by_role("textbox").press("ArrowDown")
page.get_by_role("textbox").fill("skyramp-e2e-demo")
page.get_by_role("button", name="Save Session ID").click()
page.wait_for_timeout(1500)
page.wait_for_timeout(1500)
with page.expect_response("**/api/v1/reset") as resp:
page.get_by_test_id("navbar-clear-state").click()
page.wait_for_timeout(1500)
def create_product(client, headers):
products_POST_request_body = r'''{
"category": "Tablets",
"description": "High-performance tablet powered by Skyramp",
"image_url": "https://shorturl.at/sZeO8",
"in_stock": true,
"name": "SkyPad Pro",
"price": 999.99
}'''
products_POST_response = client.send_request(
url=URL_demoshop,
path="/api/v1/products",
method="POST",
body=products_POST_request_body,
headers=headers
)
assert products_POST_response.status_code == 201
return products_POST_response
def edit_product(page: Page):
page.goto("http://demoshop.skyramp.dev/products")
page.wait_for_timeout(1500)
page.get_by_test_id("product-SkyPad-Pro-view-details").click()
page.get_by_role("button", name="Edit Product").click()
page.get_by_test_id("product-detail-input-price").click()
for _ in range(6):
page.get_by_test_id("product-detail-input-price").press("ArrowLeft")
page.get_by_test_id("product-detail-input-price").fill("1999.99")
page.wait_for_timeout(1500)
with page.expect_response("**/api/v1/products/24") as resp:
page.get_by_role("button", name="Save Product").click()
def create_order(client, headers, products_POST_response):
orders_POST_request_body = r'''{
"customer_email": "sahil@skyramp.dev",
"items": [
{
"product_id": 24,
"quantity": 2
}
]
}'''
orders_POST_response = client.send_request(
url=URL_demoshop,
path="/api/v1/orders",
method="POST",
body=orders_POST_request_body,
headers=headers,
data_override={"items.0.product_id": skyramp.get_response_value(products_POST_response, "product_id")}
)
assert orders_POST_response.status_code == 201
return orders_POST_response
def verify_order(page: Page):
page.get_by_test_id("navbar-orders").click()
page.wait_for_timeout(1500)
page.get_by_test_id("order-sahil@skyramp.dev - 1 items").get_by_test_id("order-view-details-btn").click()
page.wait_for_timeout(1500)
expect(page.get_by_test_id("order-detail-value-total")).to_contain_text("$3999.98")
page.wait_for_timeout(1500)
with page.expect_response("**/api/v1/orders/13") as resp:
page.get_by_role("button", name="Cancel Order").click()
def delete_product(page: Page):
page.get_by_test_id("navbar-products").click()
page.wait_for_timeout(1500)
page.get_by_test_id("product-SkyPad-Pro-view-details").click()
page.wait_for_timeout(1500)
with page.expect_response("**/api/v1/products/24") as resp:
page.get_by_role("button", name="Delete Product").click()
def test_e_2_e(page: Page):
client = skyramp.Client()
headers = {}
if os.getenv("SKYRAMP_TEST_TOKEN") is not None:
headers["Authorization"] = "Bearer " + os.getenv("SKYRAMP_TEST_TOKEN")
setup_session(page)
products_POST_response = create_product(client, headers)
edit_product(page)
create_order(client, headers, products_POST_response)
verify_order(page)
delete_product(page)
Python
# Generated by Skyramp v1.2.11 on 2025-08-08 09:51:10.326678 -0400 EDT m=+0.475189585
# Command: skyramp generate e2e rest \
# --playwright-trace e2e_test_playwright.zip \
# --trace e2e_test_trace.json \
# Import of required libraries
import skyramp
import os
import time
import pytest
import re
from playwright.sync_api import Page, expect
@pytest.fixture(scope="session")
def browser_context_args(browser_context_args, playwright):
return {"ignore_https_errors": True, "service_workers": "block"}
# URL for test requests
URL_demoshop = "https://demoshop.skyramp.dev"
def test_e_2_e(page: Page):
# Invocation of Skyramp Client
client = skyramp.Client()
# Definition of authentication header
headers = {}
if os.getenv("SKYRAMP_TEST_TOKEN") is not None:
headers["Authorization"] = "Bearer " + os.getenv("SKYRAMP_TEST_TOKEN")
page.goto("http://demoshop.skyramp.dev/products")
# Javascript download detected. Wait until potential hydration is completed
page.wait_for_timeout(1500)
page.get_by_role("button", name="Edit Session ID").click()
page.get_by_role("textbox").click()
page.get_by_role("textbox").fill("ybe-shoot")
page.get_by_role("textbox").press("ArrowDown")
page.get_by_role("textbox").fill("skyramp-e2e-demo")
page.get_by_role("button", name="Save Session ID").click()
# Javascript download detected. Wait until potential hydration is completed
page.wait_for_timeout(1500)
# Wait to finish any potential hydration
page.wait_for_timeout(1500)
with page.expect_response("**/api/v1/reset") as resp:
page.get_by_test_id("navbar-clear-state").click()
# Javascript download detected. Wait until potential hydration is completed
page.wait_for_timeout(1500)
# Request Body
products_POST_request_body = r'''{
"category": "Tablets",
"description": "High-performance tablet powered by Skyramp",
"image_url": "https://shorturl.at/sZeO8",
"in_stock": true,
"name": "SkyPad Pro",
"price": 999.99
}'''
# Execute Request
products_POST_response = client.send_request(
url=URL_demoshop,
path="/api/v1/products",
method="POST",
body=products_POST_request_body,
headers=headers
)
# Generated Assertions
assert products_POST_response.status_code == 201
page.goto("http://demoshop.skyramp.dev/products")
# Javascript download detected. Wait until potential hydration is completed
page.wait_for_timeout(1500)
page.get_by_test_id("product-SkyPad-Pro-view-details").click()
page.get_by_role("button", name="Edit Product").click()
page.get_by_test_id("product-detail-input-price").click()
page.get_by_test_id("product-detail-input-price").press("ArrowLeft")
page.get_by_test_id("product-detail-input-price").press("ArrowLeft")
page.get_by_test_id("product-detail-input-price").press("ArrowLeft")
page.get_by_test_id("product-detail-input-price").press("ArrowLeft")
page.get_by_test_id("product-detail-input-price").press("ArrowLeft")
page.get_by_test_id("product-detail-input-price").press("ArrowLeft")
playwright_request_1 = {
"category": "Tablets",
"description": "High-performance tablet powered by Skyramp",
"image_url": "https://shorturl.at/sZeO8",
"in_stock": True,
"name": "SkyPad Pro",
"price": 1999.99
}
page.get_by_test_id("product-detail-input-price").fill(str(skyramp.get_value(playwright_request_1, "price")))
# Wait to finish any potential hydration
page.wait_for_timeout(1500)
with page.expect_response("**/api/v1/products/24") as resp:
page.get_by_role("button", name="Save Product").click()
# Request Body
orders_POST_request_body = r'''{
"customer_email": "sahil@skyramp.dev",
"items": [
{
"product_id": 24,
"quantity": 2
}
]
}'''
# Execute Request
orders_POST_response = client.send_request(
url=URL_demoshop,
path="/api/v1/orders",
method="POST",
body=orders_POST_request_body,
headers=headers,
data_override={"items.0.product_id": skyramp.get_response_value(products_POST_response, "product_id")}
)
# Generated Assertions
assert orders_POST_response.status_code == 201
page.get_by_test_id("navbar-orders").click()
# Javascript download detected. Wait until potential hydration is completed
page.wait_for_timeout(1500)
page.get_by_test_id("order-sahil@skyramp.dev - 1 items").get_by_test_id("order-view-details-btn").click()
# Javascript download detected. Wait until potential hydration is completed
page.wait_for_timeout(1500)
expect(page.get_by_test_id("order-detail-value-total")).to_contain_text("$3999.98")
# Wait to finish any potential hydration
page.wait_for_timeout(1500)
with page.expect_response("**/api/v1/orders/13") as resp:
page.get_by_role("button", name="Cancel Order").click()
page.get_by_test_id("navbar-products").click()
# Javascript download detected. Wait until potential hydration is completed
page.wait_for_timeout(1500)
page.get_by_test_id("product-SkyPad-Pro-view-details").click()
# Wait to finish any potential hydration
page.wait_for_timeout(1500)
with page.expect_response("**/api/v1/products/24") as resp:
page.get_by_role("button", name="Delete Product").click()
Skyramp Differentiators
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.
Here is an example of a modularized test using the Skyramp Agent:
# Generated by Skyramp v1.2.9 on 2025-08-08 10:14:53.463035 -0400 EDT m=+22287.450243876
# Command: skyramp generate e2e rest \
# --framework pytest \
# --language python \
# --overwrite true \
# --playwright-trace e2e_test_playwright.zip \
# --trace e2e_test_trace.json \
# Import of required libraries
import skyramp
import os
import time
import pytest
import re
from playwright.sync_api import Page, expect
@pytest.fixture(scope="session")
def browser_context_args(browser_context_args, playwright):
return {"ignore_https_errors": True, "service_workers": "block"}
# URL for test requests
URL_demoshop = "https://demoshop.skyramp.dev"
def setup_session(page: Page):
page.goto("http://demoshop.skyramp.dev/products")
page.wait_for_timeout(1500)
page.get_by_role("button", name="Edit Session ID").click()
page.get_by_role("textbox").click()
page.get_by_role("textbox").fill("ybe-shoot")
page.get_by_role("textbox").press("ArrowDown")
page.get_by_role("textbox").fill("skyramp-e2e-demo")
page.get_by_role("button", name="Save Session ID").click()
page.wait_for_timeout(1500)
page.wait_for_timeout(1500)
with page.expect_response("**/api/v1/reset") as resp:
page.get_by_test_id("navbar-clear-state").click()
page.wait_for_timeout(1500)
def create_product(client, headers):
products_POST_request_body = r'''{
"category": "Tablets",
"description": "High-performance tablet powered by Skyramp",
"image_url": "https://shorturl.at/sZeO8",
"in_stock": true,
"name": "SkyPad Pro",
"price": 999.99
}'''
products_POST_response = client.send_request(
url=URL_demoshop,
path="/api/v1/products",
method="POST",
body=products_POST_request_body,
headers=headers
)
assert products_POST_response.status_code == 201
return products_POST_response
def edit_product(page: Page):
page.goto("http://demoshop.skyramp.dev/products")
page.wait_for_timeout(1500)
page.get_by_test_id("product-SkyPad-Pro-view-details").click()
page.get_by_role("button", name="Edit Product").click()
page.get_by_test_id("product-detail-input-price").click()
for _ in range(6):
page.get_by_test_id("product-detail-input-price").press("ArrowLeft")
page.get_by_test_id("product-detail-input-price").fill("1999.99")
page.wait_for_timeout(1500)
with page.expect_response("**/api/v1/products/24") as resp:
page.get_by_role("button", name="Save Product").click()
def create_order(client, headers, products_POST_response):
orders_POST_request_body = r'''{
"customer_email": "sahil@skyramp.dev",
"items": [
{
"product_id": 24,
"quantity": 2
}
]
}'''
orders_POST_response = client.send_request(
url=URL_demoshop,
path="/api/v1/orders",
method="POST",
body=orders_POST_request_body,
headers=headers,
data_override={"items.0.product_id": skyramp.get_response_value(products_POST_response, "product_id")}
)
assert orders_POST_response.status_code == 201
return orders_POST_response
def verify_order(page: Page):
page.get_by_test_id("navbar-orders").click()
page.wait_for_timeout(1500)
page.get_by_test_id("order-sahil@skyramp.dev - 1 items").get_by_test_id("order-view-details-btn").click()
page.wait_for_timeout(1500)
expect(page.get_by_test_id("order-detail-value-total")).to_contain_text("$3999.98")
page.wait_for_timeout(1500)
with page.expect_response("**/api/v1/orders/13") as resp:
page.get_by_role("button", name="Cancel Order").click()
def delete_product(page: Page):
page.get_by_test_id("navbar-products").click()
page.wait_for_timeout(1500)
page.get_by_test_id("product-SkyPad-Pro-view-details").click()
page.wait_for_timeout(1500)
with page.expect_response("**/api/v1/products/24") as resp:
page.get_by_role("button", name="Delete Product").click()
def test_e_2_e(page: Page):
client = skyramp.Client()
headers = {}
if os.getenv("SKYRAMP_TEST_TOKEN") is not None:
headers["Authorization"] = "Bearer " + os.getenv("SKYRAMP_TEST_TOKEN")
setup_session(page)
products_POST_response = create_product(client, headers)
edit_product(page)
create_order(client, headers, products_POST_response)
verify_order(page)
delete_product(page)