#!/usr/bin/python2.7 import lamptestclass import time import sys __author__ = 'WendyYu' color_gamut = lamptestclass.LampTest() def sleep(s): if s is None: s = 1 time.sleep(s) def wait_exit(msg=None, s=None): if msg is not None: print msg input_key = raw_input('Press "n" to quit or other key to continue:') sys.exit() if input_key.lower() == "n" else sleep(s) else: sleep(s) def execute(group_no, body_list): for body in body_list: print "\n********** Command:%s **********" % body wait_exit(color_gamut.group_cast("put", group_no, body), 5) if "transitiontime" in body:
#!/usr/bin/python2.7 import lamptestclass import Process_case __author__ = 'WendyYu' if __name__ == "__main__": Op = Process_case.OpName Group_Tcs = lamptestclass.LampTest() method = "PUT" scene_name = "groupscene" TCs_list = [ " IPJ_13546 TC1 ", " IPJ_13552 TC7 ", " IPJ_13547 TC2 ", " IPJ_13553 TC8 ", " IPJ_13548 TC3 ", " IPJ_13554 TC9 ", " IPJ_13549 TC4 ", " IPJ_13555 TC10 ", " IPJ_13550 TC5 ", " IPJ_13556 TC11 ", " IPJ_13551 TC6 ", " IPJ_13557 TC12 ", " IPJ_13558 TC13 ", " IPJ_13559 TC14 ", " IPJ_13560 TC15 ", " IPJ_13561 TC16 ", " IPJ_13562 TC17 ", " IPJ_13563 TC18 ",
#!/usr/bin/python2.7 import lamptestclass import time import sys __author__ = 'WendyYu' dynamic_test = lamptestclass.LampTest() def sleep(s): if s is None: s = 1 time.sleep(s) def wait_exit(msg=None, s=None): if msg is not None: print msg input_key = raw_input('Press "n" to quit or other key to continue:') sys.exit() if input_key.lower() == "n" else sleep(s) else: sleep(s) def execute(group_no, light_list, body_list): for body in body_list: wait_exit(dynamic_test.group_cast("put", group_no, body), 5) if "transitiontime" in body: id_start = body.find('"transitiontime":')
#!/usr/bin/python import lamptestclass import Process_case import time __author__ = 'WendyYu' if __name__ == '__main__': scene_full = lamptestclass.LampTest() try: numbers = raw_input("How many scenes do you want to create: ") lights_list = [1, 2, 3] Lights_body = None All_diff = raw_input( "Set the same status for the lights for all scenes(y or n): ") if All_diff == 'y': Lights_body = raw_input( 'Enter the status of the lights(eg:{"on":true}): ') for i in range(int(numbers)): real_time = time.strftime("%H%M%S", time.localtime()) scene_name = "Scene%s_%s" % (str(i + 1), real_time) if All_diff == 'n': Lights_body = raw_input( 'Enter the lights status for %s (eg:{"on":true}): ' % scene_name) print "*" * 10 + "\t" + str(i + 1) + " scene(s)\t" + "*" * 10 scene_full.msg_list.append("*" * 10 + "\t" + str(i + 1) + " scene(s)\t" + "*" * 10) Process_case.wait_exit( False,
#!/usr/bin/python2.7 import lamptestclass import Process_case __author__ = 'WendyYu' if __name__ == '__main__': Op = Process_case.OpName Control_TCs = lamptestclass.LampTest() light_list = [1, 2, 3, 4, 7, 8, 9] group_number = 0 scene_name = "controlscene" TCs_list = [ " IPJ_8413 TC1 ", " IPJ_8393 TC2 ", " IPJ_8392 TC3 ", " IPJ_15487 TC4 ", " IPJ_15488 TC5 ", " IPJ_15489 TC6 ", " IPJ_15490 TC7 ", " IPJ_15491 TC8 ", " IPJ_15491 TC9 ", " IPJ_15493 TC10 ", " IPJ_15494 TC11 ", " IPJ_15495 TC12 ", " IPJ_15496 TC13 " ] TCs_body = { "TC1": [[Op.GC, '{"on": true, "effect": "colorloop"}', "PUT"], [Op.RA, ["effect"]], [Op.GC, '{"effect": "none"}', "PUT"], [Op.RA, ["effect"]]], "TC2": [[Op.CS, '{"on": true, "effect": "colorloop"}'], [Op.RS], [Op.RA, ["effect"]], [Op.GS]], "TC3": [[Op.MSG, "Before long select stops, press continue"], [Op.GC, '{"alert": "lselect"}', "PUT"], [Op.GC, '{"alert": "none"}', "PUT"], [Op.RA, ["alert"]]], "TC4": [[Op.GC, '{"on": true, "ct": 209}', "PUT"], [Op.RA, ["ct", "colormode"]],
#!/usr/bin/python2.7 import lamptestclass import Process_case __author__ = 'WendyYu' if __name__ == '__main__': Op = Process_case.OpName Scene_v2_TCs = lamptestclass.LampTest() one_light_list = [1] three_lights_list = [1, 2, 3, 4, 5, 6, 7] one_light_group_no = 1 three_lights_group_no = 0 scene_name1 = "1_lamp_scene" scene_name2 = "3_lamps_scene" TCs_list_1_lamp =[" IPJ_16524 TC1 ", " IPJ_16530 TC5 "] TCs_list_3_lamps = [" IPJ_16525 TC2 ", " IPJ_16526 TC3 ", " IPJ_16528 TC4 ", " IPJ_16531 TC6 ", " IPJ_16532 TC7 ", " IPJ_16533 TC8 "] # TCs_body_1_lamp = { # "TC1": [ # [Op.CS, '{"on": true, "bri": 100}'], # [Op.RS] # ], # "TC5": [ # [Op.CS], # [Op.MSG, "Change the color for the test lamp"] # [Op.RS] # ] # }
#!/usr/bin/python2.7 import lamptestclass import time import sys __author__ = 'WendyYu' RF_stress_test = lamptestclass.LampTest() def wait_exit(msg=None): if msg is not None: print msg input_key = raw_input('Press "n" to quit or other key to continue:') if input_key.lower() == "n": sys.exit() def stress(light_list, body_list): for body in body_list: print "*** Command:%s ***" % body wait_exit(RF_stress_test.uni_cast("put", light_list, body)) # time.sleep(1.5) RF_stress_test.msg_list.append("\n" + "*" * 120 + "\n")
#!/usr/bin/python2.7 import lamptestclass import Process_case __author__ = 'WendyYu' if __name__ == '__main__': Op = Process_case.OpName Monitor_TCs = lamptestclass.LampTest() light_list = [1, 2, 3, 4, 7, 8, 11] group_number = 0 scene_name = "MonitorScene" TCs_list = [" IPJ_15465 TC1 ", " IPJ_15466 TC2 ", " IPJ_15467 TC3 ", " IPJ_15468 TC4 ", " IPJ_15469 TC5 ", " IPJ_15470 TC6 ", " IPJ_15471 TC7 ", " IPJ_15472 TC8 ", " IPJ_15473 TC9 ", " IPJ_15474 TC10 ", " IPJ_15475 TC11 ", " New_Case1 TC12 ", " New_Case2 TC13 ", " New_Case3 TC14 "] TCs_body = { # "TC1": [ # [Op.MSG, 'Power cycle lamp manually'], # [Op.RA, ["ct", "bri"]] # ], # "TC2": [ # [Op.CS, '{"on": false, "transitiontime": 100}'], # [Op.RS], # [Op.RA, ["on"]] # ], # "TC3": [ # [Op.GC, '{"on": true, "ct": 345}', "PUT"], # [Op.RA, ["ct", "colormode"]], # [Op.CS, '{"xy": [0.16195, 0.02948]}'],
#!/usr/bin/python2.7 import lamptestclass import Process_case __author__ = 'WendyYu' if __name__ == '__main__': Op = Process_case.OpName Attribute_Tcs = lamptestclass.LampTest() light_list = [1, 2, 3, 4, 5, 6, 7] group_number = 0 TCs_list = [ " IPJ_15525 TC1 ", " IPJ_15526 TC2 ", " IPJ_15527 TC3 ", " IPJ_15537 TC4 ", " IPJ_15538 TC5 ", " IPJ_15539 TC6 ", " IPJ_15540 TC7 ", " IPJ_15541 TC8 ", " IPJ_15542 TC9 ", " IPJ_15543 TC10 ", " IPJ_15544 TC11 ", " IPJ_15545 TC12 ", " IPJ_15546 TC13 ", " IPJ_15547 TC14 ", " IPJ_15548 TC15 ", " IPJ_15549 TC16 ", " IPJ_15550 TC17 ", " IPJ_15551 TC18 ", " IPJ_15552 TC19 ", " IPJ_15553 TC20 ", " IPJ_15554 TC21 ", " IPJ_15555 TC22 ", "Added new_case1", "Added new_case2" ] TCs_body = { # "TC1": [ # [Op.MSG, "Turn all lights on"], # [Op.GC, '{"bri":100}', "PUT"], # [Op.GC, '{"bri_inc": -254}', "PUT"], # [Op.RA, ["bri"]], # [Op.GC, '{"bri":200}', "PUT"], # [Op.GC, '{"bri_inc": -1}', "PUT"], # [Op.RA, ["bri"]],
#!/usr/bin/python2.7 import lamptestclass import Process_case __author__ = 'WendyYu' if __name__ == '__main__': Op = Process_case.OpName Channel_TCs = lamptestclass.LampTest() group_number = 0 lights_list = [3] scene_name = "Channelscene" TCs_list = ["IPJ_13494 TC1", "IPJ_13495 TC2", "IPJ_13496 TC3", "IPJ_13497 TC4", "IPJ_13498 TC5", "IPJ_13499 TC6", "IPJ_13500 TC7", "IPJ_13501 TC8"] TCs_body = { "TC1": [ [Op.GC, '{"on": false}', "PUT"] ], "TC2": [ [Op.UC, '{"on": false}', "PUT"], ], "TC3": [ [Op.GC, '{"effect": "colorloop"}', "PUT"] ], "TC4": [ [Op.UC, '{"effect": "colorloop"}', "PUT"] ], "TC5": [ [Op.GC, '{"on": true}', "PUT"], [Op.GC, '{"on": false, "transitiontime": 600}', "PUT"]
#!/usr/bin/python2.7 import lamptestclass import Process_case __author__ = 'WendyYu' if __name__ == '__main__': Op = Process_case.OpName SceneMem_Tcs = lamptestclass.LampTest() light_list = [2, 5, 6] group_number = 0 TCs_list = [" IPJ_15819 TC1 ", " IPJ_15821 TC2 ", " IPJ_15822 TC3 ", " IPJ_16513 TC4 ", " IPJ_16514 TC5 "] TCs_body = { "TC1": [ [Op.MSG, "Bridge contain 200 scenes (not locked, recycle true)\n" "Lamp memory should empty: <factory reset all lamps>"], [Op.CS, '{"on":true, "bri":100}'] ], "TC2": [ [Op.MSG, "Bridge memory empty\n" "A lamp linked to remote controller and this lamp is included in the scene"], [Op.CS, '{"on":true, "bri":200, "transitiontime":100}'], [Op.RS] ], "TC3": [ [Op.MSG, "This case can't test, lamp memory should be full (48 scenes)"] ], "TC4": [ [Op.MSG, "This case can't test, lamp memory should be full (48 scenes)"] ],