Exemple #1
0
 private static void initAndRun(String[] args, CommandLineArgs cla, RemoteArgs ra) {
   RemoteTestNG remoteTestNg = new RemoteTestNG();
   if (m_debug) {
     // In debug mode, override the port and the XML file to a fixed location
     cla.port = Integer.parseInt(DEBUG_PORT);
     ra.serPort = cla.port;
     cla.suiteFiles = Arrays.asList(new String[] {DEBUG_SUITE_DIRECTORY + DEBUG_SUITE_FILE});
   }
   remoteTestNg.configure(cla);
   remoteTestNg.setHost(cla.host);
   m_serPort = ra.serPort;
   remoteTestNg.m_port = cla.port;
   if (isVerbose()) {
     StringBuilder sb = new StringBuilder("Invoked with ");
     for (String s : args) {
       sb.append(s).append(" ");
     }
     p(sb.toString());
     //      remoteTestNg.setVerbose(1);
     //    } else {
     //      remoteTestNg.setVerbose(0);
   }
   validateCommandLineParameters(cla);
   remoteTestNg.run();
   //    if (m_debug) {
   //      // Run in a loop if in debug mode so it is possible to run several launches
   //      // without having to relauch RemoteTestNG.
   //      while (true) {
   //        remoteTestNg.run();
   //        remoteTestNg.configure(cla);
   //      }
   //    } else {
   //      remoteTestNg.run();
   //    }
 }