Skip to content

Commit

Permalink
Configuration layer overhaul (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
noomorph committed May 4, 2024
1 parent 515559e commit b4dd29b
Show file tree
Hide file tree
Showing 366 changed files with 10,402 additions and 3,598 deletions.
7 changes: 0 additions & 7 deletions docs/docs/api/01-descriptions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@ import TabItem from '@theme/TabItem';

# Descriptions

:::caution

This website version refers to the unreleased version of `jest-allure2-reporter`, partially available as `2.0.0-beta.3` release.
Please use GitHub docs for the latest stable version, `1.x.x`.

:::

A well-written description can enhance the usefulness of a test by providing clear context and expected outcomes.
Anyone who sees your test for the first time may benefit from a rich description.

Expand Down
7 changes: 0 additions & 7 deletions docs/docs/api/02-steps.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@ import TabItem from '@theme/TabItem';

# Steps

:::caution

This website version refers to the unreleased version of `jest-allure2-reporter`, partially available as `2.0.0-beta.3` release.
Please use GitHub docs for the latest stable version, `1.x.x`.

:::

Steps are the building blocks of your tests.

Each test is composed of one or more steps, and each step can have its own [status](../config/02-statuses.mdx),
Expand Down
7 changes: 0 additions & 7 deletions docs/docs/api/03-attachments.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@ import TabItem from '@theme/TabItem';

# Attachments

:::caution

This website version refers to the unreleased version of `jest-allure2-reporter`, partially available as `2.0.0-beta.3` release.
Please use GitHub docs for the latest stable version, `1.x.x`.

:::

Attachments are a powerful feature of Allure reports that can help make your tests much more informative. You can attach text logs, screenshots, configuration details, CSV files, and much more to your tests. These attachments can help you diagnose and debug failing tests.

There are several ways to add attachments to a test:
Expand Down
7 changes: 0 additions & 7 deletions docs/docs/api/04-parameters.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,6 @@ description: Parametrize your tests and steps

# Parameters

:::caution

This website version refers to the unreleased version of `jest-allure2-reporter`, partially available as `2.0.0-beta.3` release.
Please use GitHub docs for the latest stable version, `1.x.x`.

:::

Utilize parameterized testing to avoid code duplication and reduce your maintenance costs:

```js
Expand Down
7 changes: 0 additions & 7 deletions docs/docs/api/05-people.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@ import TabItem from '@theme/TabItem';

# People

:::caution

This website version refers to the unreleased version of `jest-allure2-reporter`, partially available as `2.0.0-beta.3` release.
Please use GitHub docs for the latest stable version, `1.x.x`.

:::

In Allure reports, you can indicate who is the **owner** of any given test case.
This allows for better organization, responsibility allocation, and communication within your team.
Advanced solutions can leverage this information to notify the relevant people about test failures
Expand Down
7 changes: 0 additions & 7 deletions docs/docs/api/06-severity.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@ import TabItem from '@theme/TabItem';

# Severity

:::caution

This website version refers to the unreleased version of `jest-allure2-reporter`, partially available as `2.0.0-beta.3` release.
Please use GitHub docs for the latest stable version, `1.x.x`.

:::

In Allure reports, you can determine the **severity** of each test case.
This helps you to prioritize the test cases and to determine the impact of a failed test case.
The severity can be one of the following values: _blocker_, _critical_, _normal_, _minor_, _trivial_.
Expand Down
7 changes: 0 additions & 7 deletions docs/docs/api/07-links.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@ import TabItem from '@theme/TabItem';

# Links

:::caution

This website version refers to the unreleased version of `jest-allure2-reporter`, partially available as `2.0.0-beta.3` release.
Please use GitHub docs for the latest stable version, `1.x.x`.

:::

In Allure reports, you can add different types of links to your test cases for better context and traceability, e.g.:

* links to **issues** in your issue tracker (e.g. JIRA, GitHub, etc.);
Expand Down
7 changes: 0 additions & 7 deletions docs/docs/api/08-labels.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,6 @@ description: Tag your tests to provide additional context and detail.

# Labels

:::caution

This website version refers to the unreleased version of `jest-allure2-reporter`, partially available as `2.0.0-beta.3` release.
Please use GitHub docs for the latest stable version, `1.x.x`.

:::

Any, or most of the labels can be attached both to test suites and test cases. Practically, this means a cascade-like inheritance of labels from the test suite to the test case level.

Attach various labels to your tests such as custom tags (value), custom labels (key=value), JIRA, TMS, or any other custom labels to provide additional context and detail.
Expand Down
7 changes: 0 additions & 7 deletions docs/docs/config/01-grouping/01-by-suite.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@ import TabItem from '@theme/TabItem';

# By Suite

:::caution

This website version refers to the unreleased version of `jest-allure2-reporter`, partially available as `2.0.0-beta.3` release.
Please use GitHub docs for the latest stable version, `1.x.x`.

:::

This is perhaps the most common way to group test results, and it makes the most sense for projects using Jest.

![Grouping by suite](../../../img/screenshots/config-01-grouping-01.jpg)
Expand Down
7 changes: 0 additions & 7 deletions docs/docs/config/01-grouping/02-by-story.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@ import TabItem from '@theme/TabItem';

# By Story

:::caution

This website version refers to the unreleased version of `jest-allure2-reporter`, partially available as `2.0.0-beta.3` release.
Please use GitHub docs for the latest stable version, `1.x.x`.

:::


This grouping option is a concept that comes from the [Behavior-Driven Development](https://en.wikipedia.org/wiki/Behavior-driven_development) (BDD) methodology.
Unlike the [suite-based grouping](01-by-suite.mdx), which is based on the technical structure of your test suite, the story-based grouping
Expand Down
7 changes: 0 additions & 7 deletions docs/docs/config/01-grouping/03-by-package.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,6 @@ import TabItem from '@theme/TabItem';

# By Package

:::caution

This website version refers to the unreleased version of `jest-allure2-reporter`, partially available as `2.0.0-beta.3` release.
Please use GitHub docs for the latest stable version, `1.x.x`.

:::

![Grouping by package](../../../img/screenshots/config-01-grouping-08.jpg)

This grouping feature is the least helpful outside of Java world, where packages are used to organize the codebase.
Expand Down
7 changes: 0 additions & 7 deletions docs/docs/config/01-grouping/04-by-category.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@ import TabItem from '@theme/TabItem';

# By Category

:::caution

This website version refers to the unreleased version of `jest-allure2-reporter`, partially available as `2.0.0-beta.3` release.
Please use GitHub docs for the latest stable version, `1.x.x`.

:::

![Defect categories](../../../img/screenshots/config-03-errors-01.jpg)

One of the most important things when your builds start failing is to understand _what exactly is broken_.
Expand Down
7 changes: 0 additions & 7 deletions docs/docs/config/01-grouping/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,6 @@ import DocCardList from '@theme/DocCardList';

# Grouping

:::caution

This website version refers to the unreleased version of `jest-allure2-reporter`, partially available as `2.0.0-beta.3` release.
Please use GitHub docs for the latest stable version, `1.x.x`.

:::

**Grouping** is a feature that allows you to view test results from different perspectives and gain insights quickly.

The more thought you put into organizing your test results, the more value the members of your team will get from the reports,
Expand Down
17 changes: 5 additions & 12 deletions docs/docs/config/02-statuses.mdx
Original file line number Diff line number Diff line change
@@ -1,19 +1,10 @@
---
description: Have an informative overview of your test results.
verified: true
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Statuses

:::caution

This website version refers to the unreleased version of `jest-allure2-reporter`, partially available as `2.0.0-beta.3` release.
Please use GitHub docs for the latest stable version, `1.x.x`.

:::

Jest Allure 2 Reporter supports all the standard statuses defined by the Allure Framework.

It provides a clear indication whether your test cases have [`passed`], [`failed`], were [`broken`],
Expand Down Expand Up @@ -71,8 +62,10 @@ module.exports = {
reporters: [
// ...
['jest-allure2-reporter', {
// highlight-next-line
status: ({ value }) => value === 'broken' ? 'failed' : value,
testCase: {
// highlight-next-line
status: ({ value }) => value === 'broken' ? 'failed' : value,
},
}],
],
};
Expand Down
13 changes: 3 additions & 10 deletions docs/docs/config/04-environment.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@ import TabItem from '@theme/TabItem';

# Environment

:::caution

This website version refers to the unreleased version of `jest-allure2-reporter`, partially available as `2.0.0-beta.3` release.
Please use GitHub docs for the latest stable version, `1.x.x`.

:::

**Environment** is a feature that allows you to capture and display specific details related to the test execution environment, such as the operating system, browser version, device information, or any other global information that is relevant to the entire test run.

Such information can be especially insightful when you're troubleshooting test failures in a heterogeneous environment, e.g. when tests fail on CI but pass locally, or when you're trying to pinpoint the cause of a test failure on a specific platform or a version of some software.
Expand All @@ -39,9 +32,9 @@ module.exports = {
reporters: [
// ...
['jest-allure2-reporter', {
environment: ({ _, package }) => ({
'package.name': package.name,
'package.version': package.version,
environment: async ({ manifest }) => ({
'package.name': await manifest((p) => p.name),
'package.version': await manifest((p) => p.version),
'os.type': os.type(),

..._
Expand Down
7 changes: 0 additions & 7 deletions docs/docs/config/05-executor.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@ import TabItem from '@theme/TabItem';

# Executor

:::caution

This website version refers to the unreleased version of `jest-allure2-reporter`, partially available as `2.0.0-beta.3` release.
Please use GitHub docs for the latest stable version, `1.x.x`.

:::

**Executor** information is crucial as it allows you to identify the entity or system that executed the tests.
Typically, this would be a build agent on your CI/CD server, but, in a way, a developer's host machine is also an executor.

Expand Down
7 changes: 0 additions & 7 deletions docs/docs/config/06-history.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,6 @@ description: Monitor long-term trends in your test execution.

# History

:::caution

This website version refers to the unreleased version of `jest-allure2-reporter`, partially available as `2.0.0-beta.3` release.
Please use GitHub docs for the latest stable version, `1.x.x`.

:::

![History](../../img/screenshots/config-history-01.jpg)

One of notable features of Allure 2 is the ability to monitor _test retries_ and _long-term trends_ in your test execution.
Expand Down
7 changes: 0 additions & 7 deletions docs/docs/config/07-errors.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,6 @@ description: Distinguish between types of test failures.

# Error handling 🚧

:::caution

This website version refers to the unreleased version of `jest-allure2-reporter`, partially available as `2.0.0-beta.3` release.
Please use GitHub docs for the latest stable version, `1.x.x`.

:::

:::danger

This article is just a draft. It is not yet complete, and you should not read it meanwhile :)
Expand Down
13 changes: 3 additions & 10 deletions docs/docs/config/index.mdx
Original file line number Diff line number Diff line change
@@ -1,24 +1,17 @@
---
sidebar_position: 2
verified: true
---

import DocCardList from '@theme/DocCardList';

# Config

:::caution

This website version refers to the unreleased version of `jest-allure2-reporter`, partially available as `2.0.0-beta.3` release.
Please use GitHub docs for the latest stable version, `1.x.x`.

:::

Configure once and enjoy these features in all your tests.

This section discusses those features of `jest-allure2-reporter` that are configurable
globally, opposed to the [API section][API], which focuses on the more intrusive features
of the reporter, which are configurable on a per-test basis.

<DocCardList />
:::component{name="DocCardList"}
:::

[API]: ../api/index.mdx
Loading

0 comments on commit b4dd29b

Please sign in to comment.