Exemplo n.º 1
0
  public static void main(String args[]) {

    // The stat reporter writes out the test info and results
    // into the top-level quicklook directory during a run.

    stat.addDescription("Unit test for IT 13555");

    WebTest webTest = new WebTest(args);

    int port = new Integer(webTest.portS).intValue();
    String name;

    try {
      webTest.goGet(webTest.host, port, webTest.contextRoot + "/test");
    } catch (Throwable t) {
      System.out.println(t.getMessage());
      stat.addStatus(" Test " + TEST_NAME + " UNPREDICTED-FAILURE", stat.FAIL);
    } finally {
      try {
        if (webTest.sock != null) {
          webTest.sock.close();
        }
      } catch (IOException ioe) {
        // ignore
      }
    }

    stat.printSummary(TEST_NAME + " ---> PASS");
  }
Exemplo n.º 2
0
  public static void main(String args[]) {

    // The stat reporter writes out the test info and results
    // into the top-level quicklook directory during a run.

    stat.addDescription("http-listener reader-threads unit tests.");

    String host = args[0];
    String portS = args[1];
    String contextRoot = args[2];

    int port = new Integer(portS).intValue();
    String name;

    try {
      goGet(host, port, "FILTER", contextRoot + "/ServletTest");
    } catch (Throwable t) {
      System.out.println(t.getMessage());
    }

    if (count != EXPECTED_COUNT) {
      stat.addStatus("web-readerThreadsConfig", stat.FAIL);
    }
    stat.printSummary("web/standalonewar---> expect " + EXPECTED_COUNT);
  }
Exemplo n.º 3
0
  public static void main(String[] args) {

    stat.addDescription("Unit test for resource injection into " + "ServletRequestListener");
    WebTest webTest = new WebTest(args);

    try {
      webTest.doTest();
      stat.addStatus(TEST_NAME, stat.PASS);
    } catch (Exception ex) {
      ex.printStackTrace();
      stat.addStatus(TEST_NAME, stat.FAIL);
    }

    stat.printSummary();
  }
Exemplo n.º 4
0
  public static void main(String[] args) {

    stat.addDescription(
        "Unit test for ensuring binary compatibility "
            + "of GlassFish-style valves compiled against the old Valve "
            + "interface");
    WebTest webTest = new WebTest(args);

    try {
      webTest.doTest();
      stat.addStatus(TEST_NAME, stat.PASS);
    } catch (Exception ex) {
      ex.printStackTrace();
      stat.addStatus(TEST_NAME, stat.FAIL);
    }

    stat.printSummary();
  }
Exemplo n.º 5
0
  public static void main(String[] args) {

    stat.addDescription("Unit test for CR 6716503");
    WebTest webTest = new WebTest(args);

    try {
      if ("first".equals(webTest.run)) {
        TEST_NAME = TEST_ROOT_NAME + "-first";
        webTest.firstRun();
      } else {
        TEST_NAME = TEST_ROOT_NAME + "-second";
        webTest.secondRun();
      }
    } catch (Exception ex) {
      ex.printStackTrace();
      stat.addStatus(TEST_NAME, stat.FAIL);
    }

    stat.printSummary();
  }
Exemplo n.º 6
0
  public static void main(String[] args) {

    stat.addDescription("Unit test for IT 12891, 17377");
    WebTest webTest = new WebTest(args);

    try {
      webTest.doTest("hello", 200);
      webTest.doTest("hello", 200);
      webTest.doTest("hello2", 500);
      webTest.doTest("hello2", 200);

      webTest.doTest("pages/test.jsp", 200);
      stat.addStatus(TEST_NAME, stat.PASS);
    } catch (Exception ex) {
      ex.printStackTrace();
      stat.addStatus(TEST_NAME, stat.FAIL);
    }

    stat.printSummary();
  }
Exemplo n.º 7
0
  public static void main(String args[]) {

    // The stat reporter writes out the test info and results
    // into the top-level quicklook directory during a run.

    stat.addDescription("Test BodyTag behavior when tag is reused");

    String host = args[0];
    String portS = args[1];
    String contextRoot = args[2];
    int port = new Integer(portS).intValue();

    try {
      goGet(host, port, contextRoot + "/test.jsp");
      stat.addStatus("BodyTag test", pass ? stat.PASS : stat.FAIL);
    } catch (Throwable t) {
      System.out.println(t.getMessage());
      stat.addStatus("Test UNPREDICTED-FAILURE", stat.FAIL);
    }

    stat.printSummary("BodyTag Reuse");
  }
Exemplo n.º 8
0
 public static void main(String[] args) {
   stat.addDescription("Unit test for Bugzilla 30067");
   WebTest webTest = new WebTest(args);
   webTest.doTest();
   stat.printSummary();
 }
Exemplo n.º 9
0
 public static void main(String[] args) {
   stat.addDescription("Unit test for one session cookie header");
   WebTest webTest = new WebTest(args);
   webTest.doTest();
   stat.printSummary(TEST_NAME);
 }
Exemplo n.º 10
0
 public static void main(String[] args) {
   stat.addDescription("Unit test for jsp:attribute with omit");
   WebTest webTest = new WebTest(args);
   webTest.doTest();
   stat.printSummary();
 }
Exemplo n.º 11
0
 public static void main(String[] args) {
   stat.addDescription("Unit test for @WebServlet");
   WebTest webTest = new WebTest(args);
   webTest.doTest();
   stat.printSummary(TEST_NAME);
 }