Tabnine Logo
Reporter.createReport
Code IndexAdd Tabnine to your IDE (free)

How to use
createReport
method
in
org.arquillian.reporter.api.builder.Reporter

Best Java code snippets using org.arquillian.reporter.api.builder.Reporter.createReport (Showing top 13 results out of 315)

origin: arquillian/arquillian-cube

public void reportScreencastRecording(@Observes AfterVideoRecorded event, ReporterConfiguration reporterConfiguration) {
  Path videoLocation = event.getVideoLocation();
  if (videoLocation != null) {
    videoLocation = Paths.get(videoLocation.toString().replace("flv", "mp4"));
    final Path rootDir = Paths.get(reporterConfiguration.getRootDirectory());
    final Path relativize = rootDir.relativize(videoLocation);
    final Method testMethod = getTestMethod(event);
    Reporter.createReport(new TestMethodReport(testMethod.getName()))
        .addKeyValueEntry(DockerEnvironmentReportKey.VIDEO_PATH, new FileEntry(relativize))
        .inSection(new TestMethodSection(testMethod))
        .fire(reportEvent);
  }
}
origin: arquillian/arquillian-cube

public void reportContainerLogs(@Observes org.arquillian.cube.spi.event.lifecycle.BeforeStop beforeStop, DockerClientExecutor executor, ReporterConfiguration reporterConfiguration) throws IOException {
  final String cubeId = beforeStop.getCubeId();
  if (cubeId != null) {
    final File logFile = new File(createContainerLogDirectory(new File(reporterConfiguration.getRootDirectory())), cubeId + ".log");
    final Path rootDir = Paths.get(reporterConfiguration.getRootDirectory());
    final Path relativePath = rootDir.relativize(logFile.toPath());
    executor.copyLog(beforeStop.getCubeId(), false, true, true, true, -1, new FileOutputStream(logFile));
    Reporter.createReport()
        .addKeyValueEntry(LOG_PATH, new FileEntry(relativePath))
        .inSection(new DockerContainerSection(cubeId))
        .fire(reportEvent);
  }
}
origin: arquillian/arquillian-cube

@Override
public Response filter(FilterableRequestSpecification requestSpec, FilterableResponseSpecification responseSpec, FilterContext ctx) {
  final Response response = ctx.next(requestSpec, responseSpec);
  final ByteArrayOutputStream responseLog = new ByteArrayOutputStream();
  final PrintStream stream = new PrintStream(responseLog);
  ResponsePrinter.print(response, response, stream, LogDetail.ALL, true);
  final File logFile = new File(createLogDirectory(new File(reporterConfiguration.getRootDirectory())), "restassuredResponse.log");
  writeContent(responseLog, logFile);
  final Path rootDir = Paths.get(reporterConfiguration.getRootDirectory());
  final Path relativePath = rootDir.relativize(logFile.toPath());
  Reporter.createReport(REST_RESPONSE_LOG)
      .addKeyValueEntry(LOG_PATH, new FileEntry(relativePath))
      .inSection(new DockerLogSection())
      .fire(reportEvent);
  final byte[] responseBody = response.asByteArray();
  return cloneResponseIfNeeded(response, responseBody);
}
origin: org.arquillian.cube/arquillian-cube-kubernetes-reporter

public void reportKubernetesConfiguration(@Observes Start start, Configuration configuration,
  org.arquillian.reporter.config.ReporterConfiguration reporterConfiguration) throws IOException {
  final ReportBuilder reportBuilder = Reporter.createReport(CONFIGURATION);
  Session session = start.getSession();
  if (configuration != null) {
    reportBuilder.addEntries(getFilesForResourcesConfiguration(session, configuration, reporterConfiguration));
  }
  Reporter.createReport(KUBERNETES_SECTION_NAME)
    .addReport(reportBuilder)
    .inSection(new KubernetesSection()).fire(sectionEvent);
}
origin: arquillian/arquillian-cube

public void reportKubernetesConfiguration(@Observes Start start, Configuration configuration,
  org.arquillian.reporter.config.ReporterConfiguration reporterConfiguration) throws IOException {
  final ReportBuilder reportBuilder = Reporter.createReport(CONFIGURATION);
  Session session = start.getSession();
  if (configuration != null) {
    reportBuilder.addEntries(getFilesForResourcesConfiguration(session, configuration, reporterConfiguration));
  }
  Reporter.createReport(KUBERNETES_SECTION_NAME)
    .addReport(reportBuilder)
    .inSection(new KubernetesSection()).fire(sectionEvent);
}
origin: arquillian/arquillian-cube

@Override
public Response filter(FilterableRequestSpecification requestSpec, FilterableResponseSpecification responseSpec, FilterContext ctx) {
  String uri = requestSpec.getURI();
  uri = urlDecode(uri, Charset.forName(requestSpec.getConfig().getEncoderConfig().defaultQueryParameterCharset()), true);
  final ByteArrayOutputStream requestLog = new ByteArrayOutputStream();
  final PrintStream stream = new PrintStream(requestLog);
  RequestPrinter.print(requestSpec, requestSpec.getMethod(), uri, LogDetail.ALL, stream, true);
  final File logFile = new File(createLogDirectory(new File(reporterConfiguration.getRootDirectory())), "restassuredRequest.log");
  writeContent(requestLog, logFile);
  final Path rootDir = Paths.get(reporterConfiguration.getRootDirectory());
  final Path relativePath = rootDir.relativize(logFile.toPath());
  Reporter.createReport(REST_REQUEST_LOG)
      .addKeyValueEntry(LOG_PATH, new FileEntry(relativePath))
      .inSection(new DockerLogSection())
      .fire(reportEvent);
  return ctx.next(requestSpec, responseSpec);
}
origin: arquillian/arquillian-cube

  public void reportSessionStatus(@Observes AfterStart afterStart, KubernetesClient kubernetesClient) {

    Session session = afterStart.getSession();
    if (session != null) {
      String namespace = session.getNamespace();

      Reporter.createReport(SESSION_STATUS)
        .addKeyValueEntry(NAMESPACE, namespace)
        .addKeyValueEntry(MASTER_URL, String.valueOf(kubernetesClient.getMasterUrl()))
        .inSection(new KubernetesSection())
        .asSubReport()
        .fire(sectionEvent);
    }
  }
/*
origin: org.arquillian.cube/arquillian-cube-kubernetes-reporter

  public void reportSessionStatus(@Observes AfterStart afterStart, KubernetesClient kubernetesClient) {

    Session session = afterStart.getSession();
    if (session != null) {
      String namespace = session.getNamespace();

      Reporter.createReport(SESSION_STATUS)
        .addKeyValueEntry(NAMESPACE, namespace)
        .addKeyValueEntry(MASTER_URL, String.valueOf(kubernetesClient.getMasterUrl()))
        .inSection(new KubernetesSection())
        .asSubReport()
        .fire(sectionEvent);
    }
  }
/*
origin: arquillian/arquillian-cube

public void reportDockerEnvironment(@Observes AfterAutoStart event, CubeDockerConfiguration cubeDockerConfiguration, DockerClientExecutor executor, ReporterConfiguration reporterConfiguration) {
  final ReportBuilder reportBuilder = Reporter.createReport(DOCKER_ENVIRONMENT)
      .addReport(createDockerInfoGroup(executor));
  reportBuilder.addKeyValueEntry(DOCKER_COMPOSITION_SCHEMA, createDockerCompositionSchema(cubeDockerConfiguration, reporterConfiguration));
  reportBuilder.addKeyValueEntry(NETWORK_TOPOLOGY_SCHEMA, createNetworkTopologyGraph(cubeDockerConfiguration, executor, reporterConfiguration));
  reportBuilder
      .inSection(DockerContainerSection.standalone())
      .fire(reportEvent);
}
origin: arquillian/arquillian-cube

private ReportBuilder createDockerInfoGroup(DockerClientExecutor executor) {
  Version version = executor.dockerHostVersion();
  final ReportBuilder reportBuilder = Reporter.createReport(DOCKER_HOST_INFORMATION)
      .addKeyValueEntry(DOCKER_VERSION, version.getVersion())
      .addKeyValueEntry(DOCKER_OS, version.getOperatingSystem())
      .addKeyValueEntry(DOCKER_KERNEL, version.getKernelVersion())
      .addKeyValueEntry(DOCKER_API_VERSION, version.getApiVersion())
      .addKeyValueEntry(DOCKER_ARCH, version.getArch());
  return reportBuilder;
}
origin: org.arquillian.reporter/arquillian-reporter-impl

public TestMethodReportBuilderImpl setResult(TestResult result) {
  if (result.getStatus() == TestResult.Status.FAILED && result.getThrowable() != null) {
    String stackTrace = getStackTrace(result.getThrowable());
    FailureReport failureReport = new FailureReport(METHOD_FAILURE_REPORT);
    Reporter.createReport(failureReport).addKeyValueEntry(METHOD_FAILURE_REPORT_STACKTRACE, stackTrace);
    getReport().setFailureReport(failureReport);
  }
  getReport().setStatus(result.getStatus());
  return this;
}
origin: org.arquillian.cube/arquillian-cube-docker

  .contains(dockerCube.state());
final ReportBuilder reportBuilder = Reporter.createReport(DOCKER_CONTAINER_CONFIGURATION)
  .addKeyValueEntry(CONTAINER_NAME, dockerCube.getId())
  .addKeyValueEntry(ERROR_DURING_LIFECYCLE, Boolean.toString(error))
origin: arquillian/arquillian-cube

  .contains(dockerCube.state());
final ReportBuilder reportBuilder = Reporter.createReport(DOCKER_CONTAINER_CONFIGURATION)
  .addKeyValueEntry(CONTAINER_NAME, dockerCube.getId())
  .addKeyValueEntry(ERROR_DURING_LIFECYCLE, Boolean.toString(error))
org.arquillian.reporter.api.builderReportercreateReport

Popular methods of Reporter

    Popular in Java

    • Finding current android device location
    • requestLocationUpdates (LocationManager)
    • getResourceAsStream (ClassLoader)
    • setScale (BigDecimal)
    • FileWriter (java.io)
      A specialized Writer that writes to a file in the file system. All write requests made by calling me
    • ResultSet (java.sql)
      An interface for an object which represents a database table entry, returned as the result of the qu
    • Timestamp (java.sql)
      A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
    • HashSet (java.util)
      HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
    • StringTokenizer (java.util)
      Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
    • ConcurrentHashMap (java.util.concurrent)
      A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
    • Top 12 Jupyter Notebook extensions
    Tabnine Logo
    • Products

      Search for Java codeSearch for JavaScript code
    • IDE Plugins

      IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
    • Company

      About UsContact UsCareers
    • Resources

      FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
    Get Tabnine for your IDE now