GPT Driver User Guide
GPT Driver User Guide
GPT Driver User Guide
  • Getting Started
    • πŸš€Getting Started
    • πŸ”ƒUploading a Build File
    • πŸ§™β€β™‚οΈCreating Tests
      • Commands
        • Tap Command
        • Type Command
        • scroll Command
        • scrollUntilVisible Command
        • swipe Command
        • slide Command
        • wait Command
        • assertVisible Command
        • openLink Command
        • pressBackButton Command
        • launchApp Command
        • restartApp Command
      • πŸ‘οΈwithVision: Instructions
      • 🧠AI Instructions
    • 🏁Executing Tests
  • ☎️Device Configuration
  • βš™οΈUnder the Hood
  • Getting Around
    • ✏️Test Editor
    • πŸ›°οΈTest Overview
    • πŸ…Test Reports
    • ⏺️Test Recordings
    • πŸ‘€Settings
  • Best Practices
    • πŸ§‘β€πŸ’»API Documentation
    • Versioning
    • ↗️Templates
    • πŸ–‡οΈTest Dependencies & Prompt References
    • πŸ”—Deep Links
    • πŸ“§Email Verification
    • πŸ“‘Network Calls
    • πŸͺ‘Parameterized Strings
    • πŸ“Changing Device Location
    • πŸͺΆConditional Steps
    • 🐦Nested Steps
    • ⌚Smart Caching
    • πŸ—£οΈEnv. Variables
    • πŸ’―Bulk Step Testing for Robustness
    • πŸ“–Exact Text Assertions
    • πŸ’¬Auto-grant Permissions
  • πŸ§ͺMocking Network Data
  • 🌎Localization Testing
  • Code Generation
  • ❔FAQs
Powered by GitBook
On this page
  1. Best Practices

Env. Variables

Ensure the safe storage and retrieval of sensitive information via environment variables, maintaining confidentiality while facilitating usage within test prompts.

PreviousSmart CachingNextBulk Step Testing for Robustness

Last updated 11 months ago

  1. Access GPT Driver Settings

    • Navigate to the "Env Variables" section within the GPT Driver .

  2. Add a New Environment Variable

    • Select the "Add Env Variable" option.

  3. Input Key and Value

    • Enter the necessary information in the provided fields:

      • Key: Assign a name/label to your variable (e.g., 'api-token').

      • Value: Input the actual token associated with the key.

  4. Secure Entry for Confidentiality

    • Locate the checkbox labeled 'Secure Entry: Omit Value from Interfaces and Logs.'

    • Check this box to ensure the value remains hidden from interfaces and logs for added security.

  5. Usage in Test Prompts

    • To utilize this variable in test prompts, follow this format:

      • Enclose the variable name within double curly brackets with 'env.' followed by your chosen key:

      {{env.api-token}}

    • This format also mirrors how are utilized.

The inclusion of double quotations (") around the environment variable {{env.variable}} is not required.


  1. An example of a typical CURL command might include the following:

    • Perform a DELETE request to clean a user account before initiating a test.

curl -X DELETE "https://api.example.com/users/123/order-history" -H "Authorization: Bearer {{env.apitoken}}"

How to use a stored secret Env. Variable in a

πŸ—£οΈ
Curl Command
Settings
timestamps