congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
Reporter
Code IndexAdd Tabnine to your IDE (free)

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

Best Java code snippets using org.arquillian.reporter.api.builder.Reporter (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.builderReporter

Most used methods

  • createReport

Popular in Java

  • Creating JSON documents from java classes using gson
  • compareTo (BigDecimal)
  • findViewById (Activity)
  • putExtra (Intent)
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • JComboBox (javax.swing)
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • 21 Best Atom Packages for 2021
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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