Skip to content

Naming Conversion


Snake case
Last edited: Wed, Aug 20, 2025
Snake case (sometimes stylized autologically as snake_case) is the naming convention in which each space is replaced with an underscore (_) character, and words are written in sentence case. It is a commonly used naming convention in computing, for example for variable and subroutine names, and for filenames. One study has found that readers can recognize snake case values more quickly than camel case. However, "subjects were trained mainly in the underscore style", so the possibility of bias cannot be eliminated.
A variation is screaming snake case, where words are written in all caps (stylized as SCREAMING_SNAKE_CASE). This convention is used for constants in programming languages like C/C++, Python, Java, PHP, as well as for environment variables.
See more
Wikipedia icon
en.wikipedia.org

Standard

stylized: snake case
Snake case (stylized as snake_case) is the style of writing in which each space is replaced with an underscore (_) character, and the first letter of each word is written in lowercase.

snake_case = lowercase_lowercase

Global variable

PascalCase_PascalCase
${Global_Timeout}

YAML

snake_case
product_name:

To use a special character
# use "\n"
other_service_ekyc_label: "ยืนยันตัวตนทาง\nอิเล็กทรอนิกส์"

To use a phone number
# not work
mobile_no: 0625198396 # --> 625198396

# work
mobile_no: "0625198396" # --> 0625198396

Local variable

snake_case
${result_data}

Testcase name

follow up business
# ตาม business ที่เราทำ
# following TCM
TC_E2E_01_Add_product_to_cart

Keyword Verify

Title case
# Verify that __________________
Verify that customer can select "Full redeem" and apply T1 point redeem successfully

Mobile config.yaml ให้ใส่ตามที่ desired capabilities:

snake_case
key เป็น camel case เพราะ Appium require
chalermkiat_android_emu:
# common capabilities
deviceName : emulator-5554
platformName : android
platformVersion : '13'
automationName : uiautomator2
newCommandTimeout : 600 # 10 minutes
noReset : true
# android capabilities
nativeWebScreenshot : true
appActivity : th.co.ktb.next.ui.splash.SplashActivity
appPackage : com.ktb.newnext.uat
autoGrantPermissions : true
# special capabilities
forceAppLaunch : true

chalermkiat_ios_real_13_pro:
# common capabilities
deviceName : Ole's iPhone
platformName : iOS
platformVersion : '18.2'
automationName : XCUITest
newCommandTimeout : 600 # 10 minutes
noReset : true
# ios capabilities
udid : '00008110-0009599A3AA1401E'
bundleId : com.ktb.newnext.uat
# special capabilities
forceAppLaunch : true

Folder

snake_case
test_data

Call user keyword

# file.keyword
paotang_openId_consent_page.Close page

Call a YAML variable

data:
id: 1

# call data
# ${data.id}

data:
- id: 1
name: helloworld
age: 20
- id: 2
name: good jobs
age: 30

# call data
# ${data[0].age}
# ${data[${index}].age}

# It's work
data:
is_created: true # false

# It's now work
data:
is_created: Yes # No

ps. after that call ${data.is_created}, the value = true


Data of test case on the YAML file

test_name:
prerequisite_data:
step_01_get_pet_by_id:
input_data
expected_data
step_02_remove_pet_by_id
input_data
expected_data
step_01_create_pet
input_data
expected_data
step_02_get_pet_by_id
input_data
expected_data

Example Test case flow:
Test_data:
Flow_Create_Pet:
prerequisite_data:
step_01_get_pet_by_id:
input_data:
id: 23
expected_data:
status_code: '200'
reason: OK
step_02_remove_pet_by_id:
input_data:
id: 23
expected_data:
status_code: '200'
reason: OK
contents: Pet deleted
step_01_create_pet:
input_data:
id: 23
name: Bat
category:
id: 1
name: Fly
photoUrls:
- string
tags:
- id: 0
name: sit
- id: 1
name: uat
status: available
expected_data:
status_code: '200'
reason: OK
expected_data:
id: 23
category:
id: 1
name: Fly
name: Bat
photoUrls:
- string
tags:
- id: 0
name: sit
- id: 1
name: uat
status: available
step_02_get_pet_by_id:
input_data:
id: 23
expected_data:
id: 23
status_code: '200'
reason: OK
expected_data:
id: 23
category:
id: 1
name: Fly
name: Bat
photoUrls:
- string
tags:
- id: 0
name: sit
Want to print your doc?
This is not the way.
Try clicking the ··· in the right corner or using a keyboard shortcut (
CtrlP
) instead.