question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Question] Add annotations to skipped tests

See original GitHub issue

A bit of background on https://github.com/microsoft/playwright/issues/9348#issuecomment-1293387867

tldr: I’d need to add annotations to skipped/fixme tests (test.skip(...) / test.fixme(...)) but cannot figure out how. I’m using a fixture that basically (automatically) adds:

...
test.info().annotations.push({ type: "key", description: key });
...

…but fixtures are not run for skipped tests? (right?). How would I go about this? at what point of the test lifecycle could I inject this info so that it is available to a downstream reporter?

Why do I need this? because otherwise I lack this key annotation when importing results into a (popular) test management framework, producing either errors or suboptimal reporting.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
bitcodercommented, Oct 28, 2022

Somehow related, some time ago I’ve made this junit-processor that can be useful for some situations (e.g., removing tests marked as skipped for example); it’s a post-processing utility.

0reactions
aslushnikovcommented, Nov 8, 2022

Looks like there’s a good discussion and no action point for the playwright team; closing!

Please feel free to re-file if you think we still can be helpful!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Adding own annotation to dynamic skip test in TestNG
You can check your own annotation in a setup method ( @BeforeMethod ) and throw a SkipException to skip this test.
Read more >
7. Incomplete and Skipped Tests — PHPUnit 9.5 Manual
A test can have multiple @requires annotations, in which case all requirements need to be met for the test to run.
Read more >
Skip Exception Test in TestNG - Selenium Easy
We can use Skip exception in testng to skip a test. ... In TestNG, @Test(enabled=false) annotation is used to skip a test case...
Read more >
JUnit Ignore Test Cases: JUnit 4 @Ignore Vs JUnit 5 @Disabled
The JUnit 4 @Ignore annotation could be applied for a test method, to skip its execution. In this case, you need to use...
Read more >
TestNG Test Case Priority And Sequence - Tools QA
Let's see the following code meant to skip the test CloseAccount. import org.openqa.selenium.WebDriver; import org.testng.annotations.Test; import org.openqa ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found