QATTS Technical Docs
2.0.0 Main
2.0.0 Main
  • QATTS Product Documentation
  • Getting Started
    • About QATTS
      • A Quick Tour of QATTS
      • Terminology
      • Relationship
    • Dashboard
  • Getting to know
  • Administration
    • Product
      • How to Add Product
      • Configure Test Data Repository
    • Code Branch
      • How to Add Code Branch
    • Feature
    • Client
      • How to Add Client
    • Deployment
      • How to Add Deployment
      • Database Config
      • Email Config
    • Node
      • Streaming Configuration
      • How to register node for streaming
      • Status And Actions
    • Agent
    • User
    • Role
  • Studio
    • UI Elements
      • text_box
        • Properties Library
        • Trouble Shoot
      • loader
        • Trouble Shoot
      • date
      • button
      • drop_down
        • Trouble Shoot
        • Properties Library
      • label
      • check_box
      • radio_button
      • link
      • Shadow
      • Trouble Shoot
      • Properties Library
      • Pre and Post Actions
      • table
        • Example
        • Trouble Shoot
      • form
      • toogle_button
      • file
      • alert
  • Automation
    • Objects
      • UI Element
        • Drop Down
        • Radio Button
        • Multi Elements
        • table
        • form
      • Product Element
        • Advanced Data Types
          • QIntegerArray
          • QStringArray
          • QArray
          • QData
        • Basic Data Types
      • API
      • Query
      • Smarty
        • Excel: Read data from excel
        • File: Reads file Data
        • EmailRead
        • EmailSend
        • SiteScan
        • PDF Utils
      • New Group
    • Test Case
    • Function
    • Data Table
  • Execution
    • Test Case
      • Clients Summary
      • Search and Manage
      • Context Parameters
      • Details by Functionality
        • Sync
    • Test Suite
      • Create Suite
    • Test Run
      • Schedule Test Run
      • Untitled
    • Test Result
      • Results by Clients
      • Results by Fuctionality
    • Build No
    • Reports
      • All Failed Test Cases
      • Recently Failed Test Cases
  • Others
    • Milestone
  • Settings
    • Builds
    • Milestone
  • Site Scan
  • Using QATTS
    • Guide to API Automation
      • Adding API
      • Request
      • Response
        • Writing Response Schema
    • Guide to Web Automation
      • Performing Web Automation
    • Guide to setup agent-service
  • Advanced Data Types
    • QData
  • Methods
  • Standard Actions Methods
    • Execute Methods
  • UI Action Methods
    • extractGroup
  • File Action Methods
  • UI Element Advanced
  • UI Checks
  • Extraction Rules
  • Assertion Operations
  • Error Codes : Automation
  • Error Code: Execution
  • JSpreadSheetUtil Methods
  • Functions
    • Primitive
      • CONCATENATE
    • Date & Time
    • Text
  • Other Information
    • FAQ
    • Troubleshooting
      • UI Methods
Powered by GitBook
On this page

Was this helpful?

  1. Advanced Data Types

QData

A QData contains values on basis of key and value pairs, Each pair of key and value is called as an entry.

PreviousAdvanced Data TypesNextStandard Actions Methods

Last updated 3 years ago

Was this helpful?

Rules :

  1. Key name should be UNIQUE, If the same key name was inserted multiple times. It would be overridden.

Example : QData employeeInfo = extractGroup("firstEmployee");

Sample :

{

"firstName" : "John",

"middleName" : "deSouza",

"lastName" : "D",

"SSN" : "789",

"dob" : "08/08/2000",

"Eligibility" : true

}

Ways to get data from QData :

How to get the value as String ?

String empFirstName = employeeInfo.getValueAsString("firstName");

How to get the value as Integer?

Integer empSSN = employeeInfo.getValueAsInteger("SSN");

How to get the value as Boolean?

Boolean empEligibility = employeeInfo.getValueAsBoolean("Eligibility");

List of QData Commands :

Method Name
Arguments
Return Type
Description

getValue

Key Name

Object

When the user wants the value to be returned in OBJECT (Data Type) and convert to the required Data type like Qarray,QStringArray etc. This can be used

isEmpty

NO ARGS

Boolean

This checks whether the initialized Qdata is empty / not

size

NO ARGS

Integer

This returns the count of the keys in initialized Qdata

getKey

NO ARGS

toMap

NO ARGS

Map<String,Object>

This converts the Qdata object to JAVA Map class

containsValue

Value

Boolean

This checks the whole Qdata for the given value, return true if the value matches to any of the key

setValue

key and value

VOID

This inserts the given key and value to the Qdata

getValueAsString

Key Name

String

This provides the values in the String

getValueAsQData

Key Name

Qdata

This returns the sub object data in Qdata format, by the key name provided

getValueAsQStringArray

Key Name

QStringArray

Returns Key Value as QStringArray

if the key value is a String, or multiple values separated with comma it will be converted to QStringArray.

getValueAsQIntegerArray

Key Name

QIntegerArray

Returns Key Value as QIntegerArray

if the key value is a String, or multiple values separated with comma it will be converted to QIntegerArray.

toJsonArray

key and value

String

This converts the Qdata into complete JSON object and the results would be as below sample. givenKeyName : givenValueName : [all the Qdata converted to JSON]

getKeyNames

NO ARGS

QStringArray

This lists out all the key names.

doAssert

bindToContext

tfStepContext

Context Values will be set

This save each and every pair to context and the user can utilize them

bindToTestRun

tfStepContext

Run Values will be set

This save each and every pair to RUN VALUES and the user can utilize them

toJson

NO ARGS

String

This converts the compelete Qdata into JSON, this will be utilized in API

dump

NO ARGS

String

This converts the complete Qdata into string Note : This can be utilized to print the whole Qdata for validating in development activities

hasDataFor

getValueAsDouble

Key Name

Double

This provides the values in the Double

_getValue

getValueAsBoolean

Key Name

Boolean

This provides the values in the Boolean

getValueAsInteger

Key Name

Integer

This provides the values in the Integer

invokeDataModifiers