Skip to main content

Swantide Prompting Guide - Testing

Written by Engineering Swantide
Updated over 4 months ago

Disclaimer: Swantide is a generative AI platform, therefore it may be inaccurate, incomplete, or not applicable. The output from Swantide is based on the inputs provided by the user, and any content generated by Swantide must be thoroughly reviewed and verified by you prior to use. Do not implement, rely on, or act on AI-generated output without first confirming its accuracy and suitability for your specific needs.

Testing (QA + UAT)

UAT Scripts

Swantide is a great way to write UAT scripts for updates you are making in Salesforce. The best use cases are either to 1) ask Swantide to write a UAT script based on a user story or technical design document, or 2) ask Swantide to write a UAT script for a specific metadata components.

Best Practices

  • Take into consideration the size and scope of what you are writing test cases for, and the rule of thumb that Swantide generates output of approximately 1 page, and refine your prompt accordingly. Imagine you want to write a test script for your Opportunity Closing Flow - if it is a very simple flow, you may be able to simply ask for a test script for the flow. If it is a very complex flow (i.e. handling multiple deal types, updating dozens of fields, triggering other flows), refine your prompt to focus on certain deal types, certain personas, etc.

  • If you are looking for an output in a specific format, make sure you tell Swantide, the AI Assistant will use your instructions in creating the user story

Sample Prompts

  • “Write me UAT test scripts based on the following user story {insert user story}, covering each edge case. Please include testing steps to follow, expected results, and classification if it is a positive or negative case.”

  • “Write me UAT test scripts based on this {insert metadata component type} named {insert metadata name}, covering each edge case. Please include testing steps to follow, expected results, and classification if it is a positive or negative case.”

Apex Test Classes

Swantide is also a great way for writing apex test classes and evaluating apex test classes.

Sample Prompts

“Write me a test class for {insert class name}, and ensure that you have at least 80% code coverage with the test class that you write”

“What % of code coverage does the ‘{insert test class name} provide for the {insert parent class name}? I want you to determine code coverage % by reviewing the lines of code and functions that are covered in the test class, rather than by running an actual test in the Salesforce org itself.

Note that the second sentence may be needed because Swantide does not run actual tests in the org itself, but can provide an estimate of code coverage by looking at the code, function, and methods covered in the class. Expect a ~20% range in output.

Did this answer your question?