示例#1
0
 def __init__(self):
     Bench.__init__(self, name = "address_read_and_write",
                     title = "MAC address and PAN id read/write test",
                     status = "released",
                     type = "smoke",
                     subtype = "",
                     execution = {
                         "skip": {
                             "value": False,
                             "reason": ""
                         }
                     },
                     author = "Valtteri Erkkila",
                     purpose = "Tests reading a MAC address from the driver, and writing to the modifiable MAC address",
                     feature = ["MLME-SET"],
                     component = ["MAC"],
                     requirements = {
                         "duts": {
                             '*': {
                                 "count":1,
                                 "type": "hardware",
                                 "allowed_platforms": ["K64F", "K66F", "NUCLEO_F429ZI", "KW24D", "UBLOX_EVK_ODIN_W2", "KW41Z"],
                                 "application": {
                                    "name": "TEST_APPS-device-nanostack_mac_tester"
                                 }
                             },
                             "1":{"nick": "First"}
                     }}
     )
 def __init__(self):
     Bench.__init__(self, name = "send_data_indirect",
                     title = "Indirect data transmission test",
                     status = "released",
                     type = "smoke",
                     subtype = "",
                     execution = {
                         "skip": {
                             "value": False,
                             "reason": ""
                         }
                     },
                     author = "Valtteri Erkkila",
                     purpose = "Tests sending data indirectly, i.e polling the coordinator for data",
                     feature = ["MCPS-DATA", "MLME-POLL"],
                     component = ["MAC"],
                     requirements = {
                         "duts": {
                             '*': {
                                 "count":3,
                                 "type": "hardware",
                                 "allowed_platforms": ["K64F", "K66F", "NUCLEO_F429ZI", "KW24D", "UBLOX_EVK_ODIN_W2"],
                                 "application": {
                                    "name": "TEST_APPS-device-nanostack_mac_tester"
                                 }
                             },
                             "1":{"nick": "First"},
                             "2":{"nick": "Second"},
                             "3":{"nick": "Third"}
                     }}
     )
示例#3
0
 def __init__(self):
     Bench.__init__(self, name = "ED_scan",
                     title = "ED scan test",
                     status = "released",
                     type = "smoke",
                     subtype = "",
                     execution = {
                         "skip": {
                             "value": False,
                             "reason": ""
                         }
                     },
                     author = "Valtteri Erkkila",
                     purpose = "Tests reading the ED values from channels 11-16",
                     feature = ["MLME-SCAN (ED)"],
                     component = ["MAC"],
                     requirements = {
                         "duts": {
                             '*': {
                                 "count":3,
                                 "type": "hardware",
                                 "allowed_platforms": ["K64F", "K66F", "NUCLEO_F429ZI", "KW24D", "UBLOX_EVK_ODIN_W2"],
                                 "application": {
                                    "name": "TEST_APPS-device-nanostack_mac_tester"
                                 }
                             },
                             "1":{"nick": "First"},
                             "2":{"nick": "Second"},
                             "3":{"nick": "Third"}
                     }}
     )
 def __init__(self):
     Bench.__init__(self, name = "create_and_join_PAN",
                     title = "Create a PAN and have a device join it",
                     status = "released",
                     type = "smoke",
                     subtype = "",
                     execution = {
                         "skip": {
                             "value": False,
                             "reason": ""
                         }
                     },
                     author = "Valtteri Erkkila",
                     purpose = "",
                     feature = ["MLME-START", "MLME-SCAN (active)"],
                     component = ["MAC"],
                     requirements = {
                         "duts": {
                             '*': {
                                 "count":3,
                                 "type": "hardware",
                                 "allowed_platforms": ["K64F", "K66F", "NUCLEO_F429ZI", "KW24D", "UBLOX_EVK_ODIN_W2"],
                                 "application": {
                                    "name": "TEST_APPS-device-nanostack_mac_tester"
                                 }
                             },
                             "1":{"nick": "First"},
                             "2":{"nick": "Second"},
                             "3":{"nick": "Third"}
                     }}
     )
 def __init__(self):
     Bench.__init__(self, name = "send_large_payloads",
                     title = "Data transmission test with large packets",
                     status = "released",
                     type = "reliability",
                     subtype = "",
                     execution = {
                         "skip": {
                             "value": False,
                             "reason": ""
                         }
                     },
                     author = "Valtteri Erkkila",
                     purpose = "Repeatedly sends long packets, checking that the payload is correct in each one",
                     feature = ["MCPS-DATA"],
                     component = ["MAC"],
                     requirements = {
                         "duts": {
                             '*': {
                                 "count":2,
                                 "type": "hardware",
                                 "allowed_platforms": ["K64F", "K66F", "NUCLEO_F429ZI", "KW24D", "UBLOX_EVK_ODIN_W2"],
                                 "application": {
                                    "name": "TEST_APPS-device-nanostack_mac_tester"
                                 }
                             },
                             "1":{"nick": "First"},
                             "2":{"nick": "Second"}
                     }}
     )
    def __init__(self, **kwargs):
        testcase_args = {
            'title': "dummy",
            'status': "unknown",
            'type': "functional",
            'purpose': "dummy",
            'requirements': {
                "duts": {
                    '*': {
                        "count": 0,
                    }
                }
            }
        }

        testcase_args.update(kwargs)
        Bench.__init__(self, **testcase_args)
示例#7
0
 def __init__(self):
     Bench.__init__(
         self,
         name="subdirtest",
         title="Level 1 testcase test file",
         status="development",
         purpose="dummy",
         component=["None"],
         type="compatibility",
         requirements={"duts": {
             '*': {
                 "count": 0
             }
         }},
         execution={"skip": {
             "value": True,
             "reason": "Because"
         }})
示例#8
0
 def __init__(self):
     Bench.__init__(self,
                    name="test_cmdline",
                    title="Smoke test for command line interface",
                    status="released",
                    purpose="Verify Command Line Interface",
                    component=["cmdline"],
                    type="smoke",
                    requirements={
                        "duts": {
                            '*': {
                                 "count": 1,
                                 "type": "hardware",
                                 "allowed_platforms": ['K64F']
                            }
                        }
                    }
                    )
示例#9
0
 def __init__(self):
     Bench.__init__(self,
                    name="ut_dut_failing_command",
                    title="unittest dut crash in testcase",
                    status="development",
                    type="acceptance",
                    purpose="dummy",
                    component=["Icetea_ut"],
                    requirements={
                        "duts": {
                            '*': {
                                "count": 1,
                                "type": "process",
                                "application": {
                                    "bin": "test/dut/dummyDut"
                                },
                            }
                        }
                    })
示例#10
0
 def __init__(self):
     Bench.__init__(
         self,
         name="cmdfailtestcase",
         title="Bench test file",
         status=
         "development",  #allowed values: released, development, maintenance, broken, unknown
         purpose="test",
         component=["None"],
         type=
         "regression",  # allowed values: installation, compatibility, smoke,
         # regression, acceptance, alpha, beta, destructive, performance
         requirements={
             "duts": {
                 '*': {  #requirements for all nodes
                     "count": 0
                 }
             }
         })
示例#11
0
 def __init__(self):
     Bench.__init__(self,
                    name="test_serial_port",
                    title="regression test for dut serial data communication",
                    status="development",
                    purpose="Verify dut serial",
                    component=["cmdline"],
                    type="regression",
                    requirements={
                        "duts": {
                            '*': {
                                 "count": 1,
                                 "type": "hardware",
                                 "allowed_platforms": ['K64F'],
                                 "application": {"bin": "examples/cliapp/mbed-os5/bin/mbed_cliapp_K64F.bin"}
                            }
                        }
                    }
                    )
示例#12
0
 def __init__(self):
     Bench.__init__(
         self,
         name="send_data_indirect",
         title="Indirect data transmission test",
         status="development",
         type="smoke",
         subtype="",
         execution={"skip": {
             "value": False,
             "reason": ""
         }},
         author="Valtteri Erkkila",
         purpose=
         "Tests sending data indirectly, i.e polling the coordinator for data",
         feature=["MCPS-DATA", "MLME-POLL"],
         component=["MAC"],
         requirements={
             "duts": {
                 '*': {
                     "count":
                     3,
                     "type":
                     "hardware",
                     "allowed_platforms": [
                         "K64F", "K66F", "NUCLEO_F429ZI", "KW24D",
                         "UBLOX_EVK_ODIN_W2"
                     ],
                     "application": {
                         "name": "TEST_APPS-device-nanostack_mac_tester"
                     }
                 },
                 "1": {
                     "nick": "First"
                 },
                 "2": {
                     "nick": "Second"
                 },
                 "3": {
                     "nick": "Third"
                 }
             }
         })
 def __init__(self):
     Bench.__init__(self,
                    name="create_and_join_PAN",
                    title="Create a PAN and have a device join it",
                    status="released",
                    type="smoke",
                    subtype="",
                    execution={"skip": {
                        "value": False,
                        "reason": ""
                    }},
                    author="Valtteri Erkkila",
                    purpose="",
                    feature=["MLME-START", "MLME-SCAN (active)"],
                    component=["MAC"],
                    requirements={
                        "duts": {
                            '*': {
                                "count":
                                3,
                                "type":
                                "hardware",
                                "allowed_platforms": [
                                    "K64F", "K66F", "NUCLEO_F429ZI",
                                    "KW24D", "UBLOX_EVK_ODIN_W2"
                                ],
                                "application": {
                                    "name":
                                    "TEST_APPS-device-nanostack_mac_tester"
                                }
                            },
                            "1": {
                                "nick": "First"
                            },
                            "2": {
                                "nick": "Second"
                            },
                            "3": {
                                "nick": "Third"
                            }
                        }
                    })
示例#14
0
 def __init__(self):
     Bench.__init__(
         self,
         name="ED_scan",
         title="ED scan test",
         status="released",
         type="smoke",
         subtype="",
         execution={"skip": {
             "value": False,
             "reason": ""
         }},
         author="Valtteri Erkkila",
         purpose="Tests reading the ED values from channels 11-16",
         feature=["MLME-SCAN (ED)"],
         component=["MAC"],
         requirements={
             "duts": {
                 '*': {
                     "count":
                     3,
                     "type":
                     "hardware",
                     "allowed_platforms": [
                         "K64F", "K66F", "NUCLEO_F429ZI", "KW24D",
                         "UBLOX_EVK_ODIN_W2"
                     ],
                     "application": {
                         "name": "TEST_APPS-device-nanostack_mac_tester"
                     }
                 },
                 "1": {
                     "nick": "First"
                 },
                 "2": {
                     "nick": "Second"
                 },
                 "3": {
                     "nick": "Third"
                 }
             }
         })
示例#15
0
 def __init__(self):
     Bench.__init__(self,
                    name="test_K64F_only",
                    title="Test a test case which have only K64F support",
                    status="released",
                    purpose="Just for testing scripts",
                    component=[],
                    type="smoke",
                    requirements={
                        "duts": {
                            '*': {
                                "count": 1,
                                "type": "hardware",
                                "allowed_platforms": ['K64F'],
                                "application": {
                                    "name": "TEST_APPS-device-exampleapp"
                                }
                            }
                        }
                    })
示例#16
0
 def __init__(self):
     Bench.__init__(self,
                    name="sample_process_multidut_testcase",
                    title="unittest exception in testcase",
                    status="development",
                    type="acceptance",
                    purpose="dummy",
                    requirements={
                        "duts": {
                            '*': {
                                "count": 200,
                                "type": "process",
                                "application": {
                                    "name": "sample",
                                    "version": "1.0",
                                    "bin": "tools/sample"
                                }
                            }
                        }
                    })
 def __init__(self):
     Bench.__init__(self, name="mesh_minimal_startup",
                     title = "Mesh minimal example application startup",
                     status = "released",
                     type = "regression",
                     subtype = "startup",
                     author = "Kimmo Lepikko",
                     purpose = "Verifies that the application starts up correctly and connects to border router",
                     component=["6LoWPAN"],
                     requirements={
                        "duts": {
                            '*': { #requirements for all nodes
                                 "count":1,
                                 "type": "hardware",
                                 "application":{ "name":"TEST_APPS-mesh_minimal_startup", "version": "1.0", "init_cli_cmds": [], "post_cli_cmds": [] },
                                 "rf_channel": 18
                            },
                            "1": {"nick":  "client"},
                        }}
     )
示例#18
0
    def __init__(self, **kwargs):
        testcase_args = {
            'status': "released",
            'component': ["mbed-os", "netsocket"],
            'type': "smoke",
            'subtype': "socket",
            'requirements': {
                "duts": {
                    "*": {
                        "count": 1,
                        "type": "hardware",
                        "application": {"name": "TEST_APPS-device-socket_app"}
                    },
                    "1": {"nick": "dut1"},
                }
            }
        }

        testcase_args.update(kwargs)
        Bench.__init__(self, **testcase_args)
示例#19
0
 def __init__(self):
     Bench.__init__(self,
                    name="test_close_open",
                    title="Smoke test for testing dut connection "
                          "opening and closing in testcase",
                    status="released",
                    purpose="Verify Command Line Interface",
                    component=["cmdline"],
                    type="smoke",
                    requirements={
                        "duts": {
                            '*': {
                                "count": 1,
                                "type": "hardware",
                                "allowed_platforms": ['K64F', "SAM4E", 'NRF51_DK'],
                                "application": {"name": "generalTestApplication",
                                                "version": "1.0"}
                            }
                        }}
                   )
示例#20
0
    def __init__(self, **kwargs):
        testcase_args = {
            'status': "released",
            'component': ["mbed-os", "netsocket"],
            'type': "smoke",
            'subtype': "socket",
            'requirements': {
                "duts": {
                    "*": {
                        "count": 1,
                        "type": "hardware",
                        "application": {"name": "TEST_APPS-device-socket_app"}
                    },
                    "1": {"nick": "dut1"},
                }
            }
        }

        testcase_args.update(kwargs)
        Bench.__init__(self, **testcase_args)
示例#21
0
 def __init__(self):
     Bench.__init__(self,
                    name="test_close_open",
                    title="regression test for open and close dut connection",
                    status="development",
                    purpose="Verify dut connection",
                    component=["cmdline"],
                    type="regression",  # allowed values: installation, compatibility, smoke,
                    # regression, acceptance, alpha, beta, destructive, performance
                    requirements={
                        "duts": {
                            '*': {  # requirements for all nodes
                                 "count": 1,
                                 "type": "hardware",
                                 "allowed_platforms": ['K64F'],
                                 "application": {"bin": "examples/cliapp/mbed-os5/bin/mbed_cliapp_K64F.bin"}
                            }
                        }
                    }
                    )
示例#22
0
 def __init__(self):
     Bench.__init__(self,
                    name="sample_async",
                    title="async command example usage",
                    status="development",
                    type="smoke",
                    purpose="show an example usage of async command",
                    component=["Icetea"],
                    requirements={
                         "duts": {
                             '*': {
                                 "count": 1,  # devices number
                                 "type": "hardware",  # "hardware" (by default) or "process"
                                 "application": {
                                     "bin": "build_path/build_full_name",  # build binary path
                                 }
                             }
                         }
                     }
                    )
示例#23
0
 def __init__(self):
     Bench.__init__(self,
                    name="test_cmdline",
                    title="Smoke test for command line interface",
                    status="released",
                    purpose="Verify Command Line Interface",
                    component=["cmdline"],
                    type="smoke",
                    requirements={
                        "duts": {
                            '*': {
                                "count": 1,
                                "type": "hardware",
                                "application": {
                                    "name": "TEST_APPS-device-exampleapp"
                                }
                            },
                            "1": {"nick": "dut1"},
                        }
                    }
                    )
 def __init__(self):
     Bench.__init__(
         self,
         name="test_config_parse_corner_case",
         title="Regression test for a corner case in config parsing",
         status="released",
         purpose="Regression test",
         component=["configuration"],
         type="regression",
         requirements={
             "duts": {
                 '*': {
                     "count": 33,
                     "type": "process",
                     "application": {
                         "bin":
                         os.path.abspath(
                             os.path.join(__file__, os.path.pardir,
                                          os.path.pardir, "dut",
                                          "dummyDut"))
                     }
                 },
                 1: {
                     "nick": "nick1",
                     "location": [0.0, 0.0]
                 },
                 2: {
                     "nick": "nick2",
                     "location": [10.0, 0.0]
                 },
                 "3..32": {
                     "nick": "nick_{i}",
                     "location": [20.0, 0.0]
                 },
                 33: {
                     "nick": "nick33",
                     "location": [50.0, 50.0]
                 },
             }
         })
 def __init__(self):
     Bench.__init__(
         self,
         name="send_large_payloads",
         title="Data transmission test with large packets",
         status="development",
         type="reliability",
         subtype="",
         execution={"skip": {
             "value": False,
             "reason": ""
         }},
         author="Valtteri Erkkila",
         purpose=
         "Repeatedly sends long packets, checking that the payload is correct in each one",
         feature=["MCPS-DATA"],
         component=["MAC"],
         requirements={
             "duts": {
                 '*': {
                     "count":
                     2,
                     "type":
                     "hardware",
                     "allowed_platforms": [
                         "K64F", "K66F", "NUCLEO_F429ZI", "KW24D",
                         "UBLOX_EVK_ODIN_W2"
                     ],
                     "application": {
                         "name": "TEST_APPS-device-nanostack_mac_tester"
                     }
                 },
                 "1": {
                     "nick": "First"
                 },
                 "2": {
                     "nick": "Second"
                 }
             }
         })
示例#26
0
 def __init__(self):
     Bench.__init__(
         self,
         name="test_quick_process",
         type="smoke",
         requirements={
             "duts": {
                 "*": {
                     "count": 1,
                     "type": "process"
                 },
                 1: {
                     "application": {
                         "bin": "/bin/echo",
                         "bin_args": ["If this is found, the test passed"],
                         "init_cli_cmds": [],
                         "post_cli_cmds": []
                     }
                 }
             }
         }
     )
示例#27
0
 def __init__(self):
     Bench.__init__(self,
                    name="send_data",
                    title="Simple data transmission test",
                    status="released",
                    type="smoke",
                    subtype="",
                    execution={"skip": {
                        "value": False,
                        "reason": ""
                    }},
                    author="Valtteri Erkkila",
                    purpose="Tests that sending data works",
                    feature=["MCPS-DATA"],
                    component=["MAC"],
                    requirements={
                        "duts": {
                            '*': {
                                "count":
                                2,
                                "type":
                                "hardware",
                                "allowed_platforms": [
                                    "K64F", "K66F", "NUCLEO_F429ZI",
                                    "KW24D", "UBLOX_EVK_ODIN_W2"
                                ],
                                "application": {
                                    "name":
                                    "TEST_APPS-device-nanostack_mac_tester"
                                }
                            },
                            "1": {
                                "nick": "First"
                            },
                            "2": {
                                "nick": "Second"
                            }
                        }
                    })
示例#28
0
 def __init__(self):
     Bench.__init__(
         self,
         name="test_async",
         title="async command and response test",
         status="development",
         type="regression",
         purpose="test async command and response parse works",
         component=["icetea"],
         requirements={
             "duts": {
                 '*': {
                     "count": 1,
                     "type": "hardware",
                     "allowed_platforms": ["K64F"],
                     "application": {
                         "bin":
                         "examples/cliapp/mbed-os5/bin/mbed_cliapp_K64F.bin"
                     }
                 }
             }
         })
示例#29
0
 def __init__(self):
     Bench.__init__(self,
                    name="TCPSERVER_ACCEPT",
                    title="TCPSERVER_ACCEPT",
                    purpose="Test that TCPServer::bind(), TCPServer::listen() and TCPServer::accept() works",
                    status="released",
                    component=["mbed-os", "netsocket"],
                    author="Juha Ylinen <*****@*****.**>",
                    type="smoke",
                    subtype="socket",
                    requirements={
                        "duts": {
                            '*': {  # requirements for all nodes
                                "count": 2,
                                "type": "hardware",
                                "application": {"name": "TEST_APPS-device-socket_app"}
                            },
                            "1": {"nick": "dut1"},
                            "2": {"nick": "dut2"}
                        }
                    }
                    )
示例#30
0
 def __init__(self):
     Bench.__init__(self,
                    name="test_cmdline",
                    title="Smoke test for command line interface",
                    status="released",
                    purpose="Verify Command Line Interface",
                    component=["cmdline"],
                    type="smoke",
                    requirements={
                        "duts": {
                            '*': {
                                "count": 1,
                                "type": "hardware",
                                "application": {
                                    "name": "TEST_APPS-device-exampleapp"
                                }
                            },
                            "1": {
                                "nick": "dut1"
                            },
                        }
                    })
示例#31
0
文件: test_nfc.py 项目: 0xc0170/mbed
 def __init__(self, **kwargs):
     testcase_args = {
                    'title':"NFC tests with a reader",
                    'status':"development",
                    'purpose':"NFC e2e",
                    'component':["NFC"],
                    'type':"regression",
                    'requirements':{
                        "duts": {
                            '*': {
                                "count": 1,
                                "type": "hardware",
                                "application": {
                                    "name": "TEST_APPS-device-nfcapp"
                                }
                            },
                            "1": {"nick": "dev1"}
                        }
                    }
     }
     testcase_args.update(kwargs)
     Bench.__init__(self, **testcase_args)
示例#32
0
 def __init__(self):
     Bench.__init__(
         self,
         name="test_cli_init",
         title="test cli init with EventMatcher",
         status="development",
         type="regression",
         purpose="test cli init with EventMatcher ",
         component=["icetea"],
         requirements={
             "duts": {
                 '*': {
                     "count": 1,
                     "type": "hardware",
                     "allowed_platforms": ["K64F"],
                     "application": {
                         "bin":
                         "examples/cliapp/mbed-os5/bin/mbed_cliapp_K64F.bin",
                         "cli_ready_trigger": "/>"
                     }
                 }
             }
         })
 def __init__(self):
     Bench.__init__(self,
                    name="TCPSOCKET_ECHOTEST_BURST_SHORT",
                    title="TCPSOCKET_ECHOTEST_BURST_SHORT",
                    purpose="Verify that TCPSocket can send burst of packets to echo server and read incoming packets",
                    status="released",
                    component=["mbed-os", "netsocket"],
                    author="Juha Ylinen <*****@*****.**>",
                    type="smoke",
                    subtype="socket",
                    requirements={
                        "duts": {
                            '*': {  # requirements for all nodes
                                "count": 1,
                                "type": "hardware",
                                "application": {
                                    "name": "TEST_APPS-device-socket_app"
                                }
                            },
                            "1": {"nick": "dut1"},
                        }
                    }
                    )
示例#34
0
 def __init__(self):
     Bench.__init__(self,
                    name="sample_event_matcher",
                    title="Icetea built-in event matcher example",
                    status="development",
                    type="smoke",
                    purpose="show an example usage of Icetea event matcher",
                    component=["icetea"],
                    requirements={
                        "duts": {
                            '*': {
                                "count": 1,
                                "type": "hardware",
                                "application": {
                                    "bin": "build_path/build_full_name",
                                }
                            },
                            "1": {
                                "nick": "dut1"  # give dut a nick
                            }
                        }
                    }
                   )
示例#35
0
 def __init__(self,
              teststep_fail=False,
              teststep_error=False,
              name_error=False,
              value_error=False,
              kbinterrupt=False,
              exception=False,
              inconclusive_error=False,
              in_setup=False,
              in_case=False,
              in_teardown=False,
              test_step_timeout=False):
     self.teststep_error = teststep_error
     self.teststep_fail = teststep_fail
     self.name_error = name_error
     self.value_error = value_error
     self.kbinterrupt = kbinterrupt
     self.exception = exception
     self.in_setup = in_setup
     self.in_case = in_case
     self.in_teardown = in_teardown
     self.inconclusive = inconclusive_error
     self.test_step_timeout = test_step_timeout
     Bench.__init__(
         self,
         name="ut_exception",
         title="unittest exception in testcase",
         status="development",
         type="acceptance",
         purpose="dummy",
         requirements={
             "duts": {
                 '*': {  # requirements for all nodes
                     "count": 0,
                 }
             }
         })
示例#36
0
 def __init__(self):
     Bench.__init__(
         self,
         name="address_read_and_write",
         title="MAC address and PAN id read/write test",
         status="development",
         type="smoke",
         subtype="",
         execution={"skip": {
             "value": False,
             "reason": ""
         }},
         author="Valtteri Erkkila",
         purpose=
         "Tests reading a MAC address from the driver, and writing to the modifiable MAC address",
         feature=["MLME-SET"],
         component=["MAC"],
         requirements={
             "duts": {
                 '*': {
                     "count":
                     1,
                     "type":
                     "hardware",
                     "allowed_platforms": [
                         "K64F", "K66F", "NUCLEO_F429ZI", "KW24D",
                         "UBLOX_EVK_ODIN_W2"
                     ],
                     "application": {
                         "name": "TEST_APPS-device-nanostack_mac_tester"
                     }
                 },
                 "1": {
                     "nick": "First"
                 }
             }
         })
示例#37
0
 def __init__(self):
     Bench.__init__(
         self,
         name="test_close_open",
         title=
         "Smoke test for testing dut connection opening and closing in testcase",
         status="released",
         purpose="Verify Command Line Interface",
         component=["cmdline"],
         type=
         "smoke",  # allowed values: installation, compatibility, smoke, regression, acceptance, alpha, beta, destructive, performance
         requirements={
             "duts": {
                 '*': {  #requirements for all nodes
                     "count": 1,
                     "type": "hardware",
                     "allowed_platforms": ['K64F', "SAM4E", 'NRF51_DK'],
                     "application": {
                         "name": "generalTestApplication",
                         "version": "1.0"
                     }
                 }
             }
         })
示例#38
0
 def __init__(self, **kwargs):
     testcase_args = {
         'title': "NFC tests with no reader",
         'status': "development",
         'purpose': "NFC target-only checks",
         'component': ["NFC"],
         'type': "smoke",
         'requirements': {
             "duts": {
                 '*': {
                     "count": 1,
                     "type": "hardware",
                     "application": {
                         "name": "TEST_APPS-device-nfcapp"
                     }
                 },
                 "1": {
                     "nick": "dev1"
                 }
             }
         }
     }
     testcase_args.update(kwargs)
     Bench.__init__(self, **testcase_args)
示例#39
0
    def __init__(self):
        Bench.__init__(
            self,
            name="sample",  # short name for testcase, have to be unique,
            # e.g. "icetea-sample"
            title="Smoke sample test",  # short title

            # Implementation Status
            # "released"         TC is verified and are ready to be execute
            # "development"      TC is in development and not yet ready for testing
            # "maintenance"      TC is ready, but for some reason (e.g. DUT interface
            # changes) it cannot be executed for now
            # "broken"           Some why this TC is not working correctly,
            # but not because of DUT. E.g. some major framework changes
            # "unknown"          Unknown status
            status=
            "unknown",  # allowed values: released, development, maintenance,
            # broken, unknown

            # Test Case type
            # "installation"     (just in case)
            # "compatibility"    Verify compatibility,
            # e.g. two different versions of DUTs
            # "smoke"            Verify just very basic situation
            # "regression"
            # "acceptance"
            # "functional"
            # "stability"
            # "destructive"
            # "performance"
            # "reliability"
            # "functional"
            type=
            "acceptance",  # allowed values: installation, compatibility, smoke,
            # regression, acceptance, alpha, beta, destructive, performance.
            # Allowed type -specific sub-types.
            # type acceptance - sub-type certification.
            #
            sub_type="certification",
            purpose="Demostrate FW TC API",  # test case purpose.
            specification_href="http://.....",
            component=["thread"],  # components under test as a list.
            feature=[],  # list of features under test.
            # Compatibility related information
            # This section can be normally ignored,
            # because all cases should be automation compatible.
            compatible={
                "automation": {
                    # by default all cases are automation compatible,
                    # this one is not (just for demo purpose).
                    "value": False,
                    # Reason why this is not automation compatible.
                    "reason": "This is just dummy sample"
                },
                "hw": {
                    "value": True,
                    # there will be more information later.
                },
                "framework": {
                    "name": "icetea",
                    # Version of framework required.
                    # This will be checked if you run icetea with --check_version.
                    "version": ">0.3.2"
                    # Allowed values in semantic version format. See semver.org.
                }
            },

            # This part can exists when execution should be skipped every time,
            # of course there should be reason for skipping a test case.
            # execution={
            #    "skip": {
            #         "value":  False,
            #         "reason": "This is just dummy sample"}},

            # Test case requirements
            requirements={
                # Device Under Test related configurations
                "duts": {
                    # default requirements for all nodes
                    '*': {
                        "count": 10,  # Test required 10 DUTs
                        "type":
                        "hardware",  # allowed values: hardware(default),
                        # process
                        "allowed_platforms": [
                            "K64F"
                            # ,"NRF51_DK",... any mbed enabled platforms
                            # which support required test application
                        ],
                        "application": {
                            # Application name and version requirements
                            # @todo implementation missing!
                            "name": "generalTestApplication",
                            "version": "1.0",
                            # You can also specify HTTP url for binary file,
                            # which will be downloaded and flashed
                            # e.g. https://www.some.thing.com/mybin.hex
                            "bin":
                            "./tools/sample.exe",  # this is relative path
                            "init_cli_cmds":
                            [],  # overwrite default dut init commands,
                            # list of commands to run
                            "post_cli_cmds":
                            [],  # overwrite default dut post commands,
                            # list of commands to run
                        },
                        # Specify location: x = 0.0, y = 10.0 (units).
                        "location": [0.0, 10.0],
                    },
                    # specific values for node 1
                    "1": {
                        "nick": 'leader'  # Specify nick name for DUT 1
                        # @note: all default requirements can be overridden in there..
                        # "application":{
                        #    "bin":"generalTestApplication.exe", "version": "1.2"
                        # },
                    },
                    # specific values for node 2
                    "2": {
                        # variables to use here:
                        # {n}  = duts total count
                        # {i}  = dut index
                        "nick": 'router'
                    },
                    # Specify requirements for multiple dut's. e.g. 3-10
                    # variables to use here
                    # {n}  = duts total count
                    # {i}  = dut index
                    # {pi} = math.pi
                    # {xy} = x-axis: -> 0, y-axis -> 1
                    # you can also set math inside location,
                    #  e.g. "location: ["cos(%n/7*$n*2*$pi)*50",
                    # "sin($n/7*$n*2*$pi)*50"]
                    #  -> put 7 nodes to a circle, which distance is 50 meter
                    "3..10": {
                        "nick": "Router{i}",
                        "location": ["{n}", "{n}*{i}*{pi}"]
                    }
                }
                # External applications which should be started before TC rampUp and
                # will be killed in end of test
                # ,"external": {
                #    "apps": [
                #        {
                #            # Some applications have their own wrapper classes,
                # which implement methods
                #            # and properties for use in test cases. These
                # applications can be run along with
                #            # the test case by just giving the name field, possible
                # values can be found
                #            # in ExtApps folder.
                #            # These applications might have additional configuration
                #  parameters dependent
                #            # on the environment, these have to be defined in
                # env_cfg.json.
                #            "name": "DeviceServer"
                #        },
                #        {
                #            # Other applications require a configuration field as
                # well, containing the
                #            # application command and executable path
                #            "name": "lighting",
                #            "config": {
                #                "cmd": "runLighting.bat",
                #                "path": "../../lighting/bin"
                #            }
                #        }
                #    ]
                # }
            })