1#!/usr/bin/env python3 2# 3# Copyright (C) 2019 The Android Open Source Project 4# 5# Licensed under the Apache License, Version 2.0 (the "License"); you may not 6# use this file except in compliance with the License. You may obtain a copy of 7# the License at 8# 9# http://www.apache.org/licenses/LICENSE-2.0 10# 11# Unless required by applicable law or agreed to in writing, software 12# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14# License for the specific language governing permissions and limitations under 15# the License. 16""" 17This test exercises basic setup of various GATT server configurations. 18 19Setup: 20This test only requires one fuchsia device as the purpose is to test 21different configurations of valid GATT services. 22""" 23 24from acts import signals 25from acts.base_test import BaseTestClass 26from acts.test_decorators import test_tracker_info 27 28import gatt_server_databases as database 29 30 31class GattServerSetupTest(BaseTestClass): 32 err_message = "Setting up database failed with: {}" 33 34 def __init__(self, controllers): 35 BaseTestClass.__init__(self, controllers) 36 self.fuchsia_dut = self.fuchsia_devices[0] 37 38 def teardown_test(self): 39 for fd in self.fuchsia_devices: 40 fd.clean_up() 41 42 def setup_database(self, database): 43 setup_result = self.fuchsia_dut.gatts_lib.publishServer(database) 44 if setup_result.get("error") is None: 45 signals.TestPass(setup_result.get("result")) 46 else: 47 raise signals.TestFailure( 48 self.err_message.format(setup_result.get("error"))) 49 50 @test_tracker_info(uuid='25f3463b-b6bd-408b-9924-f18ed3b9bbe2') 51 def test_single_primary_service(self): 52 """Test GATT Server Setup: Single Primary Service 53 54 Test a single primary service as a GATT server input. 55 56 Steps: 57 1. Setup input database 58 59 Expected Result: 60 Verify that there are no errors after setting up the input database. 61 62 Returns: 63 signals.TestPass if no errors 64 signals.TestFailure if there are any errors during setup 65 66 TAGS: GATT 67 Priority: 1 68 """ 69 self.setup_database(database.SINGLE_PRIMARY_SERVICE) 70 71 @test_tracker_info(uuid='084d2c91-ca8c-4572-8e9b-053495acd894') 72 def test_single_secondary_service(self): 73 """Test GATT Server Setup: Single Secondary Service 74 75 Test a single secondary service as a GATT server input. 76 77 Steps: 78 1. Setup input database 79 80 Expected Result: 81 Verify that there are no errors after setting up the input database. 82 83 Returns: 84 signals.TestPass if no errors 85 signals.TestFailure if there are any errors during setup 86 87 TAGS: GATT 88 Priority: 1 89 """ 90 self.setup_database(database.SINGLE_SECONDARY_SERVICE) 91 92 @test_tracker_info(uuid='9ff0a91d-3b17-4e11-b5d6-b91997c79a04') 93 def test_primary_and_secondary_service(self): 94 """Test GATT Server Setup: Primary and secondary service 95 96 Test primary and secondary service as a GATT server input. 97 98 Steps: 99 1. Setup input database 100 101 Expected Result: 102 Verify that there are no errors after setting up the input database. 103 104 Returns: 105 signals.TestPass if no errors 106 signals.TestFailure if there are any errors during setup 107 108 TAGS: GATT 109 Priority: 1 110 """ 111 self.setup_database(database.PRIMARY_AND_SECONDARY_SERVICES) 112 113 @test_tracker_info(uuid='4f57e827-5511-4d5d-9591-c247d84d6d6c') 114 def test_duplicate_services(self): 115 """Test GATT Server Setup: Duplicate service uuids 116 117 Test duplicate service uuids as a GATT server input. 118 119 Steps: 120 1. Setup input database 121 122 Expected Result: 123 Verify that there are no errors after setting up the input database. 124 125 Returns: 126 signals.TestPass if no errors 127 signals.TestFailure if there are any errors during setup 128 129 TAGS: GATT 130 Priority: 1 131 """ 132 self.setup_database(database.DUPLICATE_SERVICES) 133 134 ### Begin SIG defined services ### 135 136 @test_tracker_info(uuid='6b0993f5-18ff-4a20-be3d-d76529eb1126') 137 def test_alert_notification_service(self): 138 """Test GATT Server Setup: Alert Notification Service 139 140 Test Alert Notification Service as a GATT server input. 141 142 Steps: 143 1. Setup input database 144 145 Expected Result: 146 Verify that there are no errors after setting up the input database. 147 148 Returns: 149 signals.TestPass if no errors 150 signals.TestFailure if there are any errors during setup 151 152 TAGS: GATT 153 Priority: 1 154 """ 155 self.setup_database(database.ALERT_NOTIFICATION_SERVICE) 156 157 @test_tracker_info(uuid='c42e8bc9-1ba7-4d4e-b67e-9c19cc11472c') 158 def test_automation_io_service(self): 159 """Test GATT Server Setup: Automation IO 160 161 Test Automation IO as a GATT server input. 162 163 Steps: 164 1. Setup input database 165 166 Expected Result: 167 Verify that there are no errors after setting up the input database. 168 169 Returns: 170 signals.TestPass if no errors 171 signals.TestFailure if there are any errors during setup 172 173 TAGS: GATT 174 Priority: 1 175 """ 176 self.setup_database(database.AUTOMATION_IO_SERVICE) 177 178 @test_tracker_info(uuid='68936f97-4a4d-4bfb-9826-558846a0a53a') 179 def test_battery_service(self): 180 """Test GATT Server Setup: Battery Service 181 182 Test Battery Service as a GATT server input. 183 184 Steps: 185 1. Setup input database 186 187 Expected Result: 188 Verify that there are no errors after setting up the input database. 189 190 Returns: 191 signals.TestPass if no errors 192 signals.TestFailure if there are any errors during setup 193 194 TAGS: GATT 195 Priority: 1 196 """ 197 self.setup_database(database.BATTERY_SERVICE) 198 199 @test_tracker_info(uuid='678864a1-edcf-4335-85b4-1494d00c62be') 200 def test_blood_pressure_service(self): 201 """Test GATT Server Setup: Blood Pressure 202 203 Test Blood Pressure as a GATT server input. 204 205 Steps: 206 1. Setup input database 207 208 Expected Result: 209 Verify that there are no errors after setting up the input database. 210 211 Returns: 212 signals.TestPass if no errors 213 signals.TestFailure if there are any errors during setup 214 215 TAGS: GATT 216 Priority: 1 217 """ 218 self.setup_database(database.BLOOD_PRESSURE_SERVICE) 219 220 @test_tracker_info(uuid='1077d373-7d9b-4a43-acde-7d20bb0fa4e4') 221 def test_body_composition_service(self): 222 """Test GATT Server Setup: Body Composition 223 224 Test Body Composition as a GATT server input. 225 226 Steps: 227 1. Setup input database 228 229 Expected Result: 230 Verify that there are no errors after setting up the input database. 231 232 Returns: 233 signals.TestPass if no errors 234 signals.TestFailure if there are any errors during setup 235 236 TAGS: GATT 237 Priority: 1 238 """ 239 self.setup_database(database.BODY_COMPOSITION_SERVICE) 240 241 @test_tracker_info(uuid='67a82719-7dcb-4d11-b9a4-a95c05f6dda6') 242 def test_bond_management_service(self): 243 """Test GATT Server Setup: Bond Management Service 244 245 Test Bond Management Service as a GATT server input. 246 247 Steps: 248 1. Setup input database 249 250 Expected Result: 251 Verify that there are no errors after setting up the input database. 252 253 Returns: 254 signals.TestPass if no errors 255 signals.TestFailure if there are any errors during setup 256 257 TAGS: GATT 258 Priority: 1 259 """ 260 self.setup_database(database.BOND_MANAGEMENT_SERVICE) 261 262 @test_tracker_info(uuid='c0edd532-00f1-4afc-85f2-114477d81a0a') 263 def test_continuous_glucose_monitoring_service(self): 264 """Test GATT Server Setup: Continuous Glucose Monitoring 265 266 Test Continuous Glucose Monitoring as a GATT server input. 267 268 Steps: 269 1. Setup input database 270 271 Expected Result: 272 Verify that there are no errors after setting up the input database. 273 274 Returns: 275 signals.TestPass if no errors 276 signals.TestFailure if there are any errors during setup 277 278 TAGS: GATT 279 Priority: 1 280 """ 281 self.setup_database(database.CONTINUOUS_GLUCOSE_MONITORING_SERVICE) 282 283 @test_tracker_info(uuid='23b3faeb-1423-4687-81bc-ff9d71bc1c1c') 284 def test_current_time_service(self): 285 """Test GATT Server Setup: Current Time Service 286 287 Test Current Time Service as a GATT server input. 288 289 Steps: 290 1. Setup input database 291 292 Expected Result: 293 Verify that there are no errors after setting up the input database. 294 295 Returns: 296 signals.TestPass if no errors 297 signals.TestFailure if there are any errors during setup 298 299 TAGS: GATT 300 Priority: 1 301 """ 302 self.setup_database(database.CURRENT_TIME_SERVICE) 303 304 @test_tracker_info(uuid='7cc592d8-69e6-459e-b4ae-fe0b1be77491') 305 def test_cycling_power_service(self): 306 """Test GATT Server Setup: Cycling Power 307 308 Test Cycling Power as a GATT server input. 309 310 Steps: 311 1. Setup input database 312 313 Expected Result: 314 Verify that there are no errors after setting up the input database. 315 316 Returns: 317 signals.TestPass if no errors 318 signals.TestFailure if there are any errors during setup 319 320 TAGS: GATT 321 Priority: 1 322 """ 323 self.setup_database(database.CYCLING_POWER_SERVICE) 324 325 @test_tracker_info(uuid='3134ee93-7e19-4bd5-ab09-9bcb4a8f6b7d') 326 def test_cycling_speed_and_cadence_service(self): 327 """Test GATT Server Setup: Cycling Speed and Cadence 328 329 Test Cycling Speed and Cadence as a GATT server input. 330 331 Steps: 332 1. Setup input database 333 334 Expected Result: 335 Verify that there are no errors after setting up the input database. 336 337 Returns: 338 signals.TestPass if no errors 339 signals.TestFailure if there are any errors during setup 340 341 TAGS: GATT 342 Priority: 1 343 """ 344 self.setup_database(database.CYCLING_SPEED_AND_CADENCE_SERVICE) 345 346 @test_tracker_info(uuid='c090443e-c4cf-42de-ae79-a60dae50cad4') 347 def test_device_information_service(self): 348 """Test GATT Server Setup: Device Information 349 350 Test Device Information as a GATT server input. 351 352 Steps: 353 1. Setup input database 354 355 Expected Result: 356 Verify that there are no errors after setting up the input database. 357 358 Returns: 359 signals.TestPass if no errors 360 signals.TestFailure if there are any errors during setup 361 362 TAGS: GATT 363 Priority: 1 364 """ 365 self.setup_database(database.DEVICE_INFORMATION_SERVICE) 366 367 @test_tracker_info(uuid='bd696344-34a4-4665-857f-fafbd2d3c849') 368 def test_environmental_sensing_service(self): 369 """Test GATT Server Setup: Environmental Sensing 370 371 Test Environmental Sensing as a GATT server input. 372 373 Steps: 374 1. Setup input database 375 376 Expected Result: 377 Verify that there are no errors after setting up the input database. 378 379 Returns: 380 signals.TestPass if no errors 381 signals.TestFailure if there are any errors during setup 382 383 TAGS: GATT 384 Priority: 1 385 """ 386 self.setup_database(database.ENVIRONMENTAL_SENSING_SERVICE) 387 388 @test_tracker_info(uuid='d567c23b-276e-43c9-9862-94d0d36887c2') 389 def test_fitness_machine_service(self): 390 """Test GATT Server Setup: Fitness Machine 391 392 Test Fitness Machine as a GATT server input. 393 394 Steps: 395 1. Setup input database 396 397 Expected Result: 398 Verify that there are no errors after setting up the input database. 399 400 Returns: 401 signals.TestPass if no errors 402 signals.TestFailure if there are any errors during setup 403 404 TAGS: GATT 405 Priority: 1 406 """ 407 self.setup_database(database.FITNESS_MACHINE_SERVICE) 408 409 @test_tracker_info(uuid='47084eb2-b99f-4f8d-b943-04148b8a71ca') 410 def test_glucose_service(self): 411 """Test GATT Server Setup: Glucose 412 413 Test Glucose as a GATT server input. 414 415 Steps: 416 1. Setup input database 417 418 Expected Result: 419 Verify that there are no errors after setting up the input database. 420 421 Returns: 422 signals.TestPass if no errors 423 signals.TestFailure if there are any errors during setup 424 425 TAGS: GATT 426 Priority: 1 427 """ 428 self.setup_database(database.GLUCOSE_SERVICE) 429 430 @test_tracker_info(uuid='d64ce217-13f1-4cdd-965a-03d06349ac53') 431 def test_health_thermometer_service(self): 432 """Test GATT Server Setup: Health Thermometer 433 434 Test Health Thermometer as a GATT server input. 435 436 Steps: 437 1. Setup input database 438 439 Expected Result: 440 Verify that there are no errors after setting up the input database. 441 442 Returns: 443 signals.TestPass if no errors 444 signals.TestFailure if there are any errors during setup 445 446 TAGS: GATT 447 Priority: 1 448 """ 449 self.setup_database(database.HEALTH_THERMOMETER_SERVICE) 450 451 @test_tracker_info(uuid='2510d536-0464-4e25-a2c1-f2acc989e7ef') 452 def test_heart_rate_service(self): 453 """Test GATT Server Setup: Heart Rate 454 455 Test Heart Rate as a GATT server input. 456 457 Steps: 458 1. Setup input database 459 460 Expected Result: 461 Verify that there are no errors after setting up the input database. 462 463 Returns: 464 signals.TestPass if no errors 465 signals.TestFailure if there are any errors during setup 466 467 TAGS: GATT 468 Priority: 1 469 """ 470 self.setup_database(database.HEART_RATE_SERVICE) 471 472 @test_tracker_info(uuid='cc3ca7f2-d783-426d-a62e-86a56cafec96') 473 def test_http_proxy_service(self): 474 """Test GATT Server Setup: HTTP Proxy 475 476 Test HTTP Proxy as a GATT server input. 477 478 Steps: 479 1. Setup input database 480 481 Expected Result: 482 Verify that there are no errors after setting up the input database. 483 484 Returns: 485 signals.TestPass if no errors 486 signals.TestFailure if there are any errors during setup 487 488 TAGS: GATT 489 Priority: 1 490 """ 491 self.setup_database(database.HTTP_PROXY_SERVICE) 492 493 @test_tracker_info(uuid='4e265f85-12aa-43e3-9560-b9f2fb015116') 494 def test_human_interface_device_service(self): 495 """Test GATT Server Setup: Human Interface Device 496 497 Test Human Interface Device as a GATT server input. 498 499 Steps: 500 1. Setup input database 501 502 Expected Result: 503 Verify that there are no errors after setting up the input database. 504 505 Returns: 506 signals.TestPass if no errors 507 signals.TestFailure if there are any errors during setup 508 509 TAGS: GATT 510 Priority: 1 511 """ 512 self.setup_database(database.HUMAN_INTERFACE_DEVICE_SERVICE) 513 514 @test_tracker_info(uuid='3e092fb8-fe5f-42a9-ac1d-9951e4ddebe5') 515 def test_immediate_alert_service(self): 516 """Test GATT Server Setup: Immediate Alert 517 518 Test Immediate Alert as a GATT server input. 519 520 Steps: 521 1. Setup input database 522 523 Expected Result: 524 Verify that there are no errors after setting up the input database. 525 526 Returns: 527 signals.TestPass if no errors 528 signals.TestFailure if there are any errors during setup 529 530 TAGS: GATT 531 Priority: 1 532 """ 533 self.setup_database(database.IMMEDIATE_ALERT_SERVICE) 534 535 @test_tracker_info(uuid='c6eb782a-4999-460d-9ebe-d4a050002242') 536 def test_indoor_positioning_service(self): 537 """Test GATT Server Setup: Indoor Positioning 538 539 Test Indoor Positioning as a GATT server input. 540 541 Steps: 542 1. Setup input database 543 544 Expected Result: 545 Verify that there are no errors after setting up the input database. 546 547 Returns: 548 signals.TestPass if no errors 549 signals.TestFailure if there are any errors during setup 550 551 TAGS: GATT 552 Priority: 1 553 """ 554 self.setup_database(database.INDOOR_POSITIONING_SERVICE) 555 556 @test_tracker_info(uuid='96ac4b99-2232-4efd-8039-d62e8f98f0ef') 557 def test_insulin_delivery_service(self): 558 """Test GATT Server Setup: Insulin Delivery 559 560 Test Insulin Delivery as a GATT server input. 561 562 Steps: 563 1. Setup input database 564 565 Expected Result: 566 Verify that there are no errors after setting up the input database. 567 568 Returns: 569 signals.TestPass if no errors 570 signals.TestFailure if there are any errors during setup 571 572 TAGS: GATT 573 Priority: 1 574 """ 575 self.setup_database(database.INSULIN_DELIVERY_SERVICE) 576 577 @test_tracker_info(uuid='28a0f54e-906d-4c9a-800f-238ce1a3829a') 578 def test_internet_protocol_support_service(self): 579 """Test GATT Server Setup: Internet Protocol Support Service 580 581 Test Internet Protocol Support Service as a GATT server input. 582 583 Steps: 584 1. Setup input database 585 586 Expected Result: 587 Verify that there are no errors after setting up the input database. 588 589 Returns: 590 signals.TestPass if no errors 591 signals.TestFailure if there are any errors during setup 592 593 TAGS: GATT 594 Priority: 1 595 """ 596 self.setup_database(database.INTERNET_PROTOCOL_SUPPORT_SERVICE) 597 598 @test_tracker_info(uuid='3d0452ce-5cfc-4312-97c3-e7060e2efce6') 599 def test_link_loss_service(self): 600 """Test GATT Server Setup: Link Loss 601 602 Test Link Loss as a GATT server input. 603 604 Steps: 605 1. Setup input database 606 607 Expected Result: 608 Verify that there are no errors after setting up the input database. 609 610 Returns: 611 signals.TestPass if no errors 612 signals.TestFailure if there are any errors during setup 613 614 TAGS: GATT 615 Priority: 1 616 """ 617 self.setup_database(database.LINK_LOSS_SERVICE) 618 619 @test_tracker_info(uuid='79a375e9-1f6c-498e-a7f8-63a2e2fdb03b') 620 def test_location_and_navigation_service(self): 621 """Test GATT Server Setup: Location and Navigation 622 623 Test Location and Navigation as a GATT server input. 624 625 Steps: 626 1. Setup input database 627 628 Expected Result: 629 Verify that there are no errors after setting up the input database. 630 631 Returns: 632 signals.TestPass if no errors 633 signals.TestFailure if there are any errors during setup 634 635 TAGS: GATT 636 Priority: 1 637 """ 638 self.setup_database(database.LOCATION_AND_NAVIGATION_SERVICE) 639 640 @test_tracker_info(uuid='4517a844-e6b3-4f28-91f1-989d7affd190') 641 def test_mesh_provisioning_service(self): 642 """Test GATT Server Setup: Mesh Provisioning Service 643 644 Test Mesh Provisioning Service as a GATT server input. 645 646 Steps: 647 1. Setup input database 648 649 Expected Result: 650 Verify that there are no errors after setting up the input database. 651 652 Returns: 653 signals.TestPass if no errors 654 signals.TestFailure if there are any errors during setup 655 656 TAGS: GATT 657 Priority: 1 658 """ 659 self.setup_database(database.MESH_PROVISIONING_SERVICE) 660 661 @test_tracker_info(uuid='960fdf95-4e55-4c88-86ce-a6d31dd094fa') 662 def test_mesh_proxy_service(self): 663 """Test GATT Server Setup: Mesh Proxy Service 664 665 Test Mesh Proxy Service as a GATT server input. 666 667 Steps: 668 1. Setup input database 669 670 Expected Result: 671 Verify that there are no errors after setting up the input database. 672 673 Returns: 674 signals.TestPass if no errors 675 signals.TestFailure if there are any errors during setup 676 677 TAGS: GATT 678 Priority: 1 679 """ 680 self.setup_database(database.MESH_PROXY_SERVICE) 681 682 @test_tracker_info(uuid='c97f933a-2200-46ae-a161-9c133fcc2c67') 683 def test_next_dst_change_service(self): 684 """Test GATT Server Setup: Next DST Change Service 685 686 Test Next DST Change Service as a GATT server input. 687 688 Steps: 689 1. Setup input database 690 691 Expected Result: 692 Verify that there are no errors after setting up the input database. 693 694 Returns: 695 signals.TestPass if no errors 696 signals.TestFailure if there are any errors during setup 697 698 TAGS: GATT 699 Priority: 1 700 """ 701 self.setup_database(database.NEXT_DST_CHANGE_SERVICE) 702 703 @test_tracker_info(uuid='90b2caa1-f0fa-4afa-8771-924234deae17') 704 def test_object_transfer_service(self): 705 """Test GATT Server Setup: Object Transfer Service 706 707 Test Object Transfer Service as a GATT server input. 708 709 Steps: 710 1. Setup input database 711 712 Expected Result: 713 Verify that there are no errors after setting up the input database. 714 715 Returns: 716 signals.TestPass if no errors 717 signals.TestFailure if there are any errors during setup 718 719 TAGS: GATT 720 Priority: 1 721 """ 722 self.setup_database(database.OBJECT_TRANSFER_SERVICE) 723 724 @test_tracker_info(uuid='28ac2e34-1d0d-4c29-95f3-92e845dc65a2') 725 def test_phone_alert_status_service(self): 726 """Test GATT Server Setup: Phone Alert Status Service 727 728 Test Phone Alert Status Service as a GATT server input. 729 730 Steps: 731 1. Setup input database 732 733 Expected Result: 734 Verify that there are no errors after setting up the input database. 735 736 Returns: 737 signals.TestPass if no errors 738 signals.TestFailure if there are any errors during setup 739 740 TAGS: GATT 741 Priority: 1 742 """ 743 self.setup_database(database.PHONE_ALERT_STATUS_SERVICE) 744 745 @test_tracker_info(uuid='fb19e36f-0a25-48af-8787-dae2b213bf5b') 746 def test_pulse_oximeter_service(self): 747 """Test GATT Server Setup: Pulse Oximeter Service 748 749 Test Pulse Oximeter Service as a GATT server input. 750 751 Steps: 752 1. Setup input database 753 754 Expected Result: 755 Verify that there are no errors after setting up the input database. 756 757 Returns: 758 signals.TestPass if no errors 759 signals.TestFailure if there are any errors during setup 760 761 TAGS: GATT 762 Priority: 1 763 """ 764 self.setup_database(database.PULSE_OXIMETER_SERVICE) 765 766 @test_tracker_info(uuid='5e59820a-db03-4acd-96a4-1e3fc0bf7f53') 767 def test_reconnection_configuration_service(self): 768 """Test GATT Server Setup: Reconnection Configuration 769 770 Test Reconnection Configuration as a GATT server input. 771 772 Steps: 773 1. Setup input database 774 775 Expected Result: 776 Verify that there are no errors after setting up the input database. 777 778 Returns: 779 signals.TestPass if no errors 780 signals.TestFailure if there are any errors during setup 781 782 TAGS: GATT 783 Priority: 1 784 """ 785 self.setup_database(database.RECONNECTION_CONFIGURATION_SERVICE) 786 787 @test_tracker_info(uuid='7b2525c9-178a-44db-aa3b-f3cf5ceed132') 788 def test_reference_time_update_service(self): 789 """Test GATT Server Setup: Reference Time Update Service 790 791 Test Reference Time Update Service as a GATT server input. 792 793 Steps: 794 1. Setup input database 795 796 Expected Result: 797 Verify that there are no errors after setting up the input database. 798 799 Returns: 800 signals.TestPass if no errors 801 signals.TestFailure if there are any errors during setup 802 803 TAGS: GATT 804 Priority: 1 805 """ 806 self.setup_database(database.REFERENCE_TIME_UPDATE_SERVICE) 807 808 @test_tracker_info(uuid='71d657db-4519-4158-b6d2-a744f2cc2c22') 809 def test_running_speed_and_cadence_service(self): 810 """Test GATT Server Setup: Running Speed and Cadence 811 812 Test Running Speed and Cadence as a GATT server input. 813 814 Steps: 815 1. Setup input database 816 817 Expected Result: 818 Verify that there are no errors after setting up the input database. 819 820 Returns: 821 signals.TestPass if no errors 822 signals.TestFailure if there are any errors during setup 823 824 TAGS: GATT 825 Priority: 1 826 """ 827 self.setup_database(database.RUNNING_SPEED_AND_CADENCE_SERVICE) 828 829 @test_tracker_info(uuid='4d3bd69a-978a-4483-9a2d-f1aff308a845') 830 def test_scan_parameters_service(self): 831 """Test GATT Server Setup: Scan Parameters 832 833 Test Scan Parameters as a GATT server input. 834 835 Steps: 836 1. Setup input database 837 838 Expected Result: 839 Verify that there are no errors after setting up the input database. 840 841 Returns: 842 signals.TestPass if no errors 843 signals.TestFailure if there are any errors during setup 844 845 TAGS: GATT 846 Priority: 1 847 """ 848 self.setup_database(database.SCAN_PARAMETERS_SERVICE) 849 850 @test_tracker_info(uuid='2c6f95a1-a353-4147-abb6-714bc3aacbb4') 851 def test_transport_discovery_service(self): 852 """Test GATT Server Setup: Transport Discovery 853 854 Test Transport Discovery as a GATT server input. 855 856 Steps: 857 1. Setup input database 858 859 Expected Result: 860 Verify that there are no errors after setting up the input database. 861 862 Returns: 863 signals.TestPass if no errors 864 signals.TestFailure if there are any errors during setup 865 866 TAGS: GATT 867 Priority: 1 868 """ 869 self.setup_database(database.TRANSPORT_DISCOVERY_SERVICE) 870 871 @test_tracker_info(uuid='3e36f2ba-5590-4201-897e-7321c8e44f4c') 872 def test_tx_power_service(self): 873 """Test GATT Server Setup: Tx Power 874 875 Test Tx Power as a GATT server input. 876 877 Steps: 878 1. Setup input database 879 880 Expected Result: 881 Verify that there are no errors after setting up the input database. 882 883 Returns: 884 signals.TestPass if no errors 885 signals.TestFailure if there are any errors during setup 886 887 TAGS: GATT 888 Priority: 1 889 """ 890 self.setup_database(database.TX_POWER_SERVICE) 891 892 @test_tracker_info(uuid='c62d70f8-e474-4c88-9960-f2ce2200852e') 893 def test_user_data_service(self): 894 """Test GATT Server Setup: User Data 895 896 Test User Data as a GATT server input. 897 898 Steps: 899 1. Setup input database 900 901 Expected Result: 902 Verify that there are no errors after setting up the input database. 903 904 Returns: 905 signals.TestPass if no errors 906 signals.TestFailure if there are any errors during setup 907 908 TAGS: GATT 909 Priority: 1 910 """ 911 self.setup_database(database.USER_DATA_SERVICE) 912 913 @test_tracker_info(uuid='18951e43-f587-4395-93e3-b440dc4b3285') 914 def test_weight_scale_service(self): 915 """Test GATT Server Setup: Weight Scale 916 917 Test Weight Scale as a GATT server input. 918 919 Steps: 920 1. Setup input database 921 922 Expected Result: 923 Verify that there are no errors after setting up the input database. 924 925 Returns: 926 signals.TestPass if no errors 927 signals.TestFailure if there are any errors during setup 928 929 TAGS: GATT 930 Priority: 1 931 """ 932 self.setup_database(database.WEIGHT_SCALE_SERVICE) 933 934 ### End SIG defined services ### 935