testomatio / app

Testomat.io is a simplified test management system for your automated tests. Issues, project board & documentation. app.testomat.io
https://app.testomat.io
26 stars 2 forks source link

Support Playwright test.step in reports #1028

Open alexander-goncharuk opened 2 months ago

alexander-goncharuk commented 2 months ago

Describe the solution you'd like When uploading a Playwright test run repot to testomat.io, we would like to be able to:

  1. See all the tests included in the run
  2. Expand each test to see the steps (test.step in Playwright API) of each test

It's similar to what you get in Playwright HTML reporter or when running in --ui mode.

When I go to Test => Automated in my testomat.io dashboard or explore test run report in a List view, I get close to what we need, but the missing part is simple sub-list of steps.

Describe alternatives you've considered Step in Testomat functions. But ideally would prefer to not adjust tests code for concrete reporter needs.

DavertMik commented 2 months ago

@AZANIR please do the following

We can also use Playwright steps to write description to tests

AZANIR commented 2 months ago

Step Format Proposal The proposed format will include the following elements:

title: The name of the step. body: The function that performs the step, returning a Promise. options (optional): Additional options such as box. We will define the structure to support nested steps by allowing the body to call other steps.

// types.d.ts

type StepOptions = {
  box?: boolean;
};

type StepFunction = () => Promise<any>;

interface Step {
  title: string;
  body: StepFunction;
  options?: StepOptions;
}

type Steps = Step[];

Step Declaration: Use test.step('Title', async () => { ... }) to declare steps. Nested Steps: Nest steps by calling test.step within another test.step. Step Formatting: Titles and body functions are used to describe and implement steps, which are then shown in the test reports. Options: Customize step behavior using options like box.

poliarush commented 1 month ago

related to https://github.com/testomatio/app/issues/1036#issuecomment-2222839603

image