io.qameta.allure.Allure类的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(4.3k)|赞(0)|评价(0)|浏览(119)

本文整理了Java中io.qameta.allure.Allure类的一些代码示例,展示了Allure类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Allure类的具体详情如下:
包路径:io.qameta.allure.Allure
类名称:Allure

Allure介绍

[英]The class contains some useful methods to work with AllureLifecycle.
[中]该类包含一些使用AllureLifecycle的有用方法。

代码示例

代码示例来源:origin: io.qameta.allure/allure-cucumber-jvm

StepUtils(final Feature feature, final Scenario scenario) {
  this.lifecycle = Allure.getLifecycle();
  this.feature = feature;
  this.scenario = scenario;
}

代码示例来源:origin: io.qameta.allure/allure-java-commons

/**
 * Adds attachment.
 *
 * @param name    the name of attachment.
 * @param content the stream that contains attachment content.
 */
public static void attachment(final String name, final InputStream content) {
  addAttachment(name, content);
}

代码示例来源:origin: io.qameta.allure/allure-java-commons

public static CompletableFuture<byte[]> addByteAttachmentAsync(
    final String name, final String type, final Supplier<byte[]> body) {
  return addByteAttachmentAsync(name, type, "", body);
}

代码示例来源:origin: io.qameta.allure/allure-java-commons

public static CompletableFuture<InputStream> addStreamAttachmentAsync(
    final String name, final String type, final Supplier<InputStream> body) {
  return addStreamAttachmentAsync(name, type, "", body);
}

代码示例来源:origin: io.qameta.allure/allure-java-commons

/**
 * @deprecated use {@link #description(String)} instead.
 */
@Deprecated
public static void addDescription(final String description) {
  description(description);
}

代码示例来源:origin: io.qameta.allure/allure-java-commons

@Override
  protected AllureLifecycle initialValue() {
    return Allure.getLifecycle();
  }
};

代码示例来源:origin: io.qameta.allure/allure-java-commons

/**
 * Adds attachment.
 *
 * @param name    the name of attachment.
 * @param content the attachment content.
 */
public static void attachment(final String name, final String content) {
  addAttachment(name, content);
}

代码示例来源:origin: io.qameta.allure/allure-java-commons

@Override
  protected AllureLifecycle initialValue() {
    return Allure.getLifecycle();
  }
};

代码示例来源:origin: com.cognifide.qa.bb/bb-junit5

private void takeScreenshot(WebDriver webDriver) throws IOException {
  File screenshotAs = ((TakesScreenshot) webDriver).getScreenshotAs(OutputType.FILE);
  Allure.addAttachment("Screenshot", FileUtils.openInputStream(screenshotAs));
 }
}

代码示例来源:origin: io.qameta.allure/allure-cucumber2-jvm

@SuppressWarnings("unused")
public AllureCucumber2Jvm() {
  this(Allure.getLifecycle());
}

代码示例来源:origin: Cognifide/bobcat

private void takeScreenshot(WebDriver webDriver) throws IOException {
  File screenshotAs = ((TakesScreenshot) webDriver).getScreenshotAs(OutputType.FILE);
  Allure.addAttachment("Screenshot", FileUtils.openInputStream(screenshotAs));
 }
}

代码示例来源:origin: io.qameta.allure/allure-cucumber-jvm

@SuppressWarnings("unused")
public AllureCucumberJvm() {
  this(Allure.getLifecycle());
}

代码示例来源:origin: io.qameta.allure/allure-attachments

public DefaultAttachmentProcessor() {
  this(Allure.getLifecycle());
}

代码示例来源:origin: io.qameta.allure/allure-cucumber3-jvm

public AllureCucumber3Jvm() {
  this(Allure.getLifecycle());
}

代码示例来源:origin: io.qameta.allure/allure-selenide

public AllureSelenide() {
  this(Allure.getLifecycle());
}

代码示例来源:origin: io.qameta.allure/allure-junit4

public AllureJunit4() {
  this(Allure.getLifecycle());
}

代码示例来源:origin: io.qameta.allure/allure-java-commons

@SuppressWarnings("PMD.UseObjectForClearerAPI")
public static void addAttachment(final String name, final String type,
                 final String content, final String fileExtension) {
  getLifecycle().addAttachment(name, type, fileExtension, content.getBytes(StandardCharsets.UTF_8));
}

代码示例来源:origin: io.qameta.allure/allure-java-commons

@SuppressWarnings("PMD.UseObjectForClearerAPI")
public static void addAttachment(final String name, final String type,
                 final InputStream content, final String fileExtension) {
  getLifecycle().addAttachment(name, type, fileExtension, content);
}

代码示例来源:origin: io.qameta.allure/allure-java-commons

public static CompletableFuture<byte[]> addByteAttachmentAsync(
    final String name, final String type, final String fileExtension, final Supplier<byte[]> body) {
  final String source = getLifecycle().prepareAttachment(name, type, fileExtension);
  return supplyAsync(body).whenComplete((result, ex) ->
      getLifecycle().writeAttachment(source, new ByteArrayInputStream(result)));
}

代码示例来源:origin: Frameworkium/frameworkium-core

public static void stepFinish() {
    getLifecycle().stopStep(STEP_UUID_STACK.get().removeFirst());
  }
}

相关文章

Allure类方法