Cloud concept · Updated

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

In short

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.

Cloud Concepts Hub →

6 key aspects of UI Testing

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

01
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.

02
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.

03
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.

04
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.

05
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.

06
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 CodeBuildAWS 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.

AWS CodePipelineAWS 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.

AWS Device FarmAWS 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.

Amazon S3Amazon 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.

UI Testing exam questions

Real practice exam questions on UI Testing, with the correct answer and its explanation. Answer them with every option in the exam simulator.

DOP-C02

A company uses AWS CodePipeline to deploy a single-page billing application to an isolated staging environment. Unit tests and API integration tests already block releases. Customers have reported that changing an invoice's currency sometimes leaves the previous total displayed, even though the pricing API returns the correct recalculated amount. The defect can result from event-handler errors or mismatched frontend assets in the deployed release.

An AWS CodeBuild test action has network access to staging and an image containing Playwright and its browser dependencies. Each pipeline execution has a dedicated test account and an invoice fixture with known, different totals for USD and EUR. Recalculation completes asynchronously, so API response timing does not guarantee that the page has updated.

Which additional release gate will most reliably detect these defects in the deployed candidate without relying on fixed delays?

Show answerCORRECT ANSWER

Run Playwright against staging, sign in with the test account, open the invoice, and select EUR through the currency control. Use bounded condition-based waits to assert that the displayed currency and total match the fixture's EUR values. Fail the CodeBuild action if an interaction or assertion fails, and retain browser traces for diagnosis.

This tests the actual deployed frontend through its controls and verifies the rendered outcome. It can detect missing event handlers and frontend asset problems even when backend responses are correct. Bounded condition-based assertions accommodate asynchronous rendering without fixed sleeps, and propagating failures makes the test an effective release gate.

Practice UI Testing in a full exam

Questions on UI Testing in each practice exam, with every answer option and an explanation for each:

Start a free practice exam

What is UI Testing

3 min read

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.

Learn UI Testing in lessons

2 short lessons on UI Testing in 1 certification course.

Open the lessons