[Op.RA, ["hue"]], [Op.GC, '{"sat":254}', "PUT"], [Op.GC, '{"sat":1, "transitiontime":200}', "PUT"], [Op.GC, '{"hue_inc": 10000}', "PUT"], [Op.RA, ["sat"]], ], "new_case2": [ [Op.GC, '{"ct":454, "bri":50}', "PUT"], [Op.GC, '{"ct":153, "transitiontime":200}', "PUT"], [Op.GC, '{"bri_inc": 50}', "PUT"], [Op.RA, ["ct", "bri"]], [Op.GC, '{"xy":[0.17, 0.7], "bri":50}', "PUT"], [Op.GC, '{"xy":[0.6925, 0.3083], "transitiontime":200}', "PUT"], [Op.GC, '{"bri_inc": 50}', "PUT"], [Op.RA, ["xy", "bri"]], [Op.GC, '{"hue":65535, "bri":50}', "PUT"], [Op.GC, '{"hue":20000, "transitiontime":200}', "PUT"], [Op.GC, '{"bri_inc": 50}', "PUT"], [Op.RA, ["hue", "bri"]], [Op.GC, '{"sat":254, "bri":50}', "PUT"], [Op.GC, '{"sat":0, "transitiontime":200}', "PUT"], [Op.GC, '{"bri_inc": 50}', "PUT"], [Op.RA, ["sat", "bri"]] ] } try: Process_case.process_case(Attribute_Tcs, TCs_list, TCs_body, group_number, light_list, scene_name="att_scene") finally: Attribute_Tcs.write_log_all("Attribute_increment", "./logs/system_test/Attribute")
[Op.UC, '{"on": true, "bri":50, "transitiontime":100}', "PUT"], [Op.GC, '{"bri": 100, "ct": 454}', "PUT"], [Op.UC, '{"alert": "select"}', "PUT"], [Op.GC, '{"alert": "lselect"}', "PUT"], [Op.GC, '{"alert": "none"}', "PUT"], [Op.CS, '{"on": true, "bri": 200, "ct": 250}'], [Op.RS]], "TC24": [[Op.UG], [Op.UC, '{"on": true, "bri":50, "transitiontime":100}', "PUT"], [Op.GC, '{"bri": 100, "ct": 454}', "PUT"], [Op.UC, '{"alert": "select"}', "PUT"], [Op.GC, '{"alert": "lselect"}', "PUT"], [Op.GC, '{"alert": "none"}', "PUT"], [Op.CS, '{"on": true, "bri": 200, "ct": 250}'], [Op.RS]], "TC25": [[Op.DG]], "TC26": [[Op.DG]], "TC27": [[Op.DG]], # "TC28": [[Op.DG]], "TC29": [[Op.DG]], "TC30": [[Op.DG]] } try: Process_case.process_case(Group_Tcs, TCs_list, TCs_body, scene_name=scene_name) finally: Group_Tcs.write_log_all("Groups_Folder", "./logs/system_test/Groups")
# [Op.RA, ["alert"]] # ], "TC11": [ [Op.GC, '{"on": true, "bri": 150, "xy": [0.5175, 0.2664]}', "PUT"], [Op.RA, ["on", "bri", "xy"]], [Op.MSG, "Please wait for 10s to transition"], [Op.CS, '{"on": false, "transitiontime": 100}'], [Op.RS], [Op.RA, ["on"]] ], "TC12": [ [Op.GC, '{"on": false}', "PUT"], [Op.RA, ["on"]], [Op.CS, '{"on": true}'], [Op.RS], [Op.RA, ["on"]] ], "TC13": [ [Op.GC, '{"hue": 65535, "sat":254, "bri":254}', "PUT"], [Op.RA, ["hue", "sat", "bri"]], [Op.MSG, "Please wait for 10s to transition"], [Op.GC, '{"hue": 65535, "sat":0, "transitiontime":100}', "PUT"], [Op.RA, ["hue", "sat"]] ] } try: Process_case.process_case(Lamp_TCs, TCs_list, TCs_body, group_number, light_list, scene_name) finally: Lamp_TCs.write_log_all("lamp", "./logs/system_test/Lamp")
"TC4": [ [Op.CS, '{"on": true, "bri": 100, "transitiontime": 100}'], [Op.DS], [Op.RS] ], "TC6": [ [Op.CS], [Op.GS] ], "TC7": [ [Op.CS], [Op.US], [Op.MSG, "Change the status for the test lamp"], [Op.RS] ], "TC8": [ [Op.CS], [Op.DS], [Op.RS] ] } try: # Process_case.process_case(Scene_v2_TCs, TCs_list_1_lamp, TCs_body_1_lamp, one_light_group_no, one_light_list, # scene_name1) Process_case.process_case(Scene_v2_TCs, TCs_list_3_lamps, TCs_body_3_lamps, three_lights_group_no, three_lights_list, scene_name2) finally: Scene_v2_TCs.write_log_all("Scene_v2", "./logs/system_test/Scene_V2")
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, scene_full.create_scene(scene_name, lights_list, Lights_body)) except Exception as e: print "\nError:%s" % e raw_input("Press any key to quit...") except KeyboardInterrupt: raw_input("\nPress any key to quit...") finally: scene_full.write_log_all("Scene_full", "./logs/system_test/scene_full")
[Op.CS, '{"xy": [0.67725, 0.32008]}'], [Op.RS], [Op.RA, ["xy", "colormode"]]], "TC6": [[Op.UC, '{"on": true, "xy": [0.5175, 0.2664]}', "PUT"], [Op.RA, ["xy", "colormode"]], [Op.UC, '{"ct": 390}', "PUT"], [Op.RA, ["ct", "colormode"]]], "TC7": [[Op.GC, '{"on": false}', "PUT"], [Op.RA, ["on"]], [Op.GC, '{"on": true}', "PUT"], [Op.RA, ["on"]]], "TC8": [[Op.GC, '{"on": true}', "PUT"], [Op.RA, ["on"]], [Op.CS, '{"on": false}'], [Op.RS], [Op.RA, ["on"]]], "TC9": [[Op.MSG, 'Please manually power down lamps under test']], "TC10": [[Op.GC, '{"on": true, "bri": 39}', "PUT"], [Op.RA, ["bri"]], [Op.GC, '{"bri": 206}', "PUT"], [Op.RA, ["bri"]]], "TC11": [[Op.GC, '{"on": true, "bri": 255, "xy": [0.16011, 0.0358]}', "PUT"], [Op.RA, ["bri", "xy"]], [Op.MSG, 'Wait for 10s before print continue'], [Op.CS, '{"xy": [0.68093, 0.32429],"transitiontime":100}'], [Op.RS], [Op.RA, ["xy"]]], "TC12": [[Op.GC, '{"on": true, "alert": "lselect"}', "PUT"], [Op.RA, ["alert"]]], "TC13": [[Op.UC, '{"on": true, "alert": "select"}', "PUT"], [Op.RA, ["alert"]]] } try: Process_case.process_case(Control_TCs, TCs_list, TCs_body, group_number, light_list, scene_name) finally: Control_TCs.write_log_all("Control_clipsdk", "./logs/system_test/Control")
__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, scene_full.create_scene(scene_name, lights_list, Lights_body)) except Exception as e: print "\nError:%s" % e raw_input("Press any key to quit...") except KeyboardInterrupt: raw_input("\nPress any key to quit...") finally: scene_full.write_log_all("Scene_full", "./logs/system_test/scene_full")
[Op.GC, '{"on": true}', "PUT"], [Op.RA, ["on"]], [Op.MSG, "Wait for all lamps transition off"], [Op.CS, '{"on": false, "transitiontime": 600}'], [Op.RS], [Op.RA, ["on"]] ], "TC13": [ [Op.GC, '{"on": false}', "PUT"], [Op.RA, ["on"]], [Op.MSG, "Wait for all lamps transition on"], [Op.CS, '{"on": true, "bri":150, "transitiontime": 600}'], [Op.RS], [Op.RA, ["on", "bri"]] ], "TC14": [ [Op.GC, '{"bri": 254}', "PUT"], [Op.RA, ["bri"]], [Op.MSG, "Wait for all lamps transition to bri 1"], [Op.CS, '{"bri": 1, "transitiontime": 600}'], [Op.RS], [Op.RA, ["bri"]] ] } try: Process_case.process_case(Monitor_TCs, TCs_list, TCs_body, group_number, light_list, scene_name) finally: Monitor_TCs.write_log_all("Monitor_clipsdk", "./logs/system_test/Monitor")
[Op.GC, '{"sat":1, "transitiontime":200}', "PUT"], [Op.GC, '{"hue_inc": 10000}', "PUT"], [Op.RA, ["sat"]], ], "new_case2": [[Op.GC, '{"ct":454, "bri":50}', "PUT"], [Op.GC, '{"ct":153, "transitiontime":200}', "PUT"], [Op.GC, '{"bri_inc": 50}', "PUT"], [Op.RA, ["ct", "bri"]], [Op.GC, '{"xy":[0.17, 0.7], "bri":50}', "PUT"], [Op.GC, '{"xy":[0.6925, 0.3083], "transitiontime":200}', "PUT"], [Op.GC, '{"bri_inc": 50}', "PUT"], [Op.RA, ["xy", "bri"]], [Op.GC, '{"hue":65535, "bri":50}', "PUT"], [Op.GC, '{"hue":20000, "transitiontime":200}', "PUT"], [Op.GC, '{"bri_inc": 50}', "PUT"], [Op.RA, ["hue", "bri"]], [Op.GC, '{"sat":254, "bri":50}', "PUT"], [Op.GC, '{"sat":0, "transitiontime":200}', "PUT"], [Op.GC, '{"bri_inc": 50}', "PUT"], [Op.RA, ["sat", "bri"]]] } try: Process_case.process_case(Attribute_Tcs, TCs_list, TCs_body, group_number, light_list, scene_name="att_scene") finally: Attribute_Tcs.write_log_all("Attribute_increment", "./logs/system_test/Attribute")
"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"] ], "TC6": [ [Op.GC, '{"on": true}', "PUT"], [Op.UC, '{"on": false, "transitiontime": 600}', "PUT"] ], "TC7": [ [Op.GC, '{"on": true, "bri": 255, "hue": 65535, "sat": 255}', "PUT"] ], "TC8": [ [Op.UC, '{"on": true, "bri": 255, "hue": 65535, "sat": 255}', "PUT"] ] } try: Process_case.process_case(Channel_TCs, TCs_list, group_number, lights_list, TCs_body, scene_name) finally: Channel_TCs.write_log_all("Channel_change", "./logs/system_test")
# [Op.CS, '{"on": true, "bri": 200, "ct": 250}'], # [Op.RS] # ], "TC23": [ [Op.UG], [Op.UC, '{"on": true, "bri":50, "transitiontime":100}', "PUT"], [Op.GC, '{"bri": 100, "ct": 454}', "PUT"], [Op.UC, '{"alert": "select"}', "PUT"], [Op.GC, '{"alert": "lselect"}', "PUT"], [Op.GC, '{"alert": "none"}', "PUT"], [Op.CS, '{"on": true, "bri": 200, "ct": 250}'], [Op.RS] ], "TC24": [ [Op.UG], [Op.UC, '{"on": true, "bri":50, "transitiontime":100}', "PUT"], [Op.GC, '{"bri": 100, "ct": 454}', "PUT"], [Op.UC, '{"alert": "select"}', "PUT"], [Op.GC, '{"alert": "lselect"}', "PUT"], [Op.GC, '{"alert": "none"}', "PUT"], [Op.CS, '{"on": true, "bri": 200, "ct": 250}'], [Op.RS] ], "TC25": [[Op.DG]], "TC26": [[Op.DG]], "TC27": [[Op.DG]], # "TC28": [[Op.DG]], "TC29": [[Op.DG]], "TC30": [[Op.DG]] } try: Process_case.process_case(Group_Tcs, TCs_list, TCs_body, scene_name=scene_name) finally: Group_Tcs.write_log_all("Groups_Folder", "./logs/system_test/Groups")
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)"] ], "TC5": [ [Op.MSG, "This case can't test, lamp memory should be full (48 scenes)"] ] } try: Process_case.process_case(SceneMem_Tcs, TCs_list, TCs_body, group_number, light_list) finally: SceneMem_Tcs.write_log_all("Scene_memory", "./logs/system_test/Scene_Memory")