Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

allure-playwright

Package Overview
Dependencies
Maintainers
0
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

allure-playwright - npm Package Compare versions

Comparing version 3.0.5 to 3.0.6

16

package.json
{
"name": "allure-playwright",
"version": "3.0.5",
"version": "3.0.6",
"description": "Allure Playwright integration",
"keywords": [
"allure",
"playwright",
"allure"
"html",
"test",
"report",
"reporter",
"testing",
"testops"
],

@@ -58,3 +64,3 @@ "homepage": "https://allurereport.org/",

"dependencies": {
"allure-js-commons": "3.0.5"
"allure-js-commons": "3.0.6"
},

@@ -76,3 +82,3 @@ "devDependencies": {

"allure-commandline": "^2.29.0",
"allure-vitest": "3.0.5",
"allure-vitest": "3.0.6",
"eslint": "^8.57.0",

@@ -85,3 +91,3 @@ "eslint-config-prettier": "^9.1.0",

"eslint-plugin-prefer-arrow": "^1.2.3",
"npm-run-all2": "^6.1.2",
"npm-run-all2": "^7.0.0",
"rimraf": "^6.0.0",

@@ -88,0 +94,0 @@ "typescript": "^5.2.2",

@@ -15,8 +15,14 @@ # allure-playwright

## The documentation and examples
The docs for Allure Playwright are available at [https://allurereport.org/docs/playwright/](https://allurereport.org/docs/playwright/).
Also, check out the examples at [github.com/allure-examples](https://github.com/orgs/allure-examples/repositories?q=visibility%3Apublic+archived%3Afalse+topic%3Aexample+topic%3Aplaywright).
## Installation
Use your favorite node package manager to install the package:
Install `allure-playwright` using a package manager of your choice. For example:
```bash
npm i -D allure-playwright
```shell
npm install -D allure-playwright
```

@@ -53,11 +59,11 @@

When the test run completes, the result files will be generated in the `./allure-results`
directory. If you want to use another location, provide it via the `resultsDir`
reporter option ([see below](#allure-playwright-options)).
directory.
You may select another location, or further customize the reporter's behavior with [the configuration options](https://allurereport.org/docs/playwright-configuration/).
### View the report
> [!NOTE]
> You need Allure Report to generate and open the report from the result files. See the [installation instructions](https://allurereport.org/docs/install/) for more details.
> You need Allure Report to be installed on your machine to generate and open the report from the result files. See the [installation instructions](https://allurereport.org/docs/install/) on how to get it.
Generate Allure Report:
Generate Allure Report after the tests are executed:

@@ -68,3 +74,3 @@ ```bash

Open Allure Report:
Open the generated report:

@@ -75,60 +81,52 @@ ```bash

## The documentation
## Allure API
Learn more about Allure Playwright from the official documentation at
[https://allurereport.org/docs/playwright/](https://allurereport.org/docs/playwright/).
Enhance the report by utilizing the runtime API:
## Allure Playwright options
```js
import { describe, test } from "playwright";
import * as allure from "allure-js-commons";
Use following options to configure Allure Playwright:
describe("signing in with a password", () => {
test("sign in with a valid password", async () => {
await allure.description("The test checks if an active user with a valid password can sign in to the app.");
await allure.epic("Signing in");
await allure.feature("Sign in with a password");
await allure.story("As an active user, I want to successfully sign in using a valid password");
await allure.tags("signin", "ui", "positive");
await allure.issue("https://github.com/allure-framework/allure-js/issues/331", "ISSUE-331");
await allure.owner("eroshenkoam");
await allure.parameter("browser", "chrome");
| Option | Description | Default |
|-----------------|----------------------------------------------------------------------------------------------------------------------|--------------------|
| resultsDir | The path of the results folder. | `./allure-results` |
| detail | Hide the `pw:api` and `hooks` steps in report. | `true` |
| suiteTitle | Use test title instead of `allure.suite()`. | `true` |
| links | Allure Runtime API link templates. | `undefined` |
| environmentInfo | A set of key-value pairs to display in the Environment section of the report | `undefined` |
| categories | An array of category definitions, each describing a [category of defects](https://allurereport.org/docs/categories/) | `undefined` |
const user = await allure.step("Prepare the user", async () => {
return await createAnActiveUserInDb();
});
Here is an example of the reporter configuration:
await allure.step("Make a sign-in attempt", async () => {
await allure.step("Navigate to the sign in page", async () => {
// ...
});
```js
import { defineConfig } from '@playwright/test';
import os from "node:os";
await allure.step("Fill the sign-in form", async (stepContext) => {
await stepContext.parameter("login", user.login);
await stepContext.parameter("password", user.password, "masked");
export default defineConfig({
reporter: [
[
"allure-playwright",
{
detail: true,
resultsDir: "my-allure-results",
suiteTitle: false,
links: {
link: {
urlTemplate: "https://github.com/allure-framework/allure-js/blob/main/%s",
},
issue: {
urlTemplate: "https://github.com/allure-framework/allure-js/issues/%s",
nameTemplate: "ISSUE-%s",
},
},
environmentInfo: {
OS: os.platform(),
Architecture: os.arch(),
NodeVersion: process.version,
},
categories: [
{
name: "Missing file errors",
messageRegex: /^ENOENT: no such file or directory/,
},
],
},
],
],
// ...
});
await allure.step("Submit the form", async () => {
// ...
// const responseData = ...
await allure.attachment("response", JSON.stringify(responseData), { contentType: "application/json" });
});
});
await allure.step("Assert the signed-in state", async () => {
// ...
});
});
});
```
More details about Allure Playwright configuration are available at [https://allurereport.org/docs/playwright-configuration/](https://allurereport.org/docs/playwright-configuration/).
More details about the API are available at [https://allurereport.org/docs/playwright-reference/](https://allurereport.org/docs/playwright-reference/).
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc