CLOUD CONCEPT

UI Testing

UI testing verifies that an application's user interface behaves correctly when users interact with it.

Cloud Concepts Hub →

What is UI Testing

UI testing exercises visible controls, navigation, input handling, and displayed results to detect defects that lower-level tests can miss. In cloud delivery pipelines, automated UI tests provide release confidence by checking important user journeys against deployed applications before promotion.

UI testing validates an application through its user-facing interface rather than only calling internal functions or service APIs. Tests interact with controls such as buttons, forms, menus, and links, then assert observable outcomes. For example, a test might sign in, add an item to a shopping cart, submit an order using a payment sandbox, and verify that the confirmation page shows the correct total. UI tests can be manual or automated, but automated execution is especially important for repeatable CI/CD checks.

UI testing describes how a test interacts with the application, not necessarily the test's scope or business purpose. A UI component test can run with mocked dependencies, while a browser-based end-to-end test can exercise the frontend, authentication, APIs, and database together. An acceptance test may use the UI to verify business requirements, but acceptance testing does not require a UI. Unit tests check isolated behavior, integration tests check interactions between components, and security scans look for particular vulnerability classes; UI tests do not replace these checks.

In a cloud pipeline, a common sequence is to build an immutable application artifact, run fast unit and integration checks, deploy the artifact to an isolated test environment, and execute UI tests against that environment. A runner uses a framework such as Playwright, Selenium, or Cypress with the required browser dependencies. The test process must report failures through its exit status so the pipeline can block promotion. Publishing a test report without failing the test action does not create an effective release gate.

The environment must be ready before tests start. Check application health and dependency readiness, provide network access from the runner, and create controlled test accounts and data. Use unique data for parallel runs and clean it up afterward to prevent collisions. Retrieve credentials securely instead of embedding them in source code, and give the runner only the permissions it needs. Avoid destructive production transactions; use isolated environments and sandbox integrations for purchase or deletion scenarios.

Reliable automation uses stable element identifiers or accessible roles, explicit assertions, and condition-based waits. Fixed sleep intervals often make tests either unnecessarily slow or unreliable when network latency changes. Capture screenshots, browser console output, and execution traces when failures occur, while protecting credentials and personal information in those artifacts. Pin browser and framework versions where practical so changes to the test environment do not unexpectedly alter results.

UI suites are generally slower and more expensive to maintain than lower-level tests, especially when they exercise complete distributed workflows. Run a small set of critical smoke journeys on each relevant change, and schedule broader browser, viewport, or device coverage according to risk. Parallel execution reduces elapsed time but increases resource consumption and requires independent test data. Investigate flaky tests rather than masking persistent failures with unlimited retries.

A successful UI test does not prove that an application is secure, accessible, visually correct in every layout, or capable of handling production traffic. Those concerns require appropriate additional checks. For exam scenarios, identify whether the requirement is to validate user interactions, component behavior, service integration, business acceptance, or vulnerabilities, then select the corresponding test type and enforce its result at the appropriate pipeline stage.

Key aspects of UI Testing

Effective UI testing combines realistic user interactions, reliable automation, risk-based coverage, and enforceable pipeline outcomes.

User-visible behavior

Tests perform interactions and assert outcomes that users can observe, such as validation messages, navigation changes, or completed transactions. Checking that a page loads is not enough to verify a complete workflow.

Automated release gates

Execute important UI checks against a deployed test environment before promoting the application. Ensure failed assertions produce a failed pipeline action rather than merely generating a report.

Deterministic execution

Use stable selectors, condition-based waits, controlled dependencies, and isolated test data. These practices reduce failures caused by timing differences or shared state rather than application defects.

Risk-based coverage

Prioritize critical journeys and relevant browser or device combinations. Keep frequent checks focused, and run broader suites when their additional execution time and cost are justified.

Complementary testing

Combine UI tests with unit tests, integration tests, acceptance checks, and security scans. UI interaction is a testing approach, while end-to-end scope and acceptance criteria describe different dimensions of a test.

Actionable failure evidence

Preserve screenshots, traces, logs, and structured test results with the tested application version. Apply access controls and retention policies because these artifacts can contain sensitive data.

Cloud services for UI Testing

AWS CodePipeline can coordinate deployment to a test environment and invoke a CodeBuild action that runs automated browser tests against the deployed endpoint. CodeBuild supplies the execution environment, while the test framework performs interactions and assertions. For mobile application coverage, AWS Device Farm provides hosted physical devices. Diagnostic artifacts can be retained in Amazon S3 with controlled access and retention. The pipeline must evaluate the actual test outcome before allowing promotion; storing reports or screenshots alone does not prevent a faulty release.

AWS CodeBuild image AWS CodeBuild

AWS CodeBuild can execute browser automation frameworks in a build environment containing the necessary browsers and dependencies. Configure the test command to return a failure status when assertions fail, and publish supported test reports and diagnostic artifacts.

Open AWS CodeBuild →
AWS CodePipeline image AWS CodePipeline

AWS CodePipeline orchestrates build, deployment, and test actions so UI checks run before release promotion. It coordinates the workflow; a test runner such as CodeBuild executes the UI automation.

Open AWS CodePipeline →
AWS Device Farm image AWS Device Farm

AWS Device Farm supports automated testing of mobile applications on hosted physical devices. It helps teams validate UI behavior across device configurations without maintaining their own physical device fleet.

Open AWS Device Farm →
Amazon Simple Storage Service image Amazon S3

Amazon S3 can store UI test artifacts such as screenshots, traces, videos, and exported reports. Restrict access, configure appropriate encryption, and use lifecycle rules to control retention and storage cost.

Open Amazon S3 →