Design considerations for prompting
Summarize
Summary of Design considerations for prompting
This guidance helps ServiceNow customers generate effective Automated Test Framework (ATF) tests using Now Assist by following clear and concise prompting principles. It clarifies the scope and capabilities of test generation, focusing on creating new ATF tests within the current application scope. Importantly, test generation does not support updating or deleting existing ATF tests, nor functional or integration tests outside the ATF domain.
Show less
Key Features
- Supported Test Types: ATF tests covering forms, server operations, email handling, application navigation, reporting, and service catalog actions.
- Form APIs: Support for open/submit forms, field validation/visibility, UI actions, modal buttons, and workspace form types including serviceoperationsworkspace, assetworkspace, and cmdbworkspace.
- Server Operations: Includes user impersonation, user creation, logging, record CRUD, replay requests, catalog searches, and shopping cart operations.
- Email Operations: Generate, reply, send, and validate inbound/outbound emails.
- Application Navigator: Navigate modules and control menu/module visibility.
- Reporting: Validate report and dashboard visibility and sharing settings.
- Service Catalog: Open/order catalog items, manipulate shopping cart items, validate quantities, prices, and variables.
Effective Prompting Practices
Effective prompts are precise, well-defined, and comprehensive to enable accurate test generation. They should specify actions clearly, include complete field identifiers, roles, and values, and explicitly describe the expected test steps.
- Good prompts: Clearly state the test name, user roles, specific actions (e.g., create user, impersonate admin), field updates with exact values, and validation steps.
- Bad prompts: Are vague, incomplete, or ambiguous, lacking important details such as user roles, whether to create or impersonate users, exact field names, or expected values, leading to incorrect or incomplete test generation.
Practical Application
ServiceNow customers using Now Assist for ATF test generation should:
- Ensure prompts are explicit about the scope of the test and roles involved.
- Include all necessary details such as exact field names, values, and test steps.
- Avoid incomplete or ambiguous instructions that could cause misinterpretation.
- Focus on supported test types and actions within the current application scope.
Following these principles improves the quality and reliability of generated ATF tests, enabling efficient automated testing and validation of ServiceNow applications.
Generate your desired test by following the guided principles of effective prompting.
- Clear and concise ATF prompts that describes test steps
- Consider the scope and capability of Test generation
- Test generation is a Now Assist backed skill to create ATF tests
- The tests are created in the application scope that you are currently on
- Other types of functional or integration tests are out of Test generation scope
- Test generation can't update or delete existing ATF tests
- Test generation supports the following
- Forms: open/submit form, field validation/visibility, UI/Declarative Action and Modal button. Each form API supports workspace as formUI type, including service_operations_workspace and asset_workspace and cmdb_workspace.
- Server operations: impersonation/create user, log message, record CRUD, replay request, search catalog item and check out shopping cart.
- Email: generate, reply, send and validate inbound / outbound email
- Application Navigator: navigate to module, menu/module visibility
- Reporting: report visibility, dash board visibility and sharing
- Service Catalog: open/order catalog item, add item to shopping cart, set/validate item quantity, submit order, validate quantity, price, and variable status
| Good and effective prompts | Bad and irrelevant prompts | Comparison description |
|---|---|---|
| Write a test to create a new user with name Bill McDermott and assign the "itil" role. Create a new incident record, update the short description to "my new test record" and then validate the record description. Update caller to Bill McDermott, impact and urgency categories to "2- Medium" and submit the record. Delete the record and create a log for the deletion. | I need a new user Bill McDermott to open a new record. Make sure its called my new test record. Update caller to user, impact and urgency categories to Med. Delete the record and create a log for the deletion. | The bad prompt is irrelevant and incomplete for the following reasons:
|
| Write an ATF test, named 'incident record test', impersonate admin, create a new incident record, then update the record short description to 'test update field from example', delete the record, then log a message 'record deleted' | Create an ATF test for an admin to create an incident record. Make description test update field from example. Then delete the record | The bad prompt lacks the following:
|
| Write a test to open Apple iPhone 13 catalog item, set color to 'pink', monthly data allowance to 500MB, validate price to be $800.00 and log the price | Write a test to open iPhone, color should be pink and data should be 500. The price should be 800. Log the price | The bad prompt is incomplete for the following reasons:
|