Exemplo n.º 1
0
def setup():
    try:
        # Connect to the StormTest server, e.g. "jack", or "123.123.123.123",
        # and send a comment to help others to identify the purpose of the test
        StormTest.ConnectToServer(TestEnvironment.ServerName,
                                  "Hello World Test")

        # Reserves a slot on the server and start serial logging
        slot_resa_result = StormTest.ReserveSlot(5, TestEnvironment.RC_KeySet,
                                                 logParam, False)

        if slot_resa_result == 1:
            StormTest.ShowVideo()
            #StormTest.StartVideoLog()
            test_result = doTest()
            StormTest.CloseVideo()
            #StormTest.StopVideoLog()
        else:
            test_result = StormTest.TM.NOT_RUN

    except:
        import traceback
        traceback.print_exc()
        test_result = StormTest.TM.FAIL
    # End of test - release ports back to the server
    finally:
        StormTest.ReleaseServerConnection()
        # Return test result
        return test_result
Exemplo n.º 2
0
 def disconnect(self):
     StormTest.BeginLogRegion('Close Connection')
     self._connectionLog.info("Closing connection with the server\n")
     logging.shutdown()
     isClosed = StormTest.ReleaseServerConnection()
     StormTest.EndLogRegion('Close Connection')
     return isClosed
Exemplo n.º 3
0
 def disconnect(self):
     self._connectionLog.info("Closing connection with the server")
     logging.shutdown()
     return StormTest.ReleaseServerConnection()