@Override public String toString() { String isNewTestStr = isNew ? "New test" : "Existing test"; return isNewTestStr + " [ steps: " + getSteps() + ", matches: " + getMatches() + ", mismatches:" + getMismatches() + ", missing: " + getMissing() + "] , URL: " + getUrl(); }
@Override public void deleteSession(TestResults testResults) { ArgumentGuard.notNull(testResults, "testResults"); Invocation.Builder invocationBuilder = restClient.target(serverUrl) .path("/api/sessions/batches/") .path(testResults.getBatchId()) .path("/") .path(testResults.getId()) .queryParam("apiKey", getApiKey()) .queryParam("AccessToken", testResults.getSecretToken()) .request(MediaType.APPLICATION_JSON); Response response = invocationBuilder.delete(); }
@Override public String toString() { return (testResults == null ? "" : testResults.toString()) + " - " + (exception == null ? "" : exception.toString()); } }
/** * @return Whether or not this test passed. */ @SuppressWarnings("UnusedDeclaration") public boolean isPassed() { return (!isNew() && getMismatches() == 0 && getMissing() == 0); }
public TestResultSummary(List<TestResultContainer> allResults) { this.allResults = allResults; for (TestResultContainer resultContainer : allResults) { if (resultContainer.getException() != null){ this.exceptions++; } TestResults result = resultContainer.getTestResults(); if (result == null) continue; if (result.getStatus() != null) { switch (result.getStatus()) { case Failed: this.failed++; break; case Passed: this.passed++; break; case Unresolved: this.unresolved++; break; } } matches += result.getMatches(); missing += result.getMissing(); mismatches += result.getMismatches(); } }
logger.verbose("Server session was not started"); logger.log("--- Empty test ended."); return new TestResults(); save); results.setNew(isNewSession); results.setUrl(sessionResultsUrl); logger.verbose(results.toString()); (0 < results.getMismatches() || 0 < results.getMissing())) {
logger.verbose("Server session was not started"); logger.log("--- Empty test ended."); return new TestResults(); save); results.setNew(isNewSession); results.setUrl(sessionResultsUrl); logger.verbose(results.toString()); (0 < results.getMismatches() || 0 < results.getMissing())) {
logger.verbose("Server session was not started"); logger.log("--- Empty test ended."); return new TestResults(); save); results.setNew(isNewSession); results.setUrl(sessionResultsUrl); logger.verbose(results.toString()); (0 < results.getMismatches() || 0 < results.getMissing())) {
@Override public String toString() { String isNewTestStr = isNew ? "New test" : "Existing test"; return isNewTestStr + " [ steps: " + getSteps() + ", matches: " + getMatches() + ", mismatches:" + getMismatches() + ", missing: " + getMissing() + "] , URL: " + getUrl(); } }
@Override public void deleteSession(TestResults testResults) { ArgumentGuard.notNull(testResults, "testResults"); Invocation.Builder invocationBuilder = restClient.target(serverUrl) .path("/api/sessions/batches/") .path(testResults.getBatchId()) .path("/") .path(testResults.getId()) .queryParam("apiKey", getApiKey()) .queryParam("AccessToken", testResults.getSecretToken()) .request(MediaType.APPLICATION_JSON); Response response = invocationBuilder.delete(); }
@Override public String toString() { String isNewTestStr = isNew ? "New test" : "Existing test"; return isNewTestStr + " [ steps: " + getSteps() + ", matches: " + getMatches() + ", mismatches:" + getMismatches() + ", missing: " + getMissing() + "] , URL: " + getUrl(); }
@Override public void deleteSession(TestResults testResults) { ArgumentGuard.notNull(testResults, "testResults"); Invocation.Builder invocationBuilder = restClient.target(serverUrl) .path("/api/sessions/batches/") .path(testResults.getBatchId()) .path("/") .path(testResults.getId()) .queryParam("apiKey", getApiKey()) .queryParam("AccessToken", testResults.getSecretToken()) .request(MediaType.APPLICATION_JSON); @SuppressWarnings("unused") Response response = invocationBuilder.delete(); }
@Override public void deleteSession(TestResults testResults) { ArgumentGuard.notNull(testResults, "testResults"); WebResource sessionsResources = restClient.resource(serverUrl); WebResource.Builder builder = sessionsResources .path("/api/sessions/batches/") .path(testResults.getBatchId()) .path("/") .path(testResults.getId()) .queryParam("apiKey", getApiKey()) .queryParam("AccessToken", testResults.getSecretToken()) .accept(MediaType.APPLICATION_JSON); builder.delete(); }