Skip to content

Test Authoring: Assertions and mobile web updates - #3692

Open
karansharmasauce wants to merge 2 commits into
mainfrom
test-authoring
Open

karansharmasauce wants to merge 2 commits into
mainfrom
test-authoring

Conversation

@karansharmasauce

Copy link
Copy Markdown
Collaborator

Description

Updates the Sauce AI Test Authoring docs for the soft/hard assertion failure modes and Mobile web support.

Generate Test Case (generate-your-test-case.md)

  • New Assertions section: soft vs. hard failure modes, setting the test case default, and overriding it for a single step in the Add Test Assertion dialog.
  • Select Your Application Type rewritten as steps for Web, Mobile web, and Mobile, with a note that Mobile web tests are generated on emulators/simulators.
  • New Use Data Variables in Your Prompt subsection, linked to the Data Variables doc.

Run Test Cases (run-your-test-cases.md)

  • New Run a Mobile Web Test Case section: saved Mobile web tests can run on real devices, emulators, and simulators.

Manage Test Cases (manage-your-test-cases.md)

  • Add an Assertion now covers failure modes and the Add assertion above / below menu.

AI Authoring Prompting Guide (ai-authoring-prompting-guide.md)

  • Added a variable scope table and a common variable mistakes table.
  • New items 9. Ask for the Assertions You Want and 10. Choose Which Assertions Block the Test.
  • New If the Generated Test Is Not What You Expected troubleshooting table.

Other

  • Added a description to the frontmatter of all Test Authoring docs.
  • Shortened the Prompting Guides sidebar labels (e.g. "AI Authoring Prompting Guide" → "AI Authoring") so the category name isn't repeated.
  • Replaced screenshots that showed the old two-option (Web / Mobile) UI and added screenshots for the assertion flow.
  • Removed 23 images from static/img/ai-authoring/ that no doc referenced.

Motivation and Context

Test Authoring now supports Mobile web as an application type and soft or hard assertion failure modes. Before this PR, the docs described only Web and Mobile, had no failure mode guidance, and many screenshots showed the old UI.

Known follow-ups (not in this PR):

  • manage-test-cases-16.png and manage-test-cases-17.png still show the old two-option panel.
  • The IDE plugin doc (ide-plugins/ai-test-authoring.md) still shows only Web / Mobile. We still need to confirm with the product team whether the IDE plugin supports Mobile web.

Types of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation fix (typos, incorrect content, missing content, etc.)

… variable guidance, overview updates, and refreshed screenshots
@github-actions

Copy link
Copy Markdown

Deploy preview ready for 3692!
https://docs.dev.saucelabs.net/pr-preview/pr-3692

id: data-variables
title: Data Variables
sidebar_label: Data Variables
description: "Store usernames, passwords, URLs, and other reusable test data as Data Variables and reference them in Sauce AI Test Authoring prompts using {{variable_name}} syntax."

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

more accurate might be the pseudocode {{scope:variable_name}}

<img src={useBaseUrl('/img/ai-authoring/generate-test-case/test-case-3.png')} alt=" test case" width="100%"/>

:::note Mobile web
Generation runs on an **emulated device**: an Android emulator or an iOS simulator. Emulated devices start quickly and are the fastest way to author and iterate on a mobile web flow.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change this to be more accurate as we are not using smu/sim for generation actually:
Generation runs on emulated device dimensions based on your preferred mobile device selected.

:::note Mobile web
Generation runs on an **emulated device**: an Android emulator or an iOS simulator. Emulated devices start quickly and are the fastest way to author and iterate on a mobile web flow.

Once the test case is saved, you can run it against **real mobile devices** as well as emulators and simulators. Authoring happens on an emulated device; execution is not limited to one. See [**Run Test Cases**](/docs/sauce-ai/test-authoring/run-your-test-cases.md#run-a-mobile-web-test-case).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yo ucould also bold the emu/sim part


In both cases the test case itself is reported as **failed**. A soft assertion does not hide a broken check, it only keeps the test running if possible so that the checks after it still report.

When Sauce AI generates your test case:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bogdan-karmyzow Could you pls review this part to make sure it follows the implementation?

@github-actions

Copy link
Copy Markdown

Deploy preview ready for 3692!
https://docs.dev.saucelabs.net/pr-preview/pr-3692

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants