Package org.apache.sling.junit.remote.httpclient

Examples of org.apache.sling.junit.remote.httpclient.RemoteTestHttpClient.runTests()


       final String testClassesSelector = method.getMethod().getDeclaringClass().getName();
       final String methodName = method.getMethod().getName();
      
       final RemoteTestHttpClient testHttpClient = new RemoteTestHttpClient(remoteUrl, remoteUsername, remotePassword, false);
       testHttpClient.setRequestCustomizer(this);
       final RequestExecutor executor = testHttpClient.runTests(
               testClassesSelector, methodName, "serialized"
       );
       log.debug("Ran test {} method {} at URL {}",
               new Object[] { testClassesSelector, methodName, remoteUrl });
      
View Full Code Here


    public TestResults runTests(String testPackageOrClassName) throws Exception {
        final RemoteTestHttpClient testClient = new RemoteTestHttpClient(serverBaseUrl + "/system/sling/junit",serverUsername,serverPassword,true);
        final TestResults r = new TestResults();
        final Map<String, String> options = new HashMap<String, String>();
        options.put("forceReload", "true");
        final RequestExecutor executor = testClient.runTests(testPackageOrClassName, null, "json", options);
        executor.assertContentType("application/json");
        String content = executor.getContent();
        final JSONArray json = new JSONArray(new JSONTokener(content));

        for(int i = 0 ; i < json.length(); i++) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.