Example #1
0
        public InitializeResult Initialize()
        {
            // Start the Test Manager Client that dispatches tests to execute on the server.
            try
            {
                if (Microsoft.SPOT.Hardware.SystemInfo.SystemID.SKU == 3)
                {
                    Log.Comment("Do Not run the tests on the emulator since it doesn't have an SSL Stack.");
                    return InitializeResult.Skip;
                }

#if RUN_TESTS
                tmc = new TestManager();
                tmc.Start();
#endif
            }
            catch (Exception e)
            {
                Log.Comment("Unable to start the client connection to the Server.  Make sure the Server is running and actively accepting a connection.");
                Log.Comment("Error Code: " + e.ToString());
                Log.Comment("Fail the whole test suite since it can not connect to the server.");
                return InitializeResult.Skip;
            }

#if RUN_TESTS
            return InitializeResult.ReadyToGo;
#else
            return InitializeResult.Skip;
#endif
        }
Example #2
0
        public static void Main(string [] args)
        {
            //There is only one server running that contains a socket.
            TestManager tms = new TestManager();

            try
            {
                if (args.Length < 2)
                {
                    Usage();
                    Console.Write("\nEnter IPAddress: ");
                    args[0] = Console.ReadLine();
                    Console.Write("Enter Port: ");
                    args[1] = Console.ReadLine();
                }

                IPAddress ipAddress = null;
                int port = 0;
                try
                {
                    //parse the ipaddress to convert it to a long
                    ipAddress = IPAddress.Parse(args[0].ToString());
                    port = int.Parse(args[1]);

                }
                catch
                {
                    Usage();
                    return;
                }

                //Starts the server connection.  Once a connection is made the server runs the test specified by the client.
                tms.Initialize(ipAddress, port);
                tms.Start(new SslTests(ipAddress));
            }
            catch (Exception e)
            {
                Console.WriteLine("Unable to start the server with exception:" + e.ToString());
            }
        }
Example #3
0
        public static void Main(string [] args)
        {
            //There is only one server running that contains a socket.
            TestManager tms = new TestManager();

            try
            {
                if (args.Length < 2)
                {
                    Usage();
                    Console.Write("\nEnter IPAddress: ");
                    args[0] = Console.ReadLine();
                    Console.Write("Enter Port: ");
                    args[1] = Console.ReadLine();
                }

                IPAddress ipAddress = null;
                int       port      = 0;
                try
                {
                    //parse the ipaddress to convert it to a long
                    ipAddress = IPAddress.Parse(args[0].ToString());
                    port      = int.Parse(args[1]);
                }
                catch
                {
                    Usage();
                    return;
                }

                //Starts the server connection.  Once a connection is made the server runs the test specified by the client.
                tms.Initialize(ipAddress, port);
                tms.Start(new SslTests(ipAddress));
            }
            catch (Exception e)
            {
                Console.WriteLine("Unable to start the server with exception:" + e.ToString());
            }
        }