System Variables

System Variables

Overview

Zoho QEngine provides certain built-in variables, referred to as System Variables, which represent dynamic elements of the system under test. They are pre-defined variables that enhance test case flexibility, ensuring more reliable and adaptable test cases for your testing platforms. These are designed to adapt to different environments, platforms, or states of the application being tested.

These can be categorized into three:
  1. Web variables
  2. Mobile variables
  3. General variables

Web variables

The following system variables are compatible with your web test cases:
  • BROWSER

  • OS

  • SCREEN_RESOLUTION

  • BROWSER_VERSION



Syntax
Return Type
Description 
$BROWSER
STRING
Variable holds details of the browser in which the test case is running.
$OS
STRING
Variable holds details of the OS in which the test case is running.
$SCREEN_RESOLUTION
STRING
Variable holds the screen resolution of the browser in which the test case is running.
$BROWSER_VERSION
STRING
Variable holds the details of the version number of the browser in which the test case is running.

Example

  1. info($BROWSER); // Logs shows the returned value of the variable as: Info - chrome
  2. info($OS); // Logs shows the returned value of the variable as: Info - Ubuntu
  3. info($SCREEN_RESOLUTION); // Logs shows the returned value of the variable as: Info - (1024, 768)
  4. info($BROWSER_VERSION); // Logs shows the returned value of the variable as: Info - 96 

Note: The returned values shown in the example can vary according to the web browser versions and screen resolutions used.

Mobile variables

The following system variables are compatible with your mobile test cases :
  1. OS_VERSION
  2. DEVICE



Syntax
Return Type
Description
$OS_VERSION
STRING
Variable holds the details of the OS version of the device on which the test case is running.
$DEVICE
STRING
Variable holds the details of the device on which the test case is running.

Example

  1. info($OS_VERSION); // Logs shows the returned value of the variable as: Info - 12.0
  2. info($DEVICE); // Logs shows the returned value of the variable as: Info - Pixel_6_API_32

Notes

Note: The returned values shown in the example can vary according to the OS versions and screen devices used.

General variables

The following system variables can be used for both web and mobile test cases:
  • TODAY 
  • TESTCASE_ID

  • IS_PREVIEW_RUN 

  • NOW 

Syntax
Return Type
Description
$TODAY
STRING
Variable holds the current date of the machine or device on which the test case is running.
$TESTCASE_ID
STRING
A unique ID is generated for every test case upon its creation, and this ID is found in the URL of the corresponding test case. This variable is what holds the unique test case ID for the currently running test case.
$IS_PREVIEW_RUN
BOOLEAN

Variable validates whether the test case is running in preview or not.

  • If the value returned is true, the test case is running in preview.

  • If the value returned is false, the test case is running as per test plan.

$NOW
STRING

Variable holds the current date and time.


Example
  1. info($TODAY); // Logs shows the returned value of the variable as: Info - 16/10/2023

  2. info($TESTCASE_ID); // Logs shows the returned value of the variable as: Info - 1090000000722519 

  3. info($IS_PREVIEW_RUN); // Logs shows the returned value of the variable as: Info - true

  4. info($NOW); // Logs shows the returned value of the variable as:  Info - 16/10/2023 17:58
NotesNote: The returned values shown in the example can vary according to the real-time data available.

Related Links

  1. Test Cases
  2. Tasks for Web Testing
  3. Variables



        Create. Review. Publish.

        Write, edit, collaborate on, and publish documents to different content management platforms.

        Get Started Now


          Access your files securely from anywhere

            Zoho CRM Training Programs

            Learn how to use the best tools for sales force automation and better customer engagement from Zoho's implementation specialists.

            Zoho CRM Training
              Redefine the way you work
              with Zoho Workplace

                Zoho DataPrep Personalized Demo

                If you'd like a personalized walk-through of our data preparation tool, please request a demo and we'll be happy to show you how to get the best out of Zoho DataPrep.

                Zoho CRM Training

                  Create, share, and deliver

                  beautiful slides from anywhere.

                  Get Started Now


                    Zoho Sign now offers specialized one-on-one training for both administrators and developers.

                    BOOK A SESSION







                                Quick LinksWorkflow AutomationData Collection
                                Web FormsEnterpriseOnline Data Collection Tool
                                Embeddable FormsBankingBegin Data Collection
                                Interactive FormsWorkplaceData Collection App
                                CRM FormsCustomer ServiceAccessible Forms
                                Digital FormsMarketingForms for Small Business
                                HTML FormsEducationForms for Enterprise
                                Contact FormsE-commerceForms for any business
                                Lead Generation FormsHealthcareForms for Startups
                                Wordpress FormsCustomer onboardingForms for Small Business
                                No Code FormsConstructionRSVP tool for holidays
                                Free FormsTravelFeatures for Order Forms
                                Prefill FormsNon-Profit

                                Intake FormsLegal
                                Mobile App
                                Form DesignerHR
                                Mobile Forms
                                Card FormsFoodOffline Forms
                                Assign FormsPhotographyMobile Forms Features
                                Translate FormsReal EstateKiosk in Mobile Forms
                                Electronic Forms
                                Drag & drop form builder

                                Notification Emails for FormsAlternativesSecurity & Compliance
                                Holiday FormsGoogle Forms alternative GDPR
                                Form to PDFJotform alternativeHIPAA Forms
                                Email FormsFormstack alternativeEncrypted Forms

                                Wufoo alternativeSecure Forms

                                TypeformWCAG


                                    All-in-one knowledge management and training platform for your employees and customers.

                                              Create. Review. Publish.

                                              Write, edit, collaborate on, and publish documents to different content management platforms.

                                              Get Started Now




                                                                You are currently viewing the help pages of Qntrl’s earlier version. Click here to view our latest version—Qntrl 3.0's help articles.




                                                                    Manage your brands on social media


                                                                      • Desk Community Learning Series


                                                                      • Digest


                                                                      • Functions


                                                                      • Meetups


                                                                      • Kbase


                                                                      • Resources


                                                                      • Glossary


                                                                      • Desk Marketplace


                                                                      • MVP Corner


                                                                      • Word of the Day


                                                                      • Ask the Experts


                                                                        Zoho Sheet Resources

                                                                         

                                                                            Zoho Forms Resources


                                                                              Secure your business
                                                                              communication with Zoho Mail


                                                                              Mail on the move with
                                                                              Zoho Mail mobile application

                                                                                Stay on top of your schedule
                                                                                at all times


                                                                                Carry your calendar with you
                                                                                Anytime, anywhere




                                                                                      Zoho Sign Resources

                                                                                        Sign, Paperless!

                                                                                        Sign and send business documents on the go!

                                                                                        Get Started Now




                                                                                                Zoho TeamInbox Resources





                                                                                                          Zoho DataPrep Demo

                                                                                                          Get a personalized demo or POC

                                                                                                          REGISTER NOW


                                                                                                            Design. Discuss. Deliver.

                                                                                                            Create visually engaging stories with Zoho Show.

                                                                                                            Get Started Now








                                                                                                                                • Related Articles

                                                                                                                                • Variables

                                                                                                                                  1. Overview A variable acts as a dynamic placeholder, where you can store values you want to pass during testing. These values can be of various data types, such as strings, numbers, booleans, and connections. By using variables, you can create ...
                                                                                                                                • Creating mobile test cases using editor or builder mode

                                                                                                                                  In a nutshell Automated mobile test cases for Android and iOS can be created manually using Editor or Builder mode within Zoho QEngine's test case editor. Editor is a pro-code scripting mode that gives automation experts full control to write, ...
                                                                                                                                • Roles and permissions

                                                                                                                                  In a nutshell Zoho QEngine uses role-based access control (RBAC) to manage what each user can see and do across the platform. Roles are assigned to users at two levels: portal level (Super Admin, Admin) for organization-wide access, and project level ...
                                                                                                                                • Audit log in Zoho QEngine

                                                                                                                                  In a nutshell The audit log in Zoho QEngine provides a centralized record of activities across the portal. It captures creation, update, and deletion events across all project components, from Test Cases, Test Suites, to Test Plans. Built-in filters ...
                                                                                                                                • Understand Mobile Testing

                                                                                                                                  In a nutshell Zoho QEngine provides dedicated testing environments for both Android and iOS, each designed to handle the platform-specific devices, screen sizes, and app interactions unique to that ecosystem. Test cases can be created using the ...
                                                                                                                                  Wherever you are is as good as
                                                                                                                                  your workplace

                                                                                                                                    Resources

                                                                                                                                    Videos

                                                                                                                                    Watch comprehensive videos on features and other important topics that will help you master Zoho CRM.



                                                                                                                                    eBooks

                                                                                                                                    Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho CRM.



                                                                                                                                    Webinars

                                                                                                                                    Sign up for our webinars and learn the Zoho CRM basics, from customization to sales force automation and more.



                                                                                                                                    CRM Tips

                                                                                                                                    Make the most of Zoho CRM with these useful tips.



                                                                                                                                      Zoho Show Resources