Exemplo n.º 1
0
 def __init__(self, test_type):
     self.test_type = test_type
     self.dir = Utils.log_dir()
     self.test_log = TestLog(self.dir)
     self.driver = Utils.create_driver(sys.argv[2])
     self.utils = Utils(self.driver, self.test_log)
     print('init')
Exemplo n.º 2
0
 def __init__(self, log, driver, test_type, utils):
     self.test_type = test_type
     self.log_dir = Utils.log_dir()
     self.driver = driver
     self.log = log
     self.error_count = 0
     self.utils = utils
Exemplo n.º 3
0
def main():
    print('main')
    log_dir = Utils.log_dir()
    sensors = Sensors(IsolatedLoginHandler())
    test_log = TestLog('Sensors', log_dir)
    sensors.run_sensors(Utils.create_driver(sys.argv[2]), test_log)
    test_log.close()
Exemplo n.º 4
0
 def __init__(self, log, driver, test_type, utils):
     self.test_type = test_type
     self.log_dir = Utils.log_dir()
     self.driver = driver
     self.log = log
     self.error_count = 0
     self.utils = utils
Exemplo n.º 5
0
def main():
    print 'in main'
    log_dir = Utils.log_dir()
    equip_view = EquipmentView(IsolatedLoginHandler())
    test_log = TestLog('Equipment View', log_dir)
    equip_view.run_equipment_view(Utils.create_driver(sys.argv[2]), test_log)
    test_log.close()
Exemplo n.º 6
0
    def __init__(self, test_type):
        self.test_type = test_type
        self.dir = Utils.log_dir()
        self.test_log = TestLog(self.dir)
        self.driver = Utils.create_driver(sys.argv[2])

        self.utils = Utils(self.driver, self.test_log)
        print('init')
Exemplo n.º 7
0
def main():
    print('main')
    driver = Utils.create_driver(sys.argv[2])
    log_dir = Utils.log_dir()
    alarms = Alarms(IsolatedLoginHandler(driver))
    test_log = TestLog('Alarms', log_dir)
    alarms.run_alarms(driver, test_log)
    test_log.close()
Exemplo n.º 8
0
def main():
    driver = Utils.create_driver(sys.argv[2])
    log_dir = Utils.log_dir()
    test_log = TestLog(PortManager, log_dir)
    # create instance of class here and then  run method of class 
    port_manager = PortManager(IsolatedLoginHandler(driver))
    port_manager.run_port_manager(driver, test_log)
    test_log.close()
Exemplo n.º 9
0
def main():
    driver = Utils.create_driver(sys.argv[2])
    log_dir = Utils.log_dir()
    # Utils.delete_existing_logfile(log_dir)
    test_log = TestLog(EventLog, log_dir)
    # create instance of class here and then  run method of class 
    event_log = EventLog(IsolatedLoginHandler(driver))
    event_log.run_event_log(driver, test_log)
    test_log.close()
Exemplo n.º 10
0
def main():
    parser = OptionParser(usage="usage: %prog ipAddress browser")
    # parser.add_option("-c", "--chelp", help="Add arguments for IP Address for radio and target browser")
    (options, args) = parser.parse_args()

    if len(args) != 2:
        parser.error("wrong number of arguments")

    TEST_TYPE = 'smoketest'
    run_all = RunAll(TEST_TYPE)
    run_all.run_all()

    Utils.print_tree(Utils.log_dir(), TEST_TYPE)
Exemplo n.º 11
0
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))

from smoketest.mylib.utils import Utils


def ensure_path_exists(path):
    import errno
    try:
        os.makedirs(path)
    except OSError as exception:
        if exception.errno != errno.EEXIST:
            raise


logs_dir = os.path.join(Utils.log_dir(), 'logs')
sub_path = requests.get('http://localhost:3000/next').content.decode('utf-8')
path_to_dir = os.path.join(os.getcwd(), 'logs', *sub_path.split('/'))
ensure_path_exists(path_to_dir)
# except ConnectionError:
#     print "Need to start webserver. Run ./startup.sh from smoketest dir", os.getcwd()


def signal_handler(sig, frame):
    print('You pressed Ctrl+C!')
    [p.kill() for p in opens]
    sys.exit(0)


signal.signal(signal.SIGINT, signal_handler)
Exemplo n.º 12
0
def main():
    log_dir = Utils.log_dir()
    poe = PowerOverEthernet(IsolatedLoginHandler())
    test_log = TestLog('Power Over Ethernet', log_dir)
    poe.run_poe(Utils.create_driver(sys.argv[2]), test_log)
    test_log.close()
Exemplo n.º 13
0
def main():
    log_dir = Utils.log_dir()
    date_time = DateTime(IsolatedLoginHandler())
    test_log = TestLog('Date Time', log_dir)
    date_time.run_date_time(Utils.create_driver(sys.argv[2]), test_log)
    test_log.close()
Exemplo n.º 14
0
def main():
    log_dir = Utils.log_dir()
    about = SystemAbout(IsolatedLoginHandler())
    test_log = TestLog('System About', log_dir)
    about.run_system_about(Utils.create_driver(sys.argv[2]), test_log)
    test_log.close()
Exemplo n.º 15
0
def main():
    log_dir = Utils.log_dir()
    system_info = SystemInformation(IsolatedLoginHandler())
    test_log = TestLog('System Information', log_dir)
    system_info.run_system_information(Utils.create_driver(sys.argv[2]), test_log)
    test_log.close()
Exemplo n.º 16
0
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))

from smoketest.mylib.utils import Utils


def ensure_path_exists(path):
    import errno
    try:
        os.makedirs(path)
    except OSError as exception:
        if exception.errno != errno.EEXIST:
            raise


logs_dir = os.path.join(Utils.log_dir(), 'logs')
sub_path = requests.get('http://localhost:3000/next').content
path_to_dir = os.path.join(os.getcwd(), 'logs', *sub_path.split('/'))
ensure_path_exists(path_to_dir)


def signal_handler(sig, frame):
    print('You pressed Ctrl+C!')
    [p.kill() for p in opens]
    sys.exit(0)


signal.signal(signal.SIGINT, signal_handler)

opens = []
root = ET.Element("ipAddresses")