congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
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

  • Finding current android device location
  • onCreateOptionsMenu (Activity)
  • setContentView (Activity)
  • findViewById (Activity)
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • Top plugins for WebStorm
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