mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-25 20:26:41 +00:00
Update tests
This commit is contained in:
parent
e018baed09
commit
0aece4f29f
3
.gitignore
vendored
3
.gitignore
vendored
@ -5,12 +5,13 @@
|
|||||||
.git
|
.git
|
||||||
.pio
|
.pio
|
||||||
data/*
|
data/*
|
||||||
src/user_setups/active/*
|
|
||||||
include/user_config_override.h
|
include/user_config_override.h
|
||||||
src/user_config_override.h
|
src/user_config_override.h
|
||||||
user_config_override.h
|
user_config_override.h
|
||||||
platformio_override.ini
|
platformio_override.ini
|
||||||
user_setups/active/*
|
user_setups/active/*
|
||||||
|
src/user_setups/active/*
|
||||||
|
test/config.yaml
|
||||||
build_output/*
|
build_output/*
|
||||||
build_output/firmware/*.bin
|
build_output/firmware/*.bin
|
||||||
build_output/firmware/*.exe
|
build_output/firmware/*.exe
|
||||||
|
@ -159,3 +159,69 @@ stages:
|
|||||||
g: !int "{g:d}"
|
g: !int "{g:d}"
|
||||||
b: !int "{b:d}"
|
b: !int "{b:d}"
|
||||||
timeout: 1
|
timeout: 1
|
||||||
|
|
||||||
|
---
|
||||||
|
test_name: Value String Loop
|
||||||
|
|
||||||
|
includes:
|
||||||
|
- !include config.yaml
|
||||||
|
|
||||||
|
paho-mqtt:
|
||||||
|
client:
|
||||||
|
transport: tcp
|
||||||
|
client_id: tavern-tester
|
||||||
|
connect:
|
||||||
|
host: "{host}"
|
||||||
|
port: !int "{port:d}"
|
||||||
|
timeout: 3
|
||||||
|
auth:
|
||||||
|
username: "{username}"
|
||||||
|
password: "{password}"
|
||||||
|
|
||||||
|
marks:
|
||||||
|
- parametrize:
|
||||||
|
key: str1
|
||||||
|
vals:
|
||||||
|
- "Test 123456 longer strings work too"
|
||||||
|
- "The cat stretched."
|
||||||
|
- "Jacob stood on his tiptoes."
|
||||||
|
- "The car turned the corner."
|
||||||
|
- "Kelly twirled in circles."
|
||||||
|
- "She opened the door."
|
||||||
|
- "Aaron made a picture."
|
||||||
|
- "I'm sorry."
|
||||||
|
- huey
|
||||||
|
- dewey
|
||||||
|
- ""
|
||||||
|
|
||||||
|
- parametrize:
|
||||||
|
key: str2
|
||||||
|
vals:
|
||||||
|
- louie
|
||||||
|
- " I danced."
|
||||||
|
- " Oak is strong and also gives shade."
|
||||||
|
- " Cats and dogs each hate the other."
|
||||||
|
- " The pipe began to rust while new."
|
||||||
|
- " Open the crate but don't break the glass."
|
||||||
|
- " Add the sum to the product of these three."
|
||||||
|
- " Thieves who rob friends deserve jail."
|
||||||
|
- " The ripe taste of cheese improves with age."
|
||||||
|
- " Act on these orders with great speed."
|
||||||
|
- " The hog crawled under the high fence."
|
||||||
|
- " Move the vat over the hot fire."
|
||||||
|
- ""
|
||||||
|
|
||||||
|
stages:
|
||||||
|
- name: Set value_str
|
||||||
|
mqtt_publish:
|
||||||
|
topic: "hasp/{plate}/command/p1b1.value_str"
|
||||||
|
payload: "{str1}{str2}"
|
||||||
|
- name: Get value_str
|
||||||
|
mqtt_publish:
|
||||||
|
topic: hasp/{plate}/command
|
||||||
|
payload: "p1b1.value_str"
|
||||||
|
mqtt_response:
|
||||||
|
topic: hasp/{plate}/state/p1b1
|
||||||
|
json:
|
||||||
|
value_str: "{str1}{str2}"
|
||||||
|
timeout: 1
|
||||||
|
@ -344,3 +344,69 @@ stages:
|
|||||||
json:
|
json:
|
||||||
vis: 1
|
vis: 1
|
||||||
timeout: 1
|
timeout: 1
|
||||||
|
|
||||||
|
---
|
||||||
|
test_name: Value String Loop
|
||||||
|
|
||||||
|
includes:
|
||||||
|
- !include config.yaml
|
||||||
|
|
||||||
|
paho-mqtt:
|
||||||
|
client:
|
||||||
|
transport: tcp
|
||||||
|
client_id: tavern-tester
|
||||||
|
connect:
|
||||||
|
host: "{host}"
|
||||||
|
port: !int "{port:d}"
|
||||||
|
timeout: 3
|
||||||
|
auth:
|
||||||
|
username: "{username}"
|
||||||
|
password: "{password}"
|
||||||
|
|
||||||
|
marks:
|
||||||
|
- parametrize:
|
||||||
|
key: str1
|
||||||
|
vals:
|
||||||
|
- "Test 123456 longer strings work too"
|
||||||
|
- "The cat stretched."
|
||||||
|
- "Jacob stood on his tiptoes."
|
||||||
|
- "The car turned the corner."
|
||||||
|
- "Kelly twirled in circles."
|
||||||
|
- "She opened the door."
|
||||||
|
- "Aaron made a picture."
|
||||||
|
- "I'm sorry."
|
||||||
|
- huey
|
||||||
|
- dewey
|
||||||
|
- ""
|
||||||
|
|
||||||
|
- parametrize:
|
||||||
|
key: str2
|
||||||
|
vals:
|
||||||
|
- louie
|
||||||
|
- " I danced."
|
||||||
|
- " Oak is strong and also gives shade."
|
||||||
|
- " Cats and dogs each hate the other."
|
||||||
|
- " The pipe began to rust while new."
|
||||||
|
- " Open the crate but don't break the glass."
|
||||||
|
- " Add the sum to the product of these three."
|
||||||
|
- " Thieves who rob friends deserve jail."
|
||||||
|
- " The ripe taste of cheese improves with age."
|
||||||
|
- " Act on these orders with great speed."
|
||||||
|
- " The hog crawled under the high fence."
|
||||||
|
- " Move the vat over the hot fire."
|
||||||
|
- ""
|
||||||
|
|
||||||
|
stages:
|
||||||
|
- name: Set value_str
|
||||||
|
mqtt_publish:
|
||||||
|
topic: "hasp/{plate}/command/p1b1.value_str"
|
||||||
|
payload: "{str1}{str2}"
|
||||||
|
- name: Get value_str
|
||||||
|
mqtt_publish:
|
||||||
|
topic: hasp/{plate}/command
|
||||||
|
payload: "p1b1.value_str"
|
||||||
|
mqtt_response:
|
||||||
|
topic: hasp/{plate}/state/p1b1
|
||||||
|
json:
|
||||||
|
value_str: "{str1}{str2}"
|
||||||
|
timeout: 1
|
||||||
|
@ -26,7 +26,7 @@ stages:
|
|||||||
topic: hasp/{plate}/state/page
|
topic: hasp/{plate}/state/page
|
||||||
payload: "1"
|
payload: "1"
|
||||||
timeout: 1
|
timeout: 1
|
||||||
delay_after: 0
|
|
||||||
- name: step 2 - Page test
|
- name: step 2 - Page test
|
||||||
mqtt_publish:
|
mqtt_publish:
|
||||||
topic: hasp/{plate}/command
|
topic: hasp/{plate}/command
|
||||||
@ -35,7 +35,7 @@ stages:
|
|||||||
topic: hasp/{plate}/state/page
|
topic: hasp/{plate}/state/page
|
||||||
payload: "2"
|
payload: "2"
|
||||||
timeout: 1
|
timeout: 1
|
||||||
delay_after: 0
|
|
||||||
- name: step 3 - Page test
|
- name: step 3 - Page test
|
||||||
mqtt_publish:
|
mqtt_publish:
|
||||||
topic: hasp/{plate}/command
|
topic: hasp/{plate}/command
|
||||||
@ -44,7 +44,7 @@ stages:
|
|||||||
topic: hasp/{plate}/state/page
|
topic: hasp/{plate}/state/page
|
||||||
payload: "3"
|
payload: "3"
|
||||||
timeout: 1
|
timeout: 1
|
||||||
delay_after: 0
|
|
||||||
- name: step 4 - Page test
|
- name: step 4 - Page test
|
||||||
mqtt_publish:
|
mqtt_publish:
|
||||||
topic: hasp/{plate}/command/json
|
topic: hasp/{plate}/command/json
|
||||||
@ -53,7 +53,7 @@ stages:
|
|||||||
topic: hasp/{plate}/state/page
|
topic: hasp/{plate}/state/page
|
||||||
payload: "1"
|
payload: "1"
|
||||||
timeout: 1
|
timeout: 1
|
||||||
delay_after: 0
|
|
||||||
- name: step 5 - Page test
|
- name: step 5 - Page test
|
||||||
mqtt_publish:
|
mqtt_publish:
|
||||||
topic: hasp/{plate}/command/json
|
topic: hasp/{plate}/command/json
|
||||||
@ -62,7 +62,6 @@ stages:
|
|||||||
topic: hasp/{plate}/state/page
|
topic: hasp/{plate}/state/page
|
||||||
payload: "1"
|
payload: "1"
|
||||||
timeout: 1
|
timeout: 1
|
||||||
delay_after: 0
|
|
||||||
|
|
||||||
---
|
---
|
||||||
test_name: Reboot Command
|
test_name: Reboot Command
|
||||||
@ -77,9 +76,18 @@ paho-mqtt:
|
|||||||
connect:
|
connect:
|
||||||
host: "{host}"
|
host: "{host}"
|
||||||
port: !int "{port:d}"
|
port: !int "{port:d}"
|
||||||
timeout: 1
|
timeout: 3
|
||||||
|
auth:
|
||||||
|
username: "{username}"
|
||||||
|
password: "{password}"
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
|
- name: Lower idle values
|
||||||
|
mqtt_publish:
|
||||||
|
topic: hasp/{plate}/config/gui
|
||||||
|
json:
|
||||||
|
idle1: 6
|
||||||
|
idle2: 13
|
||||||
- name: Test reboot command
|
- name: Test reboot command
|
||||||
mqtt_publish:
|
mqtt_publish:
|
||||||
topic: hasp/{plate}/command/reboot
|
topic: hasp/{plate}/command/reboot
|
||||||
@ -103,6 +111,9 @@ paho-mqtt:
|
|||||||
host: "{host}"
|
host: "{host}"
|
||||||
port: !int "{port:d}"
|
port: !int "{port:d}"
|
||||||
timeout: 3
|
timeout: 3
|
||||||
|
auth:
|
||||||
|
username: "{username}"
|
||||||
|
password: "{password}"
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- name: Test idle
|
- name: Test idle
|
||||||
@ -111,17 +122,16 @@ stages:
|
|||||||
payload: "wakeup"
|
payload: "wakeup"
|
||||||
mqtt_response:
|
mqtt_response:
|
||||||
topic: hasp/{plate}/state/idle
|
topic: hasp/{plate}/state/idle
|
||||||
payload: "long"
|
payload: "off"
|
||||||
timeout: 190
|
timeout: 5
|
||||||
|
|
||||||
- name: Test idle
|
|
||||||
mqtt_publish:
|
|
||||||
topic: hasp/{plate}/command
|
|
||||||
payload: "wakeup"
|
|
||||||
mqtt_response:
|
mqtt_response:
|
||||||
topic: hasp/{plate}/state/idle
|
topic: hasp/{plate}/state/idle
|
||||||
payload: "short"
|
payload: "short"
|
||||||
timeout: 70
|
timeout: 15
|
||||||
|
mqtt_response:
|
||||||
|
topic: hasp/{plate}/state/idle
|
||||||
|
payload: "long"
|
||||||
|
timeout: 30
|
||||||
|
|
||||||
- name: Test idle
|
- name: Test idle
|
||||||
mqtt_publish:
|
mqtt_publish:
|
||||||
@ -130,4 +140,4 @@ stages:
|
|||||||
mqtt_response:
|
mqtt_response:
|
||||||
topic: hasp/{plate}/state/idle
|
topic: hasp/{plate}/state/idle
|
||||||
payload: "off"
|
payload: "off"
|
||||||
timeout: 1
|
timeout: 5
|
||||||
|
@ -49,13 +49,13 @@ marks:
|
|||||||
- parametrize:
|
- parametrize:
|
||||||
key: obj
|
key: obj
|
||||||
vals:
|
vals:
|
||||||
- cpicker
|
# - cpicker
|
||||||
- table
|
- table
|
||||||
- tabview
|
- tabview
|
||||||
- chart
|
- chart
|
||||||
- gauge
|
- gauge
|
||||||
- btn
|
- btn
|
||||||
- label
|
# - label
|
||||||
- slider
|
- slider
|
||||||
- checkbox
|
- checkbox
|
||||||
- switch
|
- switch
|
||||||
@ -102,6 +102,11 @@ marks:
|
|||||||
- ""
|
- ""
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
|
- name: Clear page
|
||||||
|
mqtt_publish:
|
||||||
|
topic: hasp/{plate}/command
|
||||||
|
payload: clearpage
|
||||||
|
|
||||||
- name: Create object
|
- name: Create object
|
||||||
mqtt_publish:
|
mqtt_publish:
|
||||||
topic: hasp/{plate}/command/jsonl
|
topic: hasp/{plate}/command/jsonl
|
||||||
|
Loading…
x
Reference in New Issue
Block a user