Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: Reflect the result of a test.step with the corresponding step in azure #14

Open
joerg1985 opened this issue Feb 8, 2023 · 6 comments

Comments

@joerg1985
Copy link
Contributor

joerg1985 commented Feb 8, 2023

As mentioned in #4 there are steps inside the azure testcases. It would be greate to connect the playwright test.step with the azure steps. To link these the same syntax like linking the testcases could be used, e.g. test.step("[2] login to the system") -> is linked to the second step.

This is a minimal example of a playwright test using steps:

test.describe('google div', () => {
  test('[31] failing is enabled', async ({ page }) => {
    await test.step("[1] Just a step", async () => {
      await expect(true).toBe(true);
    });
    
    await test.step("[2] Just another step", async () => {
      await expect(page.locator("div")).toBeEnabled();
    });
  })
})

The result of the steps are reflected correctly to the HTML report, so it should be possible to get the status of a step.
This might be done using the TestStep.error field, this should be investigated.

@alexneo2003 alexneo2003 self-assigned this Feb 8, 2023
@joerg1985
Copy link
Contributor Author

The behaviour of https://playwright.dev/docs/test-assertions#soft-assertions should also be invstigated.

@alexneo2003
Copy link
Owner

at now i'm waiting for answer on my question which was asked at microsoft/azure-devops-node-api#545

@amitasil
Copy link

amitasil commented Mar 3, 2023

Eagerly waiting for this update!

@alexneo2003
Copy link
Owner

Eagerly waiting for this update!

I'm sorry, but nothing depends on me now. I am waiting for a response from the developers microsoft/azure-devops-node-api#545 about the possibility of publishing similar results. and most likely such a possibility does not exist.

@joerg1985
Copy link
Contributor Author

@alexneo2003 i had a look at the API docs and the actionResults are used to reflect test steps.
If you create a manual run with step results and look at it with the flag detailsToInclude=iterations set you can see the data.
.../_apis/test/Runs/{run.id}/Results/{result.id}?detailsToInclude=iterations

Based on the API docs i thinks you could set the actionResults to an array of TestActionResultModel to push the results of test steps.

@alexneo2003
Copy link
Owner

it's a good thing but when i'm add test results to test run i using this method. as you seen it has results: TestInterfaces.TestCaseResult[] argument wich doesn't contain any implementation of actionResults about you say.
i'm see that ADO API has this actionResults as parameter but azure-devops-node-api doesn't has any functionality to work with it, or i doesn't seen it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants